An inequality constraint problem

71 Views Asked by At

I have the following constrained optimization problem

$$min \space \frac{1}{2}(x_1-1)^2+\frac{1}{2}(x_2-2)^2$$ s.t. $x_1-x_2 = 1$ and $x_1+x_2\le2$

Now, setting up the Lagrangian:

$$L(x_1, x_2, \lambda, \mu) = \frac{1}{2}(x_1-1)^2+\frac{1}{2}(x_2-2)^2 - \lambda(x_1-x_2-1)-\mu(x_1+x_2-2)$$

Then I try to make up the KKT-conditions:

$$\frac{\delta L}{\delta x_1} = (x_1-1) - \lambda -\mu = 0$$ $$\frac{\delta L}{\delta x_2} = (x_2-2) + \lambda -\mu = 0$$ $$\frac{\delta L}{\delta \lambda} =x_1-x_2-1 = 0 $$ $$\mu(x_1+x_2-2) = 0 ,\space \mu \ge 0$$

Now when constraint $x_1+x_2\le2$ is not binding, $\mu$ should be zero and then we find that $x_1 = 2$ and $x_2 = 1$.

But we can see that the constraint $x_1+x_2\le2$ is binding and thus $\mu$ should be $\gt 0$.

When we then work out for $x_1$ and $x_2$, we find that $x_1 = \frac{3}{2}$ and $x_2 = \frac{1}{2}$.

But then when I check the dual feasibility, I get $\mu \lt 0$.

But when I check it numerically, the solutions for $x_1$ and $x_2$ seem correct.

What mistake am I making?

Edit:

I think I set up the Lagrangian wrongly. As I try to minimize the function, the Lagrangian should be:

$$L(x_1, x_2, \lambda, \mu) = \frac{1}{2}(x_1-1)^2+\frac{1}{2}(x_2-2)^2 + \lambda(x_1-x_2-1)+\mu(x_1+x_2-2)$$

Because this allows the primal problem to be correct. This gives me the solution $x_1 = \frac{3}{2}$ and $x_2 = \frac{1}{2}$ and with $\mu = \frac{1}{2}$ and $\lambda = -1$.

1

There are 1 best solutions below

1
On

Write $x_2=t$ and $x_1=t+1$, then you have to find a minumum of $$f(t) = t^2+(t-2)^2 = 2t^2-4t+4$$ where $t\leq {1\over 2}$. Since it global minimum is at $t= 1$ we see that it is decreasing on $(-\infty,1)$, so $$f(t)\geq f({1\over 2}) =...$$