I've got problems to solve the following exercise. Could anybody please try to help me. :)
Let functions $f, g_i, h_l : \mathbb{R}^n → \mathbb{R}$ for $i ∈ [m_1]$ and $l ∈ [m_2]$ be given. We consider the optimization problem
$\max_{x\in \mathbb{R}^n} f(x)$ s.t.
$g_i(x) \le 0$ $\forall i \in [m_1]$
$h_l(x) = 0$ $\forall l \in [m_2]$
Show: If all the functions $f, g_i, h_l (i ∈ [m_1], l ∈ [m_2])$ are affine, then $x_∗ ∈ \mathbb{R}^n$ is an optimal solution of (P), if and only if both of the following statements are true:
- $g_i(x_∗)\le 0$ $\forall i∈[m_1]$ and $h_l(x_∗)=0$ $∀l∈[m_2]$
- There exists λ ∈ $\mathbb{R}^{m_1}_{\ge0}$ and μ ∈ $\mathbb{R}^{m_2}$ such that: (1) $∇f(x_∗) = \sum_{i=1}^{m_1} λ_i∇g_i(x_∗) + \sum_{l=1}^{m_2} μ_l∇h_l(x_∗)$ and (2) $\sum_{i=1}^{m_1} λ_ig_i(x_∗) = 0$