The function is continuous and differentiable, so its maximum value over a region will be critical points or at the boundary.
To find critical points, we find $f_x$ and $f_y$ and set them both equal to $0$:
$$f_x = 2x+y = 0$$
$$f_y = 2y+x = 0$$
$$2(-2x)+x = 0$$
$$x = 0, y = 0$$
So the origin is a critical point. Using the second derivative test in two dimensions:
$$f_{xx} = 2$$
$$f_{xy} = f_{yx} = 1$$
$$f_{yy} = 2$$
Because $f_{xx}*f_{yy} - f_{xy}^2 = 3 > 0$ and $f_{xx}*f_{yy} > 0$ (so its a min, not a max), $(0,0)$ is a minimum, so it cannot possible be the greatest value.
Now we have to test the boundary, as the greatest value has to be there. Our new constraint is $g(x,y) = x^2+y^2 = 1$, so $\nabla g = <2x, 2y>$
Using Lagrange multipliers, we know $\nabla f = \lambda \nabla g$:
$$2x+y = \lambda 2x$$
$$2y +x = \lambda 2y$$
$${2x+y \over 2x} = {2y+x \over 2y}$$
$$4xy+2y^2 = 4xy + 2x^2$$
$$x^2 = y^2$$
$$x = \pm y$$
Using our constraint, we have $x^2 +x^2 = 1$, so $x = \pm 1/ \sqrt{2}$. So, our possible maximum values are $(1/ \sqrt{2}, 1/ \sqrt{2}), (-1/ \sqrt{2}, 1/ \sqrt{2}), (1/ \sqrt{2}, -1/ \sqrt{2}), (-1/ \sqrt{2}, -1/ \sqrt{2})$. After checking values of $f$ at each of these points, we can conclude that the greatest $f$ value, $3/2$, occurs at $(1/ \sqrt{2}, 1/ \sqrt{2})$ and $(-1/ \sqrt{2}, -1/ \sqrt{2})$.
Note that $2x +3y = 6$ describes a line. Choose any other point on that line, say $(0, 2)$, and plug it into your original function. Is the value larger or smaller than when you plug your solution point into the function?
Best Answer
first of all, you need to find all critical points that lies inside the disk $x^{2}+y^{2}\leq 4$, all you need to is set $f_{x}=f_{y}=0$ and in the worst case scenario you might obtain a system of two equations but here its clear that $$ f_{x}=0 \implies 2x=0\qquad\text{and}\qquad f_{y}=0\implies 8y=0 $$ Thus, the only critical point we have is the point $(0,0)$. Next, we proceed with Lagrange Multipliers and we treat the constraint as an equality instead of the inequality.(We only need to deal with the inequality when finding the critical points). Applying lagrange multipliers gives us : $$ f_{x}=\lambda g_{x}\qquad\text{and}\qquad f_{y}=\lambda g_{y} $$ We also have the fact that $x^{2}+y^{2}=4$. When the above equations are evaluated we get : $$ 2x=2\lambda x \qquad\text{and}\qquad 8y=2\lambda y $$ Which means : $$ 2x(1-\lambda) = 0 \qquad\text{and}\qquad 2y(4-\lambda)=0 $$ Which means for the first one you have either $x=0$ or $\lambda = 1$ and for the second one you have either $y=0$ or $\lambda = 4$. For the first one if we substitute $x=0$ in the equality, we will get $0+y^{2}=4 \implies y=\pm 2$. Therefore, we aquired two points $(0,-2)$ and $(0,+2)$. Moreover, if we substitute $\lambda_{1}=1$ in the second equation(not the first), we will get $$ 2y(4-1)=0\implies 6y=0\implies y=0 $$ and by substituting $y=0$ in the equality, we will get $x=\pm 2$ which means we obtain two new points $(-2,0)$ and $(2,0)$. Hence, we have obtained in total $5$ points that are : $$ (0,0)\qquad(-2,0)\qquad(2,0)\qquad(0,-2)\qquad(0,2) $$ All you have to do now is substitute these points in $f$ and not $g$. Now you may be asking well what about $\lambda_{2}=4$ and $y=0$ why didn't we use them? Well if you do use them you will obtain the same critical points we found for $\lambda_{1}=1$ and $x=0$