# Did I solve this Lagrange multiplier correctly? (Minimizing $f(x,y)=x^2+y^2$ with constraint $x+2y-5=0$ and $x>0$ and $y>0$.)

Okay, so we're given this equation $$f(x,y)=x^2+y^2$$ and the constraint is $$x+2y-5=0$$, and that $$x>0$$ and $$y>0$$,we have to find the minimum.

My answer is $$(1,2)$$, and my work is shown below.

Can anyone just check if I'm doing this correctly?

• why dy/dx equals=-1/2,shouldn't it be dx/dy=1/2? also do you mean my final answer isn't correct? @ian – tehcoder Aug 14 at 11:26
• It's easy to check the answer...writing $x=5-2y$ you can substitute for $x$ in $f(x,y)$ to get a function of one variable, which can then be minimized directly. – lulu Aug 14 at 11:27
• My apologies, I misread your handwriting. I thought you wrote $\frac{\partial x}{\partial y}=\frac{\lambda}{2\lambda}$ but you wrote $\frac{2x}{2y}=\frac{\lambda}{2\lambda}$, which is correct. I've removed my other comments. (One of many reasons to learn to use MathJax!) – Ian Aug 14 at 11:36
• Small editorial points : $\frac{\partial f}{\partial x}$ should be $\frac{\partial G}{\partial x}$. Same for the others derivatives. – Sesame Aug 14 at 11:56
• @Ian its okay,but like my final answer is correct right? that the point would be (1,2) – tehcoder Aug 14 at 19:00