Lagrange multiplicator/unit sphere

37 Views Asked by At

let $\vec{v} = (2,1,-2)^{T} \in \mathbb{R}^3$ and $S^2$ the unit sphere hence $\mathbb{S} = \{ (x,y,z)^{T} \in \mathbb{R}^3 | x^2+y^2+z^2=1 \} $

Define the shortest distance from $\vec{v}$ to $\mathbb{S}$

The function I set up was $$F(x,y,z, \lambda) = \sqrt{(2-x)^2+(1-y)^2+(-2-z)^2}+\lambda(x^2+y^2+z^2-1)$$

but I fear that this is not the way how I can calculate the distance, could someone help me? Thanks in advance

1

There are 1 best solutions below

0
On

To finish the shorter way just subtract $1$ (the unit sphere radius) from that distance from $v$ to the origin which was $3$ so shortest distance is $2.$ You may want to draw a picture of the sphere and your point $v$ which is outside it to see what is going on. The shortest distance from a point $p$ outside the unit sphere to the surface of the unit sphere is always one less than the distance from the origin to $p.$

Note that Diego's suggestion would make the Lagrange multiplier method work fairly well. If you get it I suggest putting it in your question.