
%begin macros
\def\L{{\cal L}}
\baselineskip=14pt
\parskip=10pt
\def\Tilde{\char126\relax}
\def\g{\bigtriangledown}
\font\eightrm=cmr8 \font\sixrm=cmr6 
\font\eighttt=cmtt8
\magnification=\magstephalf
\def\P{{\cal P}}
\def\Q{{\cal Q}}
\parindent=0pt
\overfullrule=0in
\def\frac#1#2{{#1 \over #2}}
%end macros
 
\medskip
{\bf MATH 251 (4-6,11), Dr. Z. ,  Solutions to Exam 2, 12:00noon-1:20pm , 
Thurs. Nov. 19, 2009, SEC 117}

{\bf 1.} By finding a function $f$ such that ${\bf F}=\g f$, evaluate
$\int_C {\bf F} \cdot d {\bf r}$ along the given curve $C$.
$$
{\bf F}(x,y,z)= y^2z^3 \, {\bf i}+ 2xyz^3\, {\bf j} +3xy^2z^2 \, {\bf k} \quad,
$$
$$
C: x=2t \quad , \quad y=t^2 \quad , \quad z=t^5 \quad, 
\quad 0 \leq t \leq 1 \quad .
$$

\hrule
\bigskip
\bigskip
{\bf Ans:} $2$
\bigskip
\bigskip
\hrule
\bigskip

{\bf Sol. of First Part} We need
$$
\g f= {\bf F}
$$
In this problem
$$
\langle \frac{\partial f}{\partial x} \, , \, \frac{\partial f}{\partial y} \, , \, \frac{\partial f}{\partial x} \, \rangle =
\langle y^2z^3 \, , \,  2xyz^3 \, , \, 3xy^2z^2 \, \rangle 
$$
We first use $\frac{\partial f}{\partial x}=y^2z^3$.
Integrating with respect to the variable $x$, we get
$$
f(x,y,z)= \int y^2 z^3 \, dx = xy^2z^3 + g(y,z) \quad ,
$$
where $g(y,z)$ is yet-to-be found. Using
$$
\frac{\partial f}{\partial y}= 2xyz^3 \quad ,
$$
we get
$$
2xyz^3=2xyz^3+ \frac{\partial g}{\partial y} \quad .
$$
Doing the algebra, we get:
$$
\frac{\partial g}{\partial y}=0
$$
Intgerating with respect to $y$ we get
$$
g(y,z)= \int 0 \, dy = 0 + h(z) \quad
$$
Where $h(z)$ is yet-to-be-determined. By {\bf back substitution} we get
$$
f(x,y,z)=xy^2z^3+ h(z) \quad .
$$
Finally we use
$$
\frac{\partial f}{\partial z}= 3xy^2z^2 \quad ,
$$
Getting
$$
3xy^2z^2+h'(z)=3xy^2z^2 \quad
$$
Doing the algebra, we get
$$
h'(z)=0 \quad,
$$
So $h(z)=C$. Going back to $f(x,y,z)$ we get (we can discard the $C$)
$$
f(x,y,z)= xy^2z^3 \quad .
$$
This is a {\bf potential function}.

{\bf Comments:} 1. In this easy problem, it is easy to get it by inspection, but to get full credit, you need
to do it the systematic way. 2. Some people first checked that ${\bf F}$ is conservative. If you weren't asked
to do it, you don't have to.

{\bf Sol. of Second Part}.  The starting point is the point $(0,0,0)$ (plug-in $t=0$ into ${\bf r}(t)$)
and the endpoint is the point $(2,1,1)$ (plug-in $t=1$). The answer is
$$
f(2,1,1)-f(0,0,0)=2 \cdot 1^2 \cdot 1^3 - 0= 2 \quad .
$$

\vfill\eject


