# a basic problem about lagrange multipliers

Find the max and min values of the function $f(x,y)=x^2+y^2$ under the restriction $g(x,y)=\frac{x^2}{2}+y^2-1=0$

Note that we can use Lagrange Multipliers Theorem , since $grad(g(p))\ne 0$ $\forall p$ in the ellipse. Then we put the system of equations $$\left( {2x,2y} \right) = \nabla f\left( {x,y} \right) = \lambda \nabla g\left( {x,y} \right) = \left( {\lambda x,2\lambda y} \right)$$

Then if $x,y \ne 0$ I have two values for $\lambda =1,2$ But I can't find $x,y$. Maybe I'm doing something wrong. Please help me.

-
You can also substitute $y^2 = - \frac{x^2}{2} + 1$, and find the max and min values of $\frac{x^2}{2} + 1$ on the interval $-\sqrt{2} \leq x \leq \sqrt{2}$. $\frac{x^2}{2} + 1$ is a parabola so we don't need calculus. $x = 0$ is a minimizer (min value is $1$) and $x = \pm \sqrt{2}$ are maximizers (max value is $2$). –  littleO Jul 9 '13 at 7:52

You want to solve the system $$\frac{x^2}{2}+y^2-1=0\\ 2x=\lambda x\\ 2y=2\lambda y$$ for $(x,y,\lambda)$. Clearly any triple with both $x$ and $y$ non-zero is not a solution because it would force $\lambda$ to be equal to both $1$ and $2$. Similarly, any triples with both $x$ and $y$ equal to zero are not solutions because such triples cannot satisfy the first equation.
If $x=0$ and $y\neq 0$, your system of equations reduces to $$y^2=1,\quad 2y=2\lambda y,$$ with solutions $(0,\pm1,1)$. These two points correspond to values of your target function $x^2+y^2$ of $1$.
If $y=0$ and $x\neq 0$, the system of equations simplifies to $$x^2=2,\quad 2x=\lambda x,$$ with solutions $(\pm\sqrt{2},0,1)$; the value of the target function in this case is $2$.
The maximum of the function $(x,y)\mapsto x^2+y^2$ under the constraint $x^2/2+y^2=1$ is thus equal to $2$, and the minimum is equal to $1$.