[Math] Finding Max and Min values using Lagrange Multipliers

lagrange multipliermaxima-minimamultivariable-calculus

So I am given the function $x^2 + y^2$ and the constraint $x^2 -2x +y^2 -4y=0$. Must find max and min values (answers are $f(0,0)$ is a min and $f(2,4)$ is a max.) I use $\nabla f = \lambda \nabla g$. and get $x= \lambda(x-1)$ and $y=\lambda(y-2)$. Not sure if I messed up there or what, but I haven't been able to get to the answers once I plug $x$ and $y$ into the constraint. Any help at all is appreciated.

Best Answer

The system that you should get is$$\left\{\begin{array}{l}x=\lambda(x-1)\\y=\lambda(y-2)\\x^2-2x+y^2-4y=0.\end{array}\right.$$From the first equation you get that $x=\frac\lambda{\lambda-1}$ and from the second equation you get that $y=\frac{2\lambda}{\lambda-1}$. Now, replace these values of $x$ and $y$ in the third equation in order to get $\lambda$: