%
\section{Stokes's Theorem}
We conclude our discussion of fundamental theorems of vector calculus with the following result.

\begin{theorem} (Stokes's Theorem)
Let $\mathcal{S}$ be a piecewise smooth, oriented surface in $\mathbb{R}^3$, with normal $\mathbf{N}$, and suppose that the boundary $\mathcal{C}$ of $\mathcal{S}$ consists of a finite number of closed, piecewise smooth, simple curves with \underline{orientation inherited from $\mathcal{S}$}. Let $\mathbf{F}$ be a $C^1$ vector field on an open set containing $\mathcal{S}$. Then,
\begin{equation}\label{eq44:stokestheorem}
\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r} = \iint_{\mathcal{S}} \curl \mathbf{F} \cdot \mathbf{N} \, d S.
\end{equation}
\end{theorem}

When we say \textit{inherited orientation}, we mean the boundary of $\mathcal{S}$ has counterclockwise orientation when viewed from the direction of $\mathbf{N}$---and this orientation is \textit{reversed} if $\mathcal{S}$ has ``holes''.  Some examples are shown below.
\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .65\linewidth]{figures/44fig1.pdf}
\end{minipage}
\end{figure}


We note that Green's Theorem is a special case of Stokes's Theorem: to derive Green's Theorem from Stokes's Theorem, apply \eqref{eq44:stokestheorem} with $\mathcal{S} = \mathcal{D}$ (a planar region) and $\mathbf{N} = \mathbf{k}$.
In particular, if $\mathcal{C}$ is a planar curve, then the inherited orientation condition matches the assumption on the orientation of the boundary curves in Green's Theorem.  


\subsection{Stokes's Theorem and Evaluation of Integrals}
We start with examples illustrating the use of Stokes's Theorem to simplify integrals.

\medskip\noindent
{\it 1. Replacing a surface integral by a line integral.} There is no general rule, in Stokes's Theorem, as to which integral (surface or line) should be easier to evaluate. We will explore both directions. We start with an example where the line integral is simpler.

\begin{example}\label{44ex:example1} 
Suppose that $\mathcal{S}$ is the part of the paraboloid $z = 9-x^2-y^2$ where $z \geq 0$, with $\mathbf{N}$ pointing upward,and
$$
\mathbf{F} = (2z - y) \mathbf{i} + (x+z) \mathbf{j} + (3y - 2z) \mathbf{k}.
$$
Importantly, we do \textit{not} include the disc $x^2 + y^2 < 9$ in the surface $\mathcal{S}$! This is shown below. We want to evaluate $\iint_{\mathcal{S}} \big( \nabla \times \mathbf{F} \big) \cdot d \mathbf{S}$.
\end{example}

\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .65\linewidth]{figures/44fig2.png}
\end{minipage}
\end{figure}

Notice that the boundary curve of $\mathcal{S}$ is the circle $x^2 + y^2  = 9$, $z = 0$, oriented counterclockwise relative to the vector $\mathbf{N} = \mathbf{k}$. Let's call this curve $\mathcal{C}$, and use the parametrization $x = 3 \cos t$, $y = 3 \sin t$ and $z = 0$ for $0 \leq t \leq 2 \pi$. Then, for $(x,y,z)$ in $\mathcal{C}$, we have
$$
\mathbf{F} = - y \mathbf{i} + x \mathbf{j} + 3 y \mathbf{k} = -3 \sin t \mathbf{i} + 3 \cos t \mathbf{j} + 9 \sin t \mathbf{k}.
$$

Using \eqref{eq44:stokestheorem}, we then calculate the integral of the curl of $\mathbf{F}$ over $\mathcal{S}$ as
\begin{eqnarray*}
\iint_{\mathcal{S}} \big( \nabla \times \mathbf{F} \big) \cdot d \mathbf{S} & = &  \int_0^{2\pi} \bigg[ \underbrace{(-3 \sin t)}_{-y} \underbrace{(-3 \sin t) dt}_{dx} + \underbrace{(3 \cos t)}_{x} \underbrace{(3 \cos t)dt}_{dy} \bigg] \\
\quad & = & \int_0^{2 \pi} (9 \sin^2 t + 9 \cos^2 t) \, dt = \int_0^{2 \pi} 9 dt \\[1ex]
\quad & = & 18 \pi.
\end{eqnarray*}



