
%begin macros
%\magnification=\magstephalf
\magnification=\magstep1
\def\g{\bigtriangledown}
\def\L{{\cal L}}
%\baselineskip=14pt
%\parskip=10pt
\def\Tilde{\char126\relax}
\font\eightrm=cmr8 \font\sixrm=cmr6 
\font\eighttt=cmtt8
\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 (1-3,10 ), Dr. Z. ,  Solutions to Exam 2, Thurs., Nov. 19, 2009, 
10:20-11:40am, SEC 118}

{\bf 1}. (10 pts.)  
(i) Prove that
$$
{\bf F} \, = \, 
\langle \, 2e^{2x+3y+5z} + y^2 +1 \, ,\, 3e^{2x+3y+5z}+ 2xy+1 \, , \, 5 e^{2x+3y+5z} \, \rangle
$$
is a conservative vector field. 
\bigskip
(ii) Find a function $f(x,y,z)$ such that ${\bf F}= \g f$.
\bigskip
(iii) Compute $f(1,1,1)-f(0,0,0)-e^{10}+1$

\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans. to (iii)}: $3$
\bigskip
\bigskip
\hrule
\bigskip
{\bf Sol.} 

(i)
Here
$$ 
F_1=2e^{2x+3y+5z} + y^2 +1 \, , \, F_2=3e^{2x+3y+5z}+ 2xy+1  \, , \,  F_3=5 e^{2x+3y+5z} 
$$
$$
\frac{\partial F_1}{\partial y}=6e^{2x+3y+5z}+2y \quad, \quad
\frac{\partial F_2}{\partial x}=6e^{2x+3y+5z}+2y \quad .
$$
$$
\frac{\partial F_1}{\partial z}=10e^{2x+3y+5z} \quad, \quad
\frac{\partial F_3}{\partial x}=10e^{2x+3y+5z} \quad .
$$
$$
\frac{\partial F_2}{\partial z}=15e^{2x+3y+5z} \quad, \quad
\frac{\partial F_3}{\partial y}=15e^{2x+3y+5z} \quad .
$$
So
$$
\frac{\partial F_1}{\partial y}=\frac{\partial F_2}{\partial x}
\quad , \quad
\frac{\partial F_1}{\partial z}=\frac{\partial F_3}{\partial x}
\quad , \quad
\frac{\partial F_2}{\partial z}=\frac{\partial F_3}{\partial y} \quad ,
$$
and ${\bf F}$ is indeed conservative.
\bigskip
(ii) Since $\frac{\partial f}{\partial x}=2e^{2x+3y+5z}+y^2+1$,
we have
$$
f(x,y,z)= \int (2e^{2x+3y+5z}+y^2+1) \, dx = e^{2x+3y+5z}+ xy^2+ x+ g(y,z) \quad,
$$
where $g(y,z)$ is yet-to be found. Taking derivatives with respect to $y$:
$$
\frac{\partial f}{\partial y}= 3e^{2x+3y+5z}+ 2xy+ \frac{\partial g}{\partial y} \quad .
$$
But we know that $\frac{\partial f}{\partial y}=3e^{2x+3y+5z}+ 2xy+1$, so we have
$$
3e^{2x+3y+5z}+ 2xy+ \frac{\partial g}{\partial y} = 3e^{2x+3y+5z}+ 2xy+1 \quad .
$$
Doing the algebra we get
$$
\frac{\partial g}{\partial y} =1 \quad .
$$
Integrating with respect to $y$ we get
$$
g(y,z)= \int 1 \, dy = y + h(z) \quad ,
$$
where $h(z)$ is yet-to-be-found. By {\bf back-substitution} we have:
$$
f(x,y,z)=e^{2x+3y+5z}+ xy^2+ x+ y+ h(z) \quad .
$$
Finally, take partial-derivative with resepct to $z$ getting
$$
f_z= 5e^{2x+3y+5z}+ h'(z)=5e^{2x+3y+5z} \quad 
$$
that gives $h'(z)=0$ so $h(z)=C$ (constant), that we can ignore (i.e. take to be $0$). So
$$
f(x,y,z)=e^{2x+3y+5z}+ xy^2+ x+ y \quad .
$$
\bigskip
(iii)
$$
f(1,1,1)-f(0,0,0)-e^{10}+1=e^{10}+ 1 \cdot 1^2+ 1+ 1 -(e^{0}+ 0 \cdot 0^2+ 0+ 0) -e^{10}+1=3 \quad .
$$

