How to use lagrange multipliers to find the points on a sphere that are closest to a point?

310 Views Asked by At

Use the method of Lagrange multipliers to find the points on the sphere $x^2 + y^2 + z^2 = 36$ that are closest to and farthest from the point $(1, 2, 2)$.

Based on the solution provided:

$f(x,y,z) = (x-1)^2 + (y-2)^2 + (z-2)^2$

I don't understand how to represent a point as an equation? Can someone explain how I can turn the point $(1, 2, 2)$ to the equation $f(x,y,z) = (x-1)^2 + (y-2)^2 + (z-2)^2$?

Lets say if I want to change this question from $x^2 + y^2 + z^2 = 36$ (a sphere) to say a rectangular prism or something, how would this change?

Thanks - Alice

1

There are 1 best solutions below

0
On

The Lagrangian is $$ \mathcal{L}(\mathbf{x},\lambda) = \| \mathbf{x}-\mathbf{x}_0 \|^2 + \lambda \left( \| \mathbf{x} \|^2 -R^2 \right) $$ The gradient is $ \frac{\partial \mathcal{L}}{\partial \mathbf{x}} = 2(\mathbf{x}-\mathbf{x}_0)+2\lambda\mathbf{x} $.

Setting the gradient to zero yields the relation $(\lambda+1)\mathbf{x}=\mathbf{x}_0$. and multiplying on the left by $\mathbf{x}^T$
and applying the constraint yields $ \lambda+1=\frac{\mathbf{x}^T \mathbf{x}_0}{R^2} $.

Thus the stationary points verify $$ \left( \frac{\mathbf{x}^T \mathbf{x}_0}{R^2} \right) \mathbf{x}=\mathbf{x}_0 $$ Writing $\mathbf{x}= \alpha \mathbf{x}_0$, we end up with the solution $ \alpha = \pm R/\|\mathbf{x}_0\| $ which gives the maxima and minima.