\medskip\noindent
{\it 2. Replacing a surface integral by an integral on a simpler surface with the same boundary.}
Stokes's theorem tells us that the value of the integral $ \iint_{\mathcal{S}} \big( \nabla \times \mathbf{F} \big) \cdot d \mathbf{S}$ for a given vector field $\mathbf{F}$ are entirely determined by the values of $\mathbf{F}$ along the boundary of $\mathcal{S}$! Specifically, we have the following corollary of Stokes's Theorem.

\begin{corollary}
Suppose that $\mathcal{S}_1$ and $\mathcal{S}_2$ are two oriented surfaces that share a common boundary $\mathcal{C}$ with the same induced orientation, and that they both satisfy the assumptions of Stokes's Theorem. Then
\begin{equation}\label{44eq:stokesequality}
\iint_{\mathcal{S}_1} \big( \nabla \times \mathbf{F} \big) \cdot d \mathbf{S} = 
\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r} =
\iint_{\mathcal{S}_2} \big( \nabla \times \mathbf{F} \big) \cdot d \mathbf{S}.
\end{equation}
\end{corollary}

In particular,  if (say) $\mathcal{S}_1$ is a complicated surface, but its boundary curve $\mathcal{C}$ is also the boundary of a simpler surface $\mathcal{S}_2$, then we can evaluate curl integrals over $\mathcal{S}_2$ as a substitute for curl integrals over $\mathcal{S}_1$.

\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .65\linewidth]{figures/44fig3.pdf}
\caption{Two surfaces $\mathcal{S}_1$ and $\mathcal{S}_2$ with matching orientation (upward pointing normal) which share the same boundary curve $\mathcal{C}$.}
\end{minipage}
\end{figure}

\begin{example}
Evaluate the integral in Example \ref{44ex:example1} by replacing the surface $\mathcal{S}$ with a simpler surface.
\end{example}

The surface $\mathcal{S}$ is a part of a paraboloid bounded by the circle $\mathcal{C}$.  However, $\mathcal{C}$ is also the boundary of the disc
$$
\mathcal{D}: = \{(x,y,0) : x^2 + y^2 \leq 9 \},
$$
with normal $\mathbf{N} = \mathbf{k}$.  Using the same $\mathbf{F}$ as in Example \ref{44ex:example1},  we calculate
$$
\nabla \times \mathbf{F} =
\begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\partial_x & \partial_y & \partial_z \\
2z - y & x + z & 3y - 2z
\end{vmatrix}
=
2 \mathbf{i} + 2 \mathbf{j} + 2 \mathbf{k},
$$
for every $(x,y,z) \in \mathcal{D}$.  Integrating this directly over the paraboloid would require some work.  However, if we integrate on the disc instead, then
$$
\iint_{\mathcal{D}} \big( \nabla \times \mathbf{F} \big) \cdot d \mathbf{S} = 2  \, (\textrm{Area of } \mathcal{D}) = 2 \cdot 9 \pi = 18 \pi.
$$
This agrees with our previous calculation using the line integral.


\medskip\noindent
{\it 3. Modifying the surface to get a simpler boundary curve, by adding pieces that do not contribute to the integral.}
This is a little bit less common because additional assumptions on ${\bf F}$ are needed to make it work. Nonetheless, here is an example. 

\begin{example}\label{44ex:example3}
Evaluate $\iint_{\mathcal{S}}(\nabla\times{\bf F})\cdot d{\bf S}$, if
$$
\mathbf{F} = 2xz \mathbf{i} + (2yz+x^3) \mathbf{j} + (x^2+y^2+z^2) \mathbf{k}
$$
and $\mathcal{S}$ is the 
surface shown below, with the boundary curve $\mathcal{C}$ on the cylinder $x^2 + y^2 = 4$ (shown in grey in the diagram), oriented with $\mathbf{N}$ pointing ``up'' so that $\mathcal{C}$ has counterclockwise orientation. 
\end{example}


