Undefined case in Lagrangian method

237 Views Asked by At

I am trying to finding the minimum distance between the point $(1,1,0)$ and points on the sphere $$x^2+y^2+z^2-2x-4y=4.$$

An easy way to do this is to graphical intuition and get the distance, since the point is inside the sphere.

However, can the answer be obtained using Lagrangian multipliers? I keep getting undefined answers and I do not know how to resolve it.

So, I do

\begin{align} &\min\limits_{x,y,z} & f(x,y,z)&=(x-1)^2+(y-1)^2+z^2\\ &\text{subject to}&g(x,y,z)&=x^2+y^2+z^2-2x-4y=4. \end{align}

$\vec\nabla f=<2x,2y,2z>$

$\vec\nabla g=<2x-2,2y-4,2z>$

$\therefore \vec\nabla f=\lambda \vec\nabla g$

$2x=\lambda (2x-2) \\ 2y=\lambda (2y-4) \\ 2z=\lambda (2z)$

From this I get $\lambda=1$, and I have no idea where to go from that point. Please help!

1

There are 1 best solutions below

2
On

hint: $\lambda \neq 1$ since if it were you would get $2x=2x-2$ would be absurd. Thus the last equation implies $z = 0$, and the first two equations give: $\dfrac{2x}{2x-2} = \dfrac{2y}{2y-4}$. Can you solve for $x,y,z$ using the two new equations, and the constraint?