Example (problem using complementary slackness)

Problem

$$ \begin{align*} \text{Minimise } & x_1 - 3x_2 \\ \text{suject to } & x_1^2 + x_2^2 \leq 4, \\ & x_1 + x_2 \leq 2. \end{align*} $$

Let the Lagrangian $$ \begin{align*} L(\v x, \v s, \v \lambda) &=x_1 - 3x_2 - \lambda_1(x_1^2 + x_2^2 + s_1 - 4) - \lambda_2(x_1 + x_2 + s_2 - 2) \\ &= \left[(1-\lambda_2)x_1 -\lambda_1 x_1^2\right] + \left[(-3 - \lambda_2)x_2 - \lambda_1 x_2^2\right] - \lambda_1 s_1 - \lambda_2 s_2 + 4\lambda_1 + 2\lambda_2. \end{align*} $$ Since $\lambda_1,\lambda_2\leq 0$, setting the derivatives of the quadratic terms to zero minimises them: $$ \begin{align*} 1 - \lambda_2 - 2\lambda_1 x_1 &= 0, \tag{1} \\ -3 - \lambda_2 - 2\lambda_1 x_2 &= 0. \tag{2} \end{align*} $$

Now we make use of complementary slackness. (1) and (2) are inconsistent if $\lambda_1 = 0$, so we must have $\lambda_1 < 0, s_1 = 0$ and so $$x_1^2 + x_2^2 = 4. \tag{3}$$

We know have two cases for $\lambda_2 s_2 = 0$: