<s>[INST] Karush-Kuhn-Tucker NLP 
Consider the nonlinear program
Minimize: \begin{align}f(x,y) = \frac{1}{2}x^2 - 10xy + 10y^2\end{align}
Subject to: \begin{align}2x +y^2 &\le 5 \implies g_1(x,y)=2x + y^2 -5 \le0 \\ x^2 - ay &\le 2 \implies g_2(x,y) =x^2 -ay -2 \le 0\end{align}
a) Is the above problem a convex optimisation problem?
b) For which value of $a$ is $(x,y)=(1,1)$ a KKT point?

My attempt:
a)
\begin{align}\nabla f(x,y) &= \begin{bmatrix}x - 10y \\ -10x + 20y\end{bmatrix}\end{align} and \begin{align}H_f(x,y) =\begin{bmatrix}1 & -10 \\ -10 & 20\end{bmatrix}\end{align} which is positive definite, hence $f$ is strictly convex.
\begin{align}\nabla g_1(x,y) &= \begin{bmatrix}2 \\ 2y\end{bmatrix} \implies H_{g_1}(x,y) = \underbrace{\begin{bmatrix}0 & 0 \\ 0 & 2\end{bmatrix}}_{\text{Positive Semidefinite}} \\
\nabla g_2(x,y) &= \begin{bmatrix}2x \\ -a\end{bmatrix} \implies H_{g_2}(x,y) = \underbrace{\begin{bmatrix}2 & 0 \\ 0 & 0\end{bmatrix}}_{\text{Positive Semidefinite}}\end{align}
Thus both $f$ and the set of constraints are convex. Hence this is, in fact, a convex optimization problem.
b) Let $$L(x,y,\lambda_1, \lambda_2) = \frac{1}{2}x^2 - 10xy + 10y^2 - \lambda_1( 2x +y^2 -5) - \lambda_2(x^2 -ay -2)$$
The Kuhn-Tucker conditions are given by 
\begin{align}x - 10y -2 \lambda_1 -2 \lambda_2 x &= 0 \tag{$1$} \\
-10x + 20y - 2 \lambda_1 y + a \lambda-2 &=0 \tag{$2$} \\
\lambda_1(2x + y^2 -5) &=0 \tag{$3$} \\
\lambda_2( x^2 -ay -2) &=0 \tag{$4$}\\
2x + y^2 -5 &\le 0 \tag{$5$} \\ 
x^2 -ay -2 &\le 0 \tag{$6$} \\
\lambda_1, \lambda_2 &\le 0 \tag{$7,8$}\end{align}
This is where I am stuck. Can anyone please help guide me as to how I can go about solving the rest of the problem?
 [/INST] When $(x,y)=(1,1)$, we have $2x+y^2=3<5$. That is, the first constraint is strictly satisfied, and $2x+y^2-5\neq 0$. That and (3) implies $\lambda_1 = 0$.
Substituting $(x,y)=(1,1)$ and $\lambda_1=0$ into (1) yields $\lambda_2=-4.5$.
Since $\lambda_2$ is nonzero, (4) dictates that $x^2-ay-2=1-a-2=0$, or $a=-1$.
</s>