\section{Spherical Coordinates}
\begin{enumerate}[1.]
\item 
{\it 
A surface in ${\mathbb R}^3$ has the equation $x^2+y^2=z^2-4$. 
Convert the equation of this surface to cylindrical and spherical coordinates.}

\bigskip

\begin{itemize}

\item In cylindrical coordinates, we have $r^2=x^2+y^2$, so the equation of the surface is 
$r^2=z^2-4$.

\item In spherical coordinates, we have 
$r=R\sin\phi$ and $z=R\cos\phi$, so our equation is $R^2\sin^2\phi=R^2\cos^2\phi-4$.
(Optional: This can be simplified to $R^2(\cos^2\phi-\sin^2\phi)=4$, or $R^2\cos(2\phi)=4$.)

\end{itemize}

\bigskip
\item 
{\it A surface in ${\mathbb R}^3$ has the equation $R^2-4R\sin\phi+3=0$
in spherical coordinates. Find its equation in cylindrical coordinates.  }

\bigskip

We have $r= R\sin\theta$ and $R^2=r^2+z^2$, hence our equation in
cylindrical coordinates is $r^2+z^2-4r+3=0$. (Optional: To see what kind of a surface
this is, we rewrite the equation as $(r-2)^2+z^2=1$. This is the torus obtained
by rotating the circle $(x-2)^2+z^3=1$ in the $xz$-plane around the $z$-axis.)


\bigskip



\item {\it Evaluate the integral
$\displaystyle \iiint_D \frac{\cos(x^2+y^2+z^2)}{\sqrt{x^2+y^2+z^2}}\, dV,$
 where $D$ is the region that lies above the cone
$z=\sqrt{x^2+y^2}$ and inside the sphere $x^2+y^2+z^2=4$.}


\bigskip


We use spherical coordinates:
\begin{align*}
 \iiint_D & \frac{\cos(x^2+y^2+z^2)}{\sqrt{x^2+y^2+z^2}}\, dV
 = \int_0^{2\pi}d\theta \int_0^{\pi/4} d\phi \int_0^2 \frac{\cos(R^2){R}}R^2\sin\phi \,dR
 \\
 &= \int_0^{2\pi}d\theta \int_0^{\pi/4} \sin\phi \,d\phi \int_0^2 \cos(R^2)R \,dR
 \\
 &= 2\pi \left[ -\cos\phi\right]_0^{\pi/4} \left[ \frac{\sin(R^2)}{2}\right]_0^{2}  
 \\
 &
 = 2\pi \left( 1-\frac{\sqrt{2}}{2}\right) \left( \frac{\sin 4}{2} \right) 
  = \pi (\sin 4) \left( 1-\frac{\sqrt{2}}{2}\right)  
\end{align*}

\bigskip





\item {\it Write the following integrals as iterated integrals in your choice of coordinates (rectangular $(x,y,z)$, 
cylindrical $(r,\theta,z)$, or spherical $(R,\theta,\phi)$). You do not need to evaluate the integrals.

\medskip

(a)
$ \iiint_D (x+y) \, dV$, where $D$ is the region bounded by the planes $y=x$, $y=4x$,
$x=2$, $z=0$, and $z=x$.}

\medskip

In rectangular coordinates:

$$
 \int_0^2 \int_x^{4x}  \int_0^{x}  (x+y)dz\,dy\,dx
$$

\medskip

(b) {\it 
$\iiint_D z^2 \, dV$, where $D$ is the spatial region outside the cone $z=\sqrt{x^2+y^2}$,
inside the cylinder $x^2+y^2=4$, and above the $xy$-plane. }

\medskip

We use cylindrical coordinates:
$$
 \int_0^2 \int_0^{2\pi}  \int_0^{r}  z^2 r\,dz\,d\theta\, dr
$$

\bigskip

\item
{\it  Write out the integral
$\iiint_W x^2\,dV$
as an iterated integral in cylindrical coordinates, if $W$ is the three-dimensional
solid inside
the cylinder $x^2+y^2=1$, bounded from below by the cone $z=\sqrt{x^2+y^2}$ and
from above by the sphere $x^2+y^2+z^2=4$.  (You do not need to evaluate the integral.)}


