Perpendicular distance from origin to the plane $x+2y+2z=6$

lagrange multipliermultivariable-calculus

I am trying to find the perpendicular distance from origin to the plane $x+2y+2z=6$. I have an attempt at a solution, but it is incorrect, and I am hoping to find out why.

Consider the function $f(x,y,x)=x^2+y^2+z^2$. We'd like to minimize this function given the contraint $g(x,y,z)=x+2y+2z=6$. To do this, we use the Lagrange multiplier method.

We have $2x=\lambda, 2y=2\lambda, 2z=2\lambda$, from which we get $x=y/2=z/2$. Using this imformation, our constraint equation gives us $y/2+2y+2y=6$, which means that $y=z=4/3$ and $x=2/3$. Plugging this values into $f$, we get $(2/3)^2+(4/3)^2+(4/3)^2=4$.

The answer is supposed to be $2$, so I am not sure where I went wrong. Any help would be much appreciated.

Best Answer

[Turning coffeemath’s comment into an answer since none of the others so far have really addressed your actual question.]

Everything was fine up until the end, when you apparently forgot that the function that you minimized gives you the square of the distance. Take the square root of the value that you’ve computed and all will be well.