{\bf 2.} 
Evaluate the line integral
$$
\int_{C} 5y\,dx+ 5x \, dy + 6xyz \,dz \quad ,
$$
where $C: x=t \, , \,  y=t^2 \, , \, z=t^3 \, , \, 0 \leq t \leq 1$.

\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans.:}  $7$
\bigskip
\bigskip
\hrule
\bigskip

{\bf Sol.} 
$$
\int_{C} 5y\,dx+ 5x \, dy + 6xyz \,dz =
\int_{0}^{1} ( 5(t^2)\,d(t)+ 5td\,(t^2)+ 6(t)(t^2)(t^3)\, d(t^3)=
$$
$$
\int_{0}^{1} ( 5(t^2)\,dt+ 5t(2t)\, dt + 6(t)(t^2)(t^3)(3t^2)) \, dt =
$$
$$
\int_{0}^{1} ( 5t^2+ 10t^2+ 18t^8) \, dt =
$$
$$
\int_{0}^{1} (15t^2+ 18t^8) \, dt = (5t^3+ 2t^9) \Bigl \vert_0^1= 7-0= 7 \quad .
$$
\vfill\eject

{\bf 3.} 
Evaluate
$$
\int\int\int_{E}  {{5} \over {62 \pi}} \, (x^2+y^2+z^2) \, dV \quad ,
$$
where $E$ is bounded by the $yz$-plane and the hemispheres
$x=\sqrt{1-y^2-z^2}$ and $x=\sqrt{4-y^2-z^2}$.
\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans.:}  $1$
\bigskip
\bigskip
\hrule
\bigskip
{\bf Sol.} You use {\bf spherical coordinates}. Remember the ``dictionary'' $dV= \rho^2 \sin \phi \, d \rho \, d \theta \, d \phi$
and $x^2+y^2+z^2=\rho^2$. (Note: you don't need the other parts!).
The two hemispheres are of radius $1$ and $2$ so the $\rho$ range is $1 \leq \rho \leq 2$.

Now {\it pay attention!} (very few people got it right). Since  $x$ is between $\sqrt{1-y^2-z^2}$
and $\sqrt{4-y^2-z^2}$ $x$ is {\bf positive} (the square-root sign means positive square-root).
The projection on the $xy$ plane is  the right-half-plane $x>0$ which is $-\pi/2 \leq \theta \leq \pi/2$.
The range for $\phi$ is the {\bf full-range} $0 \leq \phi \leq \pi$ . 

So the description of the region in spherical is
$$
\{ ( \rho, \theta, \phi) \, | \, 1 \leq \rho \leq 2 , -\pi/2 \leq \theta \leq \pi/2 , 0 \leq \phi \leq \pi \}
$$

Our integral becomes (let's forget about the annoying ${{5} \over {62 \pi}}$ and leave it to the end.
$$
\int_{0}^{\pi}\int_{-\pi/2}^{\pi/2} \int_{1}^2   \, (\rho^2) \, \rho^2 \sin \phi \, d \rho d \theta d \phi =
\int_{0}^{\pi}\int_{-\pi/2}^{\pi/2} \int_{1}^2   \, \rho^4 \sin \phi \, d \rho d \theta d \phi  \quad .
$$
Since the limits of integrations are all {\bf numbers} and the integrand is {\bf separable}
(product of functions of single-variables), we can write this as
$$
\left ( \int_{0}^{\pi} \sin \phi \, d \phi \right )
\left ( \int_{-\pi/2}^{\pi/2} d \theta \right )
\left ( \int_{1}^{2} \rho^4 d \rho \right )
$$
The first integral is $-\cos \phi \Bigl \vert_{0}^{\pi}= -\cos \pi -- \cos 0 = 1+1=2$.
The second one is $\pi/2--\pi/2=\pi$, and the third one is: $\rho^5/5 \Bigl \vert_1^2= (2^5-1^5)/5=31/5$.

So the whole triple-integral (without the annoying constant in front) is
$$
2 \cdot \pi \cdot \frac{31}{5}= \frac{62 \pi}{5} \quad .
$$
Finally, multiplying by the annoying constant, we get
$$
\frac{5}{62 \pi} \cdot \frac{62 \pi}{5} =1 \quad .
$$

{\bf Comments}: Please review how to find the ranges of $\theta$ and $\phi$.
First remember that $\phi$ is never negative and never more than $\pi$. If $z$ is positive then
$0 \leq \phi \leq \pi/2$. If $z$ is negative then $\pi/2 \leq \phi \leq \pi$. 

If $x$ is positive then $-\pi/2 \leq \theta \leq \pi/2$. 
If $x$ is negative, then $\pi/2 \leq \theta \leq 3\pi/2$. 

If $y$ is positive then $0 \leq \theta \leq \pi$. 
If $y$ is negative, then $\pi \leq \theta \leq 2\pi$. 


\vfill\eject

{\bf 4.} 
Evaluate the triple integral
$$
\int\int\int_{E} \,\, {{160} \over {3 \sin 1}} \, yz \cos (x^5) \, dV \quad ,
$$
where
$$
E=\{ (x,y,z) \, \vert \, 0 \leq x \leq 1 \, , \, 0 \leq y \leq x
\, ,  \, x \leq z \leq 2x \, \} \quad .
$$
\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans.:}  $8$ \quad .
\bigskip
\bigskip
\hrule
\bigskip
{\bf Sol.} Once again, let's take the annoying constant out of the way.
The iterated integral (w/o the constant) is
$$
\int_0^1 \int_0^x \int_x^{2x} yz \cos (x^5) \, dz \, dy \, dx \quad.
$$
The {\bf inner integral} is
$$
y \cos (x^5) \int_x^{2x} z \, dz = y \cos(x^5) \frac{z^2}{2} \Bigl \vert_x^{2x}=
y \cos(x^5) \frac{(2x)^2-x^2}{2}=y \cos(x^5) \frac{3x^2}{2} = \frac{3yx^2 \cos(x^5)}{2}
$$
The {\bf middle integral} is
$$
\int_0^x \frac{3yx^2 \cos(x^5)}{2} \, dy =
\frac{3x^2 \cos(x^5)}{2} \int_0^x  y \, dy =
\frac{3x^2 \cos(x^5)}{2} \frac{y^2}{2} \Bigl \vert_0^x =
\frac{3x^2 \cos(x^5)}{2} \cdot \frac{x^2}{2} =\frac{3x^4 \cos(x^5)}{4}  \quad .
$$
The {\bf outer-integral} is
$$
\int_0^1 \frac{3x^4 \cos(x^5)}{4}  \, dx
$$
Using the {\bf substitution} $u=x^5$ (when $x=0$, $u=0$, when $x=1$, $u=1$) $du=5x^4 \, dx$ so
$dx= \frac{du}{5x^4}$:
$$
\int_0^1 \frac{3x^4 \cos(x^5)}{4}\cdot \frac{du}{5x^4}=
\int_0^1 \frac{3 \cos(u) du}{20}=\frac{3}{20} \int_0^1 \cos u \, du
$$
$$
=\frac{3}{20} \sin u \Bigl \vert_0^1= 
\frac{3}{20} (\sin 1 - \sin 0)= \frac{3 \sin 1}{20}  \quad .
$$
Finally, multiplying by the annoying constant that we took out at the very beginning, we get
that the answer is:
$$
\frac{160}{3 \sin 1} \cdot  \frac{3 \sin 1}{20}  = 8 \quad .
$$
\vfill\eject

{\bf 5.} Find the Jacobian of the transformation from $(u,v,w)$-space to
$(x,y,z)$-space.
$$
x=-uv^2 \quad, \quad y=uw^2 \quad, \quad z=v  ,
$$
at the point $(u,v,w)=(1,1,1)$.
\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans.:}  $2$ 
\bigskip
\bigskip
\hrule
\bigskip
{\bf Sol.}
$$
\left \vert \matrix{ 
{{\partial x} \over {\partial u}}
 & 
{{\partial x} \over {\partial v}}
 & 
{{\partial x} \over {\partial w}}
  \cr
{{\partial y} \over {\partial u}}
 & 
{{\partial y} \over {\partial v}}
 & 
{{\partial y} \over {\partial w}}
\cr
{{\partial z} \over {\partial u}}
& 
{{\partial z} \over {\partial v}}
& 
{{\partial z} \over {\partial w}}
} \right \vert 
$$
$$
=
\left \vert \matrix{ 
-v^2
 & 
-2uv
 & 
0
  \cr
w^2
 & 
0
 & 
2wu
\cr
0
& 
1
& 
0
} \right \vert
$$
Now it is a good time to plug-in numbers. (Most people continued with the variables and only plugged in at the
very end. This is correct, and in this problem OK, but for more complicated problems it is a good idea to
plug-in {\bf as soon as you can}).
$$
\left \vert \matrix
{-1
 & 
-2
 & 
0
\cr
1
 & 
0
 & 
2
\cr
0
& 
1
& 
0
} \right \vert
$$
This equals $(-1)((0)(0)-(2)(1))-(-2)((1)(0)-(2)(0))+0((1)(1)-(0)(0)=2$.

\vfill\eject

{\bf 6.} Evaluate the integral
$$
\int\int_{D} \,\, {{16e} \over {\pi(e-1)} } \, e^{-x^2-y^2} \, dA \quad,
$$
where $D$ is the region bounded by the semi-circle
$y=-\sqrt{1-x^2}$ and the $x$-axis.
\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans.:} $8$
\bigskip
\bigskip
\hrule
\bigskip
{\bf Sol.} Once again, let's take the annoying constant $\frac{16e}{\pi(e-1)}$ out, and
evaluate
$$
\int\int_D e^{-x^2-y^2} \, dA \quad .
$$
There are two clues here that we should use {\bf polar coordinates}. The first one
is the $-x^2-y^2=-(x^2+y^2)$ in the integrand, and the second that $D$ is a {\it semi}-circle.
The radius is $1$ and since $y$ is {\bf negative}, we have $\pi \leq \theta \leq 2 \pi$,
and of course $0 \leq r \leq 1$. Also $dA= r \, dr \, d \theta$, so we have
$$
\int_{\pi}^{2\pi} \int_0^1 e^{-r^2} r \, dr \, d \theta=
(\int_{\pi}^{2\pi} d \theta ) (\int_0^1 e^{-r^2} r \, dr) \quad
$$
The second integral (do the substitution $u=-r^2$ is $\frac{-e^{-r^2}}{2} \Bigl \vert_0^1=(-e^{-1}+e^0)/2=(1-e^{-1})/2$. 
The first integral is $\pi$, so this equals $\frac{\pi(1-e^{-1})}{2}$.
Multiplying by the constant that we took out we get
$$
\frac{16e}{\pi(e-1)} \cdot \frac{\pi(1-e^{-1})}{2}=
\frac{16e}{(e-1)} \cdot \frac{(e-1)}{2e}= 8 \quad .
$$

{\bf Comment}: Some people are so rusty in algebra that they had trouble doing this last simplification.
If you are one of them, review your algebra! Algebra is far more important than calculus.
\vfill\eject
{\bf 7.} 
Calculate the iterated integral
$$
\int_{1}^{2} \int_{0}^{1} (2x^3+ 2y)\, dx \, dy
\quad .
$$
\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans.:} $\frac{7}{2}$
\bigskip
\bigskip
\hrule
\bigskip
{\bf Sol.} The inner integral is:
$$
\int_{0}^{1} (2x^3+ 2y)\, dx = (\frac{2x^4}{4} + 2yx)  \Bigl \vert_0^1 =
\frac{2 \cdot 1^4}{4} + 2y \cdot 1 - 0 = \frac{1}{2} +2y
\quad .
$$
The outer-integral is
$$
\int_1^2 (\frac{1}{2} +2y) \, dy = \frac{1}{2}y+ y^2 \Bigl \vert_1^2=
(\frac{1}{2} \cdot 2+ 2^2) -(\frac{1}{2} \cdot 1+ 1^2)=
5-\frac{3}{2}=\frac{7}{2} \quad .
$$



