\documentclass[12pt]{article}
\pagestyle{empty}
\setlength{\topmargin}{-1in}
\setlength{\oddsidemargin}{-.3in}
\setlength{\textheight}{9in}
\setlength{\textwidth}{7.2in}

\usepackage{amssymb}

\newcommand{\adj}{\mathrm{Adj}}
\newcommand{\mbf}{\mathbf}
\newcommand{\R}{\mathbb{R}}
\newcommand{\ra}{\rightarrow}
\newcommand{\proj}{\mathrm{proj}}
\newcommand{\dotprod}{\bullet}
\newcommand{\sol}{\textbf{Solution}}

\begin{document}

\textbf{Key to TEST 2}


\begin{enumerate}

\item  For the surface defined by $z=x^2-xy-2y^2$, find the equation of the tangent plane at the
  point $(1,2,-9)$.
	\\
	\sol:
	We first form the equation $x^2-xy-2y^2-z=0$ and the function $F(x,y,z)=x^2-xy-2y^2-z$.
	The gradiant of $F$ is normal to the plane and the plane contains the point $(1,2,-9)$.
	\begin{eqnarray*}
	\nabla F & = & (2x-y, -x-4y, -1) \\
	\nabla F(1,2,-9) & = & (0, -9, -1)	
	\end{eqnarray*}
	So, the equation is $0x-9y-z=D$ and we need to solve for $D$ by plugging in the point $(1,2,-9)$:
	$D=-9(2)-(-9)=-9$ and the equation is:
	\[
	-9y-z=-9
	\]

\item  Consider the function $f(x,y,z)=x^2-3xy-yz$.
  \begin{enumerate}
  \item  In what direction is $f$ decreasing most rapidly at the point $(2,1,1)$?
    \\
    \sol: This is just $-\nabla f(2,1,1)$.
    $\nabla f = (2x-3y, -3x-z, -y)$.  At the point in question, we have
    \[
    -\nabla f(2,1,1) = -(1, -7, -1) = (-1,7,1)
    \]
  \item  What is the directional derivative of $f$ at $(2,1,1)$ in the direction $(1,3,4)$?
    \\
    \sol: We just compute the directional derivative and we need to remember to convert the vector into a unit vector:
    \begin{eqnarray*}
    D_uf & = & \nabla f \dotprod u = (1,-7,-1) \dotprod \frac{(1,3,4)}{\sqrt{26}} \\
    & = & \frac{-24}{\sqrt{26}}
    \end{eqnarray*}
  \end{enumerate}


\item  Find all extrema and saddle points for the function $f(x,y)=x^2y-6y^2-3x^2$.
  \\
  \sol: Here we need to find the critical points:
  \[
  \nabla f = (2xy-6x, x^2-12y) = (0,0)
  \]
  We solve this system of equations as follows:
  If $2xy-6x=0$ then either $x=0$ or $y=3$.
  If $x=0$, then the equation $x^2-12y=0$ implies that $y=0$ giving the critical point $(0,0)$.
  If $y=3$ then the equation $x^2-12y=0$ implies that $x=\pm 6$ giving the critical points $(6,3)$ and $(-6,3)$.
  We can now test these critical points using the second derivative test.
  Notice that $f_{xx}=2y-6$, $f_{yy}=-12$ and $f_{xy}=2x$.
  \[
  \begin{array}{|r|r|r|r|r|}
    \hline
    C.P. & f_{xx} & f_{yy} & f_{xy} & D=f_{xx}f_{yy}-(f_{xy})^2 \\
    \hline
    (0,0) & -6 & -12 & 0 & 72 \\
    (6,3) & 0 & -12 & 12 & -144 \\
    (-6,3) & 0 & -12 & -12 & -144 \\
    \hline
  \end{array}
  \]
  This means that there is a local maximum of $0$ at $(0,0)$ and saddle points at $(6,3)$ and $(-6,3)$.

\item  Consider the double integral below:
  \[
  \int_0^2 \int_{-2y}^{y/2} \; dx\; dy
  \]
  \begin{enumerate}
  \item  Draw the region of integration in the $xy$-plane.
  \item  Rewrite the integral by switching the order of integration.
    \\
    (Hint: this may require writing the integral down as two integrals.)
    \\
    \sol:
    \[
    \int_{-4}^0 \int_{-x/2}^{2} \; dy \; dx +
    \int_0^1 \int_{-2x}^{2} \; dy \; dx
    \]
  \item  Evaluate the integral.
    \\
    \sol: A simple way to do this is to notice that the integral represents area of the region 
    drawn in part (a).  This region is just a triangle and has area $5$, so this is the value of the integral.
  \end{enumerate}




\end{enumerate}

\end{document}







