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

  • Context: Undergrad 
  • Thread starter Thread starter squenshl
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
4 replies · 2K views
squenshl
Messages
468
Reaction score
4
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[tex]\lambda[/tex]x - 2[tex]\mu[/tex]x = 0, Ly = 2 + 2[tex]\lambda[/tex]y - 2[tex]\mu[/tex]y = 0 & Lz = 2 + 2[tex]\lambda[/tex]z - 2[tex]\mu[/tex]z = 0
I'm just asking how to use Lx, Ly & Lz to eliminate [tex]\lambda[/tex] & [tex]\mu[/tex] to get the critical points.
 
Physics news on Phys.org


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

Those reduce very easily to [itex](\mu+ \lambda)x= -1[/itex], [itex](\mu- \lambda)y= -1[/itex] and [itex](\mu- \lambda)z= -1[/itex]. Also, just adding the two constraints eliminates both y and z giving [itex]2x^2- 18= 0[/itex] so [itex]x= \pm 3[/itex]. Divide the second equation by the third to get y/z= 1 so y= z. Put that into [itex]x^2- y^2- z^2- 1= 0[/itex] to get [itex]9- 2z^2= 1[/itex] so [itex]2z^2= 8[/itex] and [itex]z= \pm 2[/itex]. 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,[tex]\lambda[/tex],[tex]\mu[/tex]) = 2x + 2y + 2z - [tex]\lambda[/tex](x2 - y2 - z2 - 1) - [tex]\mu[/tex](x2 + y2 + z2 - 17) making x2 both negative making Lx = 2 - 2[tex]\lambda[/tex]x - 2[tex]\mu[/tex]x. But I don't think it matters in the end result.
 
Last edited:


What if I wanted to find [tex]\lambda[/tex] & [tex]\mu[/tex]?
 


squenshl said:
But I thought L(x,y,z,[tex]\lambda[/tex],[tex]\mu[/tex]) = 2x + 2y + 2z - [tex]\lambda[/tex](x2 - y2 - z2 - 1) - [tex]\mu[/tex](x2 + y2 + z2 - 17) making x2 both negative making Lx = 2 - 2[tex]\lambda[/tex]x - 2[tex]\mu[/tex]x. But I don't think it matters in the end result.
It just changes the values of [itex]\lambda[/itex] and [itex]\mu[/itex].

squenshl said:
What if I wanted to find [tex]\lambda[/tex] & [tex]\mu[/tex]?
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 [itex]\lambda[/itex] and [itex]\mu[/itex].