{\bf Ans. to (iii) }: $3$ (type number).

\vfill\eject
{\bf 2.} (10 points) 
Evaluate the line integral
$$
\int_C {\bf F} \cdot d{\bf r} \quad,
$$
where $C$ is given by the vector function ${\bf r}(t)$.
$$
{\bf F} (x,y,z)= yz {\bf i} + xz {\bf j} + xy {\bf k} \quad,
$$
$$
{\bf r} (t)= t^3 {\bf i} + t^2 {\bf j} +  {\bf k} \quad,
\quad 0 \leq t \leq 1 \quad .
$$
\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans.}: $1$ (type number).
\bigskip
\bigskip
\hrule

\bigskip

{\bf First Solution}: The curve is $x=t^3,y=t^2,z=1$, ($0 \leq t \leq 1$) or in vector-notation:
$$
{\bf r}(t) = \langle t^3, t^2, 1 \rangle \quad ,
$$
So
$$
{\bf r}'(t) = \langle 3t^2, 2t, 0 \rangle \quad .
$$
$$
\int_C {\bf F} \cdot d{\bf r} =
\int_0^1 \langle yz,xz,xy \rangle \cdot \langle 3t^2, 2t, 0 \rangle dt
$$
$$
=\int_0^1 \langle yz,xz,xy \rangle \cdot \langle 3t^2, 2t, 0 \rangle dt
=
\int_0^1 \langle (t^2)(1),(t^3)(1),(t^3)(t^2) \rangle \cdot \langle 3t^2, 2t, 0 \rangle dt
$$
$$
=\int_0^1 (3t^4+2t^4+0) \, dt=
\int_0^1 (5t^4) \, dt= t^5 \Bigl \vert_0^{1}=1 \quad .
$$
\bigskip
{\bf Second Solution}: This vector-field is conservative (check!), and it is easy to see by inspection that
$f(x,y,z)=xyz$ is the potential function (check that $\g f= {\bf F}$). So
$$
\int_C {\bf F} \cdot d{\bf r} =f(End)-f(Start)= f(1,1,1)-f(0,0,0)=1-0 =1 \quad .
$$

{\bf Comments:} To get full credit you only need to do {\bf one} of the above, of course.




\vfill\eject
{\bf 3.} (10 points)
Evaluate
$$
\int\int\int_{E} {{9} \over {\pi}} (x^2+y^2)^3 \, dV \quad ,
$$
where $E$ is the solid that lies within the cylinder
$x^2+y^2=1$, above the plane $z=0$, and below the cone
$z^2=4x^2+4y^2$.

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

\bigskip

{\bf Sol.}: We need to use {\bf cylindrical coordinates}. The ``floor'' is the circle $r=1$ 
and the ceiling is $z^2=4r^2$ which could mean $z=2r$ or $z=-2r$, but since the floor is the $xy$-plane,
obviously we take $z=2r$. 
Remember that in cylindrical (and polar), $x^2+y^2=r^2$,
and recall that $dV=r dz dr d \theta$. The volume-integral of the problem is ${{9} \over {\pi}}$ times
$$
\int_0^{2\pi} \int_0^{1} \int_0^{2r}  (r^{2})^3 \, r dz dr d \theta 
=
\int_0^{2\pi} \int_0^{1} \int_0^{2r}  r^7 dz dr d \theta \quad.
$$
The {\bf inner integral} is:
$$
\int_0^{2r} r^7 \, dz = r^7 (2r)= 2r^8 \quad .
$$
The {\bf middle-integral} is:
$$
\int_0^1 2r^8 \, dr= 2\frac{r^9}{9} \Bigl \vert_0^1= \frac{2}{9} \quad .
$$
The outside integral
$$
\int_0^{2\pi} \frac{2}{9} \, d \theta = \frac{4 \pi}{9} \quad .
$$
Now multiply by ${{9} \over {\pi}}$ to get that the answer is
$$
\frac{4 \pi}{9} \cdot {{9} \over {\pi}}= 4 \quad .
$$


