Maximize the following equation under a constraint Maximize $g(x,y)=x^4+y^4$ on $x^2+y^2=9$.
Our professor had sped through it and I didn't fully understand how they arrived at the answer. Some clarification on it would be greatly appreciated. I have attached the writing below:

 A: $g(x,y) = x^4 + y^4 = x^4 + \underbrace{\big(\sqrt{9-x^2}\big)^4}_{from~constraint} = g(x)$
$${d g(x) \over d x} = 4 x^3-4 x \left(9-x^2\right) = 4x \left( x^2 - \left(9-x^2\right) \right) = 4 x^2 (2 x^2 - 9)$$
Set this function of a single variable $x$ to equal $0$ (for an extremum) and thus find:
$$\left\{\{x\to 0\},\left\{x\to -\frac{3}{\sqrt{2}}\right\},\left\{x\to \frac{3}{\sqrt{2}}\right\}\right\}$$
Then test each individually to see if it is a maximum, minimum or inflection point.  (You can also calculate second-order derivatives to solve that problem, or plot the functions...)

It is clear that $x=0$ corresponds to a local maximum, while the other solutions correspond to local minima.
By the way, the handwritten notes say "obviously $(0,0)$ is a minimum," which is false.  That point does not obey the constraints and is hence invalid.
A: Since we are finding a maximum on a circle centered at the origin it makes sense to convert both equations to polar coordinates:
\begin{eqnarray} g(r,\theta)&=&(r\cos\theta)^4+(r\sin\theta)^4\\
                            &=&r^4(\cos^4\theta+\sin^4\theta)\\
\frac{dg}{dr}&=&4r^3(\cos^4\theta+\sin^4\theta)=0\\
\frac{dg}{d\theta}&=&-4r^4\cos^3\theta\sin\theta+4r^4\sin^3\theta\cos\theta\\
&=&-4r^4\sin\theta\cos\theta(\cos^2\theta-\sin^2\theta)\\
&=&-2r^4(2\sin\theta\cos\theta)(\cos^2\theta-\sin^2\theta)\\
&=&-2r^4\sin(2\theta)\cos(2\theta)\\
&=&-r^4\sin(4\theta)=0
 \end{eqnarray}
So extrema should occur when $\sin(4\theta)=0$. And $\sin(4\theta)=0$ only when $4\theta$ is a whole multiple of $\pi$. Thus you must check points of the circle corresponding to multiples of $\dfrac{\pi}{4}$.
You should find that the minima occur when $\theta$ is an odd multiple of $\dfrac{\pi}{4}$ and the maxima will occur when $\theta$ is an even multiple of $\dfrac{\pi}{4}$ (i.e. a multiple of $\dfrac{\pi}{2})$.
$$g\left(3,\frac{\pi}{4}\right)=g\left(3,\frac{3\pi}{4}\right)=g\left(3,\frac{5\pi}{4}\right)=g\left(3,\frac{7\pi}{4}\right)=\left(\pm\frac{3}{\sqrt{2}}\right)^4+\left(\pm\frac{3}{\sqrt{2}}\right)^4=\frac{81}{2}$$
$$g(3,0)=g\left(3,\frac{\pi}{2}\right)=g\left(3,\pi\right)=g\left(3,\frac{3\pi}{2}\right)=3^4=81$$
