Find points on surface nearest to origin

In summary: I think the problem here is in understanding the definition of the gradient. The gradient of a function at a point is a vector pointing in the direction of the greatest rate of change of the function at that point. In this case, the function is the distance from the origin, and at any point (x,y,z) on the surface, the gradient points in the direction of greatest increase in distance. So, if you want to minimize distance, you want to move in the opposite direction of the gradient, which means moving parallel to the gradient.In summary, the gradient of the distance function points in the direction of the greatest increase in distance at a given point on the surface, which means it is also the direction of the shortest distance from that point
  • #1
ImAnEngineer
209
1

Homework Statement


Find the points on the surface: z²-xy=1 nearest to the origin


Homework Equations


grad(f)= lambda grad(g) (?)
f(x,y,z)=z²-xy (?)
g=(0,0,0) (?)

The Attempt at a Solution


grad(f)=(-y, -x, 2z)= lambda (0,0,0) = (0,0,0)
-y=0 => y=0
-x=0 => x=0
2z=0 => z=0

But (x,y,z)=(0,0,0) doesn't satisfy f(0,0,0)=1.
 
Physics news on Phys.org
  • #2
No. You want to minimize distance to the origin. Minimize f=x^2+y^2+z^2. Your constraint g is z^2-xy-1.
 
  • #3
The "f" you are using is the left side of [itex]z^2- xy= 1[/itex], the equation of the surface. But where have you used the function you want to minimize, the distance from the point (x,y,z) to the origin? "g= (0,0,0)" makes no sense because that is a point, not a function!

The function you want to minimize is the distance from (0,0,0). That is [itex]\sqrt{x^2+ y^2+ z^2}[/itex]. But because you know distance is always positive, that is the same as minimizing the square of distance, [itex]x^2+ y^2+ z^2[/itex]. Your "f" is that: [itex]f(x,y,z)= x^2+ y^2+ z^2[/itex].

The "constraint" you are given is that [itex]g(x,y,z)= z^2- xy= 1[/itex]. Geometrically, the shortest line from (0,0,0) to that surface will be perpendicular to that surface. And, if we think of g(x,y,z)= 1 as a "level surface" of the function g(x,y,z), its gradient will be perpendicular to the surface. That is, the shortest distance will be when grad f and grad g are parallel vectors which means one is a multiple of the other: [itex] grad f= \lambda grad g[/itex].

As I said, use [itex]f(x,y,z)= x^2+ y^2+ z^2[/itex] and [itex]g(x,y,z)= x^2- xy[/itex].
 
  • #4
Thanks a lot, I get it now :) !

I get the following system of equations:
2x-ly = 0
2y-lx = 0
z(2+2l) = 0
z²-xy = 1

And when I solve this I get (x,y,z)=(0,0,+/-1).
 
  • #5
While searching for finding a solution to my problem, I came across with this thread. It would be nice if someone could explain to me geometrically what kind of vector is the [itex]grad f=(2x,2y,2z)[/itex].
I mean, I can understand that [itex]grad g[/itex] is perpendicular to the surface, but I can't get why [itex]grad f[/itex] and [itex]grad g[/itex] are parallel vectors, since the distance [itex] x^2 + y^2 + z^2[/itex] is already a vector that passes through that point of the surface and the origin.
 
  • #6
My mistake... [itex]x^2 +y^2 + z^2[/itex] is actually a number and not a vector.
But I still can get this problem solved.
I have a surface [itex]x^2 + y^2 -z =2[/itex] and I need to find the shortest distance from the origin. The gradient of the distance is [itex]grad(d)=(2x,2y,2z)[/itex] and the gradient of the the surface is [itex]gradf(x,y,z)=(2x,2y,-1)[/itex].

Shouldn't I use lagrange multipliers? But then I have [itex]2x= \lambda 2x[/itex] and [itex]2y= \lambda 2y[/itex] and if [itex] \lambda =1[/itex] then I have only two equations with 3 variables which means infinite solutions.
Could anyone help me out with the solution?
 
Last edited:
  • #7
Cevris said:
My mistake... [itex]x^2 +y^2 + z^2[/itex] is actually a number and not a vector.
But I still can get this problem solved.
I have a surface [itex]x^2 + y^2 -z =2[/itex] and I need to find the shortest distance from the origin. The gradient of the distance is [itex]grad(d)=(2x,2y,2z)[/itex] and the gradient of the the surface is [itex]gradf(x,y,z)=(2x,2y,-1)[/itex].

Shouldn't I use lagrange multipliers? But then I have [itex]2x= \lambda 2x[/itex] and [itex]2y= \lambda 2y[/itex] and if [itex] \lambda =1[/itex] then I have only two equations with 3 variables which means infinite solutions.
Could anyone help me out with the solution?

There are an infinite number of solutions. The lagrange equations only determine z. What is it? Then you can use the contraint to find x^2+y^2. There are an infinite number of points lying on a circle that are the same distance from the origin. How far?
 
  • #8
Dick said:
There are an infinite number of solutions. The lagrange equations only determine z. What is it? Then you can use the contraint to find x^2+y^2. There are an infinite number of points lying on a circle that are the same distance from the origin. How far?

