\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.75in}
\setlength{\textwidth}{7.5in}

\usepackage{tikz,pgfplots}
\usepgfplotslibrary{fillbetween}
\usetikzlibrary{arrows.meta}


\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}

\noindent
\parbox{2in}{\bf Math 2130-101}
\hfill {\Large \bf Final Exam} \hfill
\parbox{2in}{\bf \hfill May $3^\mathrm{rd}$\!,\  2021}

\vspace{0.2in}

\noindent {\large\bf Name:} \underline{\hskip 3.0 truein}
\hfill {\bf Be sure to show your work!}

\vspace{0.1in}

\noindent
{\bf\large 1. (6 points)} Let $\B F(x,y,z) = \la \ln(x^3+1), y\sin(xz), x^2y+z^5 \ra$. Compute $\nabla \times \B F$ and $\nabla \bdot \B F$.

\vfill

\noindent
{\bf\large 2. (11 points)} Let $\B F(x,y,z) = \left\la 2x+z, 1+2yz, y^2+x \right\ra$, and let $C$ be the line segment from $(0,1,1)$ to $(2,1,0)$.\\
\force \hfill {\it Note:} $\B F$ is a conservative vector field (I've checked for you).

\begin{enumerate}[(a)]
\item Use the \underline{\bf fundamental theorem of line integrals} to compute $\int_C \B F \bdot d\B r$.

\vfill

\item Recompute $\int_C \B F \bdot d\B r$ directly (i.e. parameterize $C$ etc.).

\vfill

\end{enumerate}

\newpage

\noindent 
{\bf\large 3. (5 points)} Suppose $\B F = \langle M,N,P \rangle$ is a vector field where $M,N,P$ have continuous partial derivatives of all orders defined on all of $\mathbb{R}^3$.
Fill in the blank and circle the correct answers.

\vspace{0.25in}

If $\nabla \times \B F=\B 0$, then $\B F$ is a \underline{\hspace*{2in}} vector field.

\vspace{0.25in}

$\nabla \times \B F=\B 0$ implies $\B F$'s \quad {\Large line\quad/\quad flux} \quad integrals are \quad {\Large path\quad/\quad surface} \quad independent.

\vspace{0.25in}

$\nabla \bdot \B F=\B 0$ implies $\B F$'s \quad {\Large line\quad/\quad flux} \quad integrals are \quad {\Large path\quad/\quad surface} \quad independent.

\vspace{0.25in}

\noindent
{\bf\large 4. (9 points)} Let $C$ be the counter-clockwise oriented boundary of the region bounded by $y=1$ and $y=2-x^2$.\\ \force \hfill
Compute $\displaystyle \int_C \left(-y^2+\sqrt{x^6+e^{3x}}\right)\,dx+\sin(y^8+ye^y)\,dy$.

% Alternate version use upper half of annulus

\vfill

\vfill


\force \hfill
\begin{tikzpicture}[arrowmark/.style 2 args={decoration={markings,mark=at position #1 with \arrow{#2}}}]
\begin{axis}[
  axis lines=none,
  %axis line style={draw=none},
  %tick style={draw=none},
  %axis x line=middle, axis y line=middle,
  width=7cm, height=5cm,     % size of the image = rigged to keep scaling=constrained
  ymin=-0.5, ymax=3.5, %ytick={0}, ylabel={},
  xmin=-3.5, xmax=3.5, %xtick={0}, xlabel={},
]

\addplot[name path=A,black, thick, domain=0:180, smooth] ({3*cos(x)}, {3*sin(x)});
\addplot[name path=B,black, thick, domain=0:180, smooth] ({0.75*cos(x)}, {0.75*sin(x)+1.25});
\addplot[name path=C,black, thick, domain=180:360, smooth] ({0.75*cos(x)}, {0.75*sin(x)+1.25});
\addplot[name path=D,black, thick, domain=-3:3, smooth] ({x}, {0});

\addplot[yellow!50] fill between[of=A and B];
\addplot[yellow!50] fill between[of=C and D];
\addplot[white] fill between[of=B and C];

\addplot[black, thick, domain=40:70, smooth, -{>[scale=2]}] ({3*cos(180-x)}, {3*sin(180-x)});
\addplot[black, thick, domain=40:70, smooth,  -{<[scale=2]}] ({0.75*cos(x)}, {0.75*sin(x)+1.25});
\addplot[black, thick, domain=-1:0.5, smooth,  -{>[scale=2]}] ({x}, {0});

% redraw wiped out portion of axes
%\addplot[black, domain=1:2, smooth] ({0}, {x});
%\addplot[black, domain=1:2, smooth] ({x}, {0});

\node at (axis cs:-2,1) {$R$};

\node at (axis cs: 1.7,2.85) {$C_2$};
\node at (axis cs: 0.35,1.2) {$C_1$};
\node at (axis cs: -0.5,-0.35) {$C_3$};


\end{axis}
\end{tikzpicture}


\vspace{-1.7in}

\noindent
{\bf\large 5. (9 points)} $C_1$ is a circle of radius 1 (oriented clockwise), $C_2$ is an upper-half of a circle of radius 3 (oriented clockwise), and $C_3$ is a line segment closing off the semi-circle (oriented left to right). Let $\B F(x,y) = \langle M(x,y), N(x,y) \rangle$ be a vector field such that $M$ and $N$ have continuous first partials and in addition, $N_x-M_y = 4$ for all points in\\ region $R$. We also know $\displaystyle \int_{C_2} \B F \bdot d\B r = \pi$ and $\displaystyle \int_{C_3} \B F \bdot d\B r = 5\pi$. {\it Note:} The area of $R$ is $7\pi/2$.

\vspace{0.25in}

\noindent
Compute $\displaystyle \int_{C_1} M(x,y)\,dx + N(x,y)\,dy \quad = \quad \underline{\hspace{1.5in}}$.


\vspace{0.75in}

\vspace{0.5in}

\newpage

\noindent
{\bf\large 6. (10 points)} Let $S_1$ be the upper hemisphere: $x^2+y^2+z^2=4$, $z \geq 0$ and $S_2$ be the disk $x^2+y^2 \leq 4$ in the $xy$-plane. Orient both $S_1$ and $S_2$ upward. Let $\B F$ be a smooth vector field such that $\iint_{S_2} \B F \bdot \B n\,d\sigma= \pi$ and $\nabla \bdot \B F = z$.\\ \force \hfill Find $\iint_{S_1} \B F \bdot \B n\,d\sigma$.

\vspace{1in}

\vfill


\noindent
{\bf\large 7. (12 points)} Let $S_1$ be the surface parameterized by $\B r(u,v) = \langle v\sin(u),v\cos(u),2v \rangle$\\ \force \hfill where $-\pi/2 \leq u \leq 2\pi$ and $4 \leq v \leq 11$.

\begin{enumerate}[(a)]
\item Find both orientations for $S_1$.
   
\vfill   
   
\item Set up but {\bf do not evaluate} the surface integral $\displaystyle \iint_{S_1} \sqrt{x^2+y^2}\cdot e^z\,d\sigma$. \quad [Don't worry about simplifying.] 

\vspace{1in}

\item Set up but {\bf do not evaluate} the flux integral $\displaystyle \iint_{S_1} \B F \bdot \B n\,d\sigma$ where $S_1$ is \underline{oriented downward} and $\B F(x,y,z) = \la z,y^2,9+x \ra$. \quad [Don't worry about computing the dot product or any significant simplification.] 

\vspace{0.5in}

\end{enumerate}

\newpage

\noindent
{\bf\large 8. (12 points)} Find the centroid of the part of the sphere $x^2+y^2+z^2=4$ in the first octant (i.e., $x,y,z \geq 0$).\\ \force \hfill Note: This is a {\bf surface}. You should be computing {\bf surface integrals}.

\[ m = \iint_{S_1} 1\,d\sigma \qquad M_{yz} = \iint_{S_1} x\,d\sigma \qquad M_{xz} = \iint_{S_1} y\,d\sigma \qquad M_{xy} = \iint_{S_1} z\,d\sigma \]


\vfill

\vfill



\noindent
{\bf\large 9. (11 points)} Consider the solid cylinder $E$: $x^2+y^2 \leq 1$ and $1 \leq z \leq 3$ and let $S_1=\partial E$ be its outward oriented surface.  In addition, let $\B F(x,y,z) = \left\la xz+\sqrt[6]{y^{4}+z^4+12},\;  yz+\sin^{10}(x+z^2),\; \ln(x^8+y^2+99) \right\ra$.  Compute the flux integral $\iint_{S_1} \B F \bdot \B n\,d\sigma$.

\vfill

\newpage

\noindent
{\bf\large 10. (15 points)} Let $S_1$ be the surface $z=x^2+y^2$, $1 \leq z \leq 4$ (i.e., part of a circular paraboloid). Orient $S_1$ downward. \\ \force \hfill  Verify Stokes' Theorem for the surface $S_1$, its boundary, and the vector field $\B F = \langle y+x^2,y,xz+5 \rangle$.

\hfill
%\iffalse %%%%%%%%%%%%%%%%%%%%%%%% block comment %%%%%%%%%%%%%%%%%%%%%%%%%%
\pgfplotsset{
  /pgfplots/colormap={mypink}{%
    color(0cm) = (purple);
    color(1cm) = (pink!80!purple);
    color(2cm) = (pink!90);
    color(3cm) = (pink) }
}
\pgfplotsset{
  /pgfplots/colormap={myblue}{%
    color(0cm) = (blue!55);
    color(1cm) = (blue!60);
    color(2cm) = (blue!65);
    color(3cm) = (blue!70) }
}
\pgfplotsset{
  /pgfplots/colormap={mygreen}{%
    color(0cm) = (green!40);
    color(1cm) = (green!60);
    color(2cm) = (green!80);
    color(3cm) = (green) }
}
\begin{tikzpicture}
    \begin{axis}[%
        axis equal,
        width=7cm,
        height=7cm,
        axis lines = none,  % vs. center
%        xlabel = {$x$},
%        ylabel = {$y$},
%        zlabel = {$z$},
        ticks=none,
%        enlargelimits=0.3,
%        view/h=15,
         view={35}{15},
%        colormap = {whiteblack}{color(0cm)  = (white);color(1cm) = (black)},
        scale uniformly strategy=units only,
    ]
\addplot3[ultra thick, color=black, domain = 0:360]({cos(x)},{sin(x)},{0.975});

    \addplot3[%
        opacity = 0.75,
        surf,
        z buffer = sort,
        samples = 25,
        colormap name=mygreen,
        variable = \u,
        variable y = \v,
        domain = 0:360,
        y domain = 1:2,
    ]
    ({v*cos(u)}, {v*sin(u)}, {v^2});

\addplot3[ultra thick, color=black, domain = 0:360]({2*cos(x)},{2*sin(x)},{4.025});

\addplot3[ultra thick, color=black, domain = 0:0.3,->]({1.75*cos(270)+2*(1.75)^2*cos(270)*x},{1.75*sin(270)+2*(1.75)^2*sin(270)*x},{(1.75)^2-1.75*x});

\node at (rel axis cs: 1,0,0.75) {$S_1$};

    \end{axis}
\end{tikzpicture}
%\fi %%%%%%%%%%%%%%%%%%%%%%%% end block comment %%%%%%%%%%%%%%%%%%%%%%%%%%



\vfill

\vfill

\vfill


\end{document}

