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!