Oh, yes, so I have [itex]x^2 + y^2=5/2[/itex]. So the distance is root(5/2)?

The other case is to have [itex]x=0[/itex] and [itex]y=0[/itex] and I get z=-2 from the equation of the surface. Since the length of the vector (0,0,-2) is 2 then this is the shortest distance from the surface. Is that right?
 
Last edited:
  • #9
Cevris said:
Oh, yes, so I have [itex]x^2 + y^2=5/2[/itex]. So the distance is sqrt(5/2)?

Distance to the origin from (x,y,z) is sqrt(x^2+y^2+z^2), right? And tell me what z is first.
 
  • #10
z=-1/2 if I am right since λ=1.
 
  • #11
Cevris said:
z=-1/2 if I am right since λ=1.

Ok, I'm ok with that. But then if x^2+y^2-z=2, what's x^2+y^2?
 
  • #12
My fault... It's 3/2 then :)
Have I dealt with the other case correctly?
Cevris said:
The other case is to have [itex]x=0[/itex] and [itex]y=0[/itex] and I get z=-2 from the equation of the surface. Since the length of the vector (0,0,-2) is 2 then the shortest distance from the surface is sqrt(3/2). Is that right?
 
  • #13
Cevris said:
While searching for finding a solution to my problem, I came across with this thread. It would be nice if someone could explain to me geometrically what kind of vector is the [itex]grad f=(2x,2y,2z)[/itex].
I mean, I can understand that [itex]grad g[/itex] is perpendicular to the surface, but I can't get why [itex]grad f[/itex] and [itex]grad g[/itex] are parallel vectors, since the distance [itex] x^2 + y^2 + z^2[/itex] is already a vector that passes through that point of the surface and the origin.
Think of it this way: the gradient, [itex]\nabla f[/itex] always points in the direction of fastest increase so if you objective is to maximize f, you should move in the direction of f. If your objective is to minimize f, move opposite to f. In either case, move parallel to f.

Here, the objective is to minimize the the distance to (0, 0, 0). The gradient of the square of the distance is <2x, 2y, 2z>= 2<x, y, z>. If you want to maximize distance, move in the direction of <x, y, z>, directly away from <0, 0, 0>. If you want to minimize distance, move in the direction of -<x, y, z>, directly toward <0, 0, 0>. That makes sense!

You keep doing that until there is no "direction" to [itex]\nabla f[/itex]- until is is 0 which happens when you are at (0, 0, 0). But if you are restricted to a given surface, you cannot alway move parallel to [itex]\nabla f[/itex]. The best you can do look at the projection of [itex]\nabla f[/itex] onto the surface and follow that- if [itex]\nabla f[/itex] is a little to the right of perpendicular, go that way. You can do that until [itex]\nabla f[/itex] does NOT have a "projection" onto the surface- until it is perpendicular to the surface. But if the surface is given by G(x, y, z)= constant, then [itex]\nabla G[/itex] is perpendicular to the surface. That is, you can go no further on that surface toward your maximum of minimum of f(x,y,z) when [itex]\nabla f[/itex] is perpendicular to the surface which means it is in the same direction as [itex]\nabal G[/itex]- [itex]\nabla f[/itex] and [itex]\nabla G[/itex] are parallel there which means one is a multiple of the other: [iitex]\nabla f= \lambda\nabla G[/itex].
 

1. What is the purpose of finding points on a surface nearest to the origin?

The purpose of finding points on a surface nearest to the origin is to determine the closest points to the center point (origin) of a given surface. This information can be useful in various applications, such as calculating distances for navigation or optimizing placement of objects.

2. How is the nearest point on a surface to the origin calculated?

The nearest point on a surface to the origin is calculated using a mathematical algorithm, such as the nearest neighbor algorithm or the distance formula. These methods involve measuring the distance between the origin and each point on the surface, and then selecting the point with the shortest distance as the nearest point.

3. What factors can affect the accuracy of finding the nearest point on a surface to the origin?

Several factors can affect the accuracy of finding the nearest point on a surface to the origin, including the complexity and shape of the surface, the precision of the measurement tools used, and any errors or limitations in the mathematical algorithm being used.

4. Can finding the nearest point on a surface to the origin be applied to 3D surfaces?

Yes, the concept of finding the nearest point on a surface to the origin can be applied to both 2D and 3D surfaces. In 3D surfaces, the distance between the origin and a point on the surface is calculated using the three coordinates (x, y, z) instead of just two (x, y).

5. Are there any practical applications of finding points on a surface nearest to the origin?

Yes, there are many practical applications for finding points on a surface nearest to the origin. Some examples include optimizing the placement of objects in a 3D space, calculating the shortest distance between two locations for navigation, and determining the closest point to a target location in a search and rescue operation.

Similar threads

  • Calculus and Beyond Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
1
Views
448
  • Calculus and Beyond Homework Help
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
8
Views
442
  • Calculus and Beyond Homework Help
Replies
26
Views
1K
  • Calculus and Beyond Homework Help
Replies
7
Views
671
  • Calculus and Beyond Homework Help
Replies
2
Views
490
  • Calculus and Beyond Homework Help
Replies
2
Views
1K
  • Calculus and Beyond Homework Help
Replies
9
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
Back
Top