We want to minimize $f(x,y,z)=x^2+y^2+z^2$ subject to $g(x,y,z)=x^2-yz-5=0$.
1.
Find gradients:
$\nabla f = \langle 2x, 2y, 2z \rangle$
$\nabla g = \langle 2x, -z, -y \rangle$
2.
Set up Lagrange equations $\nabla f = \lambda \nabla g$:
- $2x = \lambda(2x) \implies 2x(1-\lambda)=0$
- $2y = \lambda(-z)$
- $2z = \lambda(-y)$
3.
Solve the system:
From (i), we have two cases: $x=0$ or $\lambda=1$.
Case 1: $\lambda=1$.
From (ii), $2y = -z$. From (iii), $2z = -y$. Substituting $z=-2y$ into the second equation gives $2(-2y)=-y \implies -4y=-y \implies 3y=0 \implies y=0$. If $y=0$, then $z=0$.
We plug these into the constraint: $x^2 - (0)(0) = 5 \implies x^2=5 \implies x=\pm\sqrt{5}$. This gives points $(\sqrt{5},0,0)$ and $(-\sqrt{5},0,0)$. The squared distance is $f(\pm\sqrt{5},0,0) = 5$.
Case 2: $x=0$.
The constraint becomes $-yz=5 \implies y=-5/z$.
From (ii) and (iii), we get $2y=-\lambda z$ and $2z=-\lambda y$. Multiplying these gives $4yz = \lambda^2 yz$. Since $yz=-5 \neq 0$, we can divide by $yz$ to get $\lambda^2=4 \implies \lambda = \pm 2$.
If $\lambda=2$, then $2y=-2z \implies y=-z$. Substituting into $-yz=5$ gives $-(-z)z=5 \implies z^2=5$. So $z=\pm\sqrt{5}$ and $y=\mp\sqrt{5}$. This gives points $(0, -\sqrt{5}, \sqrt{5})$ and $(0, \sqrt{5}, -\sqrt{5})$. The squared distance is $f = 0^2+5+5=10$.
Comparing the squared distances (5 and 10), the minimum distance is $\sqrt{5}$ and it occurs at the points $(\sqrt{5},0,0)$ and $(-\sqrt{5},0,0)$.