# Local extrema and minima of the multivariable function $f(x,y) = x^2y+y^2+xy$

Let $f(x,y) = x^2y+y^2+xy$ be a function, I want to find its local extrema an minima.

I easily find that $f$ has 2 critical points: $(x,y)=(0,0)$ and $(x,y) = (-1,0)$.

In order to find its local extrema, I now find the Hessian matrix of the quadratic form: $H_f(a) = \begin{bmatrix}2y&2x+1\\2x+1&2\end{bmatrix}$

Therefore for $(x,y) = (0,0)$ I find $H_f(0,0) = \begin{bmatrix}0&1\\1&2\end{bmatrix}$ and $H_f(-1,0) =\begin{bmatrix}0&-1\\-1&2\end{bmatrix}$

I now have to determine wether those matrices are positive definite, semi-positive definite, semi-negative definite, negative definite or non-definite. In other term if $x \in \mathbb{R^2}$ I have to determine the sign of $x^T.H_f(a).x$

• $\begin{bmatrix}x&y\end{bmatrix} \begin{bmatrix}0&1\\1&2\end{bmatrix} \begin{bmatrix}x\\y\end{bmatrix} = 2(x+y)^2$ Therefore $H_f(0,0)$ is definite positive, (0,0) is a local extremum.