# KKT Conditions for thresholds?

My main question is that when I use Lagrange Multipliers/KKT conditions to perform optimization with threshold constraints, I seem to get contradictory FOC.

Here is a characteristic example: take an optimization problem like the following:

\begin{align*} &\max_{x,y} 2x+y-(x-y)^2\\ &s.t.\\ &x,y \geq 0\\ &x+y \leq I \end{align*} For some value $$I>0$$. If I translate this directly to a lagrangian I believe the KKT conditions should give that I need to optimize: $$\mathcal{L}(x,y,\mu_1, \mu_2, \mu_3)=2x+y-(x-y)^2 + \mu_1(-x) + \mu_2(-y)+\mu_3(x+y-I)$$ However partial derivatives w.r.t $$\mu_1, \mu_2,\mu_3$$ gives: \begin{align*} &-x=0\\ &-y=0\\ &x+y-I=0\\ \end{align*} which gives a contradiction for $$I>0$$.

Could someone help me understand why I seem to get this contradiction?

Instead of differentiating w.r.t. the multipliers you should properly write the complementary slackness condition (defined in your link). In your case this is

$$-\mu_1 x=0$$

$$-\mu_2 y=0$$

$$\mu_3 (x+y-I)=0$$

This says that either the constraint binds with equality or the multiplier is zero. If you just differentiate with respect to $$\mu_1$$ for instance you would incorrectly conclude that always $$x=0$$, while this can be strictly positive.

• Ahh got it. So at an optimum we check for FOC for the term we wish to optimize but complementary slackness for inequality terms? Feb 21, 2022 at 0:19
• @naveace Yep correct.
– fes
Feb 21, 2022 at 9:03