\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 7 | MA261 | July 20, 2017}
}
\makebox[\textwidth]{Christina Jamroz, Alden Bradford}
\begin{enumerate}
\ifkey\else
\itemsep2em
\fi

%%% PROBLEMS

\item \pts{4} Find the gradient vector field of $f(x,y,z)=xy^2z$.

\key{$\nabla f=\langle f_x,f_y,f_z\rangle=\langle y^2z,2xyz,xy^2\rangle$}

\item \pts{6} Let $\vec{F}(x,y)=\langle 2y, x\rangle$. Integrate $\vec{F}\cdot d\vec{r}$ along the path $y=x^2$ from $(0,0)$ to $(1,1)$.

\key{Using $y=x^2$ we find $dy=2xdx$ and so\begin{align*}
\int 2y\;dx+x\;dy&=\int_0^1 2x^2\;dx+x2x\;dx\\
&=\int_0^1(4x^2)\;dx\\
&=4/3
\end{align*}}

\item \pts{10} For each function $\vec{F}$ below, determine whether $\vec{F}$ is conservative. If it is, find a function $f$ such that $\vec{F}=\nabla f$.
\begin{multicols}{2}
\begin{enumerate}
\item $\vec{F}=\langle 2xy,x^2+y^2\rangle$
\item $\vec{F}=\langle xe^y,e^y\rangle$
\end{enumerate}
\end{multicols}

\key{
\begin{enumerate}
\item $\pdv{y}2xy=2x=\pdv{x}(x^2+y^2)$ so the field is conservative.
\begin{align*}
f(x,y)&=\int2xy\;dx&&=x^2y+g(y)\\
f(x,y)&=\int(x^2+y^2)\;dy&&=x^2y+\frac{y^3}{3}+h(x)\\
f(x,y)&=x^2y+\frac{y^3}{3}+C
\end{align*}
\item $\pdv{y} xe^y=xe^y$ while $\pdv{x} e^y=0$. The function is not conservative.
\end{enumerate}
}

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

%%% UNUSED PROBLEMS



