Why Lagrange Multiplier Doesn’t Work

calculusderivativeslagrange multipliermultivariable-calculusoptimization

Question: Find maximum value $f(x,y,z) = xy + zy + xz – 4xyz$ subject to constraint $x + y + z = 1$ and $x,y,z \geq 0$.
$$
g(x,y,z) = x + y + z – 1
$$

and
$$
\nabla g(x,y,z) \neq 0,
\qquad
\nabla g(x,y,z) = \langle 1,1,1 \rangle.
$$

When we apply Lagrange Multiplier Method, we find
$f \bigl( \frac{1}{2}, \frac{1}{4}, \frac{1}{4} \bigr) = \frac{3}{16}$, the maximum value, but the answer is
$f \bigl( 0, \frac{1}{2}, \frac{1}{2} \bigr) = \frac{1}{4}$.

Why does that happen? Lagrange Multiplier Method has a only $1$ rule: $\nabla g(x,y,z) \neq 0$, there is no rule break.

EDİT: I find f(0,1/2,1/2) with another method and f(1/2,1/4,1/4) is not both a global maxima and a global minima point but Lagrange Multiplier gives that result, and f(1/2,1/4,1/4) is not a local minimum f(0,0,1) is lower than that.

Best Answer

The Lagrange multipliers method to be applied, requires that the inequalities involved, be transformed into equivalent equations, as follows.

$$ L(x,y,z,\lambda_0,\lambda_1,\lambda_2,\lambda_3,s_1,s_2,s_3) = f(x,y,z) + \lambda_0 g(x,y,z) + \lambda_1(x-s_1^2)+\lambda_2(y-s_2^2)+\lambda_3(z-s_3^2) $$

and the stationary points are the solutions for

$$ \nabla L = 0 = \left\{ \begin{array}{l} \lambda_0+\lambda_1-4 y z+y+z \\ \lambda_0+\lambda_2-4 x z+x+z \\ \lambda_0+\lambda_3-4 x y+x+y \\ x+y+z-1 \\ x-s_1^2 \\ y-s_2^2 \\ z-s_3^2 \\ -2 \lambda_1 s_1 \\ -2 \lambda_2 s_2 \\ -2 \lambda_3 s_3 \\ \end{array} \right. $$

after solution we have

$$ \left( \begin{array}{ccccccccccc} f & x & y & z & \lambda_0 & \lambda_1 &\lambda_2 &\lambda_3 & s_1^2 & s_2^2 & s_3^2\\ 0 & 0 & 0 & 1 & 0 & -1 & -1 & 0 & 0 & 0 & 1 \\ 0 & 0 & 1 & 0 & 0 & -1 & 0 & -1 & 0 & 1 & 0 \\ 0 & 1 & 0 & 0 & 0 & 0 & -1 & -1 & 1 & 0 & 0 \\ \frac{5}{27} & \frac{1}{3} & \frac{1}{3} & \frac{1}{3} & -\frac{2}{9} & 0 & 0 & 0 & \frac{1}{3} & \frac{1}{3} & \frac{1}{3} \\ \frac{3}{16} & \frac{1}{4} & \frac{1}{4} & \frac{1}{2} & -\frac{1}{4} & 0 & 0 & 0 & \frac{1}{4} & \frac{1}{4} & \frac{1}{2} \\ \frac{3}{16} & \frac{1}{4} & \frac{1}{2} & \frac{1}{4} & -\frac{1}{4} & 0 & 0 & 0 & \frac{1}{4} & \frac{1}{2} & \frac{1}{4} \\ \frac{3}{16} & \frac{1}{2} & \frac{1}{4} & \frac{1}{4} & -\frac{1}{4} & 0 & 0 & 0 & \frac{1}{2} & \frac{1}{4} & \frac{1}{4} \\ \frac{1}{4} & 0 & \frac{1}{2} & \frac{1}{2} & -\frac{1}{2} & \frac{1}{2} & 0 & 0 & 0 & \frac{1}{2} & \frac{1}{2} \\ \frac{1}{4} & \frac{1}{2} & 0 & \frac{1}{2} & -\frac{1}{2} & 0 & \frac{1}{2} & 0 & \frac{1}{2} & 0 & \frac{1}{2} \\ \frac{1}{4} & \frac{1}{2} & \frac{1}{2} & 0 & -\frac{1}{2} & 0 & 0 & \frac{1}{2} & \frac{1}{2} & \frac{1}{2} & 0 \\ \end{array} \right) $$

NOTE

The inequalities $x>0,y>0,z>0$ were handled as $x-s_1^2=0,y-s_2^2=0, z-s_3^2=0$ hence when in the solution $s_i=0$ then the $i$ restriction is actuating.

Related Question