\documentclass[12pt]{article}
\usepackage{latexsym,amsmath,epsfig}
\newcommand{\ds}{\displaystyle}
\newcommand{\vp}{$\vphantom{\big|}$}

\newcommand{\R}{\textbf{R}}
\newcommand{\Item}{\item{$\Box$}\quad}

\newcommand{\Answer}[1]{$\phantom{.}$\hfill
        #1\quad\fboxsep 20pt \fbox{$\phantom{\Big|Answer}$}}

\newcommand{\MyTallAnswer}[2]{$\phantom{.}$\hfill
        #1\quad\fboxsep 20pt\fbox{$\vphantom{\Big|}#2$}}

\newcommand{\MyAnswer}[2]{$\phantom{.}$\hfill
        #1\quad\fboxsep 5pt\fbox{$\vphantom{\Big|}#2$}}

\newcommand{\soln}{\paragraph{Solution}}
\newcommand{\sep}{{\medskip\hrule\bigskip}}
\newcommand{\blank}{\underline{$\phantom{A blank}$}}

\setlength{\textwidth}{6.5in}
\setlength{\topmargin}{-0.5in}
\setlength{\oddsidemargin}{0in}
\setlength{\textheight}{9.0in}
\begin{document}
\begin{center}

\textbf{Mathematics 241 -- Multivariable Calculus}\\
\textbf{Midterm 3 -- Solutions} \\
\textbf{November 30}
\end{center}

\vskip 10pt
\noindent
I.  
\begin{enumerate}
\item[A)] (15) Let ${\bf F}$ be the vector field
$${\bf F}(x,y,z) = (xz - y^2, xy + z, 2x + \sin(y)).$$
Compute the divergence ${\rm div}({\bf F})$ and the curl ${\rm curl}({\bf F})$.
\item[]
{\it Solution:}  Using the $\nabla$ operator, the divergence is
$${\rm div}({\bf F}) = \nabla \cdot {\bf F} = \frac{\partial}{\partial x}(xz - y^2) + \frac{\partial}{\partial y}(xy+z) + \frac{\partial}{\partial z}(2x + \sin(y)) = z + x.$$
The curl is
$${\rm curl}({\bf F}) = \nabla \times {\bf F} = (\cos(y) - 1, x - 2, 3y).$$
\item[B)] (5) Show that if ${\bf F} = (F_1,F_2,F_3)$ is 
any vector field on a domain in ${\bf R}^3$ whose
component functions have continuous second-order partial derivatives,
then  ${\rm div}({\rm curl}({\bf F})) = 0$.  
\item[] {\it Solution:}  
\begin{eqnarray*}
{\rm div}({\rm curl}({\bf F})) &=& {\rm div}\left(\frac{\partial F_3}{\partial y} - 
\frac{\partial F_2}{\partial z}, -\left(\frac{\partial F_3}{\partial x} - 
\frac{\partial F_1}{\partial z}\right), \frac{\partial F_2}{\partial x} - 
\frac{\partial F_1}{\partial y}\right)\\
& = & \frac{\partial}{\partial x}\left(\frac{\partial F_3}{\partial y} - 
\frac{\partial F_2}{\partial z}\right) + \frac{\partial}{\partial y} \left(-\left(\frac{\partial F_3}{\partial x} - \frac{\partial F_1}{\partial z}\right)\right) 
+ \frac{\partial}{\partial z}
\left(\frac{\partial F_2}{\partial x} - \frac{\partial F_1}{\partial y}\right)\\
&=&
\frac{\partial^2 F_3}{\partial y\partial x} - 
\frac{\partial^2 F_2}{\partial z\partial x} - 
\frac{\partial^2 F_3}{\partial x\partial y} + 
\frac{\partial^2 F_1}{\partial z\partial y} + 
\frac{\partial^2 F_2}{\partial x\partial z} - 
\frac{\partial^2 F_1}{\partial y\partial z}\\
&=& 0\\
\end{eqnarray*}
by the equality of the mixed partial derivatives.
\end{enumerate}

\vskip 10pt
\noindent
II.  All parts of this problem refer to the function 
$$f(x,y) = x^3 + y^2 - 6xy + 6x + 3y.$$
\begin{enumerate}
\item[A)] (10) Determine all critical points of $f$.
\item[] {\it Solution:}  The critical points are the solutions of  
\begin{eqnarray*}
0 = f_x &=& 3x^2 - 6y + 6\\
0 = f_y &=& 2y - 6x + 3
\end{eqnarray*}
Solving for $y$ in the second equation, 
$y = 3x - 3/2$.  Substituting into the first equation,
$0 = 3x^2 - 18x + 15 = 3(x - 1)(x - 5)$ and  $x=1$ or $x = 5$.  
The critical points are 
$$(1, 3/2), \quad (5, 27/2).$$ 
\item[B)] (15) Use the Hessian Criterion (second derivative test)
to classify each of the critical points as a local maximum, a local
minimum, a saddle point, or a degenerate critical point.  
\item[] {\it Solution:}  The second derivatives of $f$ are
$$f_{xx} = 6x, \quad f_{xy} = -6, \quad f_{yy} = 2.$$
\begin{itemize}
\item At $(1,3/2)$, the Hessian matrix is
$$D^2(f)(1,3/2) = \begin{pmatrix} 6 & -6\\ -6 & 2 \end{pmatrix}$$
Since $\det(D^2(f)(1,3/2)) = 12 - 36 = -24 < 0$, this is a {\it saddle point}.
\item At $(5,27/2)$, the Hessian matrix is
$$D^2(f)(5,27/2) = \begin{pmatrix} 30 & -6\\ -6 & 2 \end{pmatrix}$$
Since $\det(D^2(f)(5,7/2)) = 60 - 36 = 24 > 0$ and $30 > 0$, this is a {\it local minimum}.
\end{itemize}
\end{enumerate}