\vfill\eject
{\bf 4.} (10 points)
Evaluate the iterated integral
$$
\int_{0}^{1} \int_{x}^{2x} \int_{0}^{x+y} {{24 z} \over {19}} \,dz \, dy \, dx \quad.
$$

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

\bigskip

{\bf Sol.}: Let's take the annoying $\frac{24}{19}$ out of the integration (we get back to it at the end).
The inner integral is 
$$
\int_0^{x+y} z \, dz = \frac{z^2}{2} \Bigl \vert_{0}^{x+y}= \frac{(x+y)^2}{2} \quad .
$$
The {\bf middle integral} is
$$
\int_x^{2x} \frac{(x+y)^2}{2} \, dy = \frac{(x+y)^3}{6} \Bigl \vert_{y=x}^{y=2x}=
\frac{(x+2x)^3}{6}-\frac{(x+x)^3}{6}=
\frac{(3x)^3}{6}-\frac{(2x)^3}{6}=\frac{27x^3}{6}-\frac{8x^3}{6}=
\frac{19x^3}{6} \quad .
$$
The outside integral is
$$
\int_0^{1} \frac{19x^3}{6}= \frac{19x^4}{ 6 \cdot 4} \Bigl \vert_0^1 =
\frac{19}{24} \quad .
$$
Finally, multiplying by the constant in front, we have
$$
\frac{24}{19}  \cdot \frac{19}{24}  =1 \quad .
$$

{\bf Comment}: Most people, after the first step, expanded $(x+y)^2$ as $x^2+2xy+y^2$ and made the problem
longer than it should be. It is very useful to memorize the integral of a generalized power
$$
\int (ax+b)^n \, dx = \frac{(ax+b)^{n+1}}{a(n+1)} \quad .
$$
(Of course, here we need
$$
\int (ay+b)^n \, dy = \frac{(ay+b)^{n+1}}{a(n+1)} \quad .
$$
with $a=1$ and $b=x$. )

\vfill\eject
{\bf 5.} (10 points) 
Use the given transformation
to evaluate the integral
$$
\int\int_{R} 20 (2x+y)^2 \, dA \quad ,
$$
where $R$ is the triangular region with vertices
$(0,0)$,$(2,-3)$, $(3,-5)$; 
$x=3u-v$, $y=-5u+2v$.

\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans.}: $5$  \quad .
\bigskip
\bigskip
\hrule

\bigskip

{\bf Sol.}: First, we need to find the counterparts of the three vertices:

For $(0,0)$, $x=0, y=0$ so we have to solve
$$
3u-v=0 \quad , -5u+2v=0 \quad .
$$
whose solution is $u=0,v=0$, and so the point in the $uv$-plane corresponding to $(x,y)=(0,0)$ is $(0,0)$.


For $(2,-3)$, $x=2, y=-3$ so we have to solve
$$
3u-v=2 \quad , -5u+2v=-3 \quad .
$$
From the first equationL $v=3u-2$, plugging into the second, we get
$-5u+2(3u-2)=-3$ which is $u-4=-3$ which gives $u=1$, and by {\bf back substitution} $v=3(1)-2=1$,
and so the point in the $uv$-plane corresponding to $(x,y)=(2,-3)$ is $(u,v)=(1,1)$.


