Lagrange multiplier problem - Why doesn't the method work?

1.9k Views Asked by At

Maximize the distance to the origin of a function with four variables given the constraints:

\begin{align} xyza &= 1 \\ x + y + z + a &= 4 \end{align}

Here's my solution: We maximize $f(x,y,z,a) = x^2+y^2+z^2+a^2$ subject to the given constraint equations. The Lagrange multiplier method yields six equations with six variables.

\begin{align} 2x &= \lambda_1yza+\lambda_2\\ 2y &= \lambda_1xza+\lambda_2\\ 2z &= \lambda_1xya+\lambda_2\\ 2a &= \lambda_1xyz+\lambda_2\\ xyza &= 1\\ x + y + z + a &= 4 \end{align}

Mathematica is unable to solve this system. Is there something wrong in the question (I made it up) itself? Thanks!

2

There are 2 best solutions below

2
On BEST ANSWER

The question is ill posed.

One of the first things you should do before applying Lagrange is to verify that there is indeed a solution. There is no solution in this case.

Fix $z=-1$, then look for solutions of $x+y-1-{1 \over xy} = 4$. Multiplying across by $x$ gives $x^2+x (y-5) -{1 \over y} = 0$, which has a solution $x= {1 \over 2} (5-y -\sqrt{(y-5)^2+{4 \over y}})$.

Letting $y \to \infty$ there are solutions, hence the distance to the origin is unbounded.

0
On

If you forget the first constraint, and instead minimize the distance to the origin from the hyperplane $x + y + z + a = 4$, your equations will look like: \begin{align*} 2x & = \lambda_1 \\ 2y & = \lambda_1 \\ 2z & = \lambda_1 \\ 2a & = \lambda_1 \\ 4 & = x + y + z + a \end{align*} This gives the unique solution $x = y = z = a = 1$. (You might have guessed this, since $\langle 1, 1, 1, 1 \rangle$ is the normal vector and also represents a point on the plane.)

In any case, adding a second constraint cannot possibly decrease the minimum distance to the origin, and since $(1,1,1,1)$ also lies on the hypersurface represented by your first constraint, it must be the unique solution.

EDIT: Sorry, just realized you wanted to maximize. Still, you can solve the system you wrote. We know from equation 5 that $x,y,z,a$ are nonzero, so we can multiply the first equation by $x$, the second by $y$, etc. Using the 5th equation to simplify gives: \begin{align*} 2x^2 & = \lambda_2x \\ 2y^2 & = \lambda_2y \\ 2z^2 & = \lambda_2z \\ 2a^2 & = \lambda_2a \\ \end{align*} We can divide each by its respective variable (again since they are all nonzero) to get $x=y=z=a=\frac{\lambda_2}{2}$, and again we get the unique solution $(1,1,1,1)$. This may be the only point at which your constraints intersect.