Maximize linear function over disk of radius $2$

305 Views Asked by At

Maximize $f(x, y) = x + 2y$ with constraint $x^2 + y^2 \le 4$.

$f(x, y)$ has no CP's so thats something gone.

I considered the boundary/edge of $g(x, y) = x^2 + y^2$. And I got the point $(0, 2), (2, 0)$, which gave $f(0, 2) = f(2, 0) = 4$. However, the point $(2/\sqrt(5), 4/\sqrt(5))$ gives a larger max.

How do I approach this to get this point?

5

There are 5 best solutions below

0
On

$f(x,y)=x+2y$ is extremal on the circle $x^2+y^2=4$ when the gradient of $f$ is proportional to the vector $(x,y)$, that is: $(1,2)=\lambda(x,y)$ for some $\lambda$, from which it follows that $\lambda=\sqrt{5}/2$, so $f$ is maximized at the point $(2,4)/\sqrt{5}$.

Another way to look at it is to use linearity: by the C-S inequality:

$$|x+2y|=|(1,2)\cdot (x,y)|\leq\sqrt{5}(x^2+y^2)^{1/2}\quad\forall (x,y)\in\mathbb{R}^2$$ with equality if and only if $(1,2)$ is proportional to $(x,y)$. Hence $$-2\sqrt{5}\leq x+2y \leq 2\sqrt{5}\quad\forall x^2+y^2=4$$ with equality if and only if $(x,y)=\pm(2,4)/\sqrt{5}$.

0
On

So you have a problem to compute the critical points of $f\mid_{S}$ where $S=g^{-1}(4)$ with $g(x,y)=x^2+y^2$.

You need to solve the equation $\nabla f(x,y)=\lambda \nabla g(x,y)$ for some $\lambda\in\mathbb R$. You get $$ \nabla f(x,y)=\lambda\nabla g(x,y)\Leftrightarrow \begin{pmatrix}1\\2\end{pmatrix}=\lambda\begin{pmatrix}2x\\2y\end{pmatrix}. $$ You get $x=\frac1{2\lambda}$ and $y=\frac{1}{\lambda}$. Since $(x,y)\in S$ we conclude $$ 4=x^2+y^2=\frac1{4\lambda^2}+\frac1{\lambda^2}\Rightarrow 4\lambda^2=\frac54\Rightarrow \lambda^2=\frac5{16}\Rightarrow \lambda=\pm\frac{\sqrt{5}}4. $$ Hence $f\mid_S$ has the critical points $$ (x,y)\in\left\{\left(\frac{2}{\sqrt{5}},\frac{4}{\sqrt{5}}\right),\left(-\frac{2}{\sqrt{5}},-\frac{4}{\sqrt{5}}\right)\right\} $$ Since $S$ is compact, one of theses critical points is the global minimum while the other is the global maximum. We compute $$ f\left(\frac{2}{\sqrt{5}},\frac{4}{\sqrt{5}}\right)=\frac{10}{\sqrt{5}}=2\sqrt{5} $$ and $$ f\left(-\frac{2}{\sqrt{5}},-\frac{4}{\sqrt{5}}\right)=-\frac{10}{\sqrt{5}}=-2\sqrt{5}. $$ These are the maximal and minimal values of $f$ on $x^2+y^2\leq 4$.

0
On

Let $g(x,y)=x^2 + y^2 -4$. Your main error is that you solved $\nabla g(x,y) =0$ to find the extremal points of $f$, but you have to solve the equation $$\nabla L(x,y) =0,$$ where $L=f+\lambda g$, where $\lambda \in \mathbf R$ is a constant. Solving $\nabla L(x,y) =0$ shows then that $f$ is maximal at $(x,y) = \frac{1}{\sqrt{5} }(2,4)$. (The Lagrange method is applicable since $f$ is continuous and $N=\{(x,y) \in \mathbf R^2 \mid x^2 +y^2 \leq 4 \}$ is compact.)

0
On

$$\begin{array}{ll} \text{maximize} & x + 2y\\ \text{subject to} & x^2 + y^2 \leq 4\end{array}$$

Since the objective function is linear and nonzero, its gradient never vanishes. Thus, the maximum is attained at the boundary of the feasible region, i.e., on the circle of radius $2$ centered at the origin

$$\begin{array}{ll} \text{maximize} & x + 2y\\ \text{subject to} & x^2 + y^2 = 4\end{array}$$

Using polar coordinates instead, the objective function is

$$2 \cos (\theta) + 4 \sin (\theta) = 2 \sqrt{5} \left( \dfrac{2}{2 \sqrt{5}} \, \cos (\theta) + \dfrac{4}{2 \sqrt{5}} \, \sin (\theta) \right) = 2 \sqrt{5} \, \cos \left( \theta - \arctan (2) \right)$$

Thus, the maximum is $\color{blue}{2 \sqrt{5}}$, which is attained at $\theta = \arctan (2)$, i.e., at

$$x = 2\,\cos \left( \arctan (2) \right) = \dfrac{4}{2 \sqrt{5}} = \color{blue}{\dfrac{2}{\sqrt{5}}}$$

$$y = 2\,\sin \left( \arctan (2) \right) = \dfrac{8}{2 \sqrt{5}} = \color{blue}{\dfrac{4}{\sqrt{5}}}$$

0
On

Max $z=x+2y$ subject to $x^2+y^2\le4$.

The contour lines: $y=-\frac{1}{2}x+\frac{1}{2}z$, the largest value of $z$ occurs when $y$ is tangent to the constraint circle $x^2+y^2=4$ or $y=\sqrt{4-x^2}$.

Thus the slope of tangent line must be equal to the slope of $y=-\frac{1}{2}x+\frac12z:$ $$y'=\frac{-2x}{2\sqrt{4-x^2}}=-\frac12 \Rightarrow x=\frac{2}{\sqrt{5}} \Rightarrow y=\frac{4}{\sqrt{5}}.$$

Graphical illustration: enter image description here