# for f(x,y,z) find point on surface nearest to origin

$f(x,y,z)=x^2+2y^2-z^2$, $S=\{(x,y,z): f(x,y,z)=1\}$ find point on S nearest to origin.

I thought I would use Lagrange multipliers to solve this problem, but when I use $f(x,y,z)=x^2+2y^2-z^2$ and $g(x,y,z)=x^2+2y^2-z^2-1$, along with, $$g(x,y,z)=0$$ $$f_x=\lambda g_x$$

$$f_y=\lambda g_y$$

$$f_z=\lambda g_z$$

I am getting not so good answers. How to solve this type of problem

The distance from $(x,y,z)$ to the origin is $\sqrt{x^2+y^2+z^2}$.
We therefore want to minimize $\sqrt{x^2+y^2+z^2}$, or equivalently $x^2+y^2+z^2$, subject to the condition $x^2+2y^2-z^2-1=0$. So $x^2+y^2+z^2$ should be your $f$. Now the usual process should work well.
• It you ask the question it will be quickly answered, but not by me (it is late). Lagrange multipliers, two constraints, will work. But it is really a linear algebra problem. If you want to set it up as a calculus problem, find parametric equations of the line of intersection of the two planes. The parametric equations will involve a single parameter $t$, and you will be minimizing a quadratic in $t$. – André Nicolas Nov 26 '15 at 7:33
• Hi @andrenicolas ok I will ask the question now, specifically for a linear algebraic approach to solve the problem. Currently, I have used both plane equation constraints already and am stuck with $2(x^2+y^2+z^2) = \lambda_1(-a_0) + \lambda_2(-b_0)$. – User001 Nov 27 '15 at 0:57
• Nothing obvious, but I do not know full details of the problem. If you have already used Lagrange multipliers to minimize distance, then the equations should involve the partials with respect to $x,y,z$ so the first equation should have shape $2x=\dots$. – André Nicolas Nov 27 '15 at 1:02