1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Lagrange Multipliers

  1. Nov 5, 2013 #1
    I'm stuck on this problem for the past hour. I've tried solving for all variables and none of the steps I'm doing are getting me to the right answer.

    Find the point on sphere x^2+y^2+z^2=25 farthest from point (1,1,-1).

    My steps:
    http://i.imgur.com/c5kUj9g.png

    Correct Answer: x= -5/sqrt(3)
    y= -5/sqrt(3)
    z= 5/sqrt(3)

    Thanks in advance.

    EDIT: On the part where I set negative lambda equal to "...", I made x=y to make solving for "z" easier since x and y are symmetrical.
     
  2. jcsd
  3. Nov 5, 2013 #2

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    I would solve for x, y and z in terms of λ. You should be able to show x=1/(1+λ) and y=1/(1+λ) so x=y (that's the symmetrical part). But you are making an algebraic mistake with z. What is z in terms of λ? How is z related to x and y? And remember solving x^2=c gives you two solutions. Try it again.
     
  4. Nov 5, 2013 #3

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    I agree, but I would urge the OP to solve for λ, from an equation of the form λ^2 = K (for some computable K > 0). There is, of course, a sign ambiguity in λ itself, but the same choices are made for all three of x, y and z (rather than making a separate choice for each equation x^2 = u, y^2 = v and z^2 = w). Furthermore, one of the λ roots is for the maximization problem and the other is for the minimization problem.
     
  5. Nov 5, 2013 #4

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    There's more than one way to skin a cat. There's often a degree of cleverness involved in seeing an easy way to solve the Lagrange multiplier equations. I don't think in this case solving for λ is best. But it's just taste.
     
  6. Nov 5, 2013 #5

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    But, is that not what you suggested in your first reply, when you suggested he solve for x, y and z in terms of λ?
     
  7. Nov 5, 2013 #6

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Well, no. Why do you say that? Maybe I'm missing what you mean by 'solve for λ'. The OP already knows x=y from a symmetry in the equations. They are related to z in a similar sort of way. Solve for the variables in terms of λ. Not solve for λ, which is I thought what you were indicating would be a better idea. That's what I was suggesting. No real need to know λ.
     
    Last edited: Nov 6, 2013
  8. Nov 6, 2013 #7

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    Well, I said that because you wrote "I would solve for x, y and z in terms of λ." I agree, and then I would just plug in x(λ), y(λ) and z(λ) in the constraint to get an equation for λ. Solving that gives two roots (corresponding to two square roots); one gives the maximizing solution and the other the minimizing solution, although that is not 100% apparent without some further checking.

    Of course you can do it in another way, but if the OP wants to learn about Lagrange multipliers then showing him one of the ways seems appropriate. I showed him one way, you showed him another. It won't harm him to see both.
     
  9. Nov 6, 2013 #8

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    We want to minimize the distance to (1, 1, -1), [itex]\sqrt{(x- 1)^2+ (y- 1)^2+ (z+ 1)^2}[/itex], which is the same as minizing the distance squared, [itex]f(x, y, z)= (x- 1)^2+ (y- 1)^2+ (z+ 1)^2[/itex], with the constraint [itex]g(x, y, z)= x^2+ y^2+ z^2= 25[/itex].

    We have [itex]\nabla f= 2(x- 1)\vec{i}+ 2(y- 1)\vec{j}+ 2(z+ 1)\vec{k}[/itex] and [itex]\nabla g= 2x\vec{i}+ 2y\vec{j}+ 2z\vec{k}[/itex] and we want [itex]\nabla f= \lambda\nabla g[/itex] for some "multiplier" [itex]\lambda[/itex]. Setting corresponding components equal, we have
    [itex]2(x- 1)= 2\lambda x[/itex]
    [itex]2(y- 1)= 2\lambda y[/itex] and
    [itex]2(z+ 1)= 2\lambda z[/itex]

    I find it is often simplest to eliminate [itex]\lambda[/itex] by dividing one equation by another.
    That is, [itex]\dfrac{x- 1}{y- 1}= \dfrac{x}{y}[/itex] and [itex]\dfrac{x- 1}{z+ 1}= \dfrac{x}{z}[/itex].

    Then (x- 1)y= x(y- 1) so xy- y= xy- x or y= x. (x- 1)z= x(z+ 1) so xz- z= xz+ x or z= -x.

    Setting y= x and z= -x in the constraint [itex]x^2+ y^2+ z^2= 25[/itex] we have [itex]3x^2= 25[/itex].
    We can solve for two values of (x, y, z) from that. One gives the point of shortest distance, the other the point of longest distance.

    Of course, the easy way to do this is to note that since [itex]x^2+ y^2+ z^2= 25[/itex] is a sphere with center at the origin, the shortest and longest distances from (1, 1, -1) to that sphere lie on the line through the center, (0, 0, 0), and (1, 1, -1). Determine where x= t, y= t, z= -t cross the sphere.
     
    Last edited: Nov 6, 2013
  10. Nov 6, 2013 #9

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    If we look at the Lagrange equations ##(\lambda-1) x = 1, ## etc., we see that we must have ##\lambda \neq 1##. Therefore, we can divide by ##\lambda - 1## to get ##x=v, y=v, z=-v##, where ##v = 1/(\lambda-1)##. The constraint gives ##3v^2 = 25##, so ##v = \pm 5/\sqrt{3}##, etc.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Lagrange Multipliers
  1. Lagrange Multiplier (Replies: 2)

  2. Lagrange Multipliers (Replies: 7)

  3. Lagrange Multipliers (Replies: 8)

Loading...