# Exercise 5, answers

## Task 1

The stability rule becomes
$$
(2x_1,2x_2)-\lambda(1,1) = (0,0),
$$
and completementary rule becomes
$$
\lambda(x_1+x_2-1) = 0.
$$
Thus, we need to have:

$$
\left\{
\begin{align}
2x_1-\lambda=0\quad (1)\\
2x_2-\lambda=0\quad (2)\\
\lambda(x_1+x_2-1) = 0\quad (3)
\end{align}
\right.
$$

Now deducting equation (2), from equation (1) gives $2x_1-2x_2=0$, thus $x_1=x_2$.  Now if $\lambda= 0$, then $x_1=x_2=0$. However, this solution is not feasible. Thus, $\lambda\neq0$, which implies $x_1+x_2-1=0$, which gives $x_1=x_2=\frac12$ and, thus, $\lambda=1$. These values satisfy KKT conditions.

Because the problem is quadratic, it has an optimal solution. Since only one solution satisfies KKT conditions, this solution is optimal.

## Task 2

Now,
$$
\begin{align}
\nabla_x L_c(x^*,\lambda^*)& = \nabla f(x^*)+\sum_{k=1}^K \lambda^*_k\nabla h_k(x^*)+c\nabla(\sum_{k=1}^Kh_k(x^*)^2)\\
&=\nabla f(x^*)+\sum_{k=1}^K \lambda^*_k\nabla h_k(x^*)+2c\sum_{k=1}^Kh_k(x^*)\nabla h_k(x^*)\\
&=0+2c\sum_{k=1}^K0\nabla h_k(x^*)=0.
\end{align}
$$
The first zero is given by the KKT conditions and the second zero is due to the solution being feasible.

0a9be9746487549cdac25d5dee919891a7a2816d
ipynb
Jupyter Notebook
Exercise 5, answers.ipynb
bshavazipour/TIES483-2022
93dfabbfe1e953e5c5f83c44412963505ecf575a
MIT
Exercise 5, answers.ipynb
bshavazipour/TIES483-2022
93dfabbfe1e953e5c5f83c44412963505ecf575a
MIT
Exercise 5, answers.ipynb
bshavazipour/TIES483-2022
93dfabbfe1e953e5c5f83c44412963505ecf575a
MIT
2022-02-03T09:40:02.000Z
2022-02-03T09:40:02.000Z
Qwen/Qwen-72B
1. YES
2. YES