Solution (source code)

= Solution

The <contour plot> is symmetric under either $x\mapsto-x$ or $y\mapsto-y$, because $f$ depends only on their squares. Denote the three critical heights by $m=\tfrac72\ln3$, $h=\tfrac14+\tfrac72\ln(7/2)$ and $M=1+\tfrac72\ln3$, where $m<h<M$.

For $m<c<h$, the <level set> $f=c$ consists of separate closed curves around the two <minima>. At $c=h$ the branches meet at the two <saddle points>. For $h<c<M$, there is an inner closed curve surrounding the <local maximum> and an outer closed curve surrounding all five <stationary points>. At $c=M$ the inner curve shrinks to the origin; for $c>M$ only the outer closed curve remains. At each <saddle point> the critical <level set> crosses in the two directions determined by
$$
-\delta x^2+\frac{12}{7}\delta y^2=0,
\qquad\delta y=\pm\sqrt{\frac7{12}}\,\delta x.
$$
The figure plots representative <level sets>, including the critical saddle height; its second panel adds the <gradient> directions requested below.

\Image[/past-exam-of-the-mathematics-course-of-the-year-1-of-the-natural-sciences-course-of-the-university-of-cambridge/2020/paper-1-2020-q14-contours-gradient.png]
{title=Contour topology and gradient directions around two minima, a maximum and two saddles}