# Optimize f(x,y,z) = 2x + 2y + 2z

Optimize f(x,y,z) = 2x + 2y + 2z subject to constraints g(x,y,z) = x2 - y2 - z2 - 1 = 0 & h(x,y,z) = x2 + y2 + z2 - 17 = 0.

I found Lx = 2 + 2$$\lambda$$x - 2$$\mu$$x = 0, Ly = 2 + 2$$\lambda$$y - 2$$\mu$$y = 0 & Lz = 2 + 2$$\lambda$$z - 2$$\mu$$z = 0
I'm just asking how to use Lx, Ly & Lz to eliminate $$\lambda$$ & $$\mu$$ to get the critical points.

HallsofIvy
Homework Helper

Your "Lx" is incorrect. Because x2 is positive in both f and g, it should be $2+ 2\lambda x+ 2\mu x= 0$

Those reduce very easily to $(\mu+ \lambda)x= -1$, $(\mu- \lambda)y= -1$ and $(\mu- \lambda)z= -1$. Also, just adding the two constraints eliminates both y and z giving $2x^2- 18= 0$ so $x= \pm 3$. Divide the second equation by the third to get y/z= 1 so y= z. Put that into $x^2- y^2- z^2- 1= 0$ to get $9- 2z^2= 1$ so $2z^2= 8$ and $z= \pm 2$. The function is optimized at (3, 2, 2), (-3, 2, 2), (3, -2, -2), and (-3, -2, -2).

Last edited by a moderator:

But I thought L(x,y,z,$$\lambda$$,$$\mu$$) = 2x + 2y + 2z - $$\lambda$$(x2 - y2 - z2 - 1) - $$\mu$$(x2 + y2 + z2 - 17) making x2 both negative making Lx = 2 - 2$$\lambda$$x - 2$$\mu$$x. But I don't think it matters in the end result.

Last edited:

What if I wanted to find $$\lambda$$ & $$\mu$$?

HallsofIvy
But I thought L(x,y,z,$$\lambda$$,$$\mu$$) = 2x + 2y + 2z - $$\lambda$$(x2 - y2 - z2 - 1) - $$\mu$$(x2 + y2 + z2 - 17) making x2 both negative making Lx = 2 - 2$$\lambda$$x - 2$$\mu$$x. But I don't think it matters in the end result.
It just changes the values of $\lambda$ and $\mu$.
What if I wanted to find $$\lambda$$ & $$\mu$$?
Why would you? They are never part of the original problem. But if you do, once you have found x, y, and z, you can substitute those back into the equations to find $\lambda$ and $\mu$.