Use the Lagrange multiplier method to find the shortest distance from $(1, 1, 1)$ to $2x + y – z = 5$

lagrange multipliermultivariable-calculus

This is my working so far:

let

$$f=d^2=(x-1)^2+(y-1)^2+(z-1)^2$$ $$g=2x+y-z-5$$ $$\psi=f+\lambda g$$

from this we can make simultaneous equations:
$$\psi_x=2(x-1)+2\lambda =0$$
$$\psi_y=2(y-1)+\lambda =0$$
$$\psi_z=2(z-1)-\lambda =0$$
$$2x+y-z=5$$
solving these gives:
$$x=\frac 65,\,y=\frac {11}{10},\,z=\frac 9{10}$$
so then to calculate the shortest distance we would do the following:
$$d=\sqrt{\left(x-\frac6{5}\right)^2+\left(y-\frac{11}{10}\right)^2+\left(z-\frac{9}{10}^2\right)}=\frac{\sqrt6}{10}$$

but the answer given is $$\frac{\sqrt6}{2}$$

Best Answer

If you solve the first three equations of the system$$\left\{\begin{array}{l}2(x-1)+2\lambda=0\\2(y-1)+\lambda=0\\2(z-1)-\lambda=0\\2x+y-z=5,\end{array}\right.$$then you get that $x=1-\lambda$, that $y=1-\frac\lambda2$, and that $z=1+\frac\lambda2$. But then$$5=2x+y-z=2-3\lambda,$$and therefore $\lambda=-1$. And so $(x,y,z)=\left(2,\frac32,\frac12\right)$. Therefore, the shortest distance is\begin{align}\left\|(1,1,1)-\left(2,\frac32,\frac12\right)\right\|&=\left\|\left(-1,-\frac12,\frac12\right)\right\|\\&=\frac12\|(-2,-1,1)\|\\&=\frac{\sqrt6}2.\end{align}