Minimize with Lagrange multiplier

105 Views Asked by At

$$\begin{array}{ll} \text{minimize} & f(x,y,z) := x+2y+z\\ \text{subject to} & g(x,y,z) := x^2+y^2+z^2-1=0\end{array}$$

I get the following $\nabla f=(1,2,1)$ and $\nabla g=(2x,2y,2z)$. Now, I know that $\nabla f=\lambda \nabla g$, but I seem to get the wrong answer, since my answer is not consistent with Wolfram Alpha. Would appreciate a walkthrough.

3

There are 3 best solutions below

0
On BEST ANSWER

Let the auxiliary function $F=f+\lambda g$, where $\lambda$ is the Lagrange's multiplier.

Then $F_x =1+2\lambda x=0$, which gives $\lambda=-\frac{1}{2x}$ ...(1)

$F_y =2+2\lambda y=0$, which gives $\lambda=-\frac{1}{y}$ ...(2)

$F_z =1+2\lambda z=0$, which gives $\lambda=-\frac{1}{2z}$ ...(3)

From (1), (2) and (3)

x=z and y=2z

Putting these values of x and y in g(x,y,z)

$z^2 + (2z)^2+ z^2 -1=0$

$ 6z^2=1$

$z=\pm \frac{1}{\sqrt6}$

Therefore stationary points are $(\frac{1}{\sqrt6},\frac{2}{\sqrt6},\frac{1}{\sqrt6})$ and $(-\frac{1}{\sqrt6},-\frac{2}{\sqrt6},-\frac{1}{\sqrt6})$

f$(\frac{1}{\sqrt6},\frac{2}{\sqrt6},\frac{1}{\sqrt6})=\sqrt6$ and f$(-\frac{1}{\sqrt6},-\frac{2}{\sqrt6},-\frac{1}{\sqrt6})= -\sqrt6$

Therefore, minimum value of f(x,y,z) is $-\sqrt6$.

0
On

1) Note that the constraint can also be viewed as $g(x,y,z) = x^2 + y^2 + z^2 = 1$.

1) Find the partial derivatives. $f_{x} = 1, f_{y} = 2, f_{z} = 1, g_{x} = 2x, g_{y} = 2y, g_{z} = 2z$

2) Find the multipliers

$1 = \lambda 2x, 2 = \lambda 2y, 1 = \lambda 2z$, so $\lambda = \frac{1}{2x}, \frac{1}{y}, \frac{1}{2z}$

From this, we can say that $x=z=\frac{1}{2}y$, so plug this into the constraint.

$(\frac{1}{2}y)^2 + (y)^2 + (\frac{1}{2}y)^2 = 1$. Now solve for $y$. Once you have $y$, plug this back in to obtain $x$ and $z$. Then you can find the extreme points. Hope this helps (I don't think I made any errors).

0
On

You get $x=z,y=2z$ thus $$6z^2=1$$

$x=z=\pm \frac {1}{\sqrt 6}$ and $y=\pm \frac {2}{\sqrt 6}$