\vskip 10pt
\noindent
III.  (20) A mountain has the shape of the graph 
$z = f(x,y) = 4 - x^2 - \frac{y^2}{4},$
where $x,y$ are east-west and north-south map coordinates respectively, 
and $z$ is the altitude (in thousands of feet).   
If you hike along a trail on the mountain described by the circle
$g(x,y) = x^2 + y^2 = 1$ on the map, what are the highest and lowest altitudes
that you reach?

\vskip 10pt
\noindent
{\it Solution:}  We want to maximize and minimize $f(x,y)$ on the constraint
curve $g(x,y) = 1$, so this is a job for Lagrange multipliers:
\begin{eqnarray*}
f_x = -2x  &=& 2\lambda x = \lambda g_x\\
f_y = -y/2 &=& 2\lambda y = \lambda g_y\\
x^2 + y^2 &=& 1
\end{eqnarray*}
From the $x$ equation, we see that either $x = 0$ or $\lambda = -1$.  
If $x = 0$, then $y = \pm 1$ from the constraint equation.  If $\lambda = -1$,
then the $y$ equation gives $y = 0$, and $x = \pm 1$ from the constraint.
Hence there are four points that solve the LM equations: $(1,0), (-1,0), (0,1), (0,-1)$.
The altitudes at these points are $f(1,0) = f(-1,0) = 3$ (thousand feet) and
$f(0,1) = f(0,-1) = 3.75$ (thousand feet).  The maximum altitude is $3750$ and 
the minimum altitude is $3000$ feet at the points on the trail.  