\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .65\linewidth]{figures/44fig4.pdf}
\end{minipage}
\end{figure}


We could use Stokes's Theorem to convert our surface integral to $\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r}$. That, in general, would not help us much when we do not even know the equation for $\mathcal{C}$! But for \underline{this specific} $\mathbf{F}$, we can work around it as follows. 
We claim that
$$
\iint_{\mathcal{S}} \big( \nabla \times \mathbf{F} \big) \cdot d \mathbf{S} = \iint_{\mathcal{S}_1} \big( \nabla \times \mathbf{F} \big) \cdot d \mathbf{S},
$$
with $\mathcal{S}_1$ as shown above. To see this, we compute the curl:
$$
\nabla \times \mathbf{F} = 
\begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\partial_x & \partial_y & \partial_z \\
2xz & 2yz+x^3 & x^2+y^2+z^2
\end{vmatrix}
=
3x^2 \mathbf{k}.
$$
In particular,  since the normal vector of the cylinder is always parallel to the $xy$-plane, we know that $(\nabla \times \mathbf{F}) \cdot \mathbf{N} = 0$ on the cylinder portion of $\mathcal{S}$.  In other words: the cylinder portion contributes nothing to the curl integral! 




Now, the boundary of $\mathcal{S}_1$ is the circle
$$
\mathcal{C}_1 : = \{(x,y,0) : x^2 + y^2 = 4 \}.
$$
While we could parametrize $\mathcal{C}_1$ by $\mathbf{r}(t) = \langle 2\cos t ,  2\sin t, 0 \rangle$ for $0 \leq t \leq 2 \pi$ and evaluate the integral directly, let us instead apply Green's Theorem to the disc
$$
\mathcal{D} = \{(x,y) : x^2 + y^2 \leq 4 \}.
$$
Using symmetry and then polar coordinates, we get
\begin{eqnarray*}
\oint_{\mathcal{C}_1} \mathbf{F} \cdot d \mathbf{r} & = & \iint_{\mathcal{D}} \big( \nabla \times \mathbf{F} \big) \cdot \mathbf{k} d A = \iint_{\mathcal{D}} 3 x^2 dx dy \\
& = & \frac{1}{2} \iint_{\mathcal{D}} 3 (x^2 + y^2) dx dy \\
& = & \frac{1}{2} \int_0^{2 \pi} \int_0^2 3 r^2 \cdot r dr d \theta = \frac{1}{2}\cdot 2 \pi \cdot \frac{3 r^4}{4} \Big\vert_0^1 \\[1ex]
\quad & = & 12\pi.
\end{eqnarray*}


While the methods in the earlier examples work for \textit{all} vector fields satisfying the hypothesis of Stokes's Theorem, here we also took advantage of the fact that the curl of $\mathbf{F}$ just happened to be parallel to the cylinder. 



\subsection{Proof of Stokes's Theorem}
We seek to prove the equality
\begin{equation}\label{44eq:stokesequality2}
\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r} = \iint_{\mathcal{S}} \curl \mathbf{F} \cdot \mathbf{N} \, d S,
\end{equation}
whenever $\mathcal{S}$, $\mathcal{C}$, and $\mathbf{F}$ satisfy the assumptions of Stokes's Theorem.


To begin, subdivide the surface $\mathcal{S}$ into smaller surfaces so that each part has a one-to-one projection on some coordinate plane, and can be represented as a graph of a function. This gets us to the point where it suffices to consider surfaces 
$\mathcal{S}$ that are graphs of functions parametrized by
$$
\mathbf{r}(x,y) = x \mathbf{i} + y \mathbf{j} + g(x,y) \mathbf{k},
$$
with $\mathbf{N}$ pointing up, and with $(x,y) \in \mathcal{R}$ for some domain $\mathcal{R}$ in the $xy$-plane. 
An example of such a surface and its projection $\mathcal{R}$ onto the $xy$-axis is shown below. 

