Solution (source code)

= Solution

The first <partial derivatives> factor as
$$
g_x=4x(2+x^2-3y^2),\qquad g_y=4y(2+y^2-3x^2).
$$
If either coordinate vanishes, the other equation forces the other coordinate to vanish as well. If both are nonzero, subtracting the two bracket equations gives $x^2=y^2$, and then $x^2=y^2=1$. Thus the complete list of <stationary points> is $(0,0)$ and the four points $(\pm1,\pm1)$.

The <Hessian matrix> is
$$
H_g=\begin{pmatrix}8+12x^2-12y^2&-24xy\\-24xy&8+12y^2-12x^2\end{pmatrix}.
$$
At the origin it is $8I$, which is a <positive-definite matrix>. At the four other points its <eigenvalues> are $32$ and $-16$, independently of the signs. The <second-derivative test> therefore gives
$$
\boxed{(0,0):\text{ strict local minimum, }g=0;\qquad
(\pm1,\pm1):\text{ saddle points, }g=4.}
$$
There are no <local maxima>. The minimum at the origin is not global, since $g(t,t)=8t^2-4t^4\to-\infty$ as $|t|\to\infty$.