Quartic potential with fourfold symmetry (source code)

= Quartic potential with fourfold symmetry
{title2=$f=x^2+y^2-\tfrac12(x^4+y^4)-b x^2y^2$}

For $b>0$, the origin is a strict <local minimum>. The four axis points at distance one have <Hessian> eigenvalues $-4$ and $2(1-b)$. The four diagonal points with $x^2=y^2=1/(1+b)$ have <Hessian> eigenvalues $-4$ and $-4(1-b)/(1+b)$. Thus for $b<1$ the diagonal points are the global maxima and the axis points are <saddle points of a scalar function>; for $b>1$ these roles reverse. In <polar coordinates>, $f=r^2-\tfrac12q(\theta)r^4$, where $q=1+\tfrac12(b-1)\sin^2(2\theta)>0$. Maximizing over $r$ gives $1/(2q)$ and proves the global statements. At $b=1$, $f=\tfrac12-\tfrac12(r^2-1)^2$, so the entire unit circle is the maximum set.