\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .65\linewidth]{figures/44fig6.pdf}
\end{minipage}
\end{figure}

In the proof below, we will also assume that the function $g(x,y)$ is $C^2$ on some open set containing $\mathcal{R}$. This is stronger than our usual $C^1$ assumption, but we may reduce to this case using an approximation argument (the details of this part are omitted), and in any case the $C^2$ assumption will be satisfied in all applications of Stokes's Theorem in this course.

With the above parametrization,
\begin{equation}\label{44-stokes-normal}
\mathbf{n} = -g_x \mathbf{i} - g_y \mathbf{j} + \mathbf{k}, \textrm{ for all } (x,y) \in \mathcal{R}.
\end{equation}
Let $\mathbf{F} = F_1 \mathbf{i} + F_2 \mathbf{j} + F_3 \mathbf{k}$. On the boundary curve $\mathcal{C}$, we know that $z = g(x,y)$, so that $dz = g_x dx + g_y dy$ by the Chain Rule.  Therefore
\begin{equation}\label{44eq:stokesproof2}
\begin{split}
\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r} &= \oint_{\mathcal{C}_1} F_1 dx + F_2 dy + F_3 (g_x dx + g_y dy) 
\\
&= \oint_{\mathcal{C}_1} \big[(F_1 + F_3 g_x) dx + (F_2 + F_3 g_y) dy \big],
\end{split}
\end{equation}
where we understand that the component functions $F_j$ are each being evaluated at the points $(x,y,g(x,y))$ for all points along $\mathcal{C}$.  Applying Green's Theorem then gives
\begin{equation}\label{44eq:stokesproof3}
\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r} = \iint_{\mathcal{R}} \bigg[ \frac{\partial}{\partial x} (F_2 + F_3 g_y) - \frac{\partial}{\partial y} (F_1 + F_3 g_x) \bigg] \, d A.
\end{equation}
To compute the partial derivatives, we need to use the Chain Rule, keeping in mind that $z = g(x,y)$ so that each $F_j$ depends on $x$ and $y$ both directly and indirectly through $z$.  We get
\begin{equation}\label{44eq:stokesproof4A}
\frac{\partial}{\partial x} (F_2 + F_3 g_y) = \frac{\partial F_2}{\partial x} + \frac{\partial F_2}{\partial z} g_x + \frac{\partial F_3}{\partial x} g_y + \underbrace{\frac{\partial F_3}{\partial z} g_x g_y + F_3 g_{yx}}_{(*)}
\end{equation}
\begin{equation}\label{44eq:stokesproof4B}
\frac{\partial}{\partial y} (F_1 + F_3 g_x) = \frac{\partial F_1}{\partial y} + \frac{\partial F_1}{\partial z} g_y + \frac{\partial F_3}{\partial y} g_x + \underbrace{\frac{\partial F_3}{\partial z} g_y g_x + F_3 g_{xy} }_{(**)}.
\end{equation}
SInce $g$ is $C^2$, we have equality of the mixed second order partials appearing in $(*)$ and $(**)$, so that we actually have $(*)=(**)$! Hence
$$
\eqref{44eq:stokesproof4A} - \eqref{44eq:stokesproof4B} = \bigg( \frac{\partial F_2}{\partial x} + \frac{\partial F_2}{\partial z} g_x + \frac{\partial F_3}{\partial x} g_y \bigg) - \bigg( \frac{\partial F_1}{\partial y} + \frac{\partial F_1}{\partial z} g_y + \frac{\partial F_3}{\partial y} g_x  \bigg).
$$
Grouping by the terms $g_x$, $g_y$ and reversing the signs of $g_x$ and $g_y$, the above becomes
$$
\left(\frac{\partial F_3}{\partial y} - \frac{\partial F_2}{\partial z} \right) (-g_x) + \left( \frac{\partial F_1}{\partial z} - \frac{\partial F_3}{\partial x} \right) (-g_y) + \left(\frac{\partial F_2}{\partial x} - \frac{\partial F_1}{\partial y}  \right),
$$
so that
\begin{equation*}
\begin{split}
\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r} 
& = \iint_{\mathcal{R}} \left[ \left(\frac{\partial F_3}{\partial y} - \frac{\partial F_2}{\partial z} \right) (-g_x) \right.
\\
&\ \ \ \  \left. + \left( \frac{\partial F_1}{\partial z} - \frac{\partial F_3}{\partial x} \right) (-g_y) + \left(\frac{\partial F_2}{\partial x} - \frac{\partial F_1}{\partial y}  \right) \right] \, dxdy\\
&=\iint_{\mathcal{S}} \curl \mathbf{F} \cdot d \mathbf{S},
\end{split}
\end{equation*}
which is what we needed to prove. At the last step we used the normal vector computed in (\ref{44-stokes-normal}).


