\magnification=\magstep1
\def\pa{\partial}
\def\ddx{{\pa\over\pa x}}
\def\ddy{{\pa\over\pa y}}
\def\ddu{{\pa\over\pa u}}
\def\ddv{{\pa\over\pa v}}
\def\sol{\medskip \item{} {\it Solution:} $\ $}
\centerline{Mathematics 241 -- Multivariable Calculus}
\centerline{Solutions for Exam 2}
\centerline{October 29, 2007}
\bigskip
\noindent
I.  Let $F(x,y) = (x - y^2,xy)$ and $g(t) = (\sin(t),\cos(t) + \sin(t))$.
\item{A)}  Compute the derivative matrices $D(F)$ and $D(g)$.
\sol By the definition, $D(F)$ is a $2\times 2$
matrix and $D(g)$ is a $2\times 1$ matrix:
$$D(F) = \pmatrix{ \ddx(x - y^2)& \ddy(x - y^2)\cr
                   \ddx(xy) & \ddy(xy)\cr}
=\pmatrix{1 & -2y\cr
          y & x\cr}$$
and 
$$D(g) = \pmatrix{\cos(t)\cr -\sin(t) + \cos(t)\cr}.$$
\item{B)}  Use the Chain Rule to compute $D(F\circ g)(\pi)$.
\sol
The Chain Rule says $D(F\circ g)(\pi) = D(F)(g(\pi)) D(g)(\pi)$
here.  We have $g(\pi) = (0,-1)$ so 
$$D(F)(g(\pi)) = \pmatrix{1 & 2\cr -1 & 0\cr}$$
and 
$$D(g)(\pi) = \pmatrix{-1\cr -1\cr}.$$
So 
$$D(F)(g(\pi))D(g)(\pi) = \pmatrix{1 & 2\cr -1 & 0\cr} \pmatrix{-1\cr -1\cr} = \pmatrix{-3 \cr 1\cr}.$$
\item{C)} Compute the composition $F\circ g$ and find its derivative
matrix directly to check your answer from part B.
\sol
We have 
$$(F\circ g)(t) = (\sin(t) - (\cos(t) + \sin(t))^2,\sin(t)(\cos(t) + \sin(t)).$$
So 
$$D(F\circ g)(t) = \pmatrix{\cos(t) - 2(\cos(t) + \sin(t))(-\sin(t) + \cos(t))\cr
\sin(t)(-\sin(t) + \cos(t)) + (\cos(t) + \sin(t))\cos(t)\cr}$$
Substituting $t=\pi$, we get:
$$\eqalign{
D(F\circ g)(\pi) &= \pmatrix{\cos(\pi) - 2(\cos(\pi) + \sin(\pi))(-\sin(\pi) + \cos(\pi))\cr
\sin(\pi)(-\sin(\pi) + \cos(\pi)) + (\cos(\pi) + \sin(\pi))\cos(\pi)\cr}\cr
&=\pmatrix{-1 - 2(-1)(-1)\cr 0 + (-1)(-1)\cr }\cr
&= \pmatrix{-3\cr 1},\cr}$$
since $\sin(\pi) = 0$ and $\cos(\pi) = -1$.
\bigskip\noindent
II.  Let $z = f(x+y,x-y)$ have continuous partial derivatives
with respect to $u = x + y$ and $v = x - y$.  Show that
$${\pa z\over\pa x}{\pa z\over\pa y} = \left({\pa z\over\pa u}\right)^2 -
\left({\pa z\over\pa v}\right)^2.$$
\sol
By the Chain Rule, 
$${\pa z\over\pa x}={\pa z\over\pa u}{\pa u\over\pa x} + 
{\pa z\over\pa v}{\pa v\over\pa x} = {\pa z\over\pa u}\cdot 1 +
{\pa z\over\pa v}\cdot 1$$
and 
$${\pa z\over\pa y}={\pa z\over\pa u}{\pa u\over\pa y} +
{\pa z\over\pa v}{\pa v\over\pa y} = {\pa z\over\pa u}\cdot 1 +
{\pa z\over\pa v}\cdot (-1).$$
Then
$${\pa z\over\pa x}{\pa z\over\pa y}=
\left({\pa z\over\pa u} +
{\pa z\over\pa v}\right)\left({\pa z\over\pa u} -
{\pa z\over\pa v}\right) = 
\left({\pa z\over\pa u}\right)^2 -
\left({\pa z\over\pa v}\right)^2.$$
This establishes what we wanted to show.  
\bigskip
\noindent
\item{}
{\it Comment:}
It is also possible to use the Chain Rule a different way to do
this problem.  If solve the equations $u = x + y$ and $v = x - y$
for $x,y$ in terms of $u,v$, then we find $x = {1\over 2}(u + v)$
and $y = {1\over 2}(u - v)$.  Then by the Chain Rule,
$${\pa z\over\pa u}={\pa z\over\pa x}{\pa x\over\pa u} +
{\pa z\over\pa y}{\pa y\over\pa u} = {\pa z\over\pa x}\cdot {1\over 2} +
{\pa z\over\pa y}\cdot {1\over 2}$$
and
$${\pa z\over\pa v}={\pa z\over\pa x}{\pa x\over\pa v} +
{\pa z\over\pa y}{\pa y\over\pa v} = {\pa z\over\pa x}\cdot {1\over 2} +
{\pa z\over\pa y}\cdot {-1\over 2}.$$
Then substituting and expanding the squares
$$
\eqalign{
\left({\pa z\over\pa u}\right)^2 -
\left({\pa z\over\pa v}\right)^2 
&=\left({\pa z\over\pa x}\cdot {1\over 2} +
{\pa z\over\pa y}\cdot {1\over 2}\right)^2 
-\left({\pa z\over\pa x}\cdot {1\over 2} +
{\pa z\over\pa y}\cdot {-1\over 2}\right)^2\cr
&={1\over 4}\left({\pa z\over\pa x}\right)^2 
+ {1\over 2} {\pa z\over\pa x}{\pa z\over\pa y} +
{1\over 4}\left({\pa z\over\pa y}\right)^2 \cr
&\qquad - \left({1\over 4}\left({\pa z\over\pa x}\right)^2
- {1\over 2} {\pa z\over\pa x}{\pa z\over\pa y} +
{1\over 4}\left({\pa z\over\pa y}\right)^2\right)\cr
&={\pa z\over\pa x}{\pa z\over\pa y}.\cr}$$
This establishes what we wanted to show again, but note the 
first way is somewhat simpler.
\bigskip
\noindent
III.  A mountain has the shape of the graph
$$z = \sqrt{4 - x^2 - {y^2\over 4}},$$
where $x,y$ are the east-west and north-south map coordinates
respectively, and $z$ is the altitude.  
\item{A)}  If you are standing at the point on the mountain
with $(x,y,z) = (1,2,\sqrt{2})$, which direction should you
move (on the map) to increase your altitude the fastest?
\sol  This will be in the direction of the gradient vector
of the altitude function at $(x,y) = (1,2)$.  We have
$$\eqalign{
\nabla f(x,y) &= \left(\ddx   \sqrt{4 - x^2 - {y^2\over 4}},
\ddy\sqrt{4 - x^2 - {y^2\over 4}}\right)\cr
&= 
\left({-x\over \sqrt{4 - x^2 - {y^2\over 4}}},
{-y\over 4\sqrt{4 - x^2 - {y^2\over 4}}}\right),\cr}$$
so at $(x,y) = (1,2)$, we have
$$\nabla f(1,2) = \left({-1\over \sqrt{2}},{-1\over 2\sqrt{2}}\right).$$
The unit vector specifying the direction of the gradient 
is 
$$u = \left({-2\over \sqrt{5}},{-1\over \sqrt{5}}\right).$$
\item{B)}  At the same point as in part A, in what direction
should you move (on the map) to remain at a constant altitude?
\sol   This will be in directions orthogonal to the 
gradient vector.  These are specified by the unit
vectors
$$u = \pm\left({1\over \sqrt{5}},{-2\over \sqrt{5}}\right).$$
(Note:  Given $(a,b)$, to get a perpendicular vector $(c,d)$ with 
$(a,b) \cdot (c,d) = 0$, we can always take $(c,d) = (-b,a)$.)
\bigskip
\noindent
IV.  Let $x(t) = (t^2/2,t,t)$ and $y(t) = (t\cos(t),t\sin(t),t)$ 
be two curves in ${\bf R}^3$.
\item{A)}  Does the tangent line to $x(t)$ at $t = 2$ cross
the $xy$-plane?  If so, where does this occur?
\sol  The tangent line is the line with parametric
equations 
$$x(2) + (t-2) x'(2) = (2,2,2) + (t-2)(2,1,1) = (2t - 2, t, t)$$
This crosses the plane $z = 0$ at $t = 0$, and the intersection
point is $(-2,0,0)$.  
\medskip
\item{B)}  Show that $y(t)$ (for $t > 0$) is a flow line
for the vector field 
$$F(x,y,z) = \left(-y + {x\over z}, x + {y\over z}, 1\right).$$
\sol
The curve $\alpha(t)$ is a flow line of $F$ if $\alpha'(t) = F(\alpha(t))$.
We have $y'(t) = (-t\sin(t) + \cos(t), t\cos(t) + \sin(t),1)$.
This is the same as what we get by substituting the component
functions of the curve into the formula for $F$:
$(-t\sin(t) + \cos(t), t\cos(t) + \sin(t),1)$.
\medskip
\item{C)}  Show that the segments of $x(t)$ and $y(t)$ for 
$a \le t \le b$ have the {\it same arclength} for all $a,b$.
\sol
We have the arclength for $x(t)$ is 
$$\int_a^b \|x'(t)\|\ dt = \int_a^b \sqrt{t^2 + 2}\ dt.$$
Similarly for $y(t)$, 
$$\eqalign{
\|y'(t)\| &= \sqrt{(-t\sin(t) + \cos(t))^2+(t\cos(t) + \sin(t))^2 + 1}\cr
&=\sqrt{(t^2+1)(\sin^2(t) + \cos^2(t)) -2t\sin(t)\cos(t) + 2t\sin(t)\cos(t) + 1}\cr
&=\sqrt{t^2+2}.\cr}$$
Hence the arclength for $y(t)$ is $\int_a^b \sqrt{t^2 + 2}\ dt$ as well.
\bigskip
\noindent
{\it Extra Credit}:  The arclength function for $x(t)$ is
$${\|dT/dt\|/\|dx/dt\|} = {\sqrt{2}\over (t^2 + 2)^{3/2}}$$
(after simplification!)
\bye