Solution (source code)

= Solution

In the standard <spherical coordinate system>, $\theta$ is measured from the positive $z$ axis. The <radial unit vector in spherical coordinates> is
$$
\boxed{e_r=\sin\theta\cos\phi\,i+\sin\theta\sin\phi\,j+\cos\theta\,k.}
$$
The coordinate forms of the <elliptic paraboloid> are given in the labelled parts below.

For the other surface, $r^2\cos2\theta=r^2(\cos^2\theta-\sin^2\theta)$ converts to
$$
\boxed{z^2-x^2-y^2=a.}
$$
For $a>0$, this is a <two-sheeted hyperboloid>, with two disconnected sheets starting at $z=\pm\sqrt a$ and opening along the $z$ axis. For $a<0$, it is a <one-sheet hyperboloid>:
$$
x^2+y^2-z^2=|a|.
$$
Its waist is the circle $z=0$, $x^2+y^2=|a|$. Both are surfaces of revolution about the $z$ axis and approach the cone $z^2=x^2+y^2$ far from the origin.

The figure shows $a=1$ and $a=-1$; scaling all coordinates by $\sqrt{|a|}$ gives the other magnitudes.

\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2006/ia/paper-1-hyperboloids.png]
{title=Two-sheeted and one-sheet hyperboloids for positive and negative values of a}