\subsection{Conservative Vector Fields and Stokes's Theorem}
,

\begin{definition}
A $3$-dimensional domain $\mathcal{D} \subset \mathbb{R}^3$ is \underline{simply connected} if every closed, simple, piecewise smooth curve $\mathcal{C}$ in $\mathcal{D}$ bounds a piecewise smooth surface $\mathcal{S}$ contained in $\mathcal{D}$.
\end{definition}

Intuitively, $D$ is simply connected if any closed curve in $D$ can be contracted continuously to a point without leaving $D$. (In topology, simple connectedness is usually defined without the smoothness conditions.) Thinking about simply connected domains as ``free from holes" is less useful here, since a  ``hole" can refer to at least two different mathematical concepts in 3 dimensions. For example, a donut-shaped region is not simply connected (see the picture below), but a spherical annulus such as $\{(x,y,z):\ 1\leq x^2+y^2+z^2\leq 4\}$ in $\rr^3$ \underline{is} simply connected.

\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .65\linewidth]{figures/44fig7.pdf}
\end{minipage}
\end{figure}

We are now in a position to prove the following result.

\begin{theorem}
If $\mathcal{D} \subset \mathbb{R}^3$ is a simply connected domain, $\mathbf{F}$ is smooth on $\mathcal{D}$, and $\curl \mathbf{F} = \mathbf{0}$ everywhere on $\mathcal{D}$, then $\mathbf{F}$ is conservative.
\end{theorem}

\begin{proof}
By Stokes's Theorem and the simply connectedness of $\mathcal{D}$, for any closed, simple, piecewise smooth curve $\mathcal{C} \subset \mathcal{D}$, we have
$$
\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r} = \iint_{\mathcal{S}} \curl \mathbf{F} \cdot d \mathbf{S} = 0.
$$
So, $\mathbf{F}$ is conservative on $\mathcal{D}$.
\end{proof}

The assumption that $D$ is simply connected is necessary in the above theorem. The following example shows this.

\begin{example}
Consider the vector field
$$
\mathbf{F} (x,y,z) : = - \frac{y}{x^2 + y^2} \mathbf{i} + \frac{x}{x^2 + y^2} \mathbf{j}, 
$$
defined on the domain $\mathcal{D}: = \mathbb{R}^3 \setminus \{(0,0,z) : z \in \mathbb{R} \}$.  This is shown below.
The function $\mathbf{F}$ satisfies $\curl \mathbf{F} = \mathbf{0}$ everywhere on $\mathcal{D}$; however, $\mathcal{D}$ is not simply connected. 

\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .7\linewidth]{figures/44fig9.png}
\end{minipage}
\end{figure}


\end{example}

We have seen previously that
$$
\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r} = 2 \pi
$$
for any circle $x^2+y^2=a^2$ in the $xy$-plane, oriented counterclockwise.
 The same calculation works for circles $x^2+y^2=a^2$, $z=b$, lying in a plane parallel to the $xy$-plane. 
 Actually a stronger result is true: the same formula holds for any closed curve $\mathcal{C}_0$ in $\mathbb{R}^3$ circling the $z$-axis once counterclockwise!
