Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

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

  1. Oct 9, 2009 #1
    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.
     
  2. jcsd
  3. Oct 10, 2009 #2

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: Optimization

    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: Oct 14, 2009
  4. Oct 10, 2009 #3
    Re: Optimization

    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: Oct 10, 2009
  5. Oct 14, 2009 #4
    Re: Optimization

    What if I wanted to find [tex]\lambda[/tex] & [tex]\mu[/tex]?
     
  6. Oct 14, 2009 #5

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    Re: Optimization

    It just changes the values of [itex]\lambda[/itex] and [itex]\mu[/itex].

    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].
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook