lagrange multipliers inconsistency

77 Views Asked by At

Suppose I want to maximize $c^T x$ in two dimensions subject to $x_1+x_2=1, c_1 \neq c_2$.

Then using Lagrange multipliers I get:

$L(x, \lambda)=c_1x_1+c_2x_2-\lambda(x_1+x_2-1)$

But then setting the partial derivatives to $0$, I get $c_1=\lambda$ and $c_2=lambda$, which is inconsistent for $\lambda$.

What is the issue? Thank you!

4

There are 4 best solutions below

0
On

Your Lagrange function has no stationary points. You required $c_1\neq c_2$. The assumption that a maximiser (minimiser) exists leads to $c_1=c_2$. Thus there are no extrema.

0
On

Yo want to maximize $c_1x_1+c_2x_2$ where $x_2=1-x_1$, that is maximize $c_1x_1+c_2-c_2x_1$. But that function has no extrema.

0
On

Recall the geometric motivation for the Lagrange multiplier method: you are looking for points on the constraint curve at which its normal is parallel to the gradient of the objective function. In your question, the constraint is the straight line $x_1+x_2=1$, which has the constant normal $(1,1)^T$. On the other hand, the gradient of $c^Tx$ is $c$, also constant. The only way for these vectors to be parallel is for $c_1=c_2$, but you’ve excluded that possibility. Note, that if you do allow $c_1=c_2$, then $c^Tx$ is constant along the line.

0
On

There is no issue.

The constraint $x_1 + x_2 = 1$ suggests that the solution lies in a straigh line in the plane $(x_1, x_2)$. Choosing to minimize any linear function subject to this constraint can only lead to $\pm \infty [1, -1 ]^T$.

Infinity is a valid analytic solution, however, numerically its not very nice. The system you are trying to solve when setting the partial derivatives of the Lagrangian to zero is $$ \begin{bmatrix} 0 & 0 & 1 \\ 0 & 0 & 1 \\ 1 & 1 & 0 \end{bmatrix} \begin{bmatrix} x_1 \\ x_2 \\ \lambda \end{bmatrix} = \begin{bmatrix} c_1 \\ c_2 \\ 1\end{bmatrix} \,,$$ clearly, the coefficient matrix is singular.

If the infinite solution is not what you are looking for, you can addressed this in 2 ways:

  • Include a positive-definite term in the cost function, e.g., $c^T x + \tfrac{1}{2} x^T Q x$
  • Include an additional contraint (maybe an inequality constraint) that is linearly independent to the existing one.