\vfill\eject

{\bf 8.} Use Lagrange multipliers to find the maximum and
minimum values of $f(x,y)=x+2y-2$ subject to the
constraint $x^2+y^2=20$.
\bigskip
\hrule
\bigskip
{\bf maximum value:} $8$
\bigskip
{\bf minimum value:} $-12$
\bigskip
\hrule

{\bf Sol.} $f(x,y)=x+2y-2$, $g(x,y)=x^2+y^2-20$.
$$
\g f = \lambda \g g \quad,
$$
means
$$
\langle f_x , f_y \rangle = \lambda \langle g_x , g_y \rangle 
$$
that in this problem spells out to be:
$$
\langle 1 , 2 \rangle = \lambda \langle 2x , 2y \rangle 
$$
This means that we have to solve
$$
1= 2 \lambda x \quad , 2 = 2 \lambda y \quad ,
$$
and in addition, the constraint equation $x^2+y^2=20$.

Whenever possible, it is a good idea to get rid of $\lambda$. Dividing the first by the second we get
the simpler equation $2=y/x$ (the fine-print is that we must insist that $\lambda \neq 0$ and $x \neq 0$ 
but both $x=0$ and $\lambda=0$ are impossible in this problem.).
So $y=2x$. Plugging into  the constraint equation, we get
$$
x^2+(2x)^2=20 \quad ,
$$
which simplifies to $5x^2=20$ which simplifies to $x^2=4$ whose solutions are $x=-2$ and $x=2$.
To $x=-2$ corresponds $y=2(-2)=-4$. To $x=2$ corresponds $y=2(2)=4$. So there
are two candidate points: $(2,4)$ and $(-2,-4)$.

