# One constrained optimization problem

Help me to find general solution of the following optimization problem: minimize $F(x,y)=(x^2-x_0)^2+y^2$ subject to $y^2+x^2=Q$ where $x, y \in R$.

-
The general technique uses Lagrange multiplies. Here, you could also parametrize the circle $x^2+y^2=Q$. –  Dirk Nov 7 '11 at 20:54
May be you have miss-typed the question, should it be $(x-x_0)^2+y^2$? Else (in the current form), your objective function becomes $(Q-y^2-x_0)^2+y^2$ and so... –  Tapu Nov 7 '11 at 22:02
This is the right-typed question. –  Max Nov 8 '11 at 3:38

Edit: Note that the problem reduces to minimizing $(a-x_0)^2+b$ subject to $a+b=Q$ which in turn reduces to minimizing $(Q-b-x_0)^2+b$ i.e., of $x(x-p)$ subject to $x\in[0,Q]$. The point of (global) minima is given by $$x=\left\{\begin{array}{cc} 0,&\text{ if }p\le0\\\frac{p}{2},&\text{ if }0\le p\le2Q\\Q,&\text{ if }p>2Q\end{array}\right.$$

May be you have mistyped the question, should it be $(x-x_0)^2+y^2$?

Else (in the current form), the answer is quite easy (unless I missed something). Your objective function (OF) becomes $$(Q-y^2-x_0)^2+y^2$$ So writing $y^2=p$ and assuming $Q-x_0=a\ge\dfrac{1}{2}$, the OF becomes

$$(p-a)^2+p$$ $$=\left[p-(a-\dfrac{1}{2})\right]^2+a^2-(a-\dfrac{1}{2})^2$$ So the minimum value is $\quad a^2-(a-\dfrac{1}{2})^2=a-\dfrac{1}{4}$

-
So... In substitution above how we would take into account that $Q-y^2>=0$? –  Max Nov 8 '11 at 3:46
Good question! Please note that I have assumed $a=Q-x_0\ge\frac{1}{2}$, to confirm that $p=y^2$ can take the value $a-\frac{1}{2}$. But it looks for my answer to be a valid answer, an additional assumption that $x_0\ge-\frac{1}{2}$ is also necessary. Please let other users to try for a better solution (without these assumption). So, please don't accept this answer. –  Tapu Nov 8 '11 at 4:05
@Max, does my answer somehow fits your need? Else, I will try to see using different method. I believe the answer should depend on the value of $Q$ and $x_0$ (like one I assumed). Please feel free to ask. –  Tapu Nov 9 '11 at 19:48
Yep, that's right. It would be nice if you consider all cases. –  Max Nov 10 '11 at 19:16
@Max, I have edited my answer to fix everything. –  Tapu Nov 10 '11 at 22:45