\documentclass[12pt]{article}
\usepackage{physics,graphicx,multicol}
\pagenumbering{gobble}

%%% MACROS
\renewcommand{\vec}[1]{\ensuremath{\mathbf{#1}}}
\newcommand{\pts}[1]{(#1 points)}

\newif\ifkey
%\keytrue %comment to hide key

\newcommand{\key}[1]{
\ifkey
	\fbox{
	\begin{minipage}{0.875\textwidth}
	#1
	\end{minipage}
	}
\fi
}

\begin{document}
\begin{large}
\noindent
\makebox[\textwidth]{
	\textbf{Quiz 4 | MA261 | July 7, 2017}
}
\makebox[\textwidth]{Christina Jamroz, Alden Bradford}
\begin{enumerate}
\ifkey\else
\itemsep2em
\fi

%%% PROBLEMS


\item \pts{4} Find and classify the critical point of the function $f(x,y)=y^2-4y+2x-x^2$ using the second derivatives test.

\key{ $f_x=2-2x$, so $x=1$. $f_y=2y-4$, so $y=2$. $f_{xx}=-2$ and $f_{yy}=2$ and $f_{xy}=0$, so $D=-4$ and the critical point $(1,2)$ is a saddle point. }

%problem 14.8.6
\item \pts{8} Find the $(x,y)$ co\"ordinates of the extreme value of $f(x,y)=e^{xy}$ subject to the constraint $x^3+y^3=16$ using the method of Lagrange multipliers.

\key{ $f_x=ye^{xy}$, $f_y=xe^{xy}$, $g_x=3x^2$, $g_y=3y^2$. Then $ye^{xy}=\lambda 3x^2$ and $xe^{xy}=\lambda 3y^2$. Solving for $\lambda$ and substituting gives the solution $y^3=x^3$, or $y=x$. Then $x^3+y^3=16$ tells us $x=y=2$.}

%15.3.19
\item \pts{8} Set up \textbf{but do not evaluate} an iterated integral to compute $\displaystyle\iint_D y^2\;dA$ where $D$ is the triangular region with vertices $(0,1),(1,2),(4,1)$.

\key{$$
\iint_Dy^2\;dA=\int_1^2\int_{y-1}^{7-3y} y^2 \;dxdy
$$}




\end{enumerate}
\end{large}
\end{document}

%%% UNUSED PROBLEMS

\item Compute $\pdv{z}{x}$ given that $u=1$, $v=-1$, $\pdv{u}{x}=5$, $\pdv{v}{x}=6$, and $z=e^{u+2v}$.

\key{ Note $\pdv{z}{u}=e^{u+2v}=e^{1-2}=\frac{1}{e}$ and $\pdv{z}{v}=2e^{u+2v}=\frac{2}{e}$.

\noindent Then use the chain rule:
\begin{align*}
\textstyle \pdv{z}{x}	&= \textstyle \pdv{z}{u}\pdv{u}{x}+\pdv{z}{v}\pdv{v}{x}\\
\textstyle 				&= \textstyle \frac{1}{e}5+\frac{2}{e}6\\
\textstyle 				&= \textstyle 17/e
\end{align*}
}