= Solution
For two independent smooth constraints $g=h=0$, the tangent direction is orthogonal to both <gradients>. At a constrained <stationary point>, the <gradient> of the objective is also orthogonal to that direction, hence lies in their span: $\nabla f=\lambda\nabla g+\mu\nabla h$. This is the two-constraint <Lagrange multiplier> condition. Alternatively, <distance extrema on a central plane section of an ellipsoid> follow from a two-dimensional <eigenvalue> problem.
Minimizing distance is equivalent to minimizing $f=x^2+y^2+z^2$. Put $g=x-y+z$ and $h=x^2+(y^2+z^2)/4-1$. The <Lagrange multiplier> equations are
$$
2(1-\mu)x=\lambda,\qquad (2-\mu/2)y=-\lambda,\qquad (2-\mu/2)z=\lambda.
$$
Adding the latter two gives $(2-\mu/2)(y+z)=0$. If $\mu=4$, those equations give $\lambda=x=0$; the constraints then give $y=z=\pm\sqrt2$ and $f=4$. Otherwise $z=-y$ and $x=2y$. The ellipsoidal constraint gives $y=\pm\sqrt2/3$, and hence
$$
(x,y,z)=\pm\frac{\sqrt2}3(2,1,-1),\qquad f=\frac43.
$$
The intersection is <compact>. The two constraint <gradients> are independent there: if $\nabla h=t\nabla g$, then $(x,y,z)=(t/2,-2t,2t)$, and $g=0$ forces $t=0$, contradicting $h=0$. Thus every global extremum is among these candidates. Taking square roots gives
$$
\boxed{d_{\min}=\frac2{\sqrt3},\qquad d_{\max}=2.}
$$
Back to article page