Lagrange multiplier with 2 constraints yielding an “invalid” equation

lagrange multipliermultivariable-calculusoptimization

I am dealing with an optimization problem involving two constraints. The problem is as follows:

The plane $x + y + 2z = 2$ intersects the paraboloid $z = x^2+y^2$ in an ellipse. Find the points on the ellipse that are nearest to and farthest from the origin.

I attempted to solve this problem using lagrange multipliers, setting the function of interest $f(x,y,z)$ to be the square of the distance from the origin (rather than just the distance out of convenience), so $f(x,y,z) = x^2 + y^2 + z^2$. I then set the functions of the two constraints to be the equations of the given surfaces, so $g(x,y,z) = x + y + 2z = 2$ and $h(x,y,z) = x^2 + y^2 – z = 0$.

I then applied the method of Lagrange multipliers to these functions, using $$\nabla f = \lambda \nabla g + \mu \nabla h$$ This yielded a system of 3 equations in addition to 2 contraints:
$$
\begin{aligned} 2 x &=\lambda+2 \mu x \\ 2 y &=\lambda+2 \mu y \\ 2 z &=2 \lambda-\mu \\ x+y+2 z &=2 \\ x^{2}+y^{2}-z &=0 \end{aligned}
$$

In solving this system of equations I first started by setting the first two equations equal to $\lambda$. This lead to the relation $2(x-y) = 2\mu (x-y)$, so from there I got $\mu = 1$.

My next step was to plug $\mu$ into the third equation, giving $2z = 2\lambda – 1$ so rearranging and dividing by 2 we get $\lambda = z + \frac{1}{2}$.

Then, I plugged this value for $\lambda$ back into the second equation, getting $2y = z + \frac{1}{2} + 2y$. Since the $2y's$ cancel, this gives us $z = -\frac{1}{2}$.

This value for z is what leads me to my problem. Plugging this back into the last equation, we get $$x^2 + y^2 = -\frac{1}{2}$$ for which there are no real solutions. I am not sure how to interpret the fact that this equation has no real solutions, or where I am supposed to go from here. I have found a solution online to this problem here where it suggests that we set $x=y$ because the equation above has no solutions, but I do not know where this step comes from, or how we can prove that this step leads to the right solution. Can someone explain why we must set $x=y$, or provide another method of solving the same problem using Lagrange multipliers with 2 constraints?

Best Answer

You considered only one possible solution to the equation $2(x-y)=2\mu(x-y)$, namely, $\mu=1$, which led to a dead end. You have to consider the other possible solution, $x=y$, too. I’ll leave it to you to verify that this indeed satisfies the above equation. From there you can derive a quadratic equation in either $x$ or $y$, and back-substitute.