Using the Lagrange method to find max/min of $f(x,y) = \frac{x^3}3 + y$

63 Views Asked by At

Problem

Use the Lagrange method to find max/min of $f(x,y) = \frac{x^3}3 + y$

Subject to the constraint $x^2 + y^2 = 1$

My attempt

The constraint gives us $g(x,y) = x^2 + y^2 - 1$

$\displaystyle\mathcal L(x,y,\lambda) = f(x,y) + \lambda \cdot g(x,y) = \frac{x^3}3 + y + \lambda(x^2 + y^2 - 1)$

Now, as I understand it, we can calculate the gradient.

$\displaystyle \nabla_{x,y,\lambda}\mathcal L(x,y,\lambda) = \left(\frac{\partial\mathcal L}{\partial x},\frac{\partial\mathcal L}{\partial y},\frac{\partial\mathcal L}{\partial \lambda} \right) = \left( x^2 + 2\lambda x, \ 1+2\lambda y, \ x^2 + y^2 - 1 \right)$

Then, equating the gradient to zero, we get

$\displaystyle \nabla_{x,y,\lambda}\mathcal L(x,y,\lambda) = 0 \Leftrightarrow \begin{cases} x^2 + 2\lambda x & = & 0 \\ 1+2\lambda y & = & 0 \\ x^2 + y^2 - 1 & = & 0 \end{cases}$

Now, when I try to find representations of $x, y$ in terms of $\lambda$, I'm unsure, since $x^2 + 2\lambda y = 0$ gives two solutions for x, namely $x \in \{0, -2\lambda\}$.

In any case, how can I ride this home (assuming I've done it right so far)?

2

There are 2 best solutions below

0
On

From what you obtained $$\displaystyle \nabla_{x,y,\lambda}\mathcal L(x,y,\lambda) = 0 \Leftrightarrow \begin{cases} x^2 + 2\lambda x & = & 0 \\ 1+2\lambda y & = & 0 \\ x^2 + y^2 - 1 & = & 0 \end{cases}$$ we have, from the first equation, either $x=0$ or $x=-2\lambda$. From the second $y=-\frac{1}{2 \lambda }$.

So, replacing in the constraint, the first case $(x=0)$ gives $y^2=1$ so $y=\pm 1$ which make $f=\pm 1$.

In the second case, using the constraint $$4\lambda^2+\frac 1 {4\lambda^2}=1$$ there is no real solution.

So the maximum corresponds to $(x=0,y=1,f=1)$ and the minimum to $(x=0,y=-1,f=-1)$

0
On

So after the procedure at end of the day formula to be remembered is:

$$ \dfrac{\partial f/ \partial x } {\partial f/ \partial y } =\dfrac{\partial g/ \partial x } {\partial g/ \partial y } = -\lambda. \tag{1} $$

EDIT1:

Let us take it further to the last logical step. After all we have to finally express maximum/minimum f in terms of g... Just as, in a simple example, for maximum area A with given perimeter p of a rectangle we have the last logical step as:

$$ A = (p/4)^2 $$

In the above example

$$ x = 1/y \tag{2} $$

$$ x^3/3 + 1/x = f \tag{3} $$

$$ x^2 + 1/x^2 - 1 = g \tag{4} $$

Let $$ G = (1+g)/2 $$

$$ x^2 - 2 G + 1/x^2 =0 \tag{5} $$

$$ x_{opt}= \sqrt{G+ \sqrt{ G^2 -1}} \tag {6} $$

$$ f= x_{opt}^3 /3 + 1/ x_{opt} \tag {7}$$

which is the extremized function f of g. Take another sign for the other extreme.