Point on surface closest to a plane using Lagrange multipliers Find the point on $z=1-2x^2-y^2$ closest to $2x+3y+z=12$ using Lagrange multipliers.
I recognize $z+2x^2+y^2=1$ as my constraint but am unable to recognize the distance squared I am trying to minimize in terms of 3 variables. May someone help please.
 A: A simpler approach for computing the distance between these objects: the given plane is orthogonal to the vector $(2,3,1)^T$, so the point(s) on the surface of minimal distance from the plane are the ones for which the tangent plane of the surface at such point(s) is orthogonal su $(2,3,1)^T$. If for some $k$
$$\left\{\begin{array}{rcl} 2x^2+y^2+z &=& 1 \\ 2x+3y+z &=& k \end{array}\right. $$
has exactly one solution, such a solution is a point of minimal distance. By eliminating $z$, we are looking for the values of $k$ such that
$$ 2x^2-2x+y^2-3y = 1-k $$
has exactly one solution. By completing the squares, it is trivial that the only point of minimal distance occurs at $(x,y)={\left(\frac{1}{2},\frac{3}{2}\right)}$, from which $(x,y,z)=\color{red}{\left(\frac{1}{2},\frac{3}{2},-\frac{7}{4}\right)}$ and
$$ d(\text{plane},\text{surface}) = \frac{\left|2\cdot\frac{1}{2}+3\cdot\frac{3}{2}-\frac{7}{4}-12\right|}{\sqrt{3^2+2^2+1^2}}=\color{red}{\frac{33}{4\sqrt{14}}}.$$
A: The squared distance between a point $(x_0, y_0, z_0)$ and the plane $2x + 3y + z = 12$ is given by
$$ f(x_0,y_0,z_0) = \frac{(2x_0 + 3y_0 + z_0 - 12)^2}{2^2 + 3^2 + 1^2} = \frac{(2x_0 + 3y_0 + z_0 - 12)^2}{14}. $$
Thus, in order to find the point in your surface that is closest to the plane, it is enough to minimze
$$ g(x,y,z) = (2x + 3y + z - 12)^2 $$
subject to the constraint
$$ 2x^2 + y^2 + z = 1. $$
A: Define $F(x,y,z) = z+ 2x² + y² = 1$, as a level set of F. So that $\nabla F= (4x,2y,1)$. Now you have to remember the distance between point-plane in $\mathbb{R}³$:
$D(x,y,z) = \frac{ax+by+cz+d}{\sqrt{a²+b²+c²}}$. Applying that for our plane, we have that $D(x,y,z) = \frac{2x+3y+1z-12}{\sqrt{14}}$. Hence,
$\nabla D= (2/\sqrt{14}, 3/\sqrt{14},1/\sqrt{14}).$
Now, utilizing Lagrange's multipliers we must solve this system:
$\nabla D = \lambda \nabla F$
$2x+3y+z=12$
