Solution (source code)

= Solution

For every <stationary point> found above, $\cos x_s\ne0$ and hence $z_s\ne0$. The <Hessian matrix> is diagonal, with entries $-(4x_s^2+3)z_s$ and $-2z_s$, so
$$
D=2(4x_s^2+3)z_s^2>0.
$$
The entries always have the same sign. Therefore
$$
\boxed{z_s>0:\ \text{strict local maximum};\qquad z_s<0:\ \text{strict local minimum}}.
$$
The root on tangent branch $(n\pi-\pi/2,n\pi+\pi/2)$ has cosine sign $(-1)^n$. Thus even-numbered branches supply maxima and odd-numbered branches minima, symmetrically paired about the origin. There are no saddle points among these nondegenerate <stationary points>. The origin is a maximum with $z_s=1$, and is in fact the global maximum since $\cos x\le1$ and $e^{-x^2-y^2}\le1$.