Minimum/Maximum Distance from a Point to a Sphere Using Questionable Method

145 Views Asked by At

To find the points on the surface of a sphere with radius $R$, centered at the origin, that are closest/furthest from a given point, $(a,b,c)$, you could use the Lagrange multiplier method to optimize the distance formula $$D(x,y,z)=\sqrt{(x-a)^2+(y-b)^2+(z-c)^2}$$ using $$g(x,y,z)={x^2+y^2+z^2=R^2}$$ as the constraint function. You could also solve the problem geometrically, without calculus. However, why can't you combine the two formulas and optimize the resulting function? So, dealing with $D^2$ to not have to deal with the radical:$$D^2(x,y,z)=(x-a)^2+(y-b)^2+(z-c)^2$$$$=x^2+y^2+z^2-2ax-2by-2zc+a^2+b^2+c^2$$ But then, from the equation for a sphere, $z^2=-x^2-y^2+R^2$. Substituting this in,$$D^2(x,y,z)=x^2+y^2+(-x^2-y^2+R^2)-2ax-2by-2zc+a^2+b^2+c^2$$$$=R^2-2ax-2by-2zc+a^2+b^2+c^2$$ So, the function reduces down to a linear function of $x,y$ and $z$....This seems fishy. Now if you try to optimize $D^2$ by finding the points where $\nabla D^2=0$, you get that the partial derivatives of the function are constants (aka, never zero unless just by coincidence based on $a,b,$ and $c$). So where are the maximum/minimum values located? What is wrong with this method?

1

There are 1 best solutions below

4
On

There is nothing wrong with this approach. Yes, you get to optimize a linear function, but only on the sphere. To use Lagrange multiplier, you need the extra term $\lambda (x^2+y^2+z^2-R^2)$ which will break the linearity of the goal function.

The Lagrange multiplier basically says that on a contrained surface, you don't necessarily have vanishing gradient on points where max/min are achieved, but the gradient has to be perpendicular to the surface (you can grow your function but only beyond the surface). In this particular case, that would mean the gradient $(-2a, -2b, -2c)$ needs to be perp to the sphere, i.e. it has to be parallel to $(x, y, z)$.