For $(3,-5)$, $x=3, y=-5$ so we have to solve
$$
3u-v=3 \quad , -5u+2v=-5 \quad .
$$
From the first equation $v=3u-3$, plugging into the second, we get
$-5u+2(3u-3)=-5$ which is $u-6=-5$ which gives $u=1$, and by {\bf back substitution} $v=3(1)-3=0$,
and so the point in the $uv$-plane corresponding to $(x,y)=(3,-5)$ is $(u,v)=(1,0)$.

So the triangle in the $(u,v)$-plane is much simpler. It has vertices
$(0,0),(1,0),(1,1)$ that in type-I notation is:
$$
\{ (u,v) \, \vert \, 0 \leq u \leq 1 \quad , \quad 0 \leq v \leq u \} \quad .
$$

Next we have to compute the {\bf Jacobian}, $J$:
$$
J=(x_u)(y_v)-(x_v)(y_u)=(3)(2)-(-1)(-5)=1 \quad .
$$
We now convert the $xy$-integral into the $uv$-language:
$$
\int\int_{R'} 20 \left ( 2 (3u-v)+(-5u+2v) \right )^2  |J| \, dA=
\int_0^1 \int_0^u 20 (u)^2 dv du \quad.
$$
The inner integral is $20u^3$ and the outer integral is $\int_0^1 20u^3= 5u^4 \Bigl \vert_{0}^{1}= 5 $.

{\bf Comment}: Some people forgot to worry about the Jacobian. They still got the right answer, since,
by accident, the Jacobian happened to be $1$ in this problem. Nevertheless they lost $3$ points.


\vfill\eject
{\bf 6.} (10 points) 
Evaluate  the iterated integral
by converting to polar coordinates.
$$
\int_{-2}^{2} \int_{-\sqrt{4-x^2}}^{\sqrt{4-x^2}} {{27} \over {64 \pi}} (x^2+y^2)^2 \,dy \,dx
$$

\bigskip
\hrule
\bigskip
{\bf Ans.}: $9$ \quad .
\bigskip
\hrule

\bigskip

{\bf Sol.} Use polar coordinates. Recall that $x^2+y^2$ in polar language is $r^2$, so the
integrand is $r^4$.

The region is the inside {\bf full} circle of radius $2$, center the origin, so 
a polar description of the region is:
$$
\{ (r, \theta) \, \vert 0 \leq r \leq 2 \, , \, 0 \leq \theta \leq 2 \pi  \} \quad.
$$
Also $dA= r dr d \theta$, so our integral (ignoring the annoying constant $\frac{27}{64 \pi}$ for now) is:
$$
\int_0^{2 \pi} \int_0^2 r^4 r \, dr \, d \theta =
\int_0^{2 \pi} \int_0^2 r^5 \, dr \, d \theta  \quad .
$$
The inside integral is $\frac{r^6}{6} \Bigl \vert_0^2= \frac{64}{6}=\frac{32}{3}$.
The outside integral is $\int_0^{2\pi} \frac{32}{3} \, d \theta= \frac{64 \pi} {3}$.
Finally, multiplying by the annoying $\frac{27}{64 \pi}$ we get that the answer is:
$$
\frac{27}{64 \pi} \cdot \frac{64 \pi} {3}= 9 \quad .
$$


\vfill\eject
{\bf 7.} (10 points)  Let $A$ be the {\bf number}
$$
A= \int_{0}^{4} \int_{y/2}^{2}  e^{x^2} \, dx \, dy \quad .
$$
What is $1+e^4-A$ ?
(Hint: Not even Dr. Z. can do $\int e^{x^2} \, dx$, so you must be clever,
and first change the order of integration.)
\bigskip
\hrule
\bigskip
\bigskip
{\bf Ans.}: $2$
\bigskip
\bigskip
\hrule

\bigskip
{\bf Sol.} The integral is in type II format:
$$
\{ (x,y) \vert 0 \leq y \leq 4 \, , \, y/2 \leq x \leq 2 \} \quad
$$
If you draw it (do it!), you get a triangle with vertices $(0,0)$, $(2,0)$ and $(2,4)$.
A type I description of the same region is:
$$
\{ (x,y) \vert 0 \leq x \leq 2 \, , \, 0 \leq y \leq 2x \} \quad
$$
So the type I formulation of the integral is:
$$
A=\int_0^2 \int_{0}^{2x} e^{x^2} \, dy dx \quad .
$$
The {\bf inner integral} is
$$
\int_{0}^{2x} e^{x^2} \, dy =
e^{x^2} \int_{0}^{2x}  \, dy = e^{x^2} (2x) \quad .
$$
The {\bf outer integral} is: (do the substitution $u=x^2$)
$$
A= \int_{0}^{2} 2x e^{x^2}  = e^{x^2} \Bigl \vert_0^2 =e^4-e^0=e^4-1 \quad .
$$
Finally, 
$$
1+e^4-A=1+e^4-(e^4-1)= 2 \quad .
$$

{\bf Comment:} Quite a few people only computed $A$ and left the final answer as $e^4-1$.
Please read the {\bf whole} question. Being able to follow instructions is much more important
than multivariable calculus.


\vfill\eject
{\bf 8.} (10 points) 
Calculate the double integral
$$
\int\int_{R} {{27x^2y^2} \over {(\ln 2) (x^3+1)}} \, dA \quad, \quad
$$
$$
R=\{(x,y)\, \vert \, 
0 \leq x \leq 1 \, , \, -1 \leq y \leq 1 \, \} \quad.
$$

\bigskip
\hrule
\bigskip
{\bf Ans.}: $6$ \quad .
\bigskip
\hrule

\bigskip

{\bf Sol.} : The iterated integral is
$$
\frac{27}{\ln 2} \int_0^1 \int_{-1}^{1} {{27x^2y^2} \over {(\ln 2) (x^3+1)}} \, dy dx=
$$
The integrand is {\bf separable}, and the region is a {\bf rectangle} so we have:
$$
\frac{27}{\ln 2}  ( \int_0^1  {{x^2} \over { x^3+1}} \, dx )
( \int_{-1}^{1} y^2 \, dy ) \quad .
$$
The first integral is almost of the form $TOP/BOT$ where the $TOP$ is the derivative of $BOT$,
and whose integral is $\ln |BOT|$.
$$
\int_{0}^{1} {{x^2} \over { x^3+1}} \, dx =
\frac{1}{3} \int_{0}^{1} {{3x^2} \over { x^3+1}} \, dx =
\frac{1}{3} \int_{0}^{1} {{3x^2} \over { x^3+1}} \, dx =
\frac{1}{3} \ln |x^3+1| \vert_0^1=\frac{1}{3} (\ln 2 - \ln 1) =\frac{\ln 2}{3}  \quad .
$$
The second integral is even simpler:
$$
 \int_{-1}^{1} y^2 \, dy  = \frac{y^3}{3} \Bigl \vert_{-1}^{1}= \frac{1}{3} -\frac{-1}{3}=\frac{2}{3} \quad .
$$
Combining, we get that the answer is:
$$
\frac{27}{\ln 2}  \cdot \frac{\ln 2}{3} \cdot \frac{2}{3}= 6 \quad .
$$

\vfill\eject
{\bf 9.} (10 points)  Use Lagrange multipliers to find the maximum
value of the function
$f(x,y)=x^2y-27$  subject to the constraint $x+y=6$.

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

\bigskip

{\bf Sol.} The goal function is $f(x,y)=x^2y-27$. The constraint function is
$g(x,y)=x+y-6$.

$$
\g f= \langle 2xy \, , \, x^2 \rangle \quad , \quad \g g= \langle 1 \, , \, 1  \rangle 
$$
We have to solve $\g f= \lambda \g g$. In this problem it is:
$$
\langle 2xy \, , \, x^2 \rangle = \lambda \langle 1 \, , \, 1  \rangle \quad .
$$
Spelling it out we have the equations
$$
2xy= \lambda \quad, x^2 = \lambda
$$
In addition we have the {\bf constraint} equation $x+y=6$.
It is always good to get rid of $\lambda$. Subtracting the first from the second, we get
$$
2xy-x^2=0 \quad
$$
Factorizing, we get $x(2y-x)=0$ so we have $x=0$ or $x=2y$. The first option gives the
solution $(x,y)=(0,6)$, and the second one gives $2y+y=6$ so $3y=6$ so $y=2$ and $x= 2 \cdot 2=4$,
yielding $(x,y)=(4,2)$.

Now it is time to plug-in. $f(0,6)=-27$ and $f(4,2)=4^2 \cdot 2 - 27= 32-27=5$.
So the {\bf minimum value} is $-27$ and the {\bf maximum value} is $5$. But no one
asked us about the minimum value, so don't mention it.

\vfill\eject
{\bf 10.} (10 points) 
Find the local maximum and minimum {\bf values},
and saddle point(s) of the function $f(x,y)=x^4+y^4-4xy+5$.

\bigskip
\hrule
\bigskip
{\bf Local maximum value(s):} None
\bigskip
{\bf Local minimum value(s)}  $3$ (at $(1,1)$ and $(-1,-1)$)
\bigskip
{\bf saddle point(s)}:  $(0,0)$
\bigskip
\hrule
\bigskip

{\bf Sol.}: 
$$
f_x=4x^3-4y \quad , \quad
f_y=4y^3-4x \quad , \quad
$$
For future reference
$$
f_{xx}=12x^2 \quad, \quad f_{xy}=-4 \quad , \quad f_{yy}=12y^2 \quad .
$$
We must first solve the system of two equations and two unknowns: $f_x=0,f_y=0$.
$$
4x^3-4y =0 \quad , \quad 4y^3-4x=0 \quad .
$$
So $y=x^3$ $x=y^3$. Substituting the first equation into the second one gives
$$
x=(x^3)^3=x^9 \quad
$$
So
$$
x^9-x=0 \quad 
$$
Factoriong:
$$
x(x^8-1)=0 \quad 
$$
giving $x=0,x=-1,x=1$. But $y=x^3$ 
so when $x=0, y=0^3=0$, when $x=1$, $y=1^3=1$ and when $x=-1$, $y=(-1)^3=-1$.
So the three critical points are $(-1,-1)$, $(0,0)$, and $(1,1)$.

Now it is time to examine each point according to its merit.

When $(x,y)=(0,0)$, we have $f_{xx}=0, f_{xy}=-4, f_{yy}=0$, so $D=(0)(0)-(-4)^2=-16<0$. Since $D$ is {\bf negative},
$(0,0)$ is a {\bf saddle point}.

When $(x,y)=(1,1)$, we have $f_{xx}=12, f_{xy}=-4, f_{yy}=12$, so $D=(12)(12)-(-4)^2=144-16=128>0$. Since
$D$ is {\bf positive}, it is either a max or a min. Since $f_{xx}$ is positive, this is a {\bf local min}.
The local min value is $f(1,1)=1^4+1^4-4(1)(1)+5=3$.

When $(x,y)=(-1,-1)$, we have $f_{xx}=12, f_{xy}=-4, f_{yy}=12$, so $D=(12)(12)-(-4)^2=144-16=128>0$. Since
$D$ is {\bf positive}, it is either a max or a min. Since $f_{xx}$ is positive, this is a {\bf local min}.
The local min value is $f(-1,-1)=(-1)^4+(-1)^4-4(-1)(-1)+5=3$.


\bigskip

{\bf Comment}: Some people wrote for the value, $128$. This is {\bf nonsense}. The min value
is obtained by plugging-in the minimum point into $f(x,y)$. The actual value of
the discriminant $D$ is not important, only whether it is positive or negative.










\end