\bigskip

In cylindrical coordinates, the cylinder, cone and sphere have equations 
$r=1$, $z=r$, $r^2+z^2=1$.  The inequalities describing the solid are
$0\leq r\leq 1$, $0\leq\theta\leq 2\pi$, $r\leq z\leq \sqrt{4-r^2}$.
The Jacobian for cylindrical coordinates is $r$.  Also, $x^2=r^2\cos^2\theta$.  Hence the integral is
$$\int_0^{2\pi}\int_0^1\int_r^{\sqrt{4-r^2}}r^3\cos^2\theta\,dz
\, dr\,d\theta.$$

\bigskip

\item
{\it Find the mass of the solid bounded from below by the cone 
$\phi=\pi/3$ and from above by the sphere $R=2$, if the density at a point 
with spherical coordinates $(R,\theta,\phi)$ is $R$.  (Evaluate the integral.)
}

\bigskip

The solid (shaped like an ice-cream cone) is described in spherical coordinates
by the inequalities $0\leq R\leq 2$, $0\leq\theta\leq 2\pi$,
$0\leq\phi\leq \pi/3$.  The Jacobian is $R^2\sin\phi$.  Hence the mass is
$$\int_0^2\int_0^{\pi/3}\int_0^{2\pi} R \cdot  R^2\sin\phi\,
d\theta\,d\phi\,d\rho
=\int_0^2\int_0^{\pi/3}2\pi R^3\sin\phi\, d\phi\,d R$$
$$=\int_0^2 2\pi R^3\left(-\cos\phi\Big|_0^{\pi/3}\right)\, d R
=\int_0^2 2\pi R^3(-\frac{1}{2}+1)\, d R$$
$$=\int_0^2 \pi R^3\, d R
=\frac{\pi R^4}{4}\Big|_0^2=\frac{16\pi }{4}=4\pi.$$


\bigskip


\item{\it Use the change of variables $x=u^2$, $y=v^2$, $z=w^2$ to evaluate
the volume of the region bounded by the coordinate planes and the 
surface $\sqrt{x}+\sqrt{y}+\sqrt{z}=1$.}


\medskip
We first change variables as indicated above.  The Jacobian is 
$\frac{\partial(x,y,z)}{\partial(u,v,w)}=8uvw$, and our region in the new
coordinates is given by the inequalities $u\geq 0$, $v\geq 0$, $w\geq 0$,
$u+v+w\leq 1$.  We compute its volume:
$$V=\int_0^1\int_0^{1-u}\int_0^{1-u-v}8uvw\,dwdvdu
=\int_0^1\int_0^{1-u} 4uvw^2\Big|_{w=0}^{1-u-v}dvdu$$
$$=\int_0^1\int_0^{1-u} 4uv(1-u-v)^2dvdu.$$
This could be expanded and integrated in a straightforward way, but
the calculations are a little bit shorter if we change variables again, from 
$(u,v)$ to $(u,t)$ with $t=1-u-v$:
$$V=\int_0^1\int_0^{1-u} 4u(1-u-t)t^2dtdu
=\int_0^1\int_0^{1-u} (4u(1-u)t^2-4ut^3)dtdu$$
$$=\int_0^1\Big(\frac{4u(1-u)t^3}{3}-ut^4\Big)\Big|_{t=0}^{1-u} du$$
$$=\int_0^1\Big(\frac{4u(1-u)^4}{3}-u(1-u)^4\Big)du
=\int_0^1\frac{u(1-u)^4}{3}du.$$
Again, we change variables for convenience, letting $s=1-u$:
$$V=\int_0^1\frac{(1-s)s^4}{3}ds
=\int_0^1\frac{s^4-s^5}{3}ds
=\frac{1}{3}(\frac{s^5}{5}-\frac{s^6}{6})\Big|_0^1=\frac{1}{90}.$$
\end{enumerate}