Finally, it is time to plug-in these points into the {\bf goal function}
$$
f(2,4)= 2 + 2 \cdot 4-2= 8 \quad , \quad f(-2,-4)=-2+2(-4)-2=-12 \quad .
$$
So the {\bf absolute max. value} is $8$ and the {\bf absolute min. value} is $-12$.

{\bf Comments}: 1. Some people expressed both $x$ and $y$ in terms of $\lambda$, then plugged into
the constraint equation, solved for $\lambda$ and then found $x$ and $y$. This is perfectly
OK, but takes longer. Whenever possible, it is a good idea to get rid of $\lambda$.
2. Some people left the answers as $(2,4)$ and $(-2,-4)$. These are the max. and min. {\bf points}
(locations), but you were asked for the {\bf values}.



\vfill\eject

{\bf 9.} Find the local maximum and minimum {\bf values}
and saddle point(s) of the function $f(x,y)=(1+xy)(x+y)$

\bigskip
\hrule
\bigskip
{\bf local maximum value(s):}  None
\bigskip
{\bf local minimum value(s):} None
\bigskip
{\bf saddle point(s):} $(-1,1)$ and $(1,-1)$
\hrule
\bigskip
{\bf Sol.} First use {\bf algebra} to expand $f(x,y)$:
$$
f(x,y)=x+y+x^2y+xy^2 \quad.
$$
We have
$$
f_x=1+2xy+y^2 \quad , \quad f_y=1+2xy+x^2 \quad ,
$$
For future reference we also need:
$$
f_{xx}=2y \quad , \quad f_{xy}=2y+2x \quad , \quad f_{yy}=2x \quad .
$$
We first need to solve the system
$$
f_x =0 \quad , \quad f_y=0 \quad ,
$$
that in this problems is:
$$
1+2xy+y^2=0 \quad , 1+2xy+y^2=0 \quad .
$$
At this point many people got {\bf stuck} and made life very complicated (and messed up).
The trick (in this problem) is to subtract the first equation from the second, getting
$$
y^2-x^2=0 \quad.
$$
This means $(y-x)(y+x)=0$ so $y=x$ or $y=-x$.
Exploring the first option, we plug-in into the first equation
$$
1+2x^2+x^2=0 \quad .
$$
This means $1+3x^2=0$, which means $x^2=-1/3$. But this can never happen (in the real world)
so we have to discard this option.

