Maximizing Distance from Point on Sphere (1,1,-1): Lagrange Multipliers Method

In summary: 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.
  • #1
Differentiate1
34
0
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.
 
Physics news on Phys.org
  • #2
Differentiate1 said:
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.

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.
 
  • #3
Dick said:
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.

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.
 
  • #4
Ray Vickson said:
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.

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.
 
  • #5
Dick said:
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.

But, is that not what you suggested in your first reply, when you suggested he solve for x, y and z in terms of λ?
 
  • #6
Ray Vickson said:
But, is that not what you suggested in your first reply, when you suggested he solve for x, y and z in terms of λ?

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:
  • #7
Dick said:
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 λ.

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.
 
  • #8
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 by a moderator:
  • #9
HallsofIvy said:
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.

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.
 

Related to Maximizing Distance from Point on Sphere (1,1,-1): Lagrange Multipliers Method

What is the Lagrange Multipliers Method?

The Lagrange Multipliers Method is a mathematical optimization technique used to find the maximum or minimum value of a multivariable function subject to one or more constraints.

How does the Lagrange Multipliers Method work?

The method involves creating a new function, called the Lagrangian, which combines the objective function and the constraints using Lagrange multipliers. The critical points of this new function are then found and checked to determine the maximum or minimum value.

Why is the Lagrange Multipliers Method useful for maximizing distance from a point on a sphere?

The method is useful because the constraints in this problem involve the equation of a sphere, which can be easily incorporated into the Lagrangian. This allows us to find the maximum distance from a specific point on the sphere, while taking into account the curvature of the sphere.

What are the limitations of the Lagrange Multipliers Method?

The method may not always give the global maximum or minimum, as it only considers the critical points of the Lagrangian. It also requires the constraints to be differentiable, which may not always be the case in real-world problems.

Are there any alternative methods for maximizing distance from a point on a sphere?

Yes, there are other optimization techniques such as gradient descent and genetic algorithms that can also be used to solve this problem. However, the Lagrange Multipliers Method is often preferred due to its simplicity and ability to handle multiple constraints.

Similar threads

  • Calculus and Beyond Homework Help
Replies
8
Views
725
  • Calculus and Beyond Homework Help
Replies
16
Views
2K
Replies
1
Views
911
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Calculus and Beyond Homework Help
Replies
10
Views
842
  • Calculus and Beyond Homework Help
Replies
8
Views
1K
  • Calculus and Beyond Homework Help
Replies
14
Views
2K
  • Calculus and Beyond Homework Help
Replies
3
Views
2K
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
Back
Top