So I have this problem with the following task.
Find the points that satisfy necessary condition for existance of minimas:
$f(x,y)=-(x^2+y^2)$ constrains $\begin{cases} x + 2y\leq3\\ x\geq0 \\ y\geq0 \end{cases}$
The problem is that after creating system of equations for gradients I compare them to 0 and end up with one more unknown variable.
Introducing three slack variables $\{s_k\}$ we transform the inequalities into equations and the Lagrangian formulation gives
$$ L(x,y,\lambda_1,\lambda_2,\lambda_3,s_1,s_2,s_3) = x^2+y^2+\lambda_1(x+2y-3+s_1^2)+\lambda_2(x-s_2^2)+\lambda_3(y-s_3^2) $$
so the stationary points are given by the solutions to
$$ \nabla L = 0 = \cases{ \lambda_1+\lambda_2+2 x \\ 2 \lambda_1+\lambda_3+2 y \\ s_1^2+x+2 y-3 \\ x-s_2^2 \\ y-s_3^2 \\ \lambda_1 s_1 \\ \lambda_2 s_2 \\ \lambda_3 s_3 \\} $$
with $f(x,y) = x^2+y^2$ the feasible results are
Here $s_k = 0$ indicates that the corresponding restriction is actuating.