The second option is $y=-x$. Plugging into the second equation we get
$$
1-2x^2+x^2=0 \quad ,
$$
which simplifies to $1-x^2=0$ and we get {\bf two} solutions $x=-1$ and $x=1$.
But, right now $y=-x$, so when $x=1$, $y=-1$ yielding the point $(1,-1)$ and
when $x=-1$ $y=1$, yielding the point $(-1,1)$.

We have found two {\bf critical points}: $(-1,1)$ and $(1,-1)$. We have to investigate them each separately.

For the point $(-1,1)$ we have $f_{xx}=-2, f_{xy}=0, f_{yy}=2$ yielding $D=(-2)(2)-0^2=-4$. This
is {\bf negative}, so our point is a {\bf saddle point}.

For the point $(1,-1)$ we have $f_{xx}=2, f_{xy}=0, f_{yy}=-2$ yielding $D=(2)(-2)-0^2=-4$. This
is {\bf negative}, so this point is also a  {\bf saddle point}.

{\bf Comments}: For saddle points, we don't care for the value, and it is usually not asked for.


\vfill\eject

{\bf 10.} Sketch the region of integration
and change the order of integration.
$$
\int_{0}^{2} \int_{2x}^{4} F(x,y) \, dy \, dx
$$
\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans.:} $\int_0^4 \int_0^{y/2} F(x,y) \, dx \, dy \quad $ .
\bigskip
\bigskip
\hrule
\bigskip

