
\documentclass{article}
\setlength{\textwidth}{5in}
\setlength{\oddsidemargin}{0.5in}
\setlength{\evensidemargin}{0.5in}
\newcommand{\p}{\partial }
\newcommand{\Title}[1]{\begin{center}\large\bf #1 \end{center}}
\newcommand{\TITLE}[1]{\begin{center}\Large\bf #1 \end{center}}
\newcommand{\ds}{\displaystyle}
\newcommand{\prob}[1]{\par\bigskip\noindent{\bf #1. } }
\newcommand{\answer}[1]{{\par\medskip\par\small\noindent{\em Answer: } #1 }}
%\newcommand{\answer}[1]{{\par\medskip\par}}
%
\begin{document}

\Title{Sample First Exam for Calculus 223}

\prob{1} Find $dw/dt$ at $t=3$ if
$$
w=\frac{x}{z}+\frac{y}{x},
\qquad x=\cos^2t,\quad y=\sin^2t, \quad z=\frac{1}{t}.
$$
\answer{
\begin{eqnarray*}
\ds \frac{dw}{dt} &=& \ds
\frac{\p w}{\p x}\frac{dx}{dt} +
\frac{\p w}{\p y}\frac{dy}{dt} +
\frac{\p w}{\p z}\frac{dz}{dt} \\
&&\\
&=&\ds
\left(\frac{1}{z}-\frac{y}{x^2}\right)(-2\cos t\sin t)+
\left(\frac{1}{x}\right)(2\sin t\cos t)+
\left(\frac{-x}{z^2}\right)\left(\frac{-1}{t^2}\right) \\
&&\\
&=&\ds
\left(3-\frac{\sin^23}{\cos^43}\right)(-2\cos 3\sin 3)+
\left(\frac{1}{\cos^23}\right)(2\sin 3\cos 3)+
\left(-9\cos^23\right)\left(\frac{-1}{9}\right)
\end{eqnarray*}
at $t=3$.
}


\prob{2} Find an equation for the tangent plane to the surface
$$
      x^3z+y^2x^2+\sin(yz)+54=0
$$
at the point $P_0 =(3,0,-2)$.

\answer{
$$
    \nabla f =
   (3x^2z+2y^2x){\bf i} +
   (2yx^2+z\cos yz){\bf j} +
   (x^3+y\cos yz) {\bf k}
$$
so
$$
    \left.\nabla f\right|_{(3,0,-2)} =
   -54{\bf i}
   -2{\bf j} +
   27 {\bf k}.
$$
The tangent plane is
$$
   -54(x-3)-2(y-0)+27(z+2) = 0.
$$
}

\prob{3} The function $f(x,y)$ is defined by
$$
    f(x,y)=uv, \qquad x = u, \quad y=v+u^2.
$$
Find the gradient ${\bf \nabla}f$ at the point $(x_0,y_0)=(3,13)$.
Express your answer in the form $a{\bf i}+b{\bf j}$.

\answer{
We can use implicit differentiation, but it is a little easier
to express $f$ in terms of $x$ and $y$ directly
using $u=x$ and $v=y-u^2=y-x^2$ so
$$
    f(x,y) =x(y-x^2) = xy-x^3.
$$
Hence
$$
 \nabla f = (y-3x^2){\bf i}+ x{\bf j}.
$$
}

\prob{4} For the function $h(x,y)=x^3+y^3-9xy$:
\begin{description}
\item[(i)] Find all points $P=(x,y)$ where the gradient
${\bf \nabla}h$ is zero.
\item[(ii)] For each point in part~(i) say whether it is
a local minimum, a local maximum, or a saddle.
{\em Don't guess: an answer without a reason receives
no credit.}
\end{description}

\answer{
$h_x= 3x^2-9y$, $h_y = 3y^2-9x$,
so $h_x=h_y=0$ when $x^2=3y$ and $y^2=3x$.
So $x^4=9y^2=27x$ so $x=0$ (and $y=0$) or $x=3$ (and $y=3$).
At $(x,y)=(0,0)$ we have $h_{xx}h_{yy}-h_{xy}^2=-81<0$ so we have a saddle.
At $(x,y)=(3,3)$ we have
$h_{xx}h_{yy}-h_{xy}^2= (6x)(6y)-(-9)^2= 18^2-9^2>0$
and $h_{xx}=18>0$ so we have a (local) minimum.
}

\prob{5} Find the maximum and minimum values of $x^2+y^2$
subject to the constraint $x^2-2x+y^2-4y=0$.

\answer{ The equations $f_x=\lambda g_x$ and $f_y=\lambda g_y$ are
$$
2x = \lambda (2x-2), \qquad 2y = \lambda(2y-4).
$$
Dividing gives
$$
  \frac{x}{y} = \frac{2x-2}{2y-4} \qquad\mbox{ or }\qquad
2xy-4x = 2xy-2y
$$
so $y=2x$. Substitute into the constraint:
$$
    x^2-2x+4x^2-8x = 5x(x-2)
$$
so $x=y=0$ or $x=2$ and $y=4$. $f(0,0)=0$ is the minimum
and $f(2,4)= 20$ is the maximum.
}

\prob{6} Find the polynomial $p(x,y)$ of degree two which
best approximates the function
$ f(x,y)=x^2y^3$  near the point $(x_0,y_0)=(1,-1)$.

\answer{
$$
\begin{array}{ll}
f(x,y) = x^2y^3 &\qquad f(1,-1) =-1 \\
f_x(x,y) = 2xy^3 &\qquad f_x(1,-1) =-2 \\
f_y(x,y) = 3x^2y^2 &\qquad f_y(1,-1) =3 \\
f_{xx}(x,y) = 2y^3 &\qquad f_{xx}(1,-1) =-2 \\
f_{xy}(x,y) = 6xy^2 &\qquad f_y(1,-1) =6 \\
f_{yy}(x,y) = 6x^2y &\qquad f_{yy}(1,-1) =-6
\end{array}
$$
so the Taylor polynomial is
$$
p(x,y) = -1-2(x-1)+3(y+1) - (x-1)^2+6(x-1)(y+1)-3(y+1)^2.
$$
}

\prob{7} Find the extreme values of the function $f(x,y)=x^2+3y^2+2y$
on the unit disk $x^2+y^2 \le 1$. Hint: On the boundary $x^2=1-y^2$.

\answer{ The critical points are given by
$$
0=  \frac{\p f}{\p x} = 2x=0, \qquad 0=\frac{\p f}{\p y} = 6y+2,
$$
so $x=0$ and $y=-1/3$. The point $(x,y)=(0,-1/3)$ lies in the region
$x^2+y^2\le 1$ so (by the first derivative test) this is a candidate
for an extremum. At this point the discriminant is
$$
     f_{xx}f_{yy}-f_{xy}^2= 1>0
$$
and  $f_{xx}$ and $f_{yy}$ are both positive so the point is a local
minimum by the second derivative test. The value at the critical point
is $f(0,-1/3)=0+1/3-2/3=-1/3<0$. The maximum occurs on the boundary.
We can find the maximum using
Lagrange multipliers (Maximize $x^2+3y^2+2y$ subject to $x^2+y+2+1$),
{\em or} by maximizing (using Calc 221)
$$
    f(\cos\theta,\sin\theta)= \cos^2\theta+3\sin^2\theta+2\sin\theta,
$$
{\em or} by using the hint.


\medskip

Here is how to finish the problem using the hint.
On the boundary $x^2=y^2-1$, $-1\le y\le 1$, and
$f= (1-y^2)+3y^2+2y=2y^2+2y+1=F(y)$. We must maximize $F(y)$ on
the interval $-1\le y\le 1$.
This is a calculus 221 problem.
The critical point occurs at $F'(y)=4y+2=0$ so $y=-1/2$
and $F(-1/2)=1/2-1+1=1/2$.
At the endpoints $F(-1)=1$ and $F(1)=5$.

\medskip

In summary:
the minimum value $f(0,-1/3)=-1/3$
occurs at at the interior point $(x,y)=(0,-1/3)$,
and
the maximum value $f(0,1)=F(1)=5$
occurs at the boundary point $(x,y)=(0,1)$.
}

\prob{8} Suppose that
$$
  w=x^2-y^2+4z+t, \mbox{\quad and\quad} x+2z+t=25.
$$
Show that the equations
$$
 \frac{\p w}{\p x} = 2x-1\qquad \frac{\p w}{\p x} = 2x-2
$$
each give $\p w/\p x$ depending on which variables are chosen to be
dependent and which are chosen to be independent.
Identify (using thermodynamic notation) the independent variables
in each case.


\answer{
From $x+2z+t=25$ we conclude that
$$
  1+2\left(\frac{\p z}{\p x}\right)_{yt}=
  1+\left(\frac{\p t}{\p x}\right)_{yz}= 0.
$$
Hence
$$
\left(\frac{\p w}{\p x}\right)_{yt} =
2x +4 \left(\frac{\p z}{\p x}\right)_{yt} =
2x +4\left(-\frac{1}{2}\right)=2x-2
$$
$$
\left(\frac{\p w}{\p x}\right)_{yz} =
2x + \left(\frac{\p t}{\p x}\right)_{yz} =
2x -1.
$$
The two equations do not define
$w$ and $y$ as functions of $x$, $z$, and $t$
since $x+2z+t=25$.
}

\prob{9}(a) Evaluate $\ds \lim_{(x,y)\to(0,0)} \frac{x^2-y^2}{x^2+y^2}$.

\medskip

\answer{ Along the line $y=mx$ we have
$$
\frac{x^2-y^2}{x^2+y^2}=\frac{x^2-m^2x^2}{x^2+m^2x^2}=
\frac{1-m^2}{1+m^2}.
$$
There  is a different limit along
each line through the origin;
the limit as $(x,y)\to(0,0)$  does not exist.
}

\noindent(b) Evaluate $\ds \lim_{(x,y)\to(0,0)} \frac{(x^2-y^2)^2}{x^2+y^2}$.

\medskip

\answer{ Since
$$
   0 \le (x^2-y^2)^2 \le (x^2+y^2)^2
$$
we have
$$
   0 \le \frac{(x^2-y^2)^2}{(x^2+y^2)} \le (x^2+y^2).
$$
But
$$
  \lim_{(x,y)\to(0,0)} (x^2+y^2) = 0
$$
so
$$
  \lim_{(x,y)\to(0,0)}\frac{(x^2-y^2)^2}{(x^2+y^2)} = 0
$$
by the sandwich theorem.
}
\end{document}



%%%%%%%%%%%%%%%%%%%%