This can be proved by constructing a surface $\mathcal{S}$ ``wrapped around" the $z$-axis, with boundary consisting of $\mathcal{C}_0$ and a circle $\mathcal{C}_1$ of the form $x^2+y^2=a^2$, $z=b$, and then applying Stokes's Theorem to that surface.  The figures below illustrate the construction of $\mathcal{S}$. 
We orient $\mathcal{S}$ so that ${\bf N}$ points away from the $z$-axis; then the oriented boundary of $\mathcal{S}$ consists of $\mathcal{C}_0$ oriented counterclockwise and $\mathcal{C}_1$ oriented clockwise (can you explain why?). By Stokes's Theorem, we then have
$$
0= \iint_{\mathcal{S}} \curl \mathbf{F} \cdot d \mathbf{S} 
= \oint_{\mathcal{C}_0} \mathbf{F} \cdot d \mathbf{r}+ \oint_{\mathcal{C}_1} \mathbf{F} \cdot d \mathbf{r}
= \oint_{\mathcal{C}_0} \mathbf{F} \cdot d \mathbf{r} -2\pi ,
$$
so that the last integral is $2\pi$. This proves the claim.


%\vfill
%\pagebreak
\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .7\linewidth]{figures/44fig11.png}
\caption{Two curves in $\mathbb{R}^3$.  The lower curve $\mathcal{C}_0$ is contained in the plane $z = 0$ and wraps around the $z$-axis once counterclockwise.  The upper curve is the circle $\mathcal{C}_1 : = \{(\cos t, \sin t,  1) : 0 \leq t \leq 2 \pi \}$.}
\end{minipage}
\end{figure}
 



\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .7\linewidth]{figures/44fig12.png}
\caption{A surface $\mathcal{S}$ bounded by the curves $\mathcal{C}_0$ and $\mathcal{C}_1$. We chose $\mathcal{C}_0$ to lie in the $xy$-plane so that it would be easier to draw a picture, but this is not necessary for the construction.}
\end{minipage}
\end{figure}

\vfill

\pagebreak

\subsection{The infinitesimal version}
As a last consideration, let $\mathcal{C}_{\epsilon}$ denote a circle of small radius $\epsilon > 0$, in a plane perpendicular to $\mathbf{N}$ and oriented counterclockwise when viewed from the direction of $\mathbf{N}$,  and let $\mathcal{S}_{\epsilon}$ denote the disc bounded by $\mathcal{C}_{\epsilon}$. Then, by Stokes's Theorem
$$
\oint_{\mathcal{C}_{\epsilon}} \mathbf{F} \cdot d \mathbf{r} = \iint_{\mathcal{S}_{\epsilon}} \curl \mathbf{F} \cdot \mathbf{N} \, d S \approx \bigg( \curl \mathbf{F} (P) \cdot \mathbf{N} \bigg) \bigg(\textrm{Area of } \mathcal{S}_{\epsilon} \bigg),
$$
where $P$ denotes the centre of the circle $\mathcal{C}_{\epsilon}$, as shown below. In this sense, the curl measures the ``rotating'' effect of $\mathbf{F}$, and the rotation is \textit{strongest} whenever $\mathbf{N}$ is parallel to $\curl \mathbf{F}$. This matches the formula from Section \ref{sec:lecture41}.


\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .25\linewidth]{figures/44fig10.png}
\end{minipage}
\end{figure}






\section*{Worked Problems}
\begin{enumerate}[1.]
\item{\it Evaluate $\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r}$ if $\mathcal{C}$ is the intersection of the graph $z = g(x,y)$ and the boundary of $0 \leq x \leq 1$ and $0 \leq y \leq 2$, oriented counterclockwise, and $\mathbf{F} = e^{-x} \mathbf{i} + e^x \mathbf{j} + e^z \mathbf{k}$.}

\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .6\linewidth]{figures/44fig5.pdf}
\end{minipage}
\end{figure}