\vskip 10pt
\noindent
IV.  All parts of this problem refer to the region $D$ in the right half-plane ($x \ge 0$),
bounded by $y = x$, $y = -x$ and $x^2 + y^2 = 9$.
\begin{enumerate}
\item[A)] (5) Sketch the region $D$.
\item[] {\it Solution:}  The region is a {\it quarter circle}, with the straight edges
along the two given lines and curved edge along the circle of radius 3, center $(0,0)$.  
\item[B)] (10) What would the limits of integration be 
to compute $\int\!\int_D f(x,y)\ dx\ dy$ integrating with respect to $y$ first, then $x$?
\item[] {\it Solution:}  This way, we must split the region along $x = 3/\sqrt{2}$.
$$\int_0^{3/\sqrt{2}} \int_{-x}^x f(x,y)\ dy dx + 
\int_{3/\sqrt{2}}^3 \int_{-\sqrt{9-x^2}}^{\sqrt{9 - x^2}} f(x,y)\ dy dx.$$
\item[C)] (10) What would the limits of integration be 
to compute $\int\!\int_D f(x,y)\ dx\ dy$ integrating with respect to $x$ first, then $y$?
\item[] {\it Solution:}  We must split the region along the line $y = 0$
$$\int_{-3/\sqrt{2}}^0 \int_{-y}^{\sqrt{9 - y^2}} f(x,y)\ dx dy + 
\int_0^{3/\sqrt{2}} \int_y^{\sqrt{9 - y^2}} f(x,y)\ dx dy.$$
\item[D)] (10) Using any applicable method, compute  $\int\!\int_D x\ dx\ dy.$
\item[] {\it Solution 1}:  Changing to polar coordinates this becomes
\begin{eqnarray*}
\int_{-\pi/4}^{\pi/4} \int_0^3 (r \cos\theta) r\ dr d\theta &=& 
\int_0^3 r^2\ dr \cdot \int_{-\pi/4}^{\pi/4} \cos\theta\ d\theta\\
&=& \left.\frac{r^3}{3}\right|_0^3 \cdot \left.\sin\theta\right|_{-\pi/4}^{\pi/4}\\
&=& 9 \sqrt{2}. 
\end{eqnarray*}
\item[] {\it Solution 2:}  If we use the form from B above, the first integral is
\begin{eqnarray*}
\int_0^{3/\sqrt{2}} \int_{-x}^x x \ dy dx &=& \int_0^{3/\sqrt{2}} \left.xy\right|_{y=-x}^{y=x}\ dx\\
&=&\int_0^{3/\sqrt{2}} 2x^2\ dx\\
&=&\left. \frac{2x^3}{3}\right|_0^{3/\sqrt{2}}\\
&=& \frac{9\sqrt{2}}{2}.
\end{eqnarray*}
The second integral is evaluated using a $u$-subsitution after the first 
integration (the integral from the table is {\it not} needed, or even applicable):
\begin{eqnarray*}
\int_{3/\sqrt{2}}^3 \int_{-\sqrt{9-x^2}}^{\sqrt{9 - x^2}} x \ dy dx &=&
\int_{3/\sqrt{2}}^3 2x\sqrt{9 - x^2}\ dx \\
&=& \left. -\frac{2}{3}(9 - x^2)^{3/2}\right|_{3/sqrt{2}}^3\\
&=& \frac{2}{3} (9/2)^{3/2}\\
&=& \frac{2}{3} \frac{3^3}{2\sqrt{2}} = \frac{9\sqrt{2}}{2}.
\end{eqnarray*}
Then the integral is the sum
$$\frac{9\sqrt{2}}{2}+\frac{9\sqrt{2}}{2} = 9\sqrt{2}.$$
\end{enumerate}

\vskip 10pt
\noindent
{\it Extra Credit}  (10) Compute the triple integral of the function 
$f(x,y,z) = e^{(x^2 + y^2 + z^2)^{3/2}}$ over the unit ball
$x^2 + y^2 + z^2 \le 1$ in ${\bf R}^3$.  (A good choice of coordinates
is essential here!)

\vskip 10pt
\noindent
{\it Solution:}  {\it Spherical} coordinates are the best choice.  The integral 
to be computed is 
$$\int_0^{2\pi} \int_0^\pi \int_0^1 e^{\rho^3} \rho^2 \sin\phi\ d\rho\ d\phi\ d\theta. $$
Since the function is a product of functions of $\rho, \phi,$ and $\theta$ we can 
use the ``product trick":
$$
= 2\pi \int_0^\pi \sin\phi\ d\phi \int_0^1 \rho^2 e^{\rho^3}\ d\rho = 4\pi \int_0^1 \rho^2 e^{\rho^3}\ d\rho.$$
For the last integral here, let $u = \rho^3$, then $du = 3\rho^2 d\rho$ and 
the integral is just $\int e^u du$ up to a constant.  The final answer
is 
$$\frac{4\pi}{3}(e - 1).$$  

\end{document}
