= Solution
The <partial derivatives> are $g_x=\sin x$ and $g_y=y$, so all <stationary points> are $(n\pi,0)$ for integers $n$. Their <Hessian matrix> is $\operatorname{diag}(\cos x,1)$. At even multiples of $\pi$ it is a <positive-definite matrix>, whereas at odd multiples it has one positive and one negative <eigenvalue>. Consequently
$$
\boxed{(2n\pi,0):\text{ strict minima, }g=0;\qquad
((2n+1)\pi,0):\text{ saddle points, }g=2.}
$$
There are no <local maxima>. Since both $1-\cos x$ and $y^2/2$ are nonnegative, these are also <global minima>. In the requested open plotting window, the <stationary points> are $(0,0)$ and $(\pm\pi,0)$; the <local minima> at $(\pm2\pi,0)$ lie on excluded edges.
For a <level set> $g=c$, solving for the vertical coordinate gives
$$
y=\pm\sqrt{2(c-1+\cos x)},\qquad c\geq1-\cos x.
$$
For $0<c<2$ these <level sets> are closed ovals around each <local minimum>. At $c=0$ the <level sets> shrink to the <local minima>. The <level set> through the <saddle points> is
$$
g=2:\qquad y=\pm2\cos(x/2),
$$
where the two signed branches together describe the same set as $y=\pm2|\cos(x/2)|$. They cross at $(\pm\pi,0)$ and reach $(0,\pm2)$. The crossing slopes at a <saddle point> are $\pm1$, as also follows from the local <quadratic form> $(-\delta x^2+\delta y^2)/2$. For $c>2$, the upper and lower <level sets> remain separate and extend across the plotting window without meeting the horizontal axis.
\Image[/past-exam-of-the-mathematics-course-of-the-year-1-of-the-natural-sciences-course-of-the-university-of-cambridge/2015/paper-1-cosine-contours.png]
{title=Contours of the cosine-plus-quadratic function, with its saddle level and stationary points labelled}
Back to article page