Let $\mathcal{S}$ be the surface bounded by the curve $\mathcal{C}$. We parametrize $\mathcal{S}$ by
$$
\mathbf{r}(x,y) = \langle x, y, g(x,y) \rangle, \textrm{ for } 0 \leq x \leq 1, 0 \leq y \leq 2.
$$
Then, $d \mathbf{S} = (-g_x \mathbf{i} - g_y \mathbf{j} + \mathbf{k})dxdy$ and also
$$
\nabla \times \mathbf{F} = 
\begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\partial_x & \partial_y & \partial_z \\
e^{-x} & e^x & e^z
\end{vmatrix}
=
e^x \mathbf{k}.
$$
Applying Stokes's Theorem, we get
$$
\oint_{\mathcal{C}} \mathbf{F} \cdot d \mathbf{r}  
=\iint_{\mathcal{S}}e^x\kk\cdot d{\bf S}=
\int_0^1 \int_0^2 e^x  dy dx = 2 e^x \big\vert_0^1 = 2 (e-1).
$$


\bigskip


\item 
{\it Evaluate 
$\iint_{\mathcal S} (\nabla \times {\bf F})\cdot d{\bf S}$, if ${\bf F}=(x^3+y)e^z{\bf i}+y^2e^{2z} {\bf j}
+ e^z {\bf k}$ and $\mathcal{S}$ is the half-sphere $x^2+y^2+z^2=9$, $z\geq 0$, oriented so that the normal vector points away from the origin.}


\medskip

We will apply Stokes's Theorem. The curl of ${\bf F}$ is
$$
\nabla \times {\bf F}=
\left|\begin{matrix}
\ii& \jj& \kk\\
           \partial_x & \partial_y & \partial_z \\
            (x^3+y)e^z & y^2e^{2z}& e^z \\
            \end{matrix}\right|
= -2y^2 e^{2z} \ii + (x^3+y)e^z \jj -e^z\kk.
$$
The easiest way to solve the problem is to replace $\mathcal{S}$ by the disk $D=\{(x,y,0):\ x^2+y^2\leq 9\}$,
with ${\bf N}=\kk$, which has the same oriented boundary curve. On $D$, we have
$(\nabla \times {\bf F})\cdot {\bf N}= -e^z=-1$, so that
$$
\iint_{\mathcal S} (\nabla \times {\bf F})\cdot d{\bf S} = 
\iint_D (\nabla \times {\bf F})\cdot d{\bf S}
= -(\hbox{area of }D) = -9\pi.
$$



\end{enumerate}

\section*{Practice Problems}
\begin{enumerate}[1.]


\item
{Evaluate $\iint_{\mathcal S} {\bf curl\, F}\cdot d{\bf S}$, if ${\bf F}=(x^4-2y){\bf i}+(\cos y){\bf j}
+z\sin(xy){\bf k}$ and $\mathcal{S}$ is the part of the paraboloid $z=9-x^2-y^2$ that lies above the $xy$-plane.}

\bigskip

\item {
Use Stokes's Theorem to evaluate $\int_C(x-z)dx+(x+y)dy+(y+z)dz$,
if $C$ is the ellipse where the plane $z=y$ intersects the cylinder
$x^2+y^2=1$, oriented counterclockwise as viewed from above.}

\bigskip

\item { Evaluate the integral $\int_C {\bf F}\cdot d{\bf r}$, where $C$ is the curve of intersection of the cylinder $x^2+y^2=1$
and the paraboloid $z=100-(x-2)^2 - (y+4)^2$, oriented counterclockwise when viewed
from above, and ${\bf F}=(3x^2y+y^3)  {\bf i}+z^4 {\bf k}$.}


\bigskip
\item {
Let $R$ be the cube whose one face is the square in the $xy$-plane with vertices $(\pm 1,\pm 1,0)$, and the opposite face lies in the plane $z=2$ and has vertices $(\pm 1, \pm 1, 2)$. Let
$${\bf F}=xyz^2  {\bf i}+xy^2\jj +x^3yz{\bf k}.$$
Evaluate
$\iint_\mathcal{S} (\nabla\times {\bf F})\cdot d{\bf S}$, if $\mathcal{S}$ is the surface consisting of the 4 vertical faces and the top of $R$ (without the bottom), oriented so that the normal vector points away from the origin.}

\end{enumerate}





