<s>[INST] Can't find minimum using Lagrange multipliers I want to find the minimum of the function $f(x,y) = x + y^2$ with the constraint $2x^2 +y^2 = 1$.
Here are my partial derivatives:
$$f_x = 1$$
$$f_y = 2y$$
$$g_x = 4x$$
$$g_y = 2y$$
I have the following system of equations:
\begin{align*}
1 = \lambda4x\\
2y = 2y\lambda\\
2x^2 + y^2 = 1
\end{align*}
and I found that $$\lambda = 1,\ x = 1/4,\ \text{and }y = +-(7/8)^{1/2}.$$ And Wolfram Alpha shows that the above is the maximum value, and that the minimum value is $$ x= -1/(2)^{1/2}\text{ and }y = 0.$$
How can I find this value? I missed something.
 [/INST] There's no need to use a Lagrange multiplier. The ellipse
$$\{ (x,y) \in \mathbb{R}^2 \mid 2 x^2 + y^2 = 1 \}$$
is parametrized as follows
$$x (\theta) = \frac{\sqrt 2}{2} \, \cos (\theta) \qquad \qquad \qquad y (\theta) = \sin (\theta)$$
Hence,
$$g (\theta) := f (x (\theta), y (\theta)) = \frac{\sqrt 2}{2} \, \cos (\theta) + \sin^2 (\theta)$$
Differentiating,
$$g' (\theta) = -\frac{\sqrt 2}{2} \, \sin (\theta) + 2 \sin (\theta) \cos (\theta) = \left( 2 \cos (\theta) - \frac{\sqrt 2}{2} \right) \sin (\theta)$$
which vanishes when $\sin (\theta) = 0$ or $\cos (\theta) = \frac{\sqrt 2}{4}$. If $\sin (\theta) = 0$, then
$$x = \pm \frac{\sqrt 2}{2} \qquad \qquad \qquad y = 0 \qquad \qquad \qquad f = \pm \frac{\sqrt 2}{2}$$
If $\cos (\theta) = \frac{\sqrt 2}{4}$, then
$$x = \frac{1}{4} \qquad \qquad \qquad y = \pm \sqrt{\frac{7}{8}} \qquad \qquad \qquad f = \frac{9}{8}$$
Thus, the minimum is $- \frac{\sqrt 2}{2}$, which is attained at $(x,y) = \left(- \frac{\sqrt 2}{2}, 0\right)$.
</s>