\documentclass{article}
\usepackage{graphicx}
\usepackage{amsmath}
\usepackage{amsfonts}
\usepackage{enumerate}
\usepackage{ifthen}
\usepackage{ulem} % for strikethrough \sout{...} command
\usepackage{color}
\setlength{\oddsidemargin}{-0.5in}
\setlength{\evensidemargin}{-0.5in}
\setlength{\topmargin}{-0.5in}
\setlength{\headheight}{0.0in}
\setlength{\headsep}{0.0in}
\setlength{\topskip}{0.0in}
\setlength{\textheight}{9.6in}
\setlength{\textwidth}{7.5in}

\usepackage{tikz,pgfplots}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{arrows.meta}
\pgfplotsset{compat=1.6}

\newcommand{\bdot}{\, {\scriptstyle{\bullet}} \,}
\newcommand{\B}[1]{{\bf {#1}}}
\newcommand{\la}{\langle}
\newcommand{\ra}{\rangle}

\newcommand{\myspace}{\parbox[c][0.2in]{0.2in}{\hfill}}
\newcommand{\varspace}[2]{\mbox{\parbox[c][#1]{#2}{\hfill}}}
\newcommand{\force}{{$\mbox{\,\!}$}}

\begin{document}

%\pagestyle{empty}

%\iffalse

\noindent
\parbox{2in}{\bf Math 2130-101}
\hfill {\Large \bf Quiz \#7 -- Answers} \hfill
\parbox{2in}{\bf \hfill Nov. $30^\mathrm{th}$\!,\  2022}

\vspace{0.05in}

\noindent
{\bf\large \#1.} Let $\B F(x,y,z) = \left\la x^3+yz, x\sin(y^2z), 5 \right\ra$. 
\begin{enumerate}[(a)]
\item Compute the divergence of $\B F$:

$$\nabla \bdot \B F = \dfrac{\partial}{\partial x}\left[ x^3+yz \right] + \dfrac{\partial}{\partial y}\left[ x\sin(y^2z) \right] + \dfrac{\partial}{\partial z}\left[ 5 \right] = \mbox{\fbox{$3x^2+2xyz\cos(y^2z)$}}+0$$

\item Compute the curl of $\B F$:

$$\nabla \times \B F= \begin{vmatrix} \B i & \B j & \B k \vspace{0.05in} \\ \partial/\partial x & \partial/\partial y & \partial/\partial z  \vspace{0.05in} \\ x^3+yz & x\sin(y^2z) & 5 \end{vmatrix}
= \begin{vmatrix} \partial/\partial y & \partial/\partial z  \vspace{0.05in} \\ x\sin(y^2z) & 5 \end{vmatrix}\B i
- \begin{vmatrix} \partial/\partial x & \partial/\partial z  \vspace{0.05in} \\ x^3+yz & 5 \end{vmatrix}\B j
+ \begin{vmatrix} \partial/\partial x & \partial/\partial y  \vspace{0.05in} \\ x^3+yz & x\sin(y^2z) \end{vmatrix}\B k
$$
$$
= \left\langle \dfrac{\partial}{\partial y}\left[5 \right] - \dfrac{\partial}{\partial z}\left[ x\sin(y^2z) \right], -\left(\dfrac{\partial}{\partial x}\left[ 5 \right] - \dfrac{\partial}{\partial z}\left[ x^3+yz \right]\right), \dfrac{\partial}{\partial x}\left[ x\sin(y^2z) \right] - \dfrac{\partial}{\partial y}\left[ x^3+yz \right] \right\rangle
$$ 
$$=\mbox{\fbox{$\left\langle -xy^2\cos(y^2z), y, \sin(y^2z)-z \right\rangle$}} \qquad \text{{\it Unnecessary note:} } \nabla \times \B F \not= \B 0 \text{ so $\B F$ is not conservative.}$$
\end{enumerate}

\noindent
{\bf\large \#2.} Set up the line integral $\displaystyle \int_C \B F \bdot d\B r$ where $\B F = \langle y^2+z^2, x, yz \rangle$\\ \force \hfill and $C$ is parameterized by $\B r(t) = \langle 3t,2\cos(t),2\sin(t) \rangle$ for $-\pi \leq t \leq 5\pi$.

\vspace{0.05in}

We already have a parameterization for $C$, so our next step to compute its derivative: $\B r'(t) = \langle 3,-2\sin(t),2\cos(t) \rangle$. Then, we plug everything in. Keep in mind that our parameterization (i.e., $\B r(t)$) tells us that $x=3t$, $y=2\cos(t)$, and $z=2\sin(t)$ and so $y^2+z^2=4$. Therefore, 

$$ \int_C \B F \bdot d\B r = \int_{-\pi}^{5\pi} \langle 4, 3t, 2\cos(t) \cdot 2\sin(t) \rangle \bdot \langle 3,-2\sin(t),2\cos(t) \rangle \,dt 
= \mbox{\fbox{$\displaystyle\int_{-\pi}^{5\pi} 12-6t\sin(t)+8\cos^2(t)\sin(t)\,dt$}}$$

{\it Note:} We were not asked to evaluate this integral, but it isn't too difficult. The $-6t\sin(t)$ term requires integration by parts (which we have almost completely avoided in this class) and the final term can be tackled with a simple $u$-substitution: $u=\cos(t)$ and $du=-\sin(t)\,dt$. For those curious, the value of this integral is $36\pi$.

\vspace{0.1in}

\noindent
{\bf\large \#3.} Let $\B F = \langle yz+1, z^3+xz, 3yz^2+xy+e^{-z} \rangle$. \quad {\it Note:} $\B F$ is conservative: $\nabla \times \B F = \B 0$ (I've checked for you).
\begin{enumerate}[(a)]
\item Find a potential function for $\B F$. 
If $\B F=\nabla f$, we must have $f_x=yz+1$, $f_y=z^3+xz$, and $f_z = 3yz^2+xy+e^{-z}$. Therefore, $f = \int (yz+1)\,dx= xyz+x+C_1(y,z)$ and 
$f = \int (z^3+xz)\,dy = yz^3+xyz+C_2(x,z)$ and $f = \int (3yz^2+xy+e^{-z})\,dz = yz^3+xyz-e^{-z}+C_3(x,y)$. 

We now merge these results to reconstruct $f$. {\it Note:} Any term involving 3 variables must appear 3 times (likewise 2 variable terms appear twice and 1 variable terms appear only once). Therefore, \fbox{$f(x,y,z) = xyz+x+yz^3-e^{-z}$} [Adding an arbitrary constant ``$+C$'' will yield all possible potential functions.]

\item Use the fundamental theorem of line integrals to evaluate $\displaystyle \int_C \B F \bdot d\B r$ if $C$ is a curve from $(1,-1,0)$ to $(0,1,0)$.

\vspace{-0.2in}

$$\hspace*{-0.25in}\int_C \B F \bdot d\B r = \int_C \B \nabla f \bdot d\B r = f(\mbox{end of $C$}) - f(\mbox{start of $C$}) = f(0,1,0) - f(1,-1,0) = (0+0+0-e^{0})-(0+1+0-e^{0})=\fbox{\mbox{$-1$}}$$

{\it Note:} The fundamental theorem of line integrals was {\it not} an option for evaluating the integral in problem \#2 since that vector field $\B F$ was not conservative (so it did not have any associated potential functions). It is also worth noting that the integral in this problem could be computed directly. We could parameterize {\it any} curve from $(1,-1,0)$ to $(0,1,0)$ (for example, a line segment) and compute the value that way (since conservative vector fields have path independent line integrals). However, this would be more work than just applying our fundamental theorem.

\end{enumerate}

\vspace{0.2in}

{\color{red}Grading Notes:} \#1: 1.5 pts part (a) and 2 pts part (b) \quad \#2: 3 pts \quad \#3: 2.5 pts part (a) and 1 pt part (b).

\newpage


\noindent
\parbox{2in}{\bf Math 2130-102}
\hfill {\Large \bf Quiz \#7 -- Answers} \hfill
\parbox{2in}{\bf \hfill Nov. $30^\mathrm{th}$\!,\  2022}

\vspace{0.05in}

\noindent
{\bf\large \#1.} Let $\B F(x,y,z) = \left\la x^5y^3z+y^2, yz^3, \sin(yz^2) \right\ra$. 
\begin{enumerate}[(a)]
\item Compute the divergence of $\B F$:

$$\nabla \bdot \B F = \dfrac{\partial}{\partial x}\left[ x^5y^3z+y^2 \right] + \dfrac{\partial}{\partial y}\left[ yz^3 \right] + \dfrac{\partial}{\partial z}\left[ \sin(yz^2) \right] = \mbox{\fbox{$5x^4y^3z+z^3+2yz\cos(yz^2)$}}$$

\item Compute the curl of $\B F$:

$$\nabla \times \B F= \begin{vmatrix} \B i & \B j & \B k \vspace{0.05in} \\ \partial/\partial x & \partial/\partial y & \partial/\partial z  \vspace{0.05in} \\ x^5y^3z+y^2 & yz^3 & \sin(yz^2) \end{vmatrix}
= \begin{vmatrix} \partial/\partial y & \partial/\partial z  \vspace{0.05in} \\ yz^3 & \sin(yz^2) \end{vmatrix}\B i
- \begin{vmatrix} \partial/\partial x & \partial/\partial z  \vspace{0.05in} \\ x^5y^3z+y^2 & \sin(yz^2) \end{vmatrix}\B j
+ \begin{vmatrix} \partial/\partial x & \partial/\partial y  \vspace{0.05in} \\ x^5y^3z+y^2 & yz^3 \end{vmatrix}\B k
$$
$$
= \left\langle \dfrac{\partial}{\partial y}\left[\sin(yz^2) \right] - \dfrac{\partial}{\partial z}\left[ yz^3 \right], -\left(\dfrac{\partial}{\partial x}\left[ \sin(yz^2) \right] - \dfrac{\partial}{\partial z}\left[ x^5y^3z+y^2 \right]\right), \dfrac{\partial}{\partial x}\left[ yz^3 \right] - \dfrac{\partial}{\partial y}\left[ x^5y^3z+y^2 \right] \right\rangle
$$ 
$$=\mbox{\fbox{$\left\langle z^2\cos(yz^2)-3yz^2, x^5y^3, -3x^5y^2z-2y \right\rangle$}} \qquad \text{{\it Unnecessary note:} } \nabla \times \B F \not= \B 0 \text{ so $\B F$ is not conservative.}$$
\end{enumerate}

\noindent
{\bf\large \#2.} Set up the line integral $\displaystyle \int_C \B F \bdot d\B r$ where $\B F = \langle x^2+z^2, yz, 5 \rangle$\\ \force \hfill and $C$ is parameterized by $\B r(t) = \langle 3\cos(t),t,3\sin(t) \rangle$ for $-3\pi \leq t \leq 4\pi$.

\vspace{0.05in}

We already have a parameterization for $C$, so our next step to compute its derivative: $\B r'(t) = \langle -3\sin(t),1,3\cos(t) \rangle$. Then, we plug everything in. Keep in mind that our parameterization (i.e., $\B r(t)$) tells us that $x=3\cos(t)$, $y=t$, and $z=3\sin(t)$ and so $x^2+z^2=9$. Therefore, 

$$ \int_C \B F \bdot d\B r = \int_{-3\pi}^{4\pi} \langle 9, t \cdot 3\sin(t), 5 \rangle \bdot \langle -3\sin(t),1,3\cos(t) \rangle \,dt 
= \mbox{\fbox{$\displaystyle\int_{-3\pi}^{4\pi} -27\sin(t)+3t\sin(t)+15\cos(t)\,dt$}}$$

{\it Note:} We were not asked to evaluate this integral, but it isn't too difficult. The $3t\sin(t)$ term requires integration by parts (which we have almost completely avoided in this class). For those curious, the value of this integral is $54-3\pi$.

\vspace{0.1in}

\noindent
{\bf\large \#3.} Let $\B F = \langle yz\cos(x)+1, z\sin(x)+z, y\sin(x)+y+e^{-z} \rangle$. \quad {\it Note:} $\B F$ is conservative: $\nabla \times \B F = \B 0$ (I've checked for you).
\begin{enumerate}[(a)]
\item Find a potential function for $\B F$. 
If $\B F=\nabla f$, we must have $f_x=yz\cos(x)+1$, $f_y=z\sin(x)+z$, and $f_z = y\sin(x)+y+e^{-z}$. Therefore, $f = \int (yz\cos(x)+1)\,dx= yz\sin(x)+x+C_1(y,z)$ and 
$f = \int (z\sin(x)+z)\,dy = yz\sin(x)+yz+C_2(x,z)$ and $f = \int (y\sin(x)+y+e^{-z})\,dz = yz\sin(x)+yz-e^{-z}+C_3(x,y)$. 

We now merge these results to reconstruct $f$. {\it Note:} Any term involving 3 variables must appear 3 times (likewise 2 variable terms appear twice and 1 variable terms appear only once). Therefore, \fbox{$f(x,y,z) = yz\sin(x)+x+yz-e^{-z}$} [Adding an arbitrary constant ``$+C$'' will yield all possible potential functions.]

\item Use the fundamental theorem of line integrals to evaluate $\displaystyle \int_C \B F \bdot d\B r$ if $C$ is a curve from $(0,1,0)$ to $(2\pi,1,0)$.

\vspace{-0.2in}

$$\hspace*{-0.25in}\int_C \B F \bdot d\B r = \int_C \B \nabla f \bdot d\B r = f(\mbox{end of $C$}) - f(\mbox{start of $C$}) = f(2\pi,1,0) - f(0,1,0) = (0+2\pi+0-e^{0})-(0+0+0-e^{0})=\fbox{\mbox{$2\pi$}}$$

{\it Note:} The fundamental theorem of line integrals was {\it not} an option for evaluating the integral in problem \#2 since that vector field $\B F$ was not conservative (so it did not have any associated potential functions). It is also worth noting that the integral in this problem could be computed directly. We could parameterize {\it any} curve from $(1,-1,0)$ to $(0,1,0)$ (for example, a line segment) and compute the value that way (since conservative vector fields have path independent line integrals). However, this would be more work than just applying our fundamental theorem.

\end{enumerate}

\vspace{0.2in}

{\color{red}Grading Notes:} \#1: 1.5 pts part (a) and 2 pts part (b) \quad \#2: 3 pts \quad \#3: 2.5 pts part (a) and 1 pt part (b).


\end{document}

