Lagrange multipliers not giving all the solutions

lagrange multiplierlinear algebramultivariable-calculusoptimization

I was working on a maximization problem that can be reduced to maximizing
$$f(a,b,c,d)= ab + bc + cd $$
subject to the constraint
$$a +b +c +d = 63 $$
I thought that this was a trivial and straightfoward problem for the method of lagrange multiplier, so I defined the Lagrangian as
$$\mathcal{L}(a,b,c,d,\lambda) = ab + bc + cd – \lambda (a +b +c +d – 63) $$
and setting the derivatives equal to 0, I got
$$
b – \lambda = 0 \\
a + c – \lambda = 0 \\
b +d – \lambda = 0 \\
c – \lambda = 0 \\
a +b +c +d = -63
$$

That is a linear problem that can be re-stated as finding the solution for the system $Ax = b$ with
$$ A = \begin{bmatrix}
0 & 1 & 0 & 0 & -1 \\
1 & 0 & 1 & 0 & -1 \\
0 & 1 & 0 & 1 & -1 \\
0 & 0 & 1 & 0 & -1 \\
1 & 1 & 1 & 1 & 0
\end{bmatrix}$$

and
$$
b = \begin{bmatrix}
0 & 0 & 0 & 0 & -63 \\
\end{bmatrix}^T$$

to my surprise, this system is determined with only one solution for $a,b,c$ and $d$
$$ x = \begin{bmatrix}
0 & 31.5 & 31.5 & 0 \\
\end{bmatrix}^T$$

But a direct evalution of the function to maximize and the constrains shows that, for example, the vector
$$ x = \begin{bmatrix}
31.5 & 31.5 & 0 & 0 \\
\end{bmatrix}^T$$

yields the same result for the function and is also part of the constraint surface, so it should be a critical point too, more over, there are infinetly many critical points, so way is the lagrange multipliers just giving me one result?

Best Answer

There is only one critical point but it is indefinite. This is seen for example by eliminating $d$ and studying the Hessian of the resulting unconstrained problem (see below for the details). Therefore there are no local extrema.

Your function is unbounded. For example, if we set $c=0$, then the constraint is satisfied by $d=63-a-b$, but this will not affect the value of $f$. Take a look: $$ f(a,b,0,63-a-b)=ab. $$ Clearly we can make this as large or as small as we wish, and there is no global maximum or minimum.


IMHO it is usually easier to use a linear constraint simply to eliminate one of the variables. If we here solve $d=63-a-b-c$ from the constraint, we get the function in three variables $$ g(a,b,c)=f(a,b,c,63-a-b-c)=ab-ac-c^2+63c. $$ Its gradient is $$ \nabla g(a,b,c)=(b-c,a,63-a-2c), $$ and this vanishes only at the critical point $P_1=(a,b,c)=(0,63/2,63/2)$. The Hessian of $g$ at $P_1$ is $$ H(g,P_1)=\left(\begin{array}{ccc}0&1&-1\\ 1&0&0\\ -1&0&-2\end{array}\right). $$ Its characteristic polynomial is $$ \chi_H(x)=\det(x I_3-H)=x^3+2x^2-2x-2. $$ We could solve for the zeros using Cardano, but for our purposes it suffices to check that $\chi_H(x)$ has zeros in the intervals $\lambda_1\in(-3,-2)$, $\lambda_2\in(-1,0)$, $\lambda_3=(1,2)$. Both signs occur, so the Hessian form is indefinite. In other words, $P_1$ is a saddle point. You can use Sylvester's criterion to reach the same conclusion — $P_1$ is not a local extremum.