{\bf Sol.} The region of integration is given in {\bf type-I} format:
$$
\{ (x,y) \, | \, 0 \leq x \leq 2 \, , \, 2x \leq y \leq 4 \} \quad .
$$
The first thing is to {\bf draw} it. The {\bf main road}, on the $x$-axis is
the line segment joining $(0,0)$ and $(2,0)$. Now along any vertical line
starting at a given $x$, we don't start our mission right away, but only
on the line $y=2x$ and we keep walking all the way until we reach the
horizontal line $y=4$ (you draw it right now!).

The region turns out to be a triangle whose vertices are $(0,0)$, $(0,4)$, and $(2,4)$.
We need to write it in {\bf type-II} format. The projection on the $y$-axis is
the line segment joining $(0,0)$ and $(0,4)$. So the {\bf main road} is
$0 \leq y \leq 4$. Along any horizontal line, starting at $y$ we start our
mission right away (along the $y$-axis, $x=0$, and continue until we bump
into the line $y=2x$ that we have to rewrite as $x=y/2$, so the
(horizontal) {\bf side streets} (coming out of a typical point of the main road $(0,y)$),are $ 0 \leq x \leq y/2$.
Our type-II description is
$$
\{(x,y) \vert 0 \leq y \leq 4, 0 \leq x \leq y/2 \} \quad .
$$
and the integral is:
$\int_0^4 \int_0^{y/2} F(x,y) \, dx \, dy $.

{\bf Comments}: Many people drew the right picture, but gave the wrong answer. Other people gave the
right answer, but drew the wrong picture. I am suspecting that they are faking it.
Please make sure that you understand how (i) draw the region. (ii) write it in both type-I and type-II formats.


\end

 














