This was a question on my test that I got two points taken off for because I wrote my answer as a minimum when the question asks for a maximum. The thing is that I'm pretty confident the maximum DNE, but I already asked my teacher about it once, so I just would like someone else to prove me right or wrong before I bother her again.
Question: Assume $x>0, y>0$. Use Lagrange multipliers to maximize $f(x,y) = \sqrt{x^2+y^2}$ subject to the constraint $2x+4y=15$.
My solution: First I set $g(x,y) = 2x+4y-15=0$ and found the gradient of both functions $$f_x(x,y)=\frac{x}{\sqrt{x^2+y^2}}, g_x(x,y)=2$$ $$f_y(x,y)=\frac{y}{\sqrt{x^2+y^2}},g_y(x,y)=4$$ I then used Lagrange multipliers to find $x$ and $y$ where $f_x(x,y)=\lambda g_x(x,y)$ and $f_y(x,y)=\lambda g_y(x,y)$ $$\frac{x}{\sqrt{x^2+y^2}}=\lambda 2$$ $$\lambda=\frac{x}{2\sqrt{x^2+y^2}}$$ $$\frac{y}{\sqrt{x^2+y^2}}=\lambda 4$$ $$\frac{y}{\sqrt{x^2+y^2}}=\frac{4x}{2\sqrt{x^2+y^2}}$$ $$y=2x$$ Putting that into the constraint $2x+4y=15$, you get $y+4y=15$, so $y=3$ and $x=\frac{3}{2}$. Therefore $f(\frac{3}{2},3)=\frac{\sqrt{45}}{2} \approx 3.35$. That's the answer my professor gave us as a maximum but I'm pretty sure that's the minimum. If you pick any other $x$ and $y$ that fit the constraint and plug it into $f(x,y)$, you get a larger number. For example, if $x=1$ then $y=\frac{13}{4}$. Plugging those into $f(x,y)$, you get $f(1,\frac{13}{4}) \approx 3.40$ which is larger than the "maximum". I also used a 3d graphing utility to find the intersect of $f(x,y)$ and $g(x,y)$, which comes out at a positive parabola. I also found the exact problem as an exercise in the textbook except it asks for the minimum instead. I know this is a bit of an overreaction considering it's only worth 2 points, but I just need someone to tell me I'm not crazy lol.
well.....................................The minimum occurs at the red dot. The maximum occurs along the $x$ axis, where the purple circle meets the red line, at $x = \frac{15}{2}$ and $y=0.$ If the question lacked the inequalities $x \geq 0, y \geq 0$ there would be no maximum $$ $$