How to solve $\min(x^2+y^2)$, $x\ge1, y\ge-2$, using the KKT conditions?

21 Views Asked by At

I'm trying to understand better optimisation problems and in particular the KKT conditions. To this end, consider the minimisation problem $\min(x^2+y^2)$ subject to $x\ge1$ and $y\ge -2$.

It's clear that the solution is $x=1, y=0$. However, how do I get this by applying the KKT conditions? And is this a kind of problem where they are necessary and sufficient?

1

There are 1 best solutions below

0
On

I managed to solve this in the process of writing up the question, so I figured I'd post it for future reference and in case it might help someone else.

Define the Lagrangian $$L(x,y,\lambda,\mu) = x^2+y^2-\lambda(x-1)-\mu (y+2).$$ Imposing $\nabla L=0$ you get the conditions $2x=\lambda$ and $2y=\mu$. From this we can see that

  1. If $\mu\neq0$, then $y=-2$, thus $\mu=-1$, which isn't consistent with $\mu\ge0$.
  2. If $\mu=\lambda=0$ the only solution would be $x=y=0$ which isn't feasible.
  3. If $\mu=0$ and $\lambda\neq0$, then $x=1$, $\lambda=2$. But also from $2y=\mu$ we'd get $y=0$. The corresponding cost is $1^2+0^2=1$, and therefore this is the solution I know I should have got from the beginning (my initial problem is that I did some miscalculations in this step and didn't correctly get this solution as I expected).

For completeness, we can also verify what the dual problem looks like. We have $$g(\lambda,\mu) \equiv \inf_{x,y} L(x,y,\lambda,\mu) = \inf_{x,y}[x(x-\lambda) + y(y-\mu) + \lambda-2\mu] \\ = -\frac14\lambda(\lambda-4) - \frac14\mu(\mu+8).$$ Maximising this in the dual feasible set, $\lambda,\mu\ge0$, we easily get the solution $\sup_{\lambda,\mu\ge0} g(\lambda,\mu) = g(2,0) = 1$, which matches the primal solution, hence confirming strong duality.

Finally, it's worth noting that the Slater conditions are not satisfied in the case, as one of the inequalities is active on the solution. However, I think the LICQ constraint is satisfied, being the gradients of the constraints linearly independent, which is consistent with KKT correctly producing the solution.