Stationary points of a cosine-modulated Gaussian (source code)

= Stationary points of a cosine-modulated Gaussian
{title2=$z(x,y)=e^{-x^2-y^2}\cos x$}

The <gradient> vanishes only when $y=0$ and $\tan x=-2x$. On each tangent branch, $\tan x+2x$ increases strictly from negative to positive infinity, so it has exactly one root $x_s$. With $z_s=e^{-x_s^2}\cos x_s$, the <Hessian matrix> is diagonal with entries $-(4x_s^2+3)z_s$ and $-2z_s$. Its determinant is positive, so every stationary point is a strict maximum when $z_s>0$ or a strict minimum when $z_s<0$. Signs alternate between successive tangent branches. This gives infinitely many nondegenerate extrema under a decaying <Gaussian function> envelope.