Find the point on the cone closest to (1,4,0) Find the point on the cone $z^2=x^2+y^2$ nearest to the point $P(1,4,0)$.
This is a homework problem I've not made much headway on.
 A: This seems like an exercise in Lagrange Multipliers. You need to minimize the distance function $f(x,y,z) = (x-1)^2 + (y-4)^2 + z^2$ (which is the square distance from $(x,y,z)$ to $(1,4,0)$) subject to the constraint that $g(x,y,z) = x^2 + y^2 - z^2 = 0$. Any point which minimizes such $f$ subject to the constraint will satisfy $$\nabla f = \lambda \nabla g$$ for some $\lambda \in \mathbb R$. This gives us 4 equations: \begin{align*} 2(x-1) &= 2\lambda x \\ 2(y-4) &= 2\lambda y \\ 2z&= -2\lambda z \\ x^2 + y^2 - z^2 &= 0.\end{align*} The third equation gives $z = 0$ or $\lambda = -1$. If $z=0$, then the fourth equation gives $x=0, y= 0$. But then the first two equations couldn't be satisfied, so this is impossible. We conclude that $\lambda = -1$. In this case $x = 1/2$, $y=2$ so by the fourth equation $z = \pm\sqrt{17/4}$. By the symmetry in $z$, both sides of the $\pm$ work, so the points which minimize the distance are $$\left(\tfrac 1 2, 2, \sqrt{17/4}\right) \,\,\,\, \text{ and } \,\,\,\, \left(\tfrac 1 2, 2, -\sqrt{17/4}\right).$$ The distance is then $$d_{\text{min}} = \sqrt{\left(\tfrac 1 2 - 1 \right)^2 + (2-4)^2 + \left( \pm\sqrt{17/4}\right)^2}= \sqrt{\tfrac 1 4 + 4 + \tfrac{17}4} = \sqrt{\tfrac{34}{4}} = \tfrac{\sqrt{34}}{2}.$$
A: You want to minimize $\sqrt{(x-1)^2+(y-4)^2+z^2}$ where $x$, $y$, and $z$ satisfy $x^2+y^2=z^2$. Notice that if we minimize the distance squared, distance is also minimized, so it suffices to minimize $(x-1)^2+(y-4)^2+z^2$. We can use the constraint to substitute $x^2+y^2$ for $z^2$. On doing so, we get $$(x-1)^2+(y-4)^2+z^2,$$ which expands to $$2x^2+2y^2-2x-8y+17.$$ You can minimize this using usual gradient methods. You will get values for $x$ and $y$. Find $z$ by referring back to the constraint.
A: Have a look at the scene to come up with an idea:
 (Large Version)
The green surfaces belong to the cone, the red and blue surfaces are spheres around $P$.
E.g you could try to find the intersection between cone and sphere and fiddle with the radius to shrink it to a point.
We can describe the intersection by the system
$$
x^2 + y^2 - z^2 = 0 \\
(x-1)^2 + (y - 4)^2 + z^2 = r^2
$$
This gives
$$
r^2 = (x-1)^2 + (y-4)^2 + x^2 + y^2 = 2x^2 + 2y^2 - 2x - 8y + 17 \iff \\
r^2/2 = x^2 + y^2 - x - 4y + 17/2
= (x - 1/2)^2 + (y-2)^2 + 17/2 - 1/4 - 4 \iff \\
\left(\frac{\sqrt{2r^2-17}}{2}\right)^2 
= \left(x - \frac{1}{2}\right)^2 + \left(y - 2\right)^2
$$
If I made no error, this indicates a circle around $(1/2, 2, 0)$ as projection of the intersection surface onto the $x$-$y$-plane.
Then $z = \pm \sqrt{1/4 + 4} = \pm \sqrt{17}/2$.
That would suggest $Q=(1/2,2,\pm\sqrt{17}/2)$ as closest points, at distance $r = \sqrt{17/2}$.
 (Large Version)
 (Large Version)
