\chapter{Classical Vector Calculus}  \label{chaptCVC}

In this chapter, we briefly review the classical results of
differential geometry commonly used in vector calculus.  We show along
the way how they are related to the theory of differential forms and
integration on manifolds.

As we have seen, Stokes' theorem given in Theorem~\ref{TheStokesTh} can be
expanded to manifolds with singular points as given in
Theorem~\ref{GenStokesTh} or equivalently to manifolds with a
piecewise smooth boundary as given in Theorem~\ref{GenStokesThV2}.
Hence, the Green's theorem, the classical Stokes' theorem and the
divergence theorem (i.e.\ Theorems~\ref{StandardGreenTh}, 
\ref{StandardStokesTh} and \ref{StandardDivTh} respectively) that we
will introduce in this chapter can also be used with these types of
manifolds as it will often be the case in the examples and
applications.

\section{Gradient, Curl and Divergence}

Let $\Omega$ be an open subset of $\displaystyle \RR^3$ and
$\displaystyle F:\Omega \rightarrow \RR^3$ be a differentiable vector
field.  The {\bfseries curl}\index{Vector Field!Curl} of
$F = F_1\VEC{e}_1 + F_2\VEC{e}_2 + F_3\VEC{e}_3$
is defined (symbolically) by
\begin{equation*}
\begin{split}
\curL F & =  \graD \times F
= \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x_1} & \displaystyle \pdydx{}{x_2} & \displaystyle
\pdydx{}{x_3} \\[0.7em]
F_1 & F_2 & F_3
\end{pmatrix} \\
& = \left( \pdydx{F_3}{x_2} - \pdydx{F_2}{x_3} \right) \VEC{e}_1 +
\left( \pdydx{F_1}{x_3} - \pdydx{F_3}{x_1} \right) \VEC{e}_2 +
\left( \pdydx{F_2}{x_1} - \pdydx{F_1}{x_2} \right) \VEC{e}_3
\end{split}
\end{equation*}
if the determinant is developed along the first row only.
If $f:\Omega \rightarrow \RR$ is a twice continuously differentiable
function, then the reader can verify by a simple computation that
$\curL(\graD f) = \VEC{0}$.

The {\bfseries divergence}\index{Vector Field!Divergence} of the
vector field $F$ is defined (symbolically) by
\[
\diV F =  \graD \cdot F
= \pdydx{F_1}{x_1} + \pdydx{F_2}{x_2} + \pdydx{F_3}{x_3} \ .
\]
If $\displaystyle F:\Omega \rightarrow \RR^3$ is a twice continuously
differentiable vector field, then the reader can again verify by a
simple computation that $\diV(\curL F) = 0$.

Everything that we just said about the curl and the divergence can be
rephrased in term of differential forms.  We first match functions and
vector fields to differential forms.

Let $f: \Omega \to \RR$ and $\displaystyle F:\Omega \to \RR^3$ be sufficiently
continuously differentiable.  We define the following associations.
\begin{align*}
f & \longleftrightarrow f \\
f & \longleftrightarrow  f \df{x_1} \wedge \df{x_2} \wedge \df{x_3} \\
F_1 \VEC{e}_1 + F_2 \VEC{e}_2 + F_3 \VEC{e}_3 &\longleftrightarrow
F_1 \df{x_1} + F_2 \df{x_2} + F_3 \df{x_3} \\
F_1 \VEC{e}_1 + F_2 \VEC{e}_2 + F_3 \VEC{e}_3 &\longleftrightarrow
F_1 \df{x_2} \wedge \df{x_3} + F_2 \df{x_3} \wedge \df{x_1}
+ F_3 \df{x_1} \wedge \df{x_2}
\end{align*}

Hence, the gradient of $f$ is associated to the differential $1$-form
$\df{f}$.
\[
\graD f = \pdydx{f}{x_1} \VEC{e}_1 + \pdydx{f}{x_2} \VEC{e}_2
+ \pdydx{f}{x_3} \VEC{e}_3
\longleftrightarrow 
\df{f} = \pdydx{f}{x_1} \df{x_1} + \pdydx{f}{x_2} \df{x_2} +
\pdydx{f}{x_3} \df{x_3} \ .
\]

The curl of the vector field $F$ is associated to the differential
$2$-form $\df{\omega}$ with 
$\omega = F_1 \df{x_1} + F_2 \df{x_2} + F_3 \df{x_3}$.
\begin{align*}
\curL F &= 
\left( \pdydx{F_3}{x_2} - \pdydx{F_2}{x_3} \right) \VEC{e}_1 +
\left( \pdydx{F_1}{x_3} - \pdydx{F_3}{x_1} \right) \VEC{e}_2 +
\left( \pdydx{F_2}{x_1} - \pdydx{F_1}{x_2} \right) \VEC{e}_3 
 \longleftrightarrow \\
\df{\omega} &=
\left(\pdydx{F_3}{x_2} - \pdydx{F_2}{x_3}\right) \df{x_2}\wedge \df{x_3}
+ \left(\pdydx{F_3}{x_1} - \pdydx{F_1}{x_3}\right) \df{x_1}\wedge \df{x_3}
+ \left(\pdydx{F_2}{x_1} - \pdydx{F_1}{x_2}\right) \df{x_1}\wedge \df{x_2}
\end{align*}

The divergence of the vector field $F$ is associated to the differential
$3$-form $\df{\omega}$ with
$\omega = F_1 \df{x_2} \wedge \df{x_3} + F_2 \df{x_3}\wedge \df{x_1}
+ F_3 \df{x_1}\wedge \df{x_2}$.
\[
\diV F = \pdydx{F_1}{x_1} + \pdydx{F_2}{x_2} + \pdydx{F_3}{x_3}
\longleftrightarrow   
\df{\omega} = 
\left(\pdydx{F_1}{x_1} + \pdydx{F_2}{x_2} + \pdydx{F_3}{x_3}\right)
\df{x_1}\wedge \df{x}_2 \wedge \df{x_3} \ .
\]

Hence, $\curL(\graD f) = \VEC{0}$ and $\diV(\curL F) = 0$ are nothing
else then $\df{(\df{f})} = 0$ and $\df{(\df{\omega})} = 0$
respectively as given by (3) of Theorem~\ref{stokesDF}.

\section{Line Integral}

We review the classical definition of line integrals and 
show how it is related to the integral of differential forms
over manifolds that we have introduced in the previous chapter.

We will use the following definition from now on.

\begin{defn} \label{defnPathV1}
A {\bfseries curve}\index{Curve} or {\bfseries path}\index{Path} is a
singular $1$-cube represented by a continuously differentiable function
$\displaystyle \sigma:I_1 = [0,1] \to \RR^n$.  If $\sigma(0) = \VEC{x}_0$ and
$\sigma(1) = \VEC{x}_1$, then we say that
$\sigma$ is a {\bfseries curve or path from $\VEC{x}_0$ to $\VEC{x}_1$}.
\end{defn}

Without any consequence, we may
replace the closed interval $[0,1]$ by any closed interval of the form
$[a,b]$.  Recall that continuously differentiable means that
$\displaystyle \sigma = \sum_{j=1}^n \sigma_i\,\VEC{e}_i$
with $\displaystyle \sigma_j \in C^1([a,b])$ for $1 \leq j\leq n$.

We will interchangeably use the term ``curve'' to designate the
function $\sigma$ or its image $C = \sigma([a,b])$.  In classical
differential geometry, the function $\sigma$ is called a
{\bfseries parametric representation}\index{Curve!Parametric Representation}
of the curve $C$.  The end points of the curve $C$ are
$\VEC{a} = \sigma(a)$ and $\VEC{b} = \sigma(b)$ (Figure~\ref{line}).

In some rare situation, we will tolerate the existence of a finite
subset $N$ of $[a,b]$ such that $\sigma$ is one-to-one on
$[a,b]\setminus N$ but not on the full interval $[a,b]$.  This means
that the curve $C$ may intersect itself a finite number of times only.
A curve that intersect itself does not define a $1$-dimensional
manifold because no local chart can be defined in the neighbourhood of
an intersection point.  Such curves have their use in differential
geometry and differential topology but cannot be used with Stokes'
theorem without careful handling.

We can recast our definition of orientation on $1$-dimensional
manifolds to the context of curves.  Suppose that $C$ has a
continuously differentiable parametric representation
$\displaystyle \sigma:[a,b]\to \RR^n$ and assume that
$\sigma'(w) \neq \VEC{0}$ for all $w \in [a,b]$.  We may continuously
assign to each point $\VEC{u} \in C$ a unit tangent vector
$\VEC{t}(\VEC{u})$.  The
{\bfseries orientation}\index{Curve!Orientation} or
{\bfseries direction}\index{Curve!Direction} on $C$ is given by continuously
selecting a unit tangent vector $\VEC{t}$ at each point of $C$.  The
curve $C$ has therefore two possible orientations.
The parametric representation $\displaystyle \sigma:[a,b] \to \RR^n$
of $C$ is consistent with the orientation on $C$ if
\begin{equation} \label{vcDefnTVc}
  \VEC{t}(\sigma(w)) = \|\sigma'(w)\|^{-1} \sigma'(w)
\end{equation}
for $w\in [a,b]$.  Intuitively, the tangent vector points in the
direction of the motion along $C$ as $w$ increases (Figure~\ref{line}).
For this reason, it is common to give the orientation along a curve
as the direction of the motion along the curve.  For instance, we may
say that the direction along a curve $C$ between two points $\VEC{a}$
and $\VEC{b}$ is from $\VEC{a}$ to $\VEC{b}$.  This means that a
parametric representation $\displaystyle \sigma:[a,b] \to \RR^n$ of
$C$ must satisfy $\sigma(a) = \VEC{a}$ and $\sigma(b) = \VEC{b}$.
Thus, we travel from $\VEC{a}$ to $\VEC{b}$ along $C$ as $t$ increases
from $a$ to $b$.  The direction along the curve $C$ is therefore given
by the unit tangent vector defined by (\ref{vcDefnTVc}).

\pdfF{vect_calculus/Line}{Parametric representation of a curve}
{$\displaystyle \sigma:[a,b]\rightarrow \RR^n$ is a parametric
representation of the curve $C$ consistent with its orientation.}{line}

The {\bfseries line integral}\index{Line Integral of a Function} of a
function $f:C \rightarrow \RR$ along the curve $C$ is defined by
\begin{equation} \label{classicLineIntFunct}
\int_C f \dx{s} \equiv \int_a^b f(\sigma(w))\,\|\sigma'(w)\|\dx{w}
\end{equation}
if this integral exists, where as usual $\|\cdot\|$ denotes the
Euclidean norm in $\displaystyle \RR^n$.  Using the change of variable
formula, we may show that the line integral of $f$ along $C$ does not
depend on the parametric representation used.  We write
\begin{equation} \label{classicvolelem1D}
  \dx{s} = \|\sigma'\|\dx{w} \ .
\end{equation}

\begin{rmk}
The expression in (\ref{classicvolelem1D}) is      \label{rmkVolElem1D}
associated to the local representation of the volume element
$\nu = \dx{s}$ \footnote{This is $\dx{s}$ as a differential $1$-form,
not $\dx{s}$ defined in (\ref{classicvolelem1D}) though they end up to
have the same action in line integrals.} for a $1$-dimensional oriented
manifold given in Example~\ref{eggVolElem1D} where $(W,U,\phi)$ is
replaced by $(]a,b[,C\setminus \{\VEC{a},\VEC{b}\},\sigma)$.
See Remark~\ref{rmkLCRn}.

The formula in (\ref{classicLineIntFunct}) is nothing else than
$\int_S f \, \nu$.  We have
\[
\int_{C\setminus\{\VEC{a},\VEC{b}\}} f\,\nu
= \int_{]a,b[}  \sigma^\ast(f\, \nu)
= \int_{]a,b[} (f \circ \sigma) \, \sigma^\ast(\nu)
= \int_{]a,b[} f(\sigma(w)) \, \big\| \sigma'(w)\big\| \dx{w}
= \int_C f \dx{s}
\]
where the third equality comes from (\ref{defn1Dvolelem}) with
$\nu = \df{s}$.
\end{rmk}

Let $\displaystyle F:V \rightarrow \RR^n$ be a continuous
{\bfseries vector fields}\index{Vector Field}; namely, a continuous
vector valued function from $V$ to $\displaystyle \RR^n$.
The {\bfseries line integral}\index{Vector Field!Line Integral} of a
vector field $\displaystyle F:V \to \RR^n$ along a curve $C$ is defined by
\begin{equation}\label{classicLineIntVectF}
  \int_C F \cdot \dx{\VEC{s}} \equiv \int_C F \cdot \VEC{t} \dx{s}
= \int_a^b F(\sigma(w)) \cdot \sigma'(w) \dx{w}
\end{equation}
if this integral exists, where $\VEC{t}(\VEC{u})$ is a tangent unit
vector to the curve $C$ at the point $\VEC{u} \in C$ and
$\displaystyle \sigma:[a,b] \to \RR^n$ is a parametric representation
of $C$, both of them consistent with the selected orientation on $C$.
The integral is independent of the parametric representation of $C$
used as long as this parametric representation is consistent with the
orientation on $C$.  We write
\begin{equation}\label{classiclineds}
\dx{\VEC{s}} = \VEC{t} \dx{s} = \sigma'(w)\dx{w} \ .
\end{equation}

\begin{rmk}
The definition of the line integral of a vector field in
(\ref{classicLineIntVectF}) is nothing else than the integral of a
differential $1$-form along a $1$-dimensional manifold.

The integral $\displaystyle \int_C F \cdot \VEC{t} \dx{s}$ in
(\ref{classicLineIntVectF}) is the integral
$\displaystyle \int_{C\setminus \{\VEC{a},\VEC{b}\}} \omega$ defined
in Definition~\ref{DefIntMan} where $\omega$ is the differential $1$-form
$\displaystyle \omega = \sum_{j=1}^n F_j \df{x_j}$.
\end{rmk}

\begin{theorem}[Fundamental Theorem for Line Integral]
Let $V$ be an open subset of $\displaystyle \RR^n$.  Suppose that
$C \subset V$ is a curve with a parametric representation
$\sigma: [a,b] \to V$ consistent with its orientation.
If $\displaystyle f \in C^1(V)$, then
\[
\int_C \graD f \cdot \VEC{t} \dx{s} = f(\sigma(b)) - f(\sigma(a)) \ ,
\]
where $\VEC{t}(\VEC{u})$ is a tangent unit
vector to the curve $C$ at the point $\VEC{u} \in C$ that is
consistent with the selected orientation on $C$.
\end{theorem}

\begin{proof}
The Fundamental Theorem for Line Integral is just a special case
of Theorem~\ref{stokesStokes}, Stokes' theorem, with the differential
$0$-form $\omega$ replaced by $f$ and the singular $1$-cube $\sigma$
replaced by $\displaystyle \tilde{\sigma}:[0,1]\to \RR^n$ defined by
$\tilde{\sigma}(w) = \sigma(a + w(b-a))$ for $0 \leq w \leq 1$.  We
get that
$\displaystyle \int_{\tilde{\sigma}} \df{f} = \int_{\partial
\tilde{\sigma}} f$.

Since
$\displaystyle \df{f} = \sum_{i=1}^n \pdydx{f}{x_i} \df{x_i}$, we have
\begin{align*}
\int_C \graD f \cdot \VEC{t} \dx{s}
&=\int_{[a,b]} \big(\graD f(\sigma(v))\big) \cdot \sigma'(v) \dx{v}
=\int_{[0,1]} \big(\graD f(\tilde{\sigma}(w))\big) \cdot
\tilde{\sigma}'(w) \dx{w} \\
&=\int_{[0,1]} \sum_{i=1}^n \pdydx{f}{x_i}(\tilde{\sigma}(w))
\, \tilde{\sigma}_i'(w) \dx{v}
= \int_{[0,1]} \tilde{\sigma}^\ast( \df{f})
= \int_{\tilde{\sigma}}\df{f} \ .
\end{align*}
Moreover, since
$\partial \tilde{\sigma} = \tilde{\sigma}_{1,1} - \tilde{\sigma}_{1,0}$
where $\tilde{\sigma}_{1,1}(0) = \sigma(b)$ and
$\tilde{\sigma}_{1,0}(0) = \sigma(a)$, we have
\[
\int_{\partial \tilde{\sigma}} f = 
\int_{\tilde{\sigma}_{1,1}} f - \int_{\tilde{\sigma}_{1,0}} f
= f(\sigma(b)) - f(\sigma(a)) \ .  \qedhere
\]
\end{proof}

\begin{rmk}
The formulae in (\ref{classicLineIntFunct}) and
(\ref{classicLineIntVectF}) can be used to define the line integral
along a curve $C$ that has only piecewise continuously differentiable
parametric representations.  In that situation, the integral is the
sum of the integrals along each section of the curve $C$ represented
by a continuously differentiable parametric representation.

It is easy to proof that the fundamental theorem of line integral is
also valid for a curve $C$ that has only piecewise continuously
differentiable parametric representations.  It suffice to apply the
fundamental theorem of line integral to each section of the curve $C$
represented by a continuously differentiable parametric
representation, and then sum up the results.
\end{rmk}

For the rest of this section, we consider curves with a continuously
differentiable or a piecewise continuously differentiable parametric
representations.

\begin{defn}
A curve $C$ with a parametric representation 
$\displaystyle \sigma:[a,b]\rightarrow \RR^n$ is
{\bfseries closed}\index{Curve!Closed} if $\sigma(a) = \sigma(b)$.
\end{defn}

There are a couple of interesting consequences to the fundamental
theorem of line integral.

\begin{prop}\label{DGoint}
Let $V$ be an open subset of $\displaystyle \RR^n$
and $\displaystyle F:V \rightarrow \RR^n$ be a continuous vector field.
The integral $\displaystyle \int_C F \cdot \VEC{t} \dx{s}$ is
independent of the curve $C \subset V$ joining two points
$\VEC{a}$ and $\VEC{b}$ in $V$ if and only if
$\displaystyle \oint_C F \cdot \VEC{t} \dx{s} = 0$ for all
closed curves $C$ in $V$.  As usual, $\VEC{t}(\VEC{u})$ is a tangent unit
vector to the curve $C$ at the point $\VEC{u} \in C$ consistent with
the orientation on $C$.

The symbol $\oint$ is used to denote an integral over a closed curve.  
\end{prop}

\begin{proof}
\stage{$\mathbf{\Rightarrow}$}
Suppose that $C$ is a closed curve with a parametric representation
$\displaystyle \sigma:[a,b]\rightarrow V$ consistent with its
orientation. 
Let $C_1$ be the curve with parametric representation
$\sigma_1:[0,1] \to V$ given by
$\sigma_1(w)=\sigma(a + v (b-a)/2)$ for $0 \leq v \leq 1$ and let
$C_2$ be the curve with parametric representation
$\sigma_2:[0,1] \to V$ given by
$\sigma_2(w)=\sigma(b + v (a-b)/2)$ for $0 \leq v \leq 1$.
Those are two curves from $\sigma(a) = \sigma(b)$ to
$\sigma((a+b)/2)$.
So $\int_{C_1} F \cdot \VEC{t} \dx{s} = \int_{C_2} F \cdot \VEC{t} \dx{s}$
by hypothesis.  Hence
\begin{align*}
0 &= \int_{C_1} F \cdot \VEC{t} \dx{s} - \int_{C_2} F \cdot \VEC{t} \dx{s}
= \int_{[0,1]} F(\sigma_1(v)) \cdot \sigma_1'(v) \dx{v}
- \int_{[0,1]} F(\sigma_2(v)) \cdot \sigma_2'(v) \dx{v} \\
&= \int_{[0,1]} F(\sigma(a + v (b-a)/2)) \cdot \sigma'(a + v (b-a)/2)
\, (b-a)/2 \dx{v}  \\
&\qquad
- \int_{[0,1]} F(\sigma(b + v (a-b)/2)) \cdot \sigma'(b + v (a-b)/2)
\, (a-b)/2 \dx{v} \\
&= \int_a^{(a+b)/2} F(\sigma(w)) \cdot \sigma'(w) \dx{w}
- \int_b^{(a+b)/2} F(\sigma(w)) \cdot \sigma'(w) \dx{w} \\
&= \int_a^b F(\sigma(w)) \cdot \sigma'(w) \dx{w}
= \int_C F \cdot \VEC{t} \dx{s}
\end{align*}

\stage{$\mathbf{\Leftarrow}$}
Suppose that $C_1$ and $C_2$ are two curves from $\VEC{a}$ to $\VEC{b}$,
and that $\sigma_i:[a,b] \to V$ is a
parametric representation of $C_i$ consistent with its orientation
for $i = 1,2$.
Let $C$ be the closed curve with the parametric representation
$\sigma: [0,1] \to V$ defined by
\[
\sigma(v) = \begin{cases}
\sigma_1(a + 2v (b-a)) & \quad \text{if} \ 0 \leq v \leq 1/2 \\
\sigma_2((2b-a) + 2v(a-b)) &  \quad \text{if} \ 1/2 \leq v \leq 1
\end{cases}
\]
By hypothesis, we have that $\int_C F \cdot \VEC{t} \dx{s} = 0$.  It
follows that
\begin{align*}
0 &= \int_C F \cdot \VEC{t} \dx{s}
= \int_0^{1/2} F(\sigma(v)) \cdot \sigma'(v) \dx{v}
+ \int_{1/2}^1 F(\sigma(v)) \cdot \sigma'(v) \dx{v} \\
&= \int_0^{1/2} F(\sigma_1(a+2v(b-a))) \cdot \sigma_1'(a+2v(b-a))\,
2(b-a) \dx{v} \\
&\qquad + \int_{1/2}^1 F(\sigma_2((2b-a)+2v(a-b))) \cdot
\sigma_2'((2b-a) + 2v(a-b))\, 2(a-b) \dx{v} \\
&= \int_a^b F(\sigma_1(w)) \cdot \sigma_1'(w) \dx{w}
+ \int_b^a F(\sigma_2(w) \cdot \sigma_2'(w) \dx{w} \\
&= \int_a^b F(\sigma_1(w)) \cdot \sigma_1'(w) \dx{w}
- \int_a^b F(\sigma_2(w) \cdot \sigma_2'(w) \dx{w}
= \int_{C_1} F \cdot \VEC{t} \dx{s} - \int_{C_2} F \cdot \VEC{t} \dx{s} \ . 
\end{align*}
Hence $\displaystyle \int_{C_1} F \cdot \VEC{t} \dx{s}
= \int_{C_2} F \cdot \VEC{t} \dx{s}$.
\end{proof}

\begin{rmk}
The previous proof contains all the arguments that could be used to
proof the following properties of line integral.  We leave it to the
reader to prove these properties.

If $C_1$ is a curve where the direction is from $\VEC{a}$ to $\VEC{b}$ and
$C_2$ is the same curve where the direction is from $\VEC{b}$ to
$\VEC{a}$, then $\displaystyle \int_{C_1} F\cdot \VEC{t} \dx{s}
= -\int_{C_2} F\cdot \VEC{t} \dx{s}$.

If $C_1$ is a curve from $\VEC{a}$ to $\VEC{b}$ and
$C_2$ is a curve from $\VEC{b}$ to $\VEC{c}$, then the union of these
two curves forms a curve $C_3$ from $\VEC{a}$ to $\VEC{c}$ and
$\displaystyle \int_{C_3} F\cdot \VEC{t} \dx{s} = \int_{C_1} F\cdot
\VEC{t} \dx{s} + \int_{C_2} F\cdot \VEC{t} \dx{s}$.
\end{rmk}

\begin{defn}
Let $\displaystyle F:V \rightarrow \RR^n$ be a continuous vector field.  If
$\displaystyle \int_C F \cdot \VEC{t} \dx{s}$ is independent
of the path $C$ in $V$ joining two points $\VEC{a}$ and $\VEC{b}$,
then $F$ is called a
{\bfseries conservative}\index{Vector Field!Conservative} vector field.
\end{defn}

\begin{prop}\label{DGconserveA}
Let $V$ be an open subset $\displaystyle \RR^n$ and 
$\displaystyle F:V \rightarrow \RR^n$ be a continuous
vector field.  If $F$ is conservative, then
$F = \graD f$ for some real valued function $f$ defined on $V$.
\end{prop}

\begin{proof}
We have that $V$ is the union of open connected components \footnote{The
readers may consult an introductory textbook in topology (e.g.\
\cite{MU}) if they are not familiar with the concept of connected and
path-connected subsets.  In $\displaystyle \RR^n$, connected and path-connected
open subsets are the same.  It is not true in all general topological
spaces and it is not even true for close subsets of
$\displaystyle \RR^n$.  For the
present context, it suffices to know that $\displaystyle W \subset \RR^n$ is
connected if for each $\VEC{a}, \VEC{b} \in W$ there exists a curve
from $\VEC{a}$ to $\VEC{b}$.}.  Let $U$ be an open connected component
of $V$.

Choose any point $\VEC{x}_0 \in U$.  We define a function
$f:U \to \RR$ as it follows.  For $\VEC{x} \in U$, let
$f(\VEC{x}) = \int_C F \cdot \VEC{t} \dx{s}$ where $C \subset U$ is a
curve from $\VEC{x}_0$ to $\VEC{x}$, and $\VEC{t}(\VEC{u})$ is a tangent unit
vector to the curve $C$ at the point $\VEC{u} \in C$ that is
consistent with the orientation on $C$ from $\VEC{x}_0$ to $\VEC{x}$.
Since $F$ is conservative, this
definition is independent of the curve $C \subset U$ from $\VEC{x}_0$ to
$\VEC{x}$ used.

We prove that $\displaystyle \pdydx{f}{x_i}(\VEC{x}) = F_i(\VEC{x})$
for all $\VEC{x} \in W$ and $1 \leq i \leq n$.  Suppose that
$\sigma:[0,1] \to U$ is the parametric representation of the curve $C$
consistent with the orientation from $\VEC{x}_0$ to $\VEC{x}$.  Since
$U$ is open, there exists $\delta >0$ such that $B_{\delta}(\VEC{x}) \subset U$.
Hence $\VEC{x} + h \VEC{e}_i \in U$ for $|h| < \delta$.  
Consider the curve $C_{i,h}$ from $\VEC{x}_0$ to $\VEC{x}+ h \VEC{e}_i$ 
with the parametric representation $\sigma_{i,h}:[0,1+h] \to U$
defined by
\[
\sigma_{i,h}(w) = \begin{cases}
\sigma(w) & \quad \text{if} \ 0 \leq w \leq 1 \\
\VEC{x} + (w-1)\, \VEC{e}_i & \quad \text{if} \ 1<w \leq 1+h
\end{cases}
\]
Hence
\begin{align*}
\frac{f(\VEC{x}+h\VEC{e}_i) - f(\VEC{x})}{h}
&= \frac{1}{h} \left( \int_{C_{i,h}} F\cdot \VEC{t} \dx{s}
- \int_C F\cdot \VEC{t} \dx{s} \right) \\
&= \frac{1}{h} \int_1^{1+h} F(\VEC{x} +(w-1)\VEC{e}_i) \cdot (w-1)
\VEC{e}_i \dx{w}
= \frac{1}{h} \int_0^h F(\VEC{x} +w\VEC{e}_i) \cdot \VEC{e}_i \dx{w} \\
&= \frac{1}{h} \int_0^h F_i(\VEC{x} +w\VEC{e}_i) \dx{w}
\to F_i(\VEC{x})
\end{align*}
as $h \to 0$ because $F$ is continuous on $V$.
\end{proof}

The converse to the previous proposition is true.
If $F = \graD f$ in $V$, then it follows from the fundamental theorem for line
integral that
$\int_C F \cdot \VEC{t} \dx{s} = \int_C \graD f \cdot \VEC{t} \dx{s} =
f(\sigma(b)) - f(\sigma(a)) = 0$ for all closed curves
$C$ in $V$, where $\sigma:[a,b] \to W$ is a parametric representation 
of $C$ consistent with its orientation.  Therefore, $F$ is
conservative according to Proposition~\ref{DGoint}.

\subsection{A Little Note on Arc Length}\label{ALNAL}

Suppose that $C$ is a curve in $\displaystyle \RR^n$ with the parametric
representation $\displaystyle \sigma:[a,b] \to \RR^n$.  Recall that we
may tolerate that there be a finite subset $N$ of $[a,b]$ such that
$\sigma$ is one-to-one on $[a,b]\setminus N$ but not on the full
interval $[a,b]$.

Given a partition $P = \{t_0,t_1, \ldots,t_N\}$ of $[a,b]$, let
\[
  L_P(\sigma) = \sum_{i=1}^N \|\sigma(t_i) - \sigma(t_{i-1})\| \ .
\]
This situation is represented in the figure below.
\pdfbox{vect_calculus/Length}
As the partition becomes finer, we expect to get better
approximations of what we intuitively define as the ``length'' of $C$.

\begin{defn}  \label{defnArcLen}
Let $C$ be a curve in $\displaystyle \RR^n$ with the parametric
representation $\displaystyle \sigma:[a,b] \to \RR^n$.
The {\bfseries length}\index{Curve!Length} $L$ of the curve
$C$ is defined by
\begin{equation}\label{ALNALa}
L = \sup \{ L_P(\sigma) : P \text{ is a partition of } [a,b] \} \ .
\end{equation}
\end{defn}

The value of $L$ is independent of the chosen parametric
representation of $C$ because only the points on $C$ are used to 
define $L$ in (\ref{ALNALa}).  If $L < \infty$, then we say that the
curve $C$ is {\bfseries rectifiable}\index{Curve!Rectifiable}.

Since we assume that our parametric representations are continuously
differentiable, we have the following result.

\begin{theorem}\label{arclength}
Suppose that $C$ is a curve in $\displaystyle \RR^n$ with the parametric
representation $\displaystyle \sigma:[a,b] \to \RR^n$, then the length
$L$ of the curve $C$ is given by
\[
  L = \int_C \dx{s} = \int_a^b \|\sigma'(t)\| \dx{t} \ .
\]
\end{theorem}

To prove this theorem, we need the following lemma.  We have already
stated in Proposition~\ref{propAIFlstIAF} a version of this lemma for
integrable real valued functions.

\begin{lemma}
If $\displaystyle f:[a,b]\to \RR^n$ is continuous, then
\[
  \left\| \int_a^b f(t) \dx{t} \right\| \leq \int_a^b \|f(t)\| \dx{t} \ .
\]
\end{lemma}

\begin{proof}
Recall that
\[
\int_a^b f(t) \dx{t} =
\begin{pmatrix}
\displaystyle \int_a^b f_1(t) \dx{t} & \displaystyle \int_a^b f_2(t) \dx{t}
& \ldots & \displaystyle \int_a^b f_n(t) \dx{t}
\end{pmatrix}^\top \ .
\]
Given any unit vector $\displaystyle \VEC{v} \in \RR^n$, we get
\begin{equation} \label{NIflessINfEq1}
\begin{split}
\left| \left( \int_a^b f(t) \dx{t} \right) \cdot \VEC{v} \right|
&= \left| \int_a^b \left( f(t)\cdot \VEC{v} \right) \dx{t} \right|
\leq \int_a^b \left| f(t)\cdot \VEC{v} \right| \dx{t} \\
&\leq \int_a^b \| f(t) \| \, \|\VEC{v} \| \dx{t}
= \int_a^b \| f(t) \| \dx{t} \ ,
\end{split}
\end{equation}
where we have used Schwarz inequality in $\displaystyle \RR^n$ for the
second inequality.
We may assume that $\displaystyle \int_a^b f(t) \dx{t} \neq \VEC{0}$
since the result is trivial in that case.  We get the conclusion of
the lemma by using the unit vector
$\displaystyle
\VEC{v} = \left\|\int_a^b f(t) \dx{t}\right\|^{-1} \int_a^b f(t) \dx{t}$
in (\ref{NIflessINfEq1}).
\end{proof}

\begin{proof}[Proof (of Theorem~\ref{arclength})]
\stage{i} Let $P= \{t_0,t_1,t_2, \ldots, t_N\}$ be a partition of
$[a,b]$.  From the previous lemma, we have
\[
\| \sigma(t_i) - \sigma(t_{i-1}) \|
= \left\| \int_{t_{i-1}}^{t_i} \sigma'(t) \dx{t} \right\|
\leq \int_{t_{i-1}}^{t_i} \| \sigma'(t) \| \dx{t}
\]
for $1 \leq i \leq N$.  Hence
\[
L_P(\sigma) = 
\sum_{i=1}^N \| \sigma(t_i) - \sigma(t_{i-1}) \|
\leq \sum_{i=1}^N \int_{t_{i-1}}^{t_i} \| \sigma'(t) \| \dx{t}
= \int_a^b \| \sigma'(t) \| \dx{t} \ .
\]
Since this is true for any partition $P$ of $[a,b]$, we get that
$\displaystyle L \leq \int_a^b \| \sigma'(t) \| \dx{t}$.

\stage{ii} Given $\epsilon > 0$, choose $\delta > 0$ such that
$\|\sigma'(t) - \sigma'(s) \| < \epsilon$ for
$|t-s| < \delta$.  This is possible because
$\displaystyle \sigma':[a,b]\to \RR^n$ is continuous on the compact set
$[a,b]$.  Therefore, it is uniformly continuous on $[a,b]$.

Let $P= \{t_0,t_1,t_2, \ldots, t_N\}$ be a partition of
$[a,b]$ such that $t_i - t_{i-1} < \delta$ for $1 \leq i \leq N$.
Therefore $\displaystyle \|\sigma'(t)\| - \|\sigma'(t_i)\|
\leq \|\sigma'(t) - \sigma'(t_i)\| < \epsilon$
for $t_{i-1} \leq t \leq t_i$.  Hence
\begin{align*}
&\int_{t_{i-1}}^{t_i} \|\sigma'(t) \| \dx{t}
\leq  \int_{t_{i-1}}^{t_i} \big(\|\sigma'(t_i)\| + \epsilon\big) \dx{t}
= \int_{t_{i-1}}^{t_i} \|\sigma'(t_i)\| \dx{t} + \epsilon (t_i -t_{i-1}) \\
&\qquad = \left\| \int_{t_{i-1}}^{t_i} \sigma'(t_i) \dx{t} \right\|+ \epsilon
(t_i -t_{i-1})
= \left\| \int_{t_{i-1}}^{t_i}\big( \sigma'(t) + \big(
\sigma'(t_i) - \sigma'(t)\big) \big)\dx{t} \right\|
+ \epsilon (t_i -t_{i-1}) \\
&\qquad \leq \left\| \int_{t_{i-1}}^{t_i}\sigma'(t) \dx{t} \right\|
+ \left\| \int_{t_{i-1}}^{t_i}\left(\sigma'(t_i) - \sigma'(t)\right)
\dx{t} \right\| + \epsilon (t_i -t_{i-1}) \\
&\qquad \leq \underbrace{\left\| \int_{t_{i-1}}^{t_i} \sigma'(t) \dx{t}
\right\| }_{=\|\sigma(t_i) - \sigma(t_{i-1})\|}
+ \underbrace{\int_{t_{i-1}}^{t_i}
\left\| \sigma'(t_i) - \sigma'(t)\right\| \dx{t}
}_{\leq \epsilon (t_i-t_{i-1})} + \epsilon (t_i -t_{i-1}) \\
&\qquad \leq \|\sigma(t_i) - \sigma(t_{i-1})\| +
2\epsilon (t_i -t_{i-1})
\end{align*}
where the second equality comes from
$\displaystyle \int_{t_{i-1}}^{t_i} \|\sigma'(t_i)\| \dx{t} 
= \left\| \int_{t_{i-1}}^{t_i} \sigma'(t_i) \dx{t} \right\|$
because $\sigma'(t_i)$ does not depend on $t$.  We conclude that
\begin{align*}
\int_a^b \|\sigma'(t) \| \dx{t}
&= \sum_{_i=1}^N \int_{t_{i-1}}^{t_i} \|\sigma'(t) \| \dx{t}
\leq \sum_{i=1}^N \left( \|\sigma(t_i) - \sigma(t_{i-1})\| +
  2\epsilon (t_i -t_{i-1}) \right) \\
&= L_P(\sigma) + 2 \epsilon(b-a) \leq L + 2\epsilon (b-a) \ .
\end{align*}
Since this is true for any $\epsilon >0$, we get the inequality
$\displaystyle \int_a^b \| \sigma'(t) \| \dx{t} \leq L$.
\end{proof}

The reader will read in Section~\ref{subsectArea} a totally different
story for the area of a surface.

\begin{defn} \label{defnALF}
Let $C$ be a curve in $\displaystyle \RR^n$ with the parametric
representation $\displaystyle \sigma:[a,b] \to \RR^n$.
The {\bfseries arc length function}\index{Curve!Arc Length Function}
along the curve $C$ is defined by
\[
s(t) = \int_a^t \|\sigma'(r)\| \dx{r}
\]
for $a \leq t \leq b$.
\end{defn}

\begin{defn}
A curve $C$ in $\displaystyle \RR^n$ is said to be
{\bfseries parameterized by arc
length}\index{Curve!Parameterized by Arc Length} if the parametric
representation $\displaystyle \sigma:[a,b] \to \RR^n$ of $C$ satisfies
$\|\sigma'(t)\|=1$ for $a \leq t \leq b$.
\end{defn}

If $C$ is parameterized by arc length with the
parametric representation $\displaystyle \sigma:[a,b] \to \RR^n$,
then the arc length function satisfies $s(t) = t - a$.  In particular, the
length $L$ of $C$ is $L = b-a$.

If $\displaystyle \sigma:[a,b] \to \RR^n$ is a parametric
representation of a curve $C$ such that $\|\sigma'(t)\| \neq 0$ for
$a\leq t \leq b$, then the arc length function $s:[a,b] \to [0,L]$ is a
continuously differentiable and strictly increasing function.  Thus
$\displaystyle s^{-1}:[0,L] \to [a,b]$ exists and is a continuously
differentiable function.  If we set
$\displaystyle \breve{\sigma}(t) = \sigma(s^{-1}(t))$ for
$0 \leq t \leq L$, then
the curve $C$ is parameterized by arc length with
the parametric representation $\breve{\sigma}$ because
\[
  \breve{\sigma}'(t) = \sigma'(s^{-1}(t))\, \dfdx{s^{-1}}{t}(t)
=  \frac{1}{\|\sigma'(s^{-1}(t))\|} \, \sigma'(s^{-1}(t))
\]
and thus $\|\breve{\sigma}(t)\| = 1$ for $0 \leq t \leq L$.
Note that, according to the Inverse Function Theorem, 
\[
\dfdx{s^{-1}}{t}(t) = \frac{1}{s'\big(s^{-1}(t)\big)}
= \frac{1}{\|\sigma'\big(s^{-1}(t)\big)\|}
\]
for $0 \leq t \leq L$.

\section{Surface Integrals}

In this section, a {\bfseries surface}\index{Surface} is a
continuously differentiable function $\displaystyle \rho:W \to \RR^n$ where
$W$ is an open subset of $\displaystyle \RR^2$ and $\diff \rho(\VEC{w})$
is of rank $2$ for all $\VEC{w} \in W$.  Thus, a surface is a $2$-dimensional
manifold without boundary of class $\displaystyle C^1$ of
$\displaystyle \RR^n$ which can be represented with only
one local chart.

As we did for the term ``curve'', we will also interchangeably use the
term ``surface'' to designate the function $\rho$ or its image
$S = \rho(W)$.  In classical differential geometry,
the function $\rho$ is called a
{\bfseries parametric representation}\index{Surface!Parametric Representation}
of the surface $S$. 

There may be occasions where we will tolerate that
$\displaystyle \rho: W \to \RR^n$ be one-to-one except on a set of measure zero.

Suppose that $f:S \rightarrow \RR$ is a function. The
{\bfseries surface integral}\index{Surface Integral of a Function}
of $f$ over $S$ is defined by
\begin{equation} \label{classicSurfIntFunct}
\iint_S f \dx{S} \equiv \iint_W
f(\rho(\VEC{w}))\, \left\|\left(\pdydx{\rho}{w_1} \times
\pdydx{\rho}{w_2}\right)(\VEC{w})\right\| \dx{w_1}\dx{w_2}
\end{equation}
if this integral exists, where (symbolically)
\[
(\rho_{w_1} \times \rho_{w_2})(\VEC{w}) = \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{\rho_1}{w_1}(\VEC{w}) & \displaystyle
\pdydx{\rho_2}{w_1}(\VEC{w}) &
\displaystyle \pdydx{\rho_3}{w_1}(\VEC{w}) \\[0.7em]
\displaystyle \pdydx{\rho_1}{w_2}(\VEC{w}) & \displaystyle
\pdydx{\rho_2}{w_2}(\VEC{w}) &
\displaystyle \pdydx{\rho_3}{w_2}(\VEC{w})
\end{pmatrix}
\]
if the determinant is developed along the top row only.
We write
\begin{equation} \label{classicvolelem2D}
\dx{S} = \left\|\pdydx{\rho}{w_1} \times \pdydx{\rho}{w_2}\right\|
\dx{w_1}\dx{w_2} \ .
\end{equation}

\begin{rmk}
The expression in (\ref{classicvolelem2D}) is associated to the local
representation of the volume element $\nu = \dx{A}$ for a $2$-dimensional
oriented manifold given in Example~\ref{eggVolElem2D}
where $(W,U,\phi)$ is replaced by $(W,S,\rho)$.  See Remark~\ref{rmkLCRn}.

As we did in Remark~\ref{rmkVolElem1D}, we can show that
(\ref{classicSurfIntFunct}) is nothing else than
$\int_S f \, \nu$.  We have
\begin{align*}
\int_S f\,\nu &= \int_W \rho^\ast (f\, \nu)
= \int_W f(\rho(\VEC{w})) (\rho^\ast \nu)
= \int_W f(\rho(\VEC{w}))
\left\| \pdydx{\rho}{w_1}(\VEC{w}) \times \pdydx{\rho}{w_2}(\VEC{w})
\right\| \dx{w_1} \wedge \dx{w_2} \\
&= \int_W f(\rho(\VEC{w}))
\left\| \pdydx{\rho}{w_1}(\VEC{w}) \times \pdydx{\rho}{w_2}(\VEC{w})
\right\| \dx{w_1}\dx{w_2}
\end{align*}
where the third equality comes from (\ref{defn2Dvolelem})
in Example~\ref{eggVolElem2D} with $\nu = \dx{A}$.
\end{rmk}

As we did for curves, we can recast our definition of orientation on a
$2$-dimensional manifold to the context of surfaces.  Since we assume
that the parametric representation $\rho$ of a surface $S$ 
is continuously differentiable and $\diff \rho(\VEC{w})$ has rank $2$
for all $\VEC{w} \in W$, we may continuously assign to each point
$\VEC{u}$ of $C$ a unit normal vector $\VEC{n}(\VEC{u})$.

If $S$ is a surface in $\displaystyle \RR^3$, then there is a close
link between the selected orientation on $S$ and the outward unit normal to $S$
at each point of $S$.  As we have seen in Remark~\ref{rmkOUNinRR3},
if $\displaystyle \mu_{\VEC{u}} =
[(\VEC{u},\VEC{v}_{\VEC{u},1}), (\VEC{u},\VEC{v}_{\VEC{u},2}) ]$
is the selected orientation on $\TS_{\VEC{u}} S$, where
$\displaystyle \{ (\VEC{u},\VEC{v}_{\VEC{u},1}),
(\VEC{u},\VEC{v}_{\VEC{u},2}) \}$ is an orthonormal basis of
$\TS_{\VEC{u}} S$, then the outward unit normal is
$\displaystyle \VEC{n}_{\VEC{u}}
= (\VEC{u}, \VEC{v}_{\VEC{u},1} \times \VEC{v}_{\VEC{u},2})$.
Suppose that $\rho$ is a parametric representation consistent with the
orientation on $S$, then
$\displaystyle \mu_{\rho(\VEC{w})} = \left[ \left(\rho(\VEC{w}),
\pdydx{\rho}{w_1}(\VEC{w})\right), \left(\rho(\VEC{w}),
\pdydx{\rho}{w_2}(\VEC{w})\right) \right]$ for all $\VEC{w} \in W$
and
\begin{equation} \label{unitNrhoW}
\VEC{n}(\rho(\VEC{w})) = \left\| \pdydx{\rho}{w_1}(\VEC{w}) \times
\pdydx{\rho}{w_2}(\VEC{w}) \right\|^{-1}
\left( \pdydx{\rho}{w_1}(\VEC{w}) \times \pdydx{\rho}{w_2}(\VEC{w}) \right)
\end{equation}
for $w\in W$.   Hence, the orientation determines the choice of the
outward unit normal and vice-versa if the outward unit normal is
consistent with the orientation on $S$.  We may
define on orientation on $S$ by continuously selecting an outward unit
normal vector $\VEC{n}$ at each point of $S$.  This is another
confirmation that the surface $S$ has two possible orientations.

Suppose that $\displaystyle F:\Omega \rightarrow \RR^3$ is a vector field.
The {\bfseries surface integral of $F$ over the oriented surface
$S$}\index{Vector Field!Surface Integral} is
defined by
\begin{equation} \label{classicSurfInt}
\iint_S F \cdot \dx{\VEC{S}} \equiv \iint_S F\cdot \VEC{n} \dx{S}
= \iint_W
F(\rho(\VEC{w})) \cdot \left(\pdydx{\rho}{w_1} \times
\pdydx{\rho}{w_2}\right)(\VEC{u}) \dx{w_1}\dx{w_2} \ ,
\end{equation}
where we assume that the parametric representation is consistent with
the orientation on $S$ and therefore
$\VEC{n}(\rho(\VEC{w}))$ is given by
(\ref{unitNrhoW}) for all $\VEC{w} \in W$.  We write
\begin{equation} \label{classicSurfdS}
\dx{\VEC{S}} = \VEC{n} \dx{S}
= \left(\pdydx{\rho}{w_1} \times \pdydx{\rho}{w_2}\right)\dx{w_1}\dx{w_2} \ .
\end{equation}

\begin{rmk}
The definition of the surface integral of a
vector field in (\ref{classicSurfInt}) is nothing else than the
integral of a differential $2$-form over a $2$-dimensional manifold.
namely, the integral
$\displaystyle \int_S F \cdot \VEC{n} \dx{S}$ in (\ref{classicSurfInt})
is nothing else than the integral $\displaystyle \int_S \omega$ defined
in (\ref{DefIntMan}) where $\omega$ is the differential $2$-form
$\omega = F_1 \df{x_2} \wedge \df{x_3} + F_2 \df{x_3} \wedge \df{x_1}
+ F_3 \df{x_1} \wedge \df{x_2}$.   This can
easily be seen if we assume that the parametric representation $\rho$
is consistent with the selected orientation on $S$.  Then
$(W, S, \rho)$ is a local chart which is consistent with the orientation
on $S$.  As usual, we assume that $W \subset H_2$.
Then
\begin{align*}
\int_S \omega &= \int_S 
F_1 \df{x_2}\wedge \df{x_3} + F_2 \df{x_3}\wedge \df{x_1}
+ F_3 \df{x_1} \wedge \df{x_2} \\
&= \int_W \rho^\ast\left(F_1 \df{x_2}\wedge \df{x_3}
+ F_2 \df{x_3}\wedge \df{x_1} + F_3 \df{x_1} \wedge \df{x_2}\right) \\
&= \int_W \bigg( F_1(\rho(\VEC{w}))
\left( \pdydx{\rho_2}{w_1}(\VEC{w})\, \pdydx{\rho_3}{w_2}(\VEC{w}) -
\pdydx{\rho_2}{w_2}(\VEC{w})\, \pdydx{\rho_3}{w_1}(\VEC{w}) \right) \\
&\qquad + F_2(\rho(\VEC{w}))
\left( \pdydx{\rho_3}{w_1}(\VEC{w})\, \pdydx{\rho_1}{w_2}(\VEC{w}) -
\pdydx{\rho_3}{w_2}(\VEC{w})\, \pdydx{\rho_1}{w_1}(\VEC{w}) \right) \\
&\qquad + F_3(\rho(\VEC{w}))
\left( \pdydx{\rho_1}{w_1}(\VEC{w})\, \pdydx{\rho_2}{w_2}(\VEC{w}) -
\pdydx{\rho_1}{w_2}(\VEC{w})\, \pdydx{\rho_2}{w_1}(\VEC{w}) \right)
\bigg) \dx{w_1} \wedge \dx{w_2} \\
&= \int_W F(\rho(\VEC{w})) \cdot
\left(\pdydx{\rho}{w_1}(\VEC{w}) \times \pdydx{\rho}{w_2}(\VEC{w})\right)
\dx{w_1}\dx{w_2} \ .
\end{align*}
\end{rmk}

\begin{rmk}
If the surface $S$ is given by $w_3=g(w_1,w_2)$ for
$\displaystyle (w_1,w_2) \in W \subset \RR^2$, then
\begin{align*}
&\iint_S f \dx{S} \\
&\ = \iint_W f(w_1,w_2,g(w_1,w_2))
\left(\left(\pdydx{g}{w_1}(w_1,w_2)\right)^2 +
\left(\pdydx{g}{w_2}(w_1,w_2)\right)^2 + 1\right)^{1/2} \dx{w_1}\dx{w_2} \ .
\end{align*}
To prove this claim, we note that in this case a parametric
representation for $S$ is given by 
$\rho(w_1,w_2)= w_1\VEC{e}_1 + w_2\VEC{e}_2 + g(w_1,w_2)\VEC{e}_3$ for
$(w_1,w_2)$ in $W$.  We have
\[
\pdydx{\rho}{w_1}(\VEC{w}) \times \pdydx{\rho}{w_2}(\VEC{w})
= \left( -\pdydx{g}{w_1}(\VEC{w}), -\pdydx{g}{w_2}(\VEC{w}) , 1 \right)
\]
and
\[
\dx{S} = \left\|\left(\pdydx{\rho}{w_1} \times \pdydx{\rho}{w_2}\right)
(\VEC{w})\right\| \dx{w_1}\dx{w_2}
= \left(\left(\pdydx{g}{w_1}(\VEC{w})\right)^2 +
\left(\pdydx{g}{w_2}(\VEC{w})\right)^2 + 1\right)^{1/2} \dx{w_1}\dx{w_2} \ .
\]

We also have
\begin{align*}
\iint_S F \cdot \VEC{n} \dx{S} &= \epsilon \iint_U
\left(-F_1(w_1,w_2,g(w_1,w_2)) \pdydx{g}{w_1}(w_1,w_2) \right . \\
& \qquad \left. -F_2(w_1,w_2,g(w_1,w_2)) \pdydx{g}{w_2}(w_1,w_2)
+ F_3(w_1,w_2,g(w_1,w_2)) \right) \dx{w_1}\dx{w_2} \ ,
\end{align*}
where $\epsilon = 1$ if
$\displaystyle \left(-\pdydx{g}{w_1}(\VEC{w}),
-\pdydx{g}{w_2}(\VEC{w}), 1\right)$ points in the same direction than
the normal\\ $\VEC{n}(w_1,w_2,g(w_1,w_2))$ associated to the orientation
on $S$ and $\epsilon = -1$ otherwise.  This is a special case of
(\ref{classicSurfInt}) with the parametric representation for $S$ given by
$\rho(w_1,w_2)= w_1\VEC{e}_1 + w_2\VEC{e}_2 + g(w_1,w_2)\VEC{e}_3$ for
$(w_1,w_2)$ in $W$.  In particular, we have
\[
\VEC{n}(\rho(\VEC{w})) =
\epsilon \left\|\left(-\pdydx{g}{w_1}(\VEC{w}),
-\pdydx{g}{w_2}(\VEC{w}),1\right) \right\|^{-1} 
\left(-\pdydx{g}{w_1}(\VEC{w}), -\pdydx{g}{w_2}(\VEC{w}), 1\right)
\]
and
\[
\VEC{n} \dx{S} = \epsilon \left(-\pdydx{g}{w_1}, -\pdydx{g}{w_2}, 1\right)
\dx{w_1}\dx{w_2} \ .
\]
\end{rmk}

\begin{rmk}
The reader may have noted that we have only considered surfaces given
by parametric representations defined on open sets in this section
while we considered curves given by parametric representations defined
on closed interval in the previous section.  One of the reasons why we
did that was to introduce the fundamental theorem of line integral.
It also greatly simplified the issue about local charts on surfaces.

We will address the issue of the boundary of a surface in
Section~\ref{sectGSDtrio}.  
\end{rmk}

\subsection{A Little Note on Surface Area} \label{subsectArea}

We would like to use an approach similar to the approach that we have
used in Section~\ref{ALNAL} to define the area of a surface.  For
instance, we would like to use polygonal surfaces (like triangles or
rectangles) to approximate the area of a surface.  Unfortunately, this
approach does not work as expected.

Suppose that $\displaystyle \rho: R \to \RR^3$ is a parametric
representation of a surface $S$ where $\displaystyle R \subset \RR^2$
is an open rectangle.  Suppose that we cut $R$ into small triangles
$R_i$.  For each triangle $R_i$. let $A_i$ be the area of the
triangles in $\displaystyle \RR^3$ having vertices at
$\rho(\VEC{a}_i)$, $\rho(\VEC{b}_i)$ and $\rho(\VEC{c}_i)$ where
$\VEC{a}_i$, $\VEC{b}_i$ and $\VEC{c}_i$ are the vertices of $R_i$.
We approximate the area of
$\displaystyle \rho(R_i) \subset \RR^3$ by $A_i$.   If the
triangles $R_i$ are very small, then the area of $\rho(R)$ should be
approximately equal to the sum of the $A_i$ over all the triangles
$R_i$ that compose $R$, should not it?  Unfortunately, this is not
always the case.   H. A. Schwarz (see \cite{Ra} and \cite{S}) gave an
example for a simple cylinder where we can choose the triangles $R_i$
such that the sum of the $A_i$ over all the triangles $R_i$ converges
to infinity as the maximum size of the triangles $R_i$ goes to zero.
The approximation of the surface using little polygonal surface
require a stronger notion of convergence than pointwise convergence.
We will not cover this vast subject in the present document.  The
reader should consult \cite{Ra} for a more general view of the
subject.

Thus, there is no chance that we could use a formula like (\ref{ALNALa})
to define the area of a surface.  If $S$ is a surface as defined at the
beginning of this section, then the tradition is to define the
{\bfseries area of the surface}\index{Area of a Surface} $S$ as
\[
A = \iint_S \dx{S}= \iint_W \left\|\pdydx{\rho}{w_1} \times
\pdydx{\rho}{w_2}\right\| \dx{w_1}\dx{w_2} \ .
\]

\section{The Classical trio} \label{sectGSDtrio}

The trio that we have in mind is composed of the Green's theorem, 
the classical Stokes' theorem and the divergence theorem.  We present
all of them below.

\begin{theorem}[Green's Theorem]\label{StandardGreenTh}
Let $\displaystyle S \subset \RR^2$ be a compact $2$-dimensional
manifold of class $\displaystyle C^1$ with boundary.  Suppose that
$\displaystyle F_i:\RR^2 \to \RR$ is of class $\displaystyle C^1$ for
$1\leq i \leq 2$.  Then
\begin{equation} \label{SGTEq1}
\oint_{\partial S} F_1 \dx{x_1} + F_2 \dx{x_2} 
= \int_S \left(\pdydx{F_2}{x_1} - \pdydx{F_1}{x_2}\right) \dx{x_1}
\wedge \dx{x_2}
\end{equation}
The orientation on the boundary $\partial S$ is such that
the interior of $S$ is to the left when travelling along $\partial S$.
In such case, we say that the orientation or direction of $\partial S$ is
{\bfseries positive}\index{Surface!Positive Orientation} with respect to $S$.
\end{theorem}

Since $S$ is a $2$-dimensional manifold in $\displaystyle \RR^2$, the
integral on the right hand side of (\ref{SGTEq1}) is simply
$\displaystyle \int_S \left(\pdydx{F_2}{x_1} - \pdydx{F_1}{x_2}\right) \dx{x_1}
\dx{x_2}$.  Note that $\displaystyle (S^\circ,S^\circ,\Id)$ is a local chart
for $S$ consistent with the orientation on $S$.  As we said in the
last section, the value of he integral does not change if we include
or not the boundary of $S$.

\begin{proof}
This is a special case of Stokes' theorem, Theorem~\ref{TheStokesTh},
with $\omega = F_1 \df{x_1} + F_2 \df{x_2}$ because
\[
\df{\omega} = \left(\pdydx{F_2}{x_1} - \pdydx{F_1}{x_2}\right)
\dx{x_1}\wedge \dx{x_2} \ .
\]

The orientation on $\TS_{\VEC{u}} S$ for $\VEC{u} \in S$
is the standard orientation given by\\
$\mu_{\VEC{u}}= [(\VEC{u},\VEC{e}_1), (\VEC{u},\VEC{e}_2)]$.
According to Definition~\ref{manifdbOrient}, the induced orientation
on $\partial S$ from $S$ is given by the tangent vector
$(\VEC{u},\VEC{t}(\VEC{u}))$ for $\VEC{u} \in \partial S$
such that $\mu_{\VEC{u}} = [ (\VEC{u},\VEC{n}(\VEC{u})), 
(\VEC{u},\VEC{t}(\VEC{u}))]$ where $(\VEC{u}, \VEC{n}(\VEC{u}))$
is the outward unit normal to $\partial S$ at $\VEC{u} \in \partial S$
as defined in Definition~\ref{manifOutNormal} (Figure~\ref{GreenTh}).
\end{proof}

\pdfF{vect_calculus/GreenTh}{Green's Theorem}{Illustration associated
to the statement of Green's Theorem, Theorem~\ref{StandardGreenTh}}{GreenTh}

\begin{theorem}[Classical Stokes' Theorem]\label{StandardStokesTh}
Let $\displaystyle S \subset \RR^3$ be a compact and oriented
$2$-dimension manifold of class $\displaystyle C^1$ with boundary.
Suppose that $\displaystyle F:\RR^3\to \RR^3$ is a vector field of class
$\displaystyle C^1$.  Then
\begin{equation} \label{diff_geom_sg}
\oint_{\partial S} F \cdot \VEC{t} \dx{s}
= \int_S \curL F \cdot \VEC{n} \dx{A} \ ,
\end{equation}
where $(\VEC{u},\VEC{n}(\VEC{u}))$ is the outward unit normal to
$S$ at $\VEC{u} \in S$ as defined in 
Definition~\ref{manifNormal} and $(\VEC{u},\VEC{t}(\VEC{u}))$ is a
unit tangent vector to $\partial S$ at $\VEC{u} \in \partial S$
such that $\displaystyle
[(\VEC{u},\VEC{n}(\VEC{u})),(\VEC{u},\tilde{\VEC{n}}(\VEC{u})),
(\VEC{u},\VEC{t}(\VEC{u}))] =[(\VEC{u},\VEC{e}_1),(\VEC{u},\VEC{e}_2),
(\VEC{u},\VEC{e}_3)]$ if
$(\VEC{u},\tilde{\VEC{n}}(\VEC{u}))$ is the outward unit normal to
$\partial S$ at $\VEC{u} \in \partial S$ as defined in 
Definition~\ref{manifOutNormal} (Figure~\ref{Stokes}).
\end{theorem}

The expressions $\dx{A}$ and $\dx{s}$ in the statement of the previous
theorem refer to the volume elements on a $2$-dimensional manifold and
a $1$-dimensional manifold respectively. If the $2$-dimensional
manifold $S$ is a surface given by a parametric representation, then
$\dx{A}$ can be replaced by the expression in (\ref{classicvolelem2D})
when computing the integral.  Similarly, if the boundary $\partial S$
is a curve given by a parametric representation, then $\dx{s}$ can be
replaced by the expression in (\ref{classicvolelem1D}) when computing
the integral.

\begin{proof}
This is a special case of Stokes' theorem, Theorem~\ref{TheStokesTh},
with $\omega = F_1 \df{x_1} + F_2 \df{x_2} + F_3 \df{x_3}$.  We get
\begin{equation} \label{classStokesEq1}
  \int_{\partial S} \omega = \int_S \df{\omega} \ .
\end{equation}

We have from (\ref{manifVFXYZN}) of Theorem~\ref{manifVFXYZT} that
$\displaystyle n_1 \dx{A} = \df{x_2}\wedge\df{x_3}$,
$\displaystyle n_2 \dx{A} = \df{x_3}\wedge\df{x_1}$ and
$\displaystyle n_3 \dx{A} = \df{x_1}\wedge\df{x_2}$ on $S$.  Thus
\begin{align}
&(\curL F \cdot \VEC{n}) \dx{A}
= \left( \pdydx{F_3}{x_2}-\pdydx{F_2}{x_3} \right)n_1 \dx{A}
+ \left(\pdydx{F_1}{x_3}-\pdydx{F_3}{x_1}\right) n_2 \dx{A} 
+ \left( \pdydx{F_2}{x_1}-\pdydx{F_1}{x_2}\right) n_3 \dx{A}
\nonumber \\
&\quad = \left( \pdydx{F_3}{x_2}-\pdydx{F_2}{x_3} \right)\df{x_2}\wedge\df{x_3}
+ \left(\pdydx{F_1}{x_3}-\pdydx{F_3}{x_1}\right) \df{x_3}\wedge \df{x_1}
+ \left( \pdydx{F_2}{x_1}-\pdydx{F_1}{x_2}\right) \df{x_1}\wedge\df{x_2}
\nonumber \\
&\quad = \df{\omega} \label{classStokesEq2}
\end{align}
We have from (\ref{manifCXYZeq2}) of Theorem~\ref{manifCXYZT} that
$t_i \dx{s} = \df{x_i}$ for $1\leq i \leq 3$ on $\partial S$.  Hence
\begin{equation} \label{classStokesEq3}
(F \cdot \VEC{t})\dx{s} = (F_1t_1)\dx{s} +
(F_2t_2)\dx{s} + (F_3t_3)\dx{s}
= F_1\df{x_1} + F_2\df{x_2} + F_3\df{x_3} = \omega \ .
\end{equation}
We get the conclusion of the theorem by substituting (\ref{classStokesEq2}) and
(\ref{classStokesEq3}) into (\ref{classStokesEq1}).
\end{proof}

\pdfF{vect_calculus/Stokes}{Stokes' theorem}{Illustration associated
to the statement of Stokes' theorem, Theorem~\ref{StandardStokesTh}.}{Stokes}

In the classical stokes' theorem, we have that the outward unit normal
$\tilde{\VEC{n}}(\VEC{u})$ to $S$ at $\VEC{u} \in \partial S$ is given by
$\tilde{\VEC{n}}(\VEC{u}) = \VEC{t}(\VEC{u}) \times \VEC{n}(\VEC{u})$
according to Definition~\ref{manifNormal} because\\
$[ (\VEC{u},\VEC{n}(\VEC{u})), (\VEC{u},\tilde{\VEC{n}}(\VEC{u})),
(\VEC{u}, \VEC{t}(\VEC{u})) ] = 
[ (\VEC{u},\VEC{e}_1), (\VEC{u},\VEC{e}_2), (\VEC{u}, \VEC{e}_3) ]$. 

In the statement of the classical Stokes' theorem, the
{\bfseries positive orientation}\index{Curve!Positive Orientation} or
{\bfseries direction}\index{Curve!Positive Direction} on $\partial S$ with
respect to $S$ is the direction for which the surface $S$
is to our left when walking along the curve $C$ in that direction
assuming that our standing position is in the direction of the 
outward unit normal $\VEC{n}(\VEC{u})$ to $S$ at $\VEC{u} \in \partial S$
(Figure~\ref{Stokes}).

Green's Theorem is a special case of the classical Stokes' theorem. 
Suppose that $S$ is a surface in the $x_1,x_2$ plane and the
orientation on $S$ is given by $[(\VEC{u},\VEC{e}_1),(\VEC{u},\VEC{e}_2)]$.
Then the outward unit normal to $S$ at $\VEC{u} \in S$ is given by
$\VEC{n}(\VEC{u}) = \VEC{e}_1 \times \VEC{e}_2 = \VEC{e}_3$.
The classical Stokes' theorem becomes
\begin{equation} \label{diff_geom_sg3}
\oint_{\partial S} F \cdot \VEC{t} \dx{s}
= \int_S \curL F \cdot \VEC{e}_3 \dx{A} \ .
\end{equation}
\pdfbox{vect_calculus/Green}
If we develop both sides of (\ref{diff_geom_sg3}) and assume that
$F_3= 0$ on $S$, then we get
\begin{equation} \label{diff_geom_green}
\oint_C F_1 \dx{x_1} + F_2 \dx{x_2}
= \int_S \left(\pdydx{F_2}{x_1} - \pdydx{F_1}{x_2}\right) \dx{x_1}
\wedge \dx{x_2} \ ,
\end{equation}
where we have used (\ref{classStokesEq2}) and (\ref{classStokesEq3})
with $F_3 = 0$ and $\VEC{n} = \VEC{e}_3$.  We may also note that
$\df{x_3} = 0$ because $S$ is in the $x_1,x_2$ plane.  Therefore, all
local charts $(W,U,\phi)$ of $S$ must satisfy $\phi_3(\VEC{w}) = 0$
for all $\VEC{w} \in W$.

\begin{rmk}
After having stated Green's and Stokes' theorems     \label{rmkImport}
for compact manifolds of class $\displaystyle C^1$, we could restated
them based on Theorem~\ref{GenStokesTh} or
Theorem~\ref{GenStokesThV2}.  For instance, if we used
Theorem~\ref{GenStokesTh}, then we assume that $S$ is a bounded
manifold without boundary of class $\displaystyle C^1$.  In that
situation, $\partial S$ should then be replaced by the set of regular
points $S_r$ of $S$ in the statement of Green's and Stokes' theorems.

If the differential form $\omega$ that is integrated has a compact
support, then the manifold $S$ does not have to be bounded as in the
statement of Theorem~\ref{GenStokesTh}.  If the differential form
$\omega$ does not have a compact support, then the manifold $S$ must be
bounded.  We then use Theorem~\ref{GenStokesTh} with $\omega$
replaced by $\psi \omega$ where $\psi$ is a function of class
$\displaystyle C^\infty$ with compact support and such that
$\psi(\VEC{u}) = 1$ for all $\VEC{u} \in S$.

From now on, $S_r$ will be denoted $\partial S$ even if the points
of $S_r$ are not in $S$.  This is closer to the notation usually
adopted in the literature.  This should not cause, we hope, any
ambiguity in the examples, applications and questions.

There are two issues to address when studying Lines and surfaces as
defined in this chapter.
\begin{enumerate}
\item The parametric representations of the surfaces that we use
are defined on open sets.  We are basically ignoring the boundary
of the surface.  The integral of a differential form on surface $S$
does not change if we include or not the boundary because the boundary
represent a set of measure zero and, very often in applications, of zero
content.  Therefore, we may ignore any local charts that cover the
boundary as long as we have local charts that cover the interior of
$S$.  This is the situation that we have with our parametric
representations of surfaces.  In fact, the parametric representation
yields a single local chart that cover the entire interior of $S$.
\item The parametric representations of Lines or surfaces that we use
are not always providing local charts for all points of the line or the
surface.   For instance, suppose that we want to
integrate a continuous differential $1$-form $\omega$ over the unit circle 
$\displaystyle S^1$.  We may use the parametric representation
$\displaystyle \sigma(\theta) = (\cos(\theta),\sin(\theta))$
for $0 \leq \theta < 2\pi$.  But this does not represent a local
chart.  This yields the local chart
$\displaystyle C_1 = \big(]0,2\pi[, S^1 \setminus \{\VEC{e}_1\}, \sigma\big)$
but we are missing a local chart to cover $\VEC{e}_1$.  Rigorously, we
must add another local chart like
$\displaystyle C_2 = \big([-\epsilon,\epsilon [,
\sigma(]-\epsilon,\epsilon[), \sigma\big)$ to completely cover
$\displaystyle S^1$.  Then we use a partition of unity $\{\psi_1, \psi_2\}$
subordinate to $\{C_1,C_2\}$.  The integral is therefore
\[
\int_{S^1} \omega = \sum_{j=1}^2 \int_{S^1} \psi_i \omega
= \int_{]0,2\pi[} \sigma^\ast(\psi_1 \omega)
+ \int_{]-\epsilon,\epsilon[} \sigma^\ast(\psi_2 \omega) \ .
\]
However, since $\omega$ is continuous of the compact set
$\displaystyle S^1$, we can show using one of the convergence theorems
for integrals (i.e. Theorem~\ref{thBCT} or Lebesgue dominated
convergence theorem) that
$\displaystyle \int_{]0,2\pi[} \sigma^\ast(\psi_1 \omega) \to
\int_{]0,2\pi[} \sigma^\ast(\omega)$ and
$\displaystyle \int_{]-\epsilon,\epsilon[} \sigma^\ast(\psi_2 \omega)
\to 0$ as $\epsilon \to 0$.

We have a similar issue when using cylindrical or spherical
coordinates.  For instance, to integrate over the unit ball
$\{\VEC{x} \in \RR^3 : \|\VEC{x}\| = 1\}$, we may use the
parametric representation $\rho(\theta,\phi) =(\cos(\theta)\sin(\phi),
\sin(\theta) \sin(\phi), \cos(\phi))$
for $0 \leq \theta < 2\pi$ and $0 \leq \phi < \pi$.  First of all, this
parametric representation is not properly defined at the poles
because $\rho$ is not one-to-one at the poles.  This parametric
representation yields a local chart
$C_1 = \big( \{(\theta,\phi);0<\theta<2\pi,0<\phi<\pi\},
B_1(\VEC{0}) \setminus \{\sin(\phi), 0, \cos(\phi) : 0\leq \phi<\pi\},
\rho\big)$.  To rigorously compute the
integral over $D$, we must add local charts to cover the region
$\{\sin(\phi), 0, \cos(\phi) : 0\leq \phi<\pi\}$.  For instance,\\
$C_2 = \big( \{(\theta,\phi);-\epsilon<\theta<\epsilon,0<\phi<\pi\},
\rho\big(\{(\theta,\phi);-\epsilon<\theta<\epsilon,0<\phi<\pi\}\big),
\rho\big)$,\\
$C_3 = \big( B_\epsilon(\VEC{0}) \subset \RR^2;
\rho_3(B_\epsilon(\VEC{0})); \rho_3(x,y) = (x,y,\sqrt{1-x^2-y^2}) \big)$
and \\
$C_4 = \big( B_\epsilon(\VEC{0}) \subset \RR^2;
\rho_4(B_\epsilon(\VEC{0})); \rho_4(x,y) = (x,y,-\sqrt{1-x^2-y^2}) \big)$.
Then we use a partition of unity $\{\psi_j\}_{1\leq j \leq 4}$
subordinate to $\{C_j\}_{1\leq j \leq 4}$.  The integral is therefore
\begin{align*}
\int_{S^2} \omega = \sum_{j=1}^4 \int_{S^1} \psi_i \omega
&= \int_{\{(\theta,\phi);0<\theta<2\pi,0<\phi<\pi\}} \rho^\ast(\psi_1 \omega)
+ \int_{\{(\theta,\phi);-\epsilon<\theta<\epsilon,0<\phi<\pi\}}
\rho^\ast(\psi_2 \omega) \\
&\qquad + \int_{B_\epsilon(\VEC{0})} \rho_3^\ast(\psi_3 \omega)
+ \int_{B_\epsilon(\VEC{0})} \rho_4^\ast(\psi_4 \omega) \ .
\end{align*}
However, since $\omega$ is continuous of the compact set
$\displaystyle S^2$, we can show as we mentioned for the integral over
$\displaystyle S^1$ that
$\displaystyle \int_{\{(\theta,\phi);0<\theta<2\pi,0<\phi<\pi\}}
\rho^\ast(\psi_1 \omega)
\to
\int_{\{(\theta,\phi);0<\theta<2\pi,0<\phi<\pi\}} \rho^\ast(\omega)$
and the other three integrals converge to $0$ as $\epsilon \to 0$.
\end{enumerate}
Those are the two situations frequently encountered in the examples,
applications and problems presented later.  We will not refer to this
remark in similar situations but the reader should always have in mind
that such a manipulation is done to justify the use of
Green's and Stokes' theorems.  Our use of Green's and Stokes' theorems
will be more heuristic.
\end{rmk}

\begin{egg}
Consider the vector field                      \label{DG_df4}
\begin{equation} \label{DG_vector_field}
F(\VEC{x}) =
\begin{pmatrix}
x_1 x_2 & x_2 x_3 & x_3
\end{pmatrix}^\top \ .
\end{equation}
Let $S$ be the surface defined by the portion of the cylinder of
radius $3$ and axis $x_3$ which is inside the region defined by
$x_1> 0$, $x_2> 0$ and $0 < x_3 < 2$.  We compute the line
integral of $F$ along $\partial S$.

The selected orientation on the surface $S$ is such that the outward
unit normal to $S$ is pointing away from the $x_3$ axis.  The positive
direction of the line integral on $\partial S$ is the direction for
which the interior of $S$ is to the left when traveling along
$\partial S$ with the upward position in the direction of the outward
unit normal to $S$.

We split $\partial S$ in four curves: $C_1$ is the straight line
from $(3,0,2)$ to $(3,0,0)$, $C_2$ is the arc of radius $3$ from
$(3,0,0)$ to $(0,3,0)$, $C_3$ is the straight line from $(0,3,0)$ to
$(0,3,2)$, and $C_4$ is the arc of radius $3$ from $(0,3,2)$ to
$(3,0,2)$.  The positive directions on $C_1$, $C_2$, $C_3$ and $C_4$
is obtained from the positive direction on $\partial S$.  We plot
$\partial S$ in the following figure.
\figbox{vect_calculus/stokes_ex}{6cm}
In theory, the corners should not be included in the parametric
representation of the four curves above since they are singular
points and do not belong to $S_r$ but, as we have mentioned in
Remark~\ref{rmkSrSsDNM}, they may be included without any
consequences.

For each curve above, we choose a parametric representation of this
curve which is consistent with the orientation on $\partial S$, and
express $F$ along this curve.
\begin{center}
\begin{tabular}{c|l|l|l}
Curve & Parametric & $F$ along the curve & range of $w$ \\
 & Representation & & \\  
\hline
\rule{0em}{2.5em} $C_1$ & $\sigma_1(w) =
\begin{pmatrix} 3 \\ 0 \\ 2 - w \end{pmatrix}$
&$F(\sigma_1(w)) = \begin{pmatrix} 0 \\ 0 \\ 2 - w \end{pmatrix}$
& $0 \leq w \leq 2$ \\[1.5em]
$C_2$ & $\sigma_2(w) = \begin{pmatrix} 3\cos(w) \\ 3\sin(w) \\ 0
\end{pmatrix}$
& $F(\sigma_2(w)) =\begin{pmatrix}9\sin(w) \cos(w) \\ 0 \\ 0
\end{pmatrix}$
& $0 \leq w \leq \pi/2$ \\[1.5em]
$C_3$ & $\sigma_3(w) = \begin{pmatrix} 0 \\ 3 \\ w \end{pmatrix}$
&$F(\sigma_3(w)) = \begin{pmatrix} 0 \\ 3w \\ w \end{pmatrix}$
& $0 \leq w \leq 2$ \\[1.5em]
$C_4$ & $\sigma_4(w) = \begin{pmatrix} 3\sin(w) \\ 3\cos(w) \\ 2
\end{pmatrix}$ &
$F(\sigma_4(w)) = \begin{pmatrix} 9\sin(w)\cos(w) \\ 6\cos(w) \\ 2
\end{pmatrix}$ & $0 \leq w \leq \pi/2$
\end{tabular}
\end{center}
Hence,
\begin{align*}
&\int_C F \cdot \VEC{t} \dx{s} =
\sum_{i=1}^4 \int_{C_i} F \cdot \VEC{t} \dx{s}
= \int_0^2 (0,0,2 - w) \cdot (0,0,-1) \dx{w} \\
&\quad + \int_0^{\pi/2} (9\sin(w) \cos(w), 0, 0) \cdot
(-3\sin(w), 3\cos(w), 0) \dx{w}
+ \int_0^2 (0, 3w, w) \cdot (0, 0, 1) \dx{w} \\
&\quad + \int_0^{\pi/2} (9\sin(w)\cos(w), 6\cos(w), 2) \cdot
(3\cos(w), -3\sin(w), 0) \dx{w}
= -2 -9 + 2 + 0 = -9 \ .
\end{align*}

We now use the classical Stokes' theorem to compute the integral of
the vector field (\ref{DG_vector_field}) along $\partial S$ in the
positive direction of $\partial S$.  The classical Stokes' theorem states that
$\displaystyle
\int_{\partial S} F \cdot \VEC{t} \dx{s} = \int_S \curL F \cdot
\VEC{n} \dx{S}$.  The curl of $F$ is
\[
\curL F = \left(\pdydx{F_3}{x_2}-\pdydx{F_2}{x_3}\right)\VEC{e}_1 
-\left(\pdydx{F_3}{x_1}-\pdydx{F_1}{x_3}\right)\VEC{e}_2
+\left(\pdydx{F_2}{x_1}-\pdydx{F_1}{x_2}\right)\VEC{e}_3 =
\begin{pmatrix}
-x_2 & 0 & -x_1
\end{pmatrix}^\top \ .
\]
To compute the surface integral on $S$, we use cylindrical coordinates
to obtain a parametric representation for $S$.  Namely,
$\displaystyle \rho(w_1, w_2) =
\begin{pmatrix} 3\cos(w_1) & 3\sin(w_1) & w_2 \end{pmatrix}^\top$
for $0 < w_1 < \pi/2$ and $0 < w_2 < 2$.
Hence $\displaystyle \curL F (\rho(\VEC{w})) =
\begin{pmatrix} -3\sin(w_1) & 0 & -3\cos(w_1) \end{pmatrix}^\top$ and
\[
\pdydx{\rho}{w_1} \times \pdydx{\rho}{w_2}
= \begin{pmatrix} 3\cos(w_1) & 3\sin(w_1) & 0 \end{pmatrix}^\top \ .
\]
This form of $\displaystyle \pdydx{\rho}{w_1} \times \pdydx{\rho}{w_2}$
is not surprising because the outward unit normal to $S$ at
$\rho(\VEC{w}) \in S$ is given by $\displaystyle
\VEC{n}(\rho(\VEC{w})) =
\begin{pmatrix} \cos(w_1) & \sin(w_1) & 0 \end{pmatrix}^\top$.
This shows that the parametric representation is consistent with the
orientation on $S$.  Hence
\[
\dx{A} =
\left\| \pdydx{\rho}{w_1} \times \pdydx{\rho}{w_2}\right\|
\dx{w_1}\dx{w_2} = 3\, \dx{w_1}\dx{w_2} \ .
\]
We finally have
\[
\int_S \curL F \cdot \VEC{n} \dx{A} =
3 \int_0^{\pi/2} \int_0^2
(-3\sin(w_1) , 0 , -3\cos(w_1) )\cdot
( \cos(w_1) ,  \sin(w_1) , 0 ) \dx{w_2}\dx{w_1} = -9
\]
as expected.
\end{egg}

\begin{prop}\label{DGconserveB}
Let $\displaystyle F:V \rightarrow \RR^3$ be a continuously
differentiable vector field on a convex open subset $V$ of
$\displaystyle \RR^3$.  If $F$ satisfies
$\curL F = \VEC{0}$ in $V$, then $F$ is conservative.
\end{prop}

\begin{proof}
This is a special case of Theorem~\ref{closedexact} for
differential $1$-forms
$\omega = F_1 \df{x_1} + F_2 \df{x_2} + F_3 \df{x_3}$ because a convex
subset of $\displaystyle \RR^3$ is star-shaped.  Since $\df{\omega} = 0$
(i.e. $\curL F = \VEC{0}$), it follows from Theorem~\ref{closedexact}
that there exists a $0$-form $f$ such that $\df f = \omega$
(i.e. $\graD f = F$).  The conclusion of the proposition follows from
the fundamental theorem of line integral.

We provide another proof of this proposition.  This proof is
interesting in itself because it provides a glance at how Stokes'
theorem could be used to generalize the proposition to surfaces.

Given any closed curve $C$ in $V$, choose a surface $S \subset V$ with
boundary $C$.  A surface $S$ exists because $V$ is convex.  We get
from Stokes's Theorem that
\[
  \oint_C F \cdot \dx{\VEC{s}} = \iint_S \curL F \cdot \dx{\VEC{S}} = 0 \ .
\]
Since $C$ is arbitrary, we get from Proposition~\ref{DGoint} that
$\displaystyle \oint_{\tilde{C}} F \cdot \dx{\VEC{s}}$ is independent of the
path $\tilde{C}$ in $V$ connecting two points $\VEC{a}$ and $\VEC{b}$.  Thus,
$F$ is conservative.
\end{proof}

The set $V$ in the previous proposition must be convex or, more generally,
every curve in $V$ must be continuously contractible in $V$ to a point
in $V$ so that we may claim that it is the boundary of a
surface in $V$ (such curve is said to be ``continuously homotopic'' to
a point).  For instance, consider the non-convex set 
$V = \RR^3 \setminus \{(0,0,x_3) : x_3 \in \RR\}$.  There is no
surface in $V$ that has the circle
$C = \{ (x_1,x_2,0): x_1^2 + x_2^2 =1 \}$ as its boundary.

\begin{theorem}[Divergence Theorem]\label{StandardDivTh}
Let $\displaystyle S \subset \RR^3$ be a compact $3$-dimension
manifold of class $\displaystyle C^1$ with a boundary.  Suppose that
$\displaystyle F:\RR^3\to \RR^3$ is a
vector field of class $\displaystyle C^1$.  Then
\begin{equation}\label{diff_geom_div}
\int_S \diV F \dx{V} = \int_{\partial S} F \cdot \VEC{n} \dx{A} \ ,
\end{equation}
where $\VEC{n}(\VEC{u})$ is the outward unit normal to $\partial S$ at
$\VEC{u} \in \partial S$ as given in Definition~\ref{manifOutNormal}
(Figure~\ref{div}).
\end{theorem}

Recall that if
$[(\VEC{u}, \VEC{v}_1(\VEC{u})), (\VEC{u}, \VEC{v}_2(\VEC{u}))]$ is
the orientation on $\TS_{\VEC{u}} \partial S$ for
$\VEC{u} \in \partial S$, then\\
$[(\VEC{u}, \VEC{n}(\VEC{u})), (\VEC{u}, \VEC{v}_1(\VEC{u})),
(\VEC{u}, \VEC{v}_2(\VEC{u}))] =
[(\VEC{u},\VEC{e}_1),(\VEC{u},\VEC{e}_2), (\VEC{u},\VEC{e}_3)]$, the
standard orientation on\\
$\displaystyle \TS_{\VEC{u}} S \cong \RR^3$ for
$\VEC{u} \in \partial S$.

The expressions $\dx{A}$ and $\dx{V}$ in the statement of the previous
theorem refer to the volume elements on a $2$-dimensional manifold and
a $3$-dimensional manifold respectively. If the $2$-dimensional
manifold $S$ is a surface given by a parametric representation, then
$\dx{S}$ can be replaced by the expression in (\ref{classicvolelem2D})
when computing the integral.  As for
$\dx{V} = \df{x_1} \wedge \df{x_2} \wedge \df{x_3}$, it can simply be
replaced by $\dx{x_1}\dx{x_2}\dx{x_3}$.

\pdfF{vect_calculus/Div}{Divergence Theorem}{Illustration associated
to the statement of the divergence theorem, Theorem~\ref{StandardDivTh}.}{div}

\begin{proof}
This is a special case of Stokes' theorem, Theorem~\ref{TheStokesTh},
with $\omega = F_1 \df{x_2}\wedge\df{x_3} + F_2 \df{x_3}\wedge\df{x_1}
+ F_3 \df{x_1}\wedge\df{x_2}$.  We have
\[
  \int_{\partial S} \omega = \int_S \df{\omega} \ ,
\]
where
$\df{\omega} = (F_1 + F_2 + F_3) \df{x_1}\wedge \df{x_2} \wedge \df{x_3}
= (\diV F) \df{x_1}\wedge \df{x_2} \wedge \df{x_3}$
and
\begin{align*}
(F \cdot \VEC{n}) \dx{A}
&= F_1 n_1 \dx{A} + F_2 n_2 \dx{A} + F_3 n_3 \dx{A} \\
&= F_1 \df{x_2}\wedge\df{x_3} + F_2 \df{x_3}\wedge \df{x_1}
+ F_3 \df{x_1}\wedge\df{x_2}
= \omega
\end{align*} because
$\displaystyle n_1 \dx{A} = \df{x_2}\wedge\df{x_3}$,
$\displaystyle n_2 \dx{A} = \df{x_3}\wedge\df{x_1}$ and
$\displaystyle n_3 \dx{A} = \df{x_1}\wedge\df{x_2}$ on $\partial S$
according to Theorem~\ref{manifVFXYZT}.
\end{proof}

Remark~\ref{rmkImport} is also valid for the divergence theorem.

\begin{egg}
We again consider the vector field $F$            \label{DG_df5}
given in (\ref{DG_vector_field}).  Let $V$ be the open
half-sphere $\displaystyle x_1^2+x_2^3+x_3^2<4$ with $x_3> 0$.
The region $V$ is drawn in following figure.
\figbox{vect_calculus/div_ex}{6cm}
We compute the surface integral of $F$ over $S = \partial V$.  The
orientation on $S$ is associated to the normal pointing outside of $V$.

We split $S$ in two: $S_1$ is the upper part of the sphere
of radius $2$ centred at the origin, and $S_2$ is the disk of radius
$2$ centred at the origin in the $x_1,x_2$ plane.

A parametric representation of $S_1$ is given by
\[
\rho_1(\VEC{w}) =
\begin{pmatrix}
2\cos(w_2)\sin(w_1) & 2\sin(w_2)\sin(w_1) & 2\cos(w_1)
\end{pmatrix}^\top
\]
for $0 < w_1 < \pi/2$ and $0 < w_2 < 2\pi$.
Hence
\[
\pdydx{\rho_1}{w_1}(\VEC{w}) \times \pdydx{\rho_1}{w_2}(\VEC{w})
= \begin{pmatrix}
4\cos(w_2)\sin^2(w_1) & 4\sin(w_2)\sin^2(w_1) & 4\sin(w_1)\cos(w_1)
\end{pmatrix}^\top \ .
\]
Note that
$\displaystyle \rho_1\left(\frac{\pi}{4},0\right) = \begin{pmatrix}
\sqrt{2} & 0 & \sqrt{2} \end{pmatrix}^\top$ and
$\displaystyle
\left( \pdydx{\rho_1}{w_1} \times \pdydx{\rho_1}{w_2}\right)
\left(\frac{\pi}{4},0\right) = \begin{pmatrix} 2 & 0 & 2 \end{pmatrix}^\top$.
This is a vector pointing outside $V$ as required by the
orientation on $S_1$.  Thus, our choice of orientation is
consistent with the orientation on $S_1$.  If it has not been the
case, then we could have changed the parametric representation by inverting the
coordinate names $w_1$ and $w_2$ for instance to obtain a representation
consistent with the orientation on $S_1$.
We have that
$\displaystyle \left\|\pdydx{\rho_1}{w_1}(\VEC{w}) \times 
\pdydx{\rho_1}{w_2}(\VEC{w})\right\| = 4 \sin(w_1)$ and
$\dx{A} = 4 \sin(w_1) \dx{w_1}\dx{w_2}$.

A parametric representation of $S_2$ is given by
\[
\rho_2(\VEC{w}) =  \begin{pmatrix}
w_2\cos(w_1) & w_2\sin(w_1) & 0 \end{pmatrix}^\top
\]
for $0 < w_1 < 2\pi$ and $0 < w_2 < 2$.
Again, $\displaystyle \pdydx{\rho_2}{w_1}(\VEC{w}) \times
\pdydx{\rho_2}{w_2}(\VEC{w}) = \begin{pmatrix}
0 & 0 & -w_2 \end{pmatrix}^\top$ is a vector pointing outside $V$ as
required by the orientation on $S_2$.  The attentive reader may have
realized that there is a problem at the origin with the parametric
representation $\rho_2$.  The function $\phi_2$ is not
one-to-one because $\rho_2(0,w_1) = \VEC{0}$ for $0 < w_1 < 2\pi$.
Moreover, it cannot be used to define the outward unit
vector since $\rho_2(\VEC{0}) = \VEC{0}$.  Nevertheless, we may still
use this parametric representation because
$\displaystyle \int_{S_2} F \cdot \VEC{n} \dx{A}
= \int_{S_2 \setminus \{\VEC{0}\}} F \cdot \VEC{n} \dx{A}$ since
a set with a single point represent a set of measure zero.
We have that
$\displaystyle \left\|\pdydx{\rho_2}{w_1}(\VEC{w}) \times 
\pdydx{\rho_2}{w_2}(\VEC{w})\right\| = w_2$ and
$\dx{A} = w_2 \dx{w_1}\dx{w_2}$ for $w_2>0$.

The integral on $S$ is given by
\begin{align*}
\int_S F \cdot \VEC{n} \dx{A} &= 
\sum_{i=1}^2 \int_{S_i} F \cdot \VEC{n} \dx{A} \\
&= \int_0^{2\pi} \int_0^{\pi/2}
\big(4\sin(w_2)\cos(w_2)\sin^2(w_1), 4\sin(w_2)\sin(w_1)\cos(w_1),
2\cos(w_1)\big) \\
& \qquad \cdot
\big(4\cos(w_2)\sin^2(w_1),4\sin(w_2)\sin^2(w_1),4\sin(w_1)\cos(w_1)\big)
\dx{w_1}\dx{w_2} \\
&+ \int_0^2 \int_0^{2\pi} \big(w_2^2\sin(w_1)\cos(w_1), 0, 0\big) \cdot 
\big(0, 0, - w_2\big) \dx{w_1}\dx{w_2}
= \frac{28}{3}\pi + 0 = \frac{28}{3}\pi \ .
\end{align*}
We could have obtained the value of the integral of $F$ over
$S_2$ without doing any computation because at each point of $S_2$ the
outward unit vector to $S_2$, namely $\VEC{e}_3$, is also
perpendicular to the vector field $F$.  In order words, the vector
field $F$ is tangent to $S_2$ and thus nothing goes in or out of
$V$ through $S_2$.

We use the divergence theorem to compute the surface integral of the
vector field (\ref{DG_vector_field}) over $S$.  The divergence theorem
states that
\[
\int_S F \cdot \VEC{n} \dx{A} = \int_V \diV F \dx{V} \ .
\]
To compute the volume integral, we use the spherical coordinates
provided by
\begin{align*}
\rho(\VEC{w}) = \begin{pmatrix} w_3\cos(w_1)\sin(w_2) &
w_3\sin(w_1)\sin(w_2) & w_3\cos(w_2) \end{pmatrix}^\top
\end{align*}
for $0< w_3 < 2$, $0 < w_1 < 2\pi$ and $0< w_2 < \pi/2$.
The volume element on $V$ is
$\dx{V} = \df{x_1}\wedge \df{x_2} \wedge \df{x_3}$.  Its local
representation using the spherical coordinates is
$\rho^\ast \dx{V} = w_3^2 \sin(w_2) \dx{w_1}\wedge \dx{w_2}\wedge \dx{w_3}$.
In the classical notation, this is
$\dx{V} = w_3^2 \sin(w_2) \dx{w_1}\dx{w_2}\dx{w_3}$.

Since
\[
\diV F(\VEC{x}) = \pdydx{F_1}{x_1}(\VEC{x}) + \pdydx{F_2}{x_2}(\VEC{x}) +
\pdydx{F_3}{x_3}(\VEC{x}) = x_2 + x_3 + 1 \ ,
\]
we get
\begin{align*}
&\int_V \diV F \dx{x_1}\dx{x_2}\dx{x_3} \\
& \qquad = \int_0^2 \int_0^{2\pi} \int_0^{\pi/2}
(w_3\sin(w_1)\sin(w_2) + w_3\cos(w_2) + 1) w_3^2 \sin(w_2)
\dx{w_2}\dx{w_1}\dx{w_3} = \frac{28}{3}\pi
\end{align*}
as expected.
\end{egg}

\begin{prop}\label{DGclosedexact}
Let $\displaystyle F:V \rightarrow \RR^3$ be a continuously
differentiable vector field on a convex open subset $V$ of
$\displaystyle \RR^3$.  If $F$ satisfies
$\diV F = 0$ in $V$, then $F = \curL G$ for some continuously
differentiable vector field $\displaystyle G:V \to \RR^3$.
\end{prop}

\begin{proof}
This is in fact a special case of Theorem~\ref{closedexact} for
differential $2$-forms
$\omega = F_1 \df{x_2} \wedge \df{x_3} + F_2 \df{x_3} \wedge \df{x_1}
+ F_3 \df{x_1} \wedge \df{x_2}$ because a convex subset of
$\displaystyle \RR^3$ is star-shaped.  Since $\df{\omega} = 0$ (i.e.
$\diV F = 0$),  it follows from Theorem~\ref{closedexact} that there
exists a $1$-form
$\tau = G_1 \df{x_1} + G_2 \df{x_2} + G_3 \df{x_3}$ such that
$\df \tau = \omega$ (i.e. $F = \curL G$).
\end{proof}

\begin{rmk}
In the previous proposition, if $\curL G = F$, then      \label{CEtrick}
$\curL(G + \graD g) = F$ for all twice continuously differentiable
functions $g:V \to \RR$.  We may therefore assume when we are trying
to find $G$ that the one of the components of $G$ is null on $V$.
For instance, we may look for $G = (G_1,G_2,0)$ such that
\[
  \curL G = \left( -\pdydx{G_2}{z},\, \pdydx{G_1}{z} ,\, \pdydx{G_2}{x} -
    \pdydx{G_1}{y} \right) = ( F_1, F_2, F_3) \ ,
\]
for $G = (G_1,0,G_3)$ such that
\[
  \curL G = \left( \pdydx{G_3}{y},\, \pdydx{G_1}{z} - \pdydx{G_3}{x},\,
 - \pdydx{G_1}{y} \right) = ( F_1, F_2, F_3)
\]
or for $G = (0, G_2,G_3)$ such that
\[
  \curL G = \left( \pdydx{G_3}{y} - \pdydx{G_2}{z},\, -\pdydx{G_3}{x} ,\,
    \pdydx{G_2}{x} \right) = ( F_1, F_2, F_3) \ .
\]
This is quite useful in applications.
\end{rmk}

\section{Applications}

One of our goal in these lecture notes is to present the theory behind what
is usually called vector calculus.  However, it would not be acceptable to
not include some geometrical and physical interpretation of the
theory.  This was the historical motivation for the development of
differential geometry and it is still the main reason to use
differential geometry.  Our presentation will be elementary and heuristic.

In this section, the reader must be aware that we will sometime switch
from the algebraic to the geometric notations for vectors and
vice-versa when one notation is more convenient than the other.
This is something that we have done occasionally in the past but will
be done more frequently in this section.  In particular, if $\VEC{v}$
and $\VEC{w}$ are two vectors in $\displaystyle \RR^n$,
then $\displaystyle \VEC{v}\cdot \VEC{w} = \VEC{v}^\top \VEC{w}
= \VEC{w}^\top \VEC{v}$.

\subsection{Tangent Vector, Curvature and Torsion}

We start with the basic concept of tangent line to a curve.
Let $C$ is a curve in $\displaystyle \RR^3$ with a continuously
differentiable parametric representation
$\displaystyle \sigma:]a,b[ \rightarrow \RR^3$.
The basic definition of derivative as a limit of secants shows that
$\sigma'(w)$ is a tangent vector to the curve $C$ at
$\sigma(w)$ for $w \in ]a,b[$, and $\sigma'(w)$ points in the
direction of increasing $w$.

If the parametric representation is consistent with the orientation on
$C$, then\\
$[(\sigma(w),\sigma'(w))]$ is the orientation on
$\TS_{\sigma(w)} C$ for $w \in ]a,b[$.  In this section, we will
always assume that the parametric representation is consistent with
the orientation on $C$.  Recall that the tangent unit vector
to $C$ at $\VEC{u} = \sigma(w) \in C$ is given by
\[
\VEC{t}(\VEC{u}) = \VEC{t}(\sigma(w))
= \|\sigma'(w)\|^{-1} \sigma'(w) \ .
\]

\begin{egg}
Consider the curve $C$ in $\displaystyle \RR^3$      \label{DG_df1}
given by the parametric representation\\
$\sigma(w) = \begin{pmatrix} w\cos(w) & w\sin(w)  & w \end{pmatrix}^\top$
for $w\in\RR$.  We have drawn a section of this curve in the following figure.
\figbox{vect_calculus/diff_geom01}{6cm}
The vector $\sigma'(w)$ is tangent to the curve $C$ at $\VEC{u} = \sigma(w)$
and points in the direction of increasing $w$.  From a mechanical point of
view, $\sigma'$ is the (directional) velocity of a particle
traveling along the curve.

We have
\[
\VEC{t}(\VEC{u}) = \VEC{t}(\sigma(w))
= \|\sigma'(w)\|^{-1} \sigma'(w)
= \frac{1}{\sqrt{2+w^2}}
\begin{pmatrix}
\cos(w)-w\sin(w) \\ \sin(w) +w\cos(w) \\ 1 
\end{pmatrix}
\]
for $\VEC{u} = \sigma(w) \in C$.  A parametric representation of the
tangent line to the curve $C$ at $\sigma(10)$ is given by
$s \mapsto \sigma(10) + s\, \VEC{t}(10)$
% \[
% \begin{pmatrix}
% 10\cos(10) + u(\cos(10) - 10 \sin(10))/\sqrt{102} \\
% 10\sin(10) + u(\sin(10) + 10 \cos(10))/\sqrt{102} \\
% 10 + u/\sqrt{102}
% \end{pmatrix}
% \]
for $s \in \RR$.  We have drawn the curve $C$ and its tangent line at
$\sigma(10)$ (in blue) in the following figure.
\figbox{vect_calculus/diff_geom02}{6cm}
\end{egg}

As before, let $\displaystyle C \subset \RR^3$ be a curve and
$\displaystyle \sigma:]a,b[\rightarrow \RR^3$ be a
sufficiently differentiable parametric representation of $C$
consistent with the orientation on $C$.

\begin{lemma} \label{UnitOrhtog}
Suppose that $\displaystyle g:]a,b[ \to \RR^n$ is a differentiable vector valued
function such that $\|g(w)\| = c$, a constant, for all $w \in ]a,b[$.
Then $g'(w)$ is orthogonal to $g(w)$ for all $w \in ]a,b[$.
\end{lemma}

\begin{proof}
If we derive both sides of $\displaystyle g(w) \cdot g(w) = c^2$ with respect to
$w$, then we get $2 g'(w) \cdot g(w) = 0$ for all $w \in ]a,b[$.
Therefore $g'(w)$ is orthogonal to $g(w)$ for all $w \in ]a,b[$.
\end{proof}

Since $\|\VEC{t}(\sigma(w))\| = 1$ for all $w \in ]a,b[$, we may apply
the previous lemma with $g(w) = \VEC{t}(\sigma(w))$ to find that
\begin{equation} \label{diffTEqu}
\dfdx{\big(\VEC{t}(\sigma(w))\big)}{w}
= \dfdx{\left(\|\sigma'(w)\|^{-1} \sigma'(w)\right)}{w}
= \|\sigma'(w)\|^{-3} \big( \sigma'(w) \times \big(\sigma'(w) \times
\sigma''(w)\big)\big) \ .
\end{equation}
is orthogonal to $\VEC{t}(\sigma(w))$ for all $w \in ]a,b[$.  It
follows from the definition of $\VEC{t}(\sigma(w))$ that
$\displaystyle \dfdx{\big(\VEC{t}(\sigma(w))\big)}{w}$ and
$\sigma'(w)$ are orthogonal.  This is also obvious from
(\ref{diffTEqu}) and the properties of the cross product.

The {\bfseries curvature vector}\index{Curve!Curvature Vector} of $C$ at
$\VEC{u} = \sigma(w) \in C$ is defined by
\begin{equation}  \label{curvatureEq1}
\VEC{k}(\VEC{u}) = 
= \|\sigma'(w)\|^{-4} \big( \sigma'(w) \times \big(\sigma'(w) \times
\sigma''(w)\big)\big) \ .
\end{equation}
For each $w\in ]a,b[$, this vector points in the direction of the
``centre of the arc'' represented ``locally'' by the curve $C$
near $\VEC{u} = \sigma(w)$.  The vector $\VEC{k}(\VEC{u})$ is perpendicular to
the tangent vector $\VEC{t}(\VEC{u})$ to the curve $C$ at
$\VEC{u} \in C$.
The {\bfseries curvature}\index{Curve!Curvature}
$\kappa(\VEC{u})$ of $C$ at $\VEC{u}$ is the Euclidean norm of
$\VEC{k}(\VEC{u})$.  For $\kappa(\VEC{u}) \neq 0$, the ratio
$1/\kappa(\VEC{u})$ is called the
{\bfseries radius of curvature}\index{Curve!Radius of Curvature}.  If
$\kappa(\VEC{u})=0$ for all $\VEC{u} \in C$, then we have that $C$ is a
straight line.

Since $\sigma'(w)$ and $\sigma'(w) \times \sigma''(w)$ are orthogonal,
we have that
$\|\sigma'(w) \times (\sigma'(w) \times \sigma''(w))\|
= \|\sigma'(w) \|\, \|\sigma'(w) \times \sigma''(w)\| \sin(\pi/2)
=  \|\sigma'(w) \|\, \|\sigma'(w) \times \sigma''(w)\|$. Hence,
the curvature of $C$ at $\VEC{u} = \sigma(w) \in C$ is given by
\begin{equation}\label{DGcurvature}
\kappa(\VEC{u}) = \frac{\|\sigma''(w) \times \sigma'(w) \|}
{\|\sigma'(w)\|^3} \ .
\end{equation}

We will generalize the definition of curvature vector and curvature in
Sections~\ref{sectRiemannCurv} and \ref{sectGeodesic} later.

\begin{rmk}
Why did we introduce this extra factor $\displaystyle \|\sigma'(w)\|^{-1}$ in
(\ref{curvatureEq1})?  It does not even transform $\VEC{k}(\VEC{u})$
to a unit vector.

It is based on the fact the
{\bfseries tangent vector}\index{Curve!Tangent Vector}
and {\bfseries curvature vector}\index{Curve!Curvature Vector}
to a curve $C$ at a point $\VEC{u} = \sigma(w)$ of $C$ are defined by
$\VEC{t}(\VEC{u}) = \sigma'(w)$ and $\VEC{k}(\VEC{u}) = \sigma''(w)$
if $C$ is parameterized by arc length as we have introduced in
Subsection~\ref{ALNAL}.

Suppose that $\displaystyle \sigma : [a,b] \to \RR^3$ is a curve of
length $L$ such that $\sigma'(w) \neq \VEC{0}$ for all $w \in [a,b]$.
Then we can use the arc length function $s:[a,b] \to [0,L]$ given in
Definition~\ref{defnALF} to obtain a parametric representation
$\displaystyle \breve{\sigma} = \sigma \circ s^{-1}:[0,L] \to \RR^3$
such that $C$ is parameterized by arc length with $\breve{\sigma}$.
Recall that $s'(t) = \|\sigma(t)\|$ for all $t \in ]a,b[$.
This parametric representation is often called the {\bfseries natural
parametric representation}\index{Curve!Natural Parametric Representation}
of the curve $C$.  With this representation, we have that the tangent
unit vector to $C$ at $\VEC{u} = \breve{\sigma}(t)$ is
$\displaystyle \VEC{t}(\VEC{u}) = \breve{\sigma}'(t)$ because
$\displaystyle \|\breve{\sigma}'(t)\| = 1$ for all $t \in ]0,L[$.
The curvature vector of $C$ at $\VEC{u} = \breve{\sigma}(t) \in C$ is
then simply $\VEC{k}(\VEC{u}) = \breve{\sigma}''(t)$.

Using the chain rule, we find for
$\VEC{u} = \sigma(w) = \breve{\sigma}(s(w))$ that
\begin{align*}
\VEC{t}(\VEC{u}) &= \breve{\sigma}'(t)\big|_{t=s(w)}
=\dfdx{\big(\sigma(w)\big)}{w}\Big|_{w = s^{-1}(s(w))} \,
\dfdx{\big(s^{-1}(t)\big)}{t}\Big|_{t = s(w)} \\
&= (s'(w))^{-1} \sigma'(w) = \|\sigma'(w)\|^{-1} \sigma'(w)
\end{align*}
and
\begin{align*}
\VEC{k}(\VEC{u}) &= \breve{\sigma}''(t)\big|_{t=s(w)}
= \dfdx{\big(\breve{\sigma}'(t)\big)}{w}\Big|_{w = s^{-1}(s(w))}
\,\dfdx{\big(s^{-1}(t)\big)}{t} \Big|_{t = s(w)}  \\
&= \|\sigma'(w)\|^{-1}
\dfdx{\left(\|\sigma'(w)\|^{-1} \sigma'(w)\right)}{w}
\end{align*}
as we have defined above.   This justify the extra factor
$\displaystyle \|\sigma'(w)\|^{-1}$ in (\ref{curvatureEq1}).

Though the formulae for the tangent unit vector and the curvature
vector are much simpler when the natural parametric representation of
the curve $C$ is used, they are not very useful in practice because
the natural parametric representation has to be found first.  The
natural parametric representation may often not be the simplest
parametric representation for computations.
\end{rmk}

\begin{egg}[Example~\ref{DG_df1} (Continued)]
We compute the curvature of the curve $C$ defined    \label{DG_df2}
by the parametric representation $\sigma$ given in Example~\ref{DG_df1}.

Since the second derivative of $\sigma$ is
\[
\sigma''(w) =
\begin{pmatrix}
- 2\sin(w) - w\cos(w) & 2\cos(w) - w\sin(w) & 0
\end{pmatrix}^\top
\]
for all $w \in \RR$.
We get from (\ref{curvatureEq1}) that the curvature vector of $C$ at
$\VEC{\VEC{u}} = \sigma(w) \in C$ is
\[
\VEC{k}(u) = \frac{1}{(2+w^2)^2}
\begin{pmatrix}
-^3 \cos(w) -w^2 \sin(w) - 3w \cos(w) - 4 \sin(w) \\
-w^3 \sin(w) + w^2 \cos(w) - 3w \sin(w) + 4 \cos(w) \\
-w
\end{pmatrix}
\]
and we get from (\ref{DGcurvature}) that the curvature at
$\sigma(10)$ is $\kappa(10) \approx 0.099508407$.

From a mechanical point of view, $\sigma''(\VEC{u})$ is the directional
acceleration of a particle travelling along the curve.

A parametric representation of the line parallel to the curvature
vector to $C$ at $\sigma(10)$ is given by
$s \mapsto \sigma(10) + s\, \VEC{k}(10)$ for $s \in \RR$.
We have drawn the curve $C$, its tangent line
(in blue) and a line parallel to its curvature vector (in red) at
$\sigma(10)$ in the following figure.
\figbox{vect_calculus/diff_geom03}{6cm}
\end{egg}

Let $\displaystyle \VEC{N}(\VEC{u}) = \|\VEC{k}(\VEC{u})\|^{-1} \VEC{k}(\VEC{u})
= (\kappa(\VEC{u}))^{-1}\VEC{k}(\VEC{u})$ and
$\displaystyle \VEC{B}(\VEC{u}) = \VEC{t}(\VEC{u}) \times \VEC{N}(\VEC{u})$
for $\VEC{\VEC{u}} \in C$.
The vector $\VEC{N}(\VEC{u})$ is called the
{\bfseries principal normal}\index{Surface!Principal Normal} and
$\VEC{B}(\VEC{u})$ is called the
{\bfseries binormal vector}\index{Surface!Binormal Vector}
to the curve $C$ at $\VEC{u}$.
Since $\VEC{B}(\VEC{u})$ is a unit vector orthogonal to the plane
generated by $\VEC{t}(\VEC{u})$ and $\VEC{N}(\VEC{u})$, we have that
$\VEC{t}(u)$, $\VEC{N}(u)$ and $\VEC{B}(u)$ are three unit
vectors that form a right handed system of mutually orthogonal vectors
moving along the curve $C$.

Since $\VEC{B}(\sigma(w))$ is of norm one for all $w \in ]a,b[$, we have from
Lemma~\ref{UnitOrhtog} that\\
$\displaystyle \dfdx{\VEC{B}(\sigma(w))}{w}$ is orthogonal to
$\VEC{B}(\sigma(w))$ for all $w \in ]a,b[$.  We also have that
$\displaystyle \dfdx{\VEC{B}(\sigma(w))}{w}$ is orthogonal to
$\VEC{t}(\sigma(w))$ for all $w \in ]a,b[$ because
\[
\dfdx{\VEC{B}(\sigma(w))}{w} = \left(\dfdx{\VEC{t}(\sigma(w))}{w} \right)
\times \VEC{N}(\sigma(w)) + \VEC{t}(\sigma(w)) \times
\dfdx{\VEC{N}(\sigma(w))}{w}
= \VEC{t}(\sigma(w)) \times \dfdx{\VEC{N}(\sigma(w))}{w}
\]
for all $w \in ]a,b[$ since
$\displaystyle \left(\dfdx{\VEC{t}(\sigma(w))}{w} \right)$ and
$\VEC{N}(\sigma(w))$ are both parallel to $\VEC{k}(\sigma(w))$.
Hence
$\displaystyle \dfdx{\VEC{B}(\sigma(w))}{w} \cdot \VEC{t}(\sigma(w)) = 0$
for all $w\in ]a,b[$ because
$\displaystyle \VEC{t}(\sigma(w)) \times \dfdx{\VEC{N}(\sigma(w))}{w}$
is orthogonal to $\VEC{t}(\sigma(w))$.
Since
$\displaystyle \dfdx{\VEC{B}(\sigma(w))}{w}$ is orthogonal to both
$\VEC{t}(\sigma(w))$ and $\VEC{B}(\sigma(w))$ for all $w \in ]a,b[$,
we get
\[
\dfdx{\VEC{B}(\sigma(w))}{w} = -\tau(\sigma(w))
\,\|\sigma'(w)\|\, \VEC{N}(\sigma(w))
\]
for some number $\tau(\sigma(w))$.
The {\bfseries torsion}\index{Curve!Torsion} of the curve $C$
at $\VEC{u} = \sigma(w) \in C$ is $\tau(\VEC{u})$.

If the torsion is zero for all $\VEC{u} \in C$, then the curve $C$ is
in a fixed plane.  With a little bit of patience, the reader may
verify that
\begin{equation}\label{DGtorsion}
\tau(\sigma(w)) = \frac{(\sigma'(w) \times \sigma''(w)) \cdot
\sigma'''(w)}{\|\sigma'(w) \times \sigma''(w)\|^2}
\end{equation}
for all $w \in [a,b]$.  The triple product
$(\sigma'(u) \times \sigma''(u)) \cdot \sigma'''(u)$ is
the determinant of the matrix
$\displaystyle \begin{pmatrix} \sigma'(w) & \sigma''(w) & \sigma'''(w)
\end{pmatrix}$.

\begin{egg}[Example~\ref{DG_df2} (Continued)]
We compute the torsion of the curve $C$ of      \label{DG_df3}
Example~\ref{DG_df1} at $\sigma(10)$.

We have
$\displaystyle \sigma'''(w) = \begin{pmatrix}
- 3\cos(w) + w\sin(w) & - 3\sin(w) - w\cos(w) & 0 \end{pmatrix}^\top$
for all $w \in \RR$.

Hence, we get from (\ref{DGtorsion}) that the torsion is
$\tau(10) \approx 0.010087552$.  We also have
\[
\VEC{B}(\sigma(w)) = \frac{1}{\kappa(\sigma(w)) (2+w^2)^{5/2}}
\begin{pmatrix}
w^3 \sin(w) - 2 w^2\cos(w) + 2 w \sin(w) - 4 \cos(w) \\
-w^3 \cos(w) -2 w^2\sin(w) -2 w \cos(w) - 4 \sin(w) \\  
w^4 + 4w^2 + 4
\end{pmatrix}
\]
for $w \in \RR$.

A parametric representation of the line parallel to the direction of
the binormal vector $\VEC{B}(\sigma(10))$ of $C$ at $\sigma(10)$ is
given by $s \mapsto \sigma(10) + s \VEC{B}(10)$ for $s \in \RR$.
We have drawn the curve $C$, its tangent line
(in blue), the line parallel to its principal normal (in red), and the
line parallel to its binormal vector (in magenta) at $\sigma(10)$
in the following figure.
\figbox{vect_calculus/diff_geom04}{6cm}
\end{egg}

\subsection{Physical Interpretations}

As it is typical in physical applications of mathematics, we will
allow ourselves a more liberal use of some mathematical concepts in
this section.  In particular, limits will be interpreted intuitively
and with a more visual interpretation.

\subsubsection{Flux of a Vector Field}\label{FluxReprRMK}

The surface integral of a vector field
$F = F_1 \VEC{e}_1 +F_2\VEC{e}_2 + F_3\VEC{e}_3$ over a oriented
surface $S$ gives the flux of the vector field $F$ through the
surface $S$ in the direction of the unit normal to $S$ associated to
the orientation on $S$.  To motivate this statement, we need to
go back to the definition of the Riemann integral.

Let $I_2 = [0,1]\times [0,1]$.
Suppose that $\displaystyle \rho: I_2 \rightarrow \RR^3$ is a
parametric representation of class $\displaystyle C^1$ consistent with
the orientation on the surface $S$.   This
parametric representation is such that
$\displaystyle \pdydx{\rho}{w_1} \times \pdydx{\rho}{w_2}$ points
in the direction of the outward unit normal $\VEC{n}$ to $S$
associated with the orientation on $S$.

Suppose that $P = \{P_1,P_2\}$ is a partition of $I_2$ given by the partitions
$\displaystyle P_1 = \{w_{1,i}: 0 \leq i \leq N_1\}$ and
$\displaystyle P_2 = \{w_{2,i} : 0 \leq i \leq N_2\}$ of the $w_1$
and $w_2$ axes respectively.  Moreover, suppose that the points in
the two partitions $P_1$ and $P_2$ are equally spaced; namely, there
are two constants $\Delta w_1$ and $\Delta w_2$ such that
$\Delta w_1 = w_{1,i+1}-w_{1,i}$ for $0<i \leq N_1$ and
$\Delta w_2 = w_{2,i+1}-w_{2,i}$ for $0<j \leq N_2$.  We have that
\begin{align*}
&F(\rho(w_{1,i},w_{2,j})) \cdot
\left( \pdydx{\rho}{w_1}(w_{1,i},w_{2,j}) \times
\pdydx{\rho}{w_2}(w_{1,i},w_{2,j}) \right) \Delta w_{1,i} \ \Delta w_{2,j} \\
& \qquad = \det
\begin{pmatrix}
F_1(\rho(w_{1,i},w_{2,j})) & F_2(\rho(w_{1,i},w_{2,j})) &
  F_3(\rho(w_{1,i},w_{2,j})) \\[0.5em]
\displaystyle \pdydx{\rho_1}{w_1}(w_{1,i},w_{2,j}) \Delta w_1 &
\displaystyle \pdydx{\rho_2}{w_1}(w_{1,i},w_{2,j}) \Delta w_1 &
\displaystyle \pdydx{\rho_3}{w_1}(w_{1,i},w_{2,j}) \Delta w_1 \\[1em]
\displaystyle \pdydx{\rho_1}{w_2}(w_{1,i},w_{2,j}) \Delta w_2 &
\displaystyle \pdydx{\rho_2}{w_2}(w_{1,i},w_{2,j}) \Delta w_2 &
\displaystyle \pdydx{\rho_3}{w_2}(w_{1,i},w_{2,j}) \Delta w_2
\end{pmatrix}
\end{align*}
is the volume of the box defined by the vectors
$F(\rho(w_{1,i},w_{2,j}))$,
$\displaystyle \pdydx{\rho}{w_1}(w_{1,i},w_{2,j}) \Delta w_1$ and
$\displaystyle \pdydx{\rho}{w_2}(w_{1,i},w_{2,j}) \Delta w_2$ that we have
drawn in Figure~\ref{FluxRepr}.  This is an approximation of the
volume of fluid that pass through the little region
$\rho([w_{1,i},w_{1,i+1}]\times[w_{2,j},w_{2,j+1}])$ of $S$ in the direction
of the outward unit normal to $S$.

\pdfF{vect_calculus/FluxRepr}{The integral of the vector field through a
surface is the flux through the surface}{The representation of one of
the terms of the Riemann sum for the integral of the vector
field $F$ on a surface.  The volume of the box is an approximation of the
flux through the little patch in the direction of the outward unit
normal to the surface.}{FluxRepr}

Since $F$ is continuous and $\rho$ are continuously differentiable, we
have that $F \cdot \VEC{n}$ is Riemann integrable.  Hence, the total
volume of fluid that goes through $S$ in the direction of the
outward unit normal to the surface $S$ is given by the limit
\begin{align*}
&\lim_{\max\{\Delta w_1,\Delta w_2\} \to 0}
\sum_{\substack{1 \leq i \leq N_1\\1 \leq j \leq N_2}}
F(\rho(w_{1,i},w_{2,j})) \cdot \left( \pdydx{\rho}{u}(w_{1,i},w_{2,j})
\times \pdydx{\rho}{v}(w_{1,i},w_{2,j}) \right) \Delta w_{1,i} \
\Delta w_{2,j} \\
&\qquad \qquad =
\iint_{I_2} F(\rho(w_1,w_2)) \cdot \left(\pdydx{\rho}{w_1}(w_1,w_2)
\times \pdydx{\rho}{w_2}(w_1,w_2)\right) \dx{w_1}\dx{w_2}
= \iint_S F \cdot \VEC{n} \dx{A} \ .
\end{align*}

\subsubsection{A Physical Interpretation of the Divergence}

A vector field $\displaystyle F:\RR^3 \to \RR^3$ can be associated to
a system of differential equations $\sigma'(t) = F(\sigma(t))$.
Students learn in their first course on ordinary differential
equations that, given $\displaystyle \VEC{y} \in \RR^3$ and a vector field
$F$ of class $\displaystyle C^1$ on $\displaystyle \RR^3$,
there exist an open neighbourhood $I_{\VEC{y}} \subset \RR$ of $0$ and
a unique function $\displaystyle \sigma:I_{\VEC{y}} \to \RR^3$ such
that $\sigma'(t) = F(\sigma(t))$ for $t \in I_{\VEC{y}}$ and
$\sigma(0) = \VEC{y}$.  The function
$\displaystyle \sigma:I_{\VEC{y}} \to \RR^3$ is a parametric
representation of a curve in $\displaystyle \RR^3$ through $\VEC{y}$
which is tangent to the vector field $F$ at all points of the curve because
$\sigma'(t) = F(\sigma(t))$ for all $t \in I_{\VEC{y}}$.

Because $F$ is of class $\displaystyle C^1$, there exist an open
neighbourhood $I \subset \RR$ of $0$ and an open subset $U$ of
$\displaystyle \RR^3$
such that we may define a continuously differentiable map
$\displaystyle \phi: I \times U \to \RR^3$
by $\phi(t,\VEC{x}) = \sigma(t)$ for $t \in I$ and $\VEC{x} \in U$ where
$\sigma$ is the unique function such that $\sigma'(t) = F(\sigma(t))$
for $t \in I$ and $\sigma(0) = \VEC{x} \in U$.  The function $\phi$
defines what we call a local {\bfseries flow}\index{Flow}.
For each $\displaystyle \VEC{x} \in U$, we may view
$\{\phi(t,\VEC{x}) : t \in I\}$ as the trajectory of a particle starting
at $\VEC{x}$ and moving under the influence of the vector field
$F$.

Let $\displaystyle P_0 =
\left\{ \VEC{x} + s_1 \VEC{e}_1 + s_2 \VEC{e}_2 + s_3 \VEC{e}_3 :
0\leq s_i \leq \epsilon \right\}$
for really small $\epsilon$.  The set $P_0$ represents a small box
that we have drawn in Figure~\ref{diff_geom_DIV}.
Using the Taylor's expansion theorem for functions from
$\displaystyle \RR^3$ to $\displaystyle \RR^3$, we find that the image
of a point
$\VEC{x} + s_1 \VEC{e}_1 + s_2 \VEC{e}_2 + s_3 \VEC{e}_3$ of the box $P_0$
along the flow is given by
\begin{align*}
\phi(t, \VEC{x} + s_1 \VEC{e}_1 + s_2 \VEC{e}_2 + s_3 \VEC{e}_3)
&= \phi(t,\VEC{x}) + \diff_{\VEC{x}} \phi(t,\VEC{x})
\left( s_1 \VEC{e}_1 + s_2 \VEC{e}_2 + s_3 \VEC{e}_3\right) \\
& \qquad + O(s_1^2+s_2^2+s_3^2) \ .
\end{align*}
If $\epsilon$ is really small, then the image of the box $P_0$ along
the flow is
\[
\phi(t, P_0) \approx
P_t = \left\{ \phi(t,\VEC{x}) + \diff_{\VEC{x}} \phi(t,\VEC{x})
  \left( s_1 \VEC{e}_1 + s_2 \VEC{e}_2 + s_3 \VEC{e}_3 \right) :
  0\leq s_i \leq \epsilon \right\} \ .
\]
for $t$ very small.  The image of the box $P_0$ by the linear map
$\diff_{\VEC{x}}\phi(t,\VEC{x})$ is approximately the box $P_t$ with
the sides given by the vectors
\begin{equation} \label{diff_geom_DD0}
\VEC{v}_i(t,\VEC{x}) = \epsilon\, \diff_{\VEC{x}} \phi(t,\VEC{x}) \VEC{e}_i
\end{equation}
for $1 \leq i  \leq 3$.  Let $V(\VEC{x},t)$ be the volume of the box
$P_t$ that we have drawn in Figure~\ref{diff_geom_DIV}.  We now show that
\begin{equation} \label{diff_geom_DD3}
\frac{1}{V(0,\VEC{x})} \dydx{V}{t}(0,\VEC{x})
= \diV F(\VEC{x}) \ .
\end{equation}
This relation can be interpreted as saying that the relative
instantaneous rate of change of the volume at the point
$\VEC{x}$ is given by the divergence of the vector field
$F$ at the point $\VEC{x}$.

\pdfF{vect_calculus/div_interp}{Physical interpretation of the divergence}
{Physical interpretation of the divergence.}{diff_geom_DIV}

Since $\displaystyle \pdydx{\phi}{t}(t,\VEC{x}) = F(\phi(t,\VEC{x}))$, we have
\[
\pdfdx{ \diff_{\VEC{x}} \phi(t,\VEC{x}) }{t}
= \diff_{\VEC{x}} \left( \pdydx{\phi}{t}(t,\VEC{x}) \right)
= \diff_{\VEC{x}} \left( F(\phi(t,\VEC{x})) \right)
= \diff F(\phi(t,\VEC{x})) \, \diff_{\VEC{x}} \phi(t,\VEC{x}) \ .
\]
Thus
\begin{equation} \label{diff_geom_DD1}
\dydx{\VEC{v}_i}{t}(t,\VEC{x}) = \epsilon\, \pdfdx{
\diff_{\VEC{x}} \phi(t,\VEC{x})}{t} \VEC{e}_i
= \epsilon\, \diff F(\phi(t,\VEC{x})) \,
\diff_{\VEC{x}} \phi(t,\VEC{x}) \VEC{e}_i
\end{equation}
for $1 \leq i \leq 3$.
Since $\phi(0,\VEC{x}) = \VEC{x}$ for all $\VEC{x} \in U$, we get that
$\diff_{\VEC{x}} \phi(0,\VEC{x}) = \Id$.  Thus (\ref{diff_geom_DD0})
yields
$\displaystyle  \VEC{v}_i(0,\VEC{x}) = \epsilon\, \VEC{e}_i$
for $1 \leq i \leq 3$,
as it should be for $P_0$, and (\ref{diff_geom_DD1}) becomes
\begin{equation} \label{diff_geom_DD2}
\dydx{\VEC{v}_i}{t}(0,\VEC{x}) = \epsilon\, \diff F(\VEC{x}) \VEC{e}_i
\end{equation}
for $1 \leq i \leq 3$.  The volume of $P_t$ is given by
$\displaystyle V(t,\VEC{x}) = \VEC{v}_1(t,\VEC{x}) \cdot
\left(\VEC{v}_2(t,\VEC{x}) \times \VEC{v}_3(t,\VEC{x}) \right)$.
Thus
\begin{align*}
\dydx{V}{t}(t,\VEC{x}) &=
\dydx{\VEC{v}_1}{t}(t,\VEC{x}) \cdot \left(\VEC{v}_2(t,\VEC{x}) \times
\VEC{v}_3(t,\VEC{x}) \right) \\
&\quad
+ \VEC{v}_1(t,\VEC{x}) \cdot \left(\dydx{\VEC{v}_2}{t}(t,\VEC{x}) \times
\VEC{v}_3(t,\VEC{x}) \right)
+ \VEC{v}_1(t,\VEC{x}) \cdot \left(\VEC{v}_2(t,\VEC{x}) \times
\dydx{\VEC{v}_3}{t}(t,\VEC{x}) \right) \ .
\end{align*}
If we evaluate this expression at $t=0$ and use (\ref{diff_geom_DD2}),
then we get
\begin{align*}
\dydx{V}{t}(0,\VEC{x}) &=
\left(\epsilon \diff F(\VEC{x}) \VEC{e}_1 \right)
\cdot \left(\epsilon\, \VEC{e}_2 \times \epsilon\, \VEC{e}_3 \right)
+ \epsilon\, \VEC{e}_1 \cdot \left(\epsilon
\left(\diff F(\VEC{x})\VEC{e}_2 \right)
\times \epsilon\, \VEC{e}_3 \right) \\
&\qquad + \epsilon\, \VEC{e}_1 \cdot \left(\epsilon\, \VEC{e}_2 \times
\left( \epsilon \diff F(\VEC{x}) \VEC{e}_3\right) \right) \\
&= \epsilon^3\, \big(
\left(\diff F(\VEC{x}) \VEC{e}_1 \right)\cdot
\left(\VEC{e}_2 \times \VEC{e}_3 \right)
+ \left(\diff F(\VEC{x}) \VEC{e}_2 \right)
\cdot \left(\VEC{e}_3 \times \VEC{e}_1 \right) \\
&\qquad + \left(\diff F(\VEC{x}) \VEC{e}_3\right) \cdot
\left( \VEC{e}_1 \times \VEC{e}_2 \right) \big) \\
&= \epsilon^3\, \big(
\left(\diff F(\VEC{x}) \VEC{e}_1 \right) \cdot \VEC{e}_1
+ \left(\diff F(\VEC{x}) \VEC{e}_2 \right) \cdot \VEC{e}_2
+ \left(\diff F(\VEC{x}) \VEC{e}_3\right)
\cdot \VEC{e}_3 \big) \\
&= \epsilon^3  \left( \pdydx{F_1}{x_1}(\VEC{y}) + \pdydx{F_2}{x_2}(\VEC{y})
+ \pdydx{F_3}{x_3}(\VEC{y}) \right) = \epsilon^3 \diV F(\VEC{y}) \ .
\end{align*}
Since the volume $V(0,\VEC{y})$ of $P_0$ is obviously
$\displaystyle \epsilon^3$, we get (\ref{diff_geom_DD3}).

If $\diV F = 0$, then it
follows from (\ref{diff_geom_DD3}) that the volume of a region
does not change as it moves along the flow.

\subsubsection{A Physical Interpretation of the Curl}

As in the previous section, we consider the flow $\phi$ associated
to the vector field $F$.  We consider a particle moving along
the flow with $\VEC{x}$ as the initial position of a particle. 
Let $\VEC{v}_0$ and $\VEC{w}_0$ be two vectors as drawn in
Figure~\ref{diff_geom_CURL2}.

\pdfF{vect_calculus/curl_interp2}{Physical interpretation of the curl
for an object along a flow}{Physical interpretation of the curl for an
object moving along a flow.  The vectors $\VEC{v}_0$ and $\VEC{w}_0$
move along the flow.}{diff_geom_CURL2} 

We consider
$\displaystyle \VEC{w}(t) = \diff_{\VEC{x}}\phi(t,\VEC{x}) \VEC{w}_0$
and $\displaystyle \VEC{v}(t) = \diff_{\VEC{x}}\phi(t,\VEC{x}) \VEC{v}_0$.
Proceeding as we did to obtain (\ref{diff_geom_DD2}), we get
$\displaystyle \dydx{\VEC{w}}{t}(0) = \diff F(\VEC{x}) \VEC{w}_0$
and
$\displaystyle \dydx{\VEC{v}}{t}(0) = \diff F(\VEC{x}) \VEC{v}_0$.
The cosine of the angle between the vectors $\VEC{w}(t)$ and $\VEC{v}(t)$
is determined by the scalar product $\VEC{v}(t) \cdot \VEC{w}(t)$.  Hence,
if we want to measure any variation of this angle, it suffices to
measure any variation of the scalar product $\VEC{v}(t) \cdot \VEC{w}(t)$
as $t$ varies.  The word variation suggests to compute the following
derivative.
\begin{equation} \label{diff_geom_curL4}
\begin{split}
&\dfdx{\left(\VEC{v}(t)\cdot \VEC{w}(t)\right)}{t}\bigg|_{t=0} =
\left( \dydx{\VEC{v}}{t}(t) \cdot \VEC{w}(t)
+ \VEC{v}(t) \cdot \dydx{\VEC{w}}{t}(t) \right)\bigg|_{t=0} \\
&\qquad = \left( \diff F(\VEC{x}) \VEC{v}_0 \right)\cdot \VEC{w}_0
+ \VEC{v}_0 \cdot \left( \diff F(\VEC{x}) \VEC{w}_0 \right)
= \VEC{w}_0^\top \left( \diff F(\VEC{x})
+ \diff F(\VEC{x})^\top \right) \VEC{v}_0 \ . 
\end{split}
\end{equation}
We may write
$\displaystyle \diff F(\VEC{x}) = S(\VEC{x}) + W(\VEC{x})$, where
$\displaystyle S(\VEC{x}) = \left( \diff F(\VEC{x}) +
\diff F(\VEC{x})^\top \right)/2$ and
$\displaystyle W(\VEC{x}) = \left( \diff F(\VEC{x})
- \diff F(\VEC{x})^\top \right)/2$.
The symmetric matrix $S$ is called the
{\bfseries deformation matrix}\index{Deformation Matrix}
while the antisymmetric matrix $W$ is called the
{\bfseries matrix of rotation}\index{Matrix of Rotation}.  We conclude
from (\ref{diff_geom_curL4}) that the matrix
of rotation is responsible for the rotation of an object moving along
the flow while the deformation matrix is responsible for the variation
of the angle between particles that form the object as the object
is moving along with the flow; it is responsible for the deformation
of the object.

There is a connection between the matrix of rotation $W$ and the
curl of $F$.  We first note that
\begin{align*}
W(\VEC{x})
& \equiv \frac{1}{2}
\left( \diff F(\VEC{x}) - \diff F(\VEC{x})^\top \right) \\
&= \frac{1}{2}
\begin{pmatrix}
0 & \displaystyle \pdydx{F_1}{x_2}(\VEC{x}) - \pdydx{F_2}{x_1}(\VEC{x}) &
\displaystyle \pdydx{F_1}{x_3}(\VEC{x}) - \pdydx{F_3}{x_1}(\VEC{x}) \\[1em]
\displaystyle \pdydx{F_2}{x_1}(\VEC{x}) - \pdydx{F_1}{x_2}(\VEC{x}) & 0 &
\displaystyle \pdydx{F_2}{x_3}(\VEC{x}) - \pdydx{F_3}{x_2}(\VEC{x}) \\[1em]
\displaystyle \pdydx{F_3}{x_1}(\VEC{x}) - \pdydx{F_1}{x_3}(\VEC{x}) &
\displaystyle \pdydx{F_3}{x_2}(\VEC{x}) - \pdydx{F_2}{x_3}(\VEC{x}) & 0
\end{pmatrix} \\
&= \frac{1}{2}
\begin{pmatrix}
0 & \displaystyle -\left(\curL F(\VEC{x})\right)_3 &
\displaystyle \left(\curL F(\VEC{x})\right)_2 \\
\displaystyle \left(\curL F(\VEC{x})\right)_3 & 0 &
\displaystyle -\left(\curL F(\VEC{x})\right)_1 \\
\displaystyle -\left(\curL F(\VEC{x})\right)_2 & 
\displaystyle \left(\curL F(\VEC{x})\right)_1 & 0
\end{pmatrix} \ ,
\end{align*}
where $(\curL F(\VEC{x}))_i$ is the $\displaystyle i^{th}$ coordinates of
$\curL F(\VEC{x})$.

When $\curL F = \VEC{0}$, the flow is
{\bfseries irrotational}\index{Irrotational}.  Namely, an
object will not rotate like a spinning top as it moves along with
the flow because $W=0$ but it will only be deformed because $S\neq 0$.
We will give another justification of this result in the next section.

To better understand link between rotation and curl in the previous
statement, we consider a solid object $S$ that spin around an axis
which runs through the object as illustrated in
Figure~\ref{diff_geom_CURL}.  We may assume without lost of generality
that the $x_3$ axis is the axis of rotation.  Suppose that
$\omega$ is the angular velocity and that $\VEC{w}$ is a vector of
length $\omega$ that points in the direction of the positive values of
$x_3$.  Given $\VEC{x} \in S$, we have that
$\VEC{x} = P(\VEC{x}) + \VEC{r}$ where $P$ is the orthogonal
projection on the $x_3$ axis and $\VEC{r}$ is a vector perpendicular
to the axis of rotation and from the axis of rotation to $\VEC{x}$.

\pdfF{vect_calculus/curl_interp1}{Physical interpretation of the curl
for a spinning solid object under the influence of a flow}{Physical
interpretation of the curl for an solid object under the influence of
a flow.}{diff_geom_CURL}

The vector $\VEC{v} = \VEC{w} \times \VEC{r}$ is perpendicular to the plan
containing the vectors $\VEC{r}$ and $\VEC{w}$, and points in the
direction of the rotation (counterclockwise in Figure~\ref{diff_geom_CURL}).
Since $\VEC{w} = (0,0,\omega)$, we have
\[
\VEC{v} = \VEC{w} \times \VEC{r} 
= \VEC{w} \times (\VEC{x} - P(\VEC{x}))
= \VEC{w} \times \VEC{x} = (-\omega x_2, \omega x_1, 0)
\]
because $P(\VEC{x})$ is parallel to $\VEC{w}$.  Hence
$\displaystyle \curL \VEC{v}  = 2\, \omega\, \VEC{e}_3$.

In general, an object that spins like a spinning top with an angular
velocity $\omega$ will satisfy $\curL \VEC{v}  = 2\, \omega\, \VEC{u}$
where $\VEC{u}$ is an unit vector in the direction of the axis of
rotation.

Therefore, if $\curL \VEC{v} = \VEC{0}$, then $\omega = 0$.  The
object does not spin.  If we think about an object moving along with
the flow of a vector field $F$, then $\VEC{v} = F(\VEC{x})$.  Therefore, if
$\curL F = 0$, then the object does not spin like a spinning top.

\subsubsection{A Physical Interpretation of the Curl  (Continued)}

We consider a sufficiently smooth vector field
$\displaystyle F:\RR^3 \to \RR^3$ and a point
$\displaystyle \VEC{y} \in \RR^3$.  Let $\VEC{n}$ be
a unit vector not necessarily tangent to the flow near $\VEC{y}$;
namely, not necessarily parallel to $F(\VEC{x})$ for some $\VEC{x}$ near
$\VEC{y}$.  Let $S_r$ be a disk of radius $r$ centred at
$\VEC{y}$ and perpendicular to the vector $\VEC{n}$.  We assume that
$\VEC{n}$ is the outward unit normal associated to the orientation on
$S_r$.  This situation is represented in Figure~\ref{diff_geom_CURL3}.

\pdfF{vect_calculus/curl_interp3}{Physical interpretation of the curl
using Stokes' theorem}{Physical interpretation of the curl using
Stokes' theorem.  We have drawn some of the vectors of the vector
field $F$ on the surface $S_r$.  The vector $\VEC{n}$ is not parallel to
$F(\VEC{x})$ for most $\VEC{x} \in S_r$.  However, $\VEC{n}$
is perpendicular to the surface $S_r$.}{diff_geom_CURL3}

From Stokes' theorem, we have
\[
  \int_{\partial S_r} F\cdot \VEC{t} \dx{s}
= \iint_{S_r} \curL\,F \cdot \VEC{n} \dx{S} \ ,
\]
where $\partial S_r$ is the boundary of the surface $S_r$ and
$\VEC{t}(\VEC{u})$ is the unit tangent vector to $\partial S_r$ at
$\VEC{u} \in \partial S_r$ which is consistent with the
orientation on $\partial S_r$ that is induced from the orientation on
$S_r$.  According to the Mean Value Theorem for Integrals
(Question~\ref{MeanValueTHInt}), we have
\[
 \frac{1}{\pi r^2} \iint_{S_r} \curL F \cdot \VEC{n} \dx{S}
= \curL F(\VEC{x}_r) \cdot \VEC{n}
\]
for some $\VEC{u}_r \in S_r$.  Thus
\[
  \curL F(\VEC{u}_r) \cdot \VEC{n}  = \frac{1}{\pi r^2}
  \int_{C_r} F\cdot \VEC{t} \dx{s} \ .
\]
Since $\displaystyle \lim_{r\to 0}\VEC{u}_r = \VEC{y}$, we get
\[
\curL F(\VEC{y}) \cdot \VEC{n}
= \lim_{r\to 0} \curL F(\VEC{u}_r) \cdot \VEC{n}
= \lim_{r\to 0} \frac{1}{\pi r^2} \int_{\partial S_r} F \cdot \VEC{t} \dx{s} \ .
\]
Since $F(\VEC{u})\cdot \VEC{t}(\VEC{u})$ is the length of the
component of the vector field $F$ tangent to $\partial S_r$ at
$\VEC{u} \in \partial S_r$, the integral
$\displaystyle \int_{\partial S_r} F \cdot \VEC{t} \dx{s}$ expresses the
displacement along $\partial S_r$.  Thus, for very small $r$,
$\displaystyle \frac{1}{\pi r^2} \int_{\partial S_r} F \cdot \VEC{t} \dx{s}$
can be used as a measure of the curl around the point $\VEC{y}$ per
unit of area in the plane perpendicular to $\VEC{n}$.  Hence, as
$r \to 0$, we get that $\curL F(\VEC{y}) \cdot \VEC{n}$ measure the curl
around the axis $\VEC{n}$ at the point $\VEC{y}$. 

We have that $\curL F(\VEC{y}) \cdot \VEC{n}$ reaches its maximal
value with
$\displaystyle \VEC{n} = \|\curL F(\VEC{y})\|^{-1} \curL F(\VEC{y})$.
In this case, $\curL F(\VEC{y}) \cdot \VEC{n} = \|\curL F(\VEC{y})\|$ and
we may conclude that the angular velocity of the rotation around the
axis given by $\curL F(\VEC{y})$ at $\VEC{y}$ is $\|\curL F(\VEC{y})\|$.

\section{Exercises}

As we did for the chapter on integration of functions of several
variables, we are including questions that are traditional questions
that can be found in advanced calculus textbooks.  We include them for the
benefit of the readers who may want to strengthen their knowledge of
classical vector calculus.  They are problems that any mathematics
students should be able to solve.  This section could be used as a
source of problems by instructors of advanced calculus.

The reader should keep in mind the comments in Remark~\ref{rmkImport}.
To avoid cumbersome details when using Green's, Stokes' and
divergence theorems, we will liberally used them without rigorously
verifying and explaining why they can be used.  In particular, we will use
them without mentioning that, in a lot of the cases, we are using
Theorem~\ref{GenStokesTh} or Theorem~\ref{GenStokesThV2}.

\subsection{Line and Surface Integrals}

\begin{question}
Compute the arc length of the following curves.

\subQ{a} The curve $C$ with the parametric representation
$\displaystyle g:[0,2\pi]\to \RR^3$ given by
$g(t) = (a\cos(t),bt, a\sin(t))$.\\
\subQ{b} The curve $C$ with the parametric representation
$\displaystyle h:[0,2]\to \RR^2$ given by
$\displaystyle h(t) = \left(t^3/3-t,t^2\right)$.\\
\subQ{c} The curve $C$ with the parametric representation
$\displaystyle f:[1,e]\to \RR^3$ given by
$\displaystyle f(t) = (\ln(t),2t,t^2)$.\\
\end{question}

\begin{sol}
\subQ{a}
The arc length is
\[
\int_C \|g'(t)\| \dx{t}
= \int_0^{2\pi} \sqrt{(-a\sin(t))^2 + b^2 + (a\cos(t))^2} \dx{t}
= \int_0^{2\pi} \sqrt{a^2 + b^2} \dx{t} = 2\pi \sqrt{a^2+b^2} \ .
\]

\subQ{b}
The arc length is
\[
\int_C \|h'(t)\| \dx{t}
= \int_0^2 \sqrt{(t^2-1)^2 + (2t)^2}\dx{t}
= \int_0^2 (t^2+1) \dx{t} = \left(\frac{t^3}{3} + t\right)\bigg|_{t=0}^2
= \frac{14}{3} \ .
\]

\subQ{c}
The arc length is
\[
\int_C \|f'(t)\| \dx{t}
= \int_1^e \sqrt{ (1/t)^2 + 2^2 + (2t)^2}\dx{t}
= \int_1^2 \frac{1+2t^2}{t} \dx{t} = \left(\ln(t) + t^2\right)\bigg|_{t=1}^e
= e^2 \ .
\]
\end{sol}

\begin{question}
Integrals of the form
$\displaystyle E(k) = \int_0^{\pi/2} \sqrt{1- k^2\sin^2(t)}\dx{t}$ with
$0<k<1$ are called elliptic integrals.

\subQ{a} Write the arc length of the ellipse
$\displaystyle \frac{x^2}{a^2} + \frac{y^2}{b^2} = 1$ in terms of an
elliptic integral.\\
\subQ{b} Write the arc length of the curve $C$ given by intersection
of the sphere $\displaystyle x^2 + y^2 + z^2 =4$ and the cylinder
$\displaystyle x^2 + y^2 -2xy = 0$ for $z\geq 0$.
\end{question}

\begin{sol}
\subQ{a}  Let $C$ be the curve represented by the ellipse.  We assume
that $a > b$.  We get a similar result if $b > a$.
A parametric representation for the ellipse is given by
$\displaystyle g:[0,2\pi]\to \RR^2$ defined by
$g(t) = (a\sin(t), b\cos(t))$.    The arc length of $C$ is
\begin{align*}
\int_0^{2\pi} \|g'(t)\|\dx{t}
&= \int_0^{2\pi} \sqrt{ (a\cos(t))^2 + (-b\sin(t))^2}\dx{t}
= \int_0^{2\pi} \sqrt{ a^2\cos^2(t)+ b^2\sin^2(t)}\dx{t} \\
&= \int_0^{2\pi} \sqrt{ a^2+ (b^2-a^2)\sin^2(t)}\dx{t}
= a \int_0^{2\pi} \sqrt{ 1 - \left(\frac{a^2-b^2}{a^2}\right)\sin^2(t)}\dx{t} \\
&= 4a \int_0^{\pi/2} \sqrt{ 1 - \left(\frac{a^2-b^2}{a^2}\right)\sin^2(t)}\dx{t}
= 4a E\left(\sqrt{\frac{a^2-b^2}{a^2}}\right) \ .
\end{align*}

\subQ{b} The curve $C$ is shown in the following figure.
\pdfbox{vect_calculus/question29}
We have
\[
  x^2 +y^2 -2y = 0 \Rightarrow x^2 + (y-1)^2 = 1 \ .
\]
This suggests that $\displaystyle g:[0,\pi]\to \RR^3$
defined by
\[
g(t) = \left(\sin(t), 1-\cos(t), \sqrt{4 - \sin^2(t) -(1+\cos(t))^2}\right)
= \big(\sin(t), 1-\cos(t), \sqrt{2 - 2 \cos(t)}\,\big)
\]
should be a good parametric representation for the curve $C$.
The length of the curve $C$ is
\begin{align*}
\int_0^\pi \|g'(t)\|\dx{t}
&= \int_0^\pi \sqrt{\cos^2(t) + \sin^2(t)
+ \left(\frac{\sin(t)}{\sqrt{2-2\cos(t)}}\right)^2}\, \dx{t} \\
&= \int_0^\pi \sqrt{ 1 + \frac{\sin^2(t)}{2(1- \cos(t))}} \, \dx{t}
= \int_0^\pi \sqrt{ 1 + \frac{(1-\cos(t))(1+\cos(t))}{2(1- \cos(t))}}
\, \dx{t} \\
&= \int_0^\pi \sqrt{ 1 + \frac{1+\cos(t)}{2}} \, \dx{t}
= \int_0^\pi \sqrt{ 1 + \cos^2\left(t/2\right)}  \dx{t}
= \int_0^\pi \sqrt{ 2 - \sin^2\left(t/2\right)}  \dx{t} \\
&= 2 \sqrt{2} \int_0^{\pi/2} \sqrt{ 1 - \frac{1}{2} \sin^2(u)} \dx{u}
= 2 \sqrt{2} E\left(\frac{1}{\sqrt{2}}\right)
\end{align*}
where we have used the substitution $u = t/2$ for the second to last
equality.
\end{sol}

\begin{question}
Let $C$ be a curve with the parametric representation
$\displaystyle g:[0,2\pi]\to \RR^3$ defined by
$\displaystyle g(t) = (2\cos(t),2\sin(t), t^2)$.
Compute $\displaystyle \int_C\sqrt{z} \dx{s}$.
\end{question}

\begin{sol}
Since $g'(t) = (-2\sin(t), 2\cos(t) , 2t )$, we have that
$\displaystyle \|g'(t)\| = 2\sqrt{1 + t^2}$.  Thus
\[
\int_C \sqrt{z} \dx{s} = 2 \int_0^{2\pi} t \sqrt{1+t^2} \dx{t}
= \frac{2}{3} (1+ t^2)^{3/2}\bigg|_{t=0}^{2\pi} = \frac{2}{3}
\left( (1+4\pi^2)^{3/2} - 1 \right) \ .
\]  
\end{sol}

\begin{question}
For each of the following vector fields $F$ and curves $C$, compute
$\displaystyle \int_C F \cdot \dx{\VEC{s}}$.

\subQ{a} $C$ is the straight line from the origin to $(1,1,1)$ and
$\displaystyle F(x,y,z) = (yz , x^2, xz)$.\\
\subQ{b} $C$ is the curve $\displaystyle \{(x,x^2,x^3) : 0 \leq x \leq 1\}$ from
$(0,0,0)$ to $(1,1,1)$ and $\displaystyle F(x,y,z) = (yz , x^2, xz)$.\\
\subQ{c} $C$ is the circle $\displaystyle x^2+y^2 =1$ oriented clockwise and
$F(x,y,z) = (x-y,x+y)$.
\end{question}

\begin{sol}
\subQ{a} We select the parametric representation of $C$ given by
$g(t) = (t,t,t)$ for $0 \leq t \leq 1$.  We have
\[
\int_C F \cdot \dx{\VEC{s}}
= \int_C F \cdot g'(t) \dx{t}
= \int_0^1 (t^2,t^2,t^2)\cdot (1,1,1) \dx{t}
= \int_0^1 3 t^2 \dx{t} = t^3\bigg|_{t=0}^1 = 1 \ .
\]

\subQ{b} We use the parametric representation of $C$ given by
$\displaystyle g(t) = (t,t^2,t^3)$ for $0 \leq t \leq 1$.  We have
\begin{align*}
\int_C F \cdot \dx{\VEC{s}}
&= \int_C F \cdot g'(t) \dx{t}
= \int_0^1 (t^5,t^2,t^4)\cdot (1,2t,3t^2) \dx{t} \\
&= \int_0^1 \left( t^5 + 2 t^3 + 3 t^6\right) \dx{t}
= \left( \frac{t^6}{6} + \frac{t^4}{2} + \frac{3 t^7}{7}\right)\bigg|_{t=0}^1
= \frac{23}{21} \ .
\end{align*}

\subQ{c} We use the parametric representation of $C$ given by
\[
  g(t) = (\cos(2\pi-t), \sin(2\pi-t)) = (cos(t) , -\sin(t))
\]
for $0 \leq t \leq 2\pi$.  The parametric representation is clockwise
as required by the orientation on the curve $C$.  We have
\begin{align*}
\int_C F \cdot \dx{\VEC{s}}
&= \int_C F \cdot g'(t) \dx{t}
= \int_0^{2\pi} (\cos(t)+\sin(t), \cos(t)-\sin(t) )\cdot
(-\sin(t),-\cos(t)) \dx{t} \\
&= \int_0^{2\pi} \left( -1 \right) \dx{t} = -2\pi \ .
\end{align*}
\end{sol}

\begin{question}
For each of the following differential 1-form $\omega$ and curves $C$,
compute $\displaystyle \int_C \omega$.

\subQ{a} $C$ is the curve $\displaystyle \{(x,x^2) : 0 \leq x \leq 1\}$
from $(0,0)$ to $(1,1)$ and
$\displaystyle \omega = xe^{-y} \df{x} + \sin(\pi x)\df{y}$.\\
\subQ{b} $C$ is the curve $\{(\cos(t),\sin(t),t) : 0 \leq t \leq 2\pi\}$ 
from $(1.0,0)$ to $(1,0,2\pi)$ and $\omega = y\df{x} + z \df{y} + xy\df{z}$.\\
\subQ{c} $C$ is the triangle with vertices at $(0,0)$, $(1,0)$ and
$(1,1)$ oriented counterclockwise and
$\displaystyle \omega = y^2 \df{x} - 2 x\df{y}$.
\end{question}

\begin{sol}
\subQ{a} The curve $C$ is the singular $1$-cube given by
$\displaystyle \sigma(t) = (t,t^2)$ for $0 \leq t \leq 1$.  We have
\begin{align*}
\int_\sigma \omega &= \int_{[0,1]} \sigma^\ast(\omega) 
= \int_0^1 \left( te^{-t^2} +2 t \sin(\pi t) \right)\dx{t} \\
&= \left(-\frac{e^{-t^2}}{2} - \frac{ 2t\cos(\pi t)}{\pi}
+ \frac{2\sin(\pi t)}{\pi^2} \right)\bigg|_{t=0}^1
= \frac{1}{2} - \frac{1}{2e} + \frac{2}{\pi} \ .
\end{align*}

\subQ{b} The curve $C$ is the singular $1$-cube given by
$\sigma(t) = (\cos(2\pi t),\sin(2\pi t),2 \pi t)$ for
$0 \leq t \leq 1$.  We have
\begin{align*}
\int_\sigma \omega &= \int_{[0,1]} \sigma^\ast(\omega) 
= 2\pi \int_0^1 \left( -\sin^2(2\pi t) + t \cos(2\pi t)
+ \cos(2\pi t)\sin(2\pi t) \right)\dx{t} \\
&= \int_0^{2\pi} \left( -\frac{1}{2} (1- \cos(2t)) + t \cos(t)
  + \cos(t)\sin(t) \right)\dx{t} \\
&= \left( -\frac{t}{2} + \frac{\sin(2t)}{4} + t\sin(t) + \cos(t)
+\frac{\sin^2(t)}{2} \right)\bigg|_{t=0}^{2\pi} = -\pi \ .
\end{align*}

\subQ{c} We have that $C = C_1 \cup C_2 \cup C_3$, where the straight lines
$C_i$ for $1\leq i \leq 3$ are the following singular $1$-cube:
$C_1$ from $(0,0)$ to $(1,0)$ is given by $\sigma_1(t) = (t,0)$ for
$0 \leq t \leq 1$, $C_2$ from $(1,0)$ to $(1,1)$ is given by
$\sigma_2(t) = (1,t)$ for $0 \leq t \leq 1$, and
$C_3$ from $(1,1)$ to $(0,0)$ is given by $\sigma_3(t) = (1-t,1-t)$ for
$0 \leq t \leq 1$.  Since
$\displaystyle \int_{\sigma_1} \omega = \int_{[0,1]} \sigma_1^\ast(\omega)
= \int_0^1 0 \dx{t} = 0$,
$\displaystyle \int_{\sigma_2} \omega = \int_{[0,1]} \sigma_2^\ast(\omega)
= \int_0^1 (-2) \dx{t} = -2$ and
$\displaystyle \int_{\sigma_3} \omega = \int_{[0,1]} \sigma_3^\ast(\omega)
= \int_0^1 \left( -(1-t)^2 +2 (1-t)\right) \dx{t} = \frac{2}{3}$,
we find that
\[
\int_C \omega = \int_{\sigma_1} \omega + \int_{\sigma_2} \omega +
\int_{\sigma_3} \omega = -2 + \frac{2}{3} = -\frac{4}{3} \ .
\]
\end{sol}

\begin{question}
Let $\displaystyle F:\RR^n \to \RR^n$ be a continuous vector fields
and $\displaystyle C \subset \RR^n$ be a curve.  Prove that
$\displaystyle  \left| \int_C F \cdot \dx{\VEC{s}} \right|
\leq \int_C \|F\|\dx{s}$.
\end{question}

\begin{sol}
Let $\displaystyle \sigma:[0,1]\to \RR^n$ be a parametric
representation of $C$.  Then
\begin{align*}
\left| \int_C F \cdot \dx{\VEC{s}} \right|
&= \left| \int_0^1 F(\sigma(t)) \cdot \sigma'(t) \dx{t} \right|
\leq \int_0^1 \left|  F(\sigma(t)) \cdot \sigma'(t) \right| \dx{t} \\
&\leq \int_0^1 \| F(\sigma(t))\| \, \| \sigma'(t) \| \dx{t} 
= \int_0^1 \| F)\| \dx{s} \ ,
\end{align*}
where the first inequality is standard for the Riemann integral of
real valued functions and the second inequality comes from the Schwarz
inequality.
\end{sol}

\begin{question}
Suppose that a curve $C$ is the union of two curves $C_1$ and $C_2$.
Use definition~\ref{defnArcLen} to prove that the length of $C$ is the
sum of the lengths of $C_1$ and $C_2$.
\end{question}

\begin{sol}
Since $C$ is a curve, there exists a parametric representation
$\displaystyle g: [a,b] \to \RR^n$ of $C$ such that $g$ is one-to-one except
possibly at a finite number of points.
Since $C$ is the union of two curves $C_1$ and $C_2$, there exists
$c$ between $a$ and $b$ such that $\displaystyle g: [a,c] \to \RR^n$
is a parametric representation of $C_1$ and
$\displaystyle g: [c,b] \to \RR^n$ is a parametric representation of $C_2$.

Let $L$ be the length of $C$ and $L_i$ be the length of $C_i$ for
$1 \leq i \leq 2$.

\stage{i}  Let $P$ be a partition of $[a,b]$ and consider the
partition $Q = P \cup \{c\}$.  The partition $Q$ is a refinement of
$P$.  Moreover $Q_1 = Q \cap [a,c]$ is a partition of $[a,c]$ and
$Q_2 = Q \cap [c,b]$ is a partition of $[c,b]$.
We have that
$\displaystyle L_P(g) \leq L_Q(g) = L_{Q_1}(g) + L_{Q_2}(g) \leq L_1 + L_2$.
Since this is true for all partitions $P$ of $[a,b]$, we get that
$L \leq L_1 + L_2$.

\stage{ii}  Choose $\epsilon >0$.  Let $P_1$ and $P_2$ be partitions
of $[a,c]$ and $[c,b]$ respectively such that
$\displaystyle L_1 - L_{P_1}(g) < \epsilon/2$ and
$\displaystyle L_2 - L_{P_2}(g) < \epsilon/2$.
We have that $P = P_1 \cup P_2$ is a partition of $[a,b]$ such that
\[
0 \leq L_1 + L_2 - L_{P}(g)
= \big(L_1 - L_{P_1}(g) \big) + \big( L_2 - L_{P_2}(g) \big)
< \epsilon \ .
\]
Thus $L_1 + L_2 <  L_{P}(g) + \epsilon \leq L + \epsilon$.
Since $\epsilon$ is arbitrary, we get the second inequality
$L_1 + L_2 \leq L$.
\end{sol}

\begin{question}
Compute the surface integral $\displaystyle \iint_S z\dx{S}$ over the
upper hemisphere $S$ of radius $a$ using two different parametric
representations.
\end{question}

\begin{sol}
The surface $S$ is shown in the figure below.
\pdfbox{vect_calculus/extra17}

\subI{First representation}
The parametric representation is given by the spherical coordinates
\[
g(\theta,\phi) =
(a\cos(\theta)\sin(\phi) , a\sin(\theta)\sin(\phi) , a\cos(\phi) )
\]
for $0\leq \theta < 2\pi$ and $0\leq \phi \leq \pi/2$.  We have that
$\displaystyle \left\| \pdydx{g}{\theta} \times \pdydx{g}{\phi} \right\| =
a^2 \sin(\phi)$.  Thus
\begin{align*}
\iint_S z \dx{S} &= \int_0^{2\pi} \int_0^{\pi/2} a \cos(\phi) 
\left\| \pdydx{g}{\theta} \times \pdydx{g}{\phi} \right\|
\dx{\phi}\dx{\theta}
= \int_0^{2\pi} \int_0^{\pi/2} a^3 \cos(\phi) \sin(\phi)
\dx{\phi}\dx{\theta} \\
&= \int_0^{2\pi} \left( a^3 \frac{\sin^2(\phi)}{2}\bigg|_0^{\pi/2}\right)
\dx{\theta}
= \int_0^{2\pi} \frac{a^3}{2} \dx{\theta} = \pi a^3 \; .
\end{align*}

\subI{Second representation}
The parametric representation is given by the Cartesian coordinates
$\displaystyle g(x,y) = (x, y, \sqrt{a^2-x^2-y^2})$ for
$\displaystyle x^2+y^2\leq a$.  We have
\begin{align*}
\dx{S} &= \sqrt{ \left(\pdydx{z}{x}\right)^2 +
  \left(\pdydx{z}{y}\right)^2 + 1} \ \dx{y}\dx{x} \\
&= \sqrt{ \left(\frac{-x}{\sqrt{a^2-x^2-y^2}}\right)^2 +
  \left(\frac{-y}{\sqrt{a^2-x^2-y^2}}\right)^2 + 1} \ \dx{y}\dx{x}
= \frac{a}{\sqrt{a^2-x^2-y^2}}  \dx{y}\dx{x} \ .
\end{align*}
On the disk $\displaystyle x^2 +y^2 \leq a$, we have that
$-a\leq x \leq a$ and
$\displaystyle -\sqrt{a^2-x^2} \leq y \leq \sqrt{a^2-x^2}$.
Hence
\begin{align*}
\iint_S z \dx{S} &= \int_{-a}^a \int_{-\sqrt{a^2-x^2}}^{\sqrt{a^2-x^2}}
\sqrt{a^2-x^2-y^2}\ \frac{a}{\sqrt{a^2-x^2-y^2}} \dx{y}\dx{x}
= \int_{-a}^a \int_{-\sqrt{a^2-x^2}}^{\sqrt{a^2-x^2}} a \dx{y}\dx{x} \\
&= \int_{-a}^a a y\bigg|_{y=-\sqrt{a^2-x^2}}^{\sqrt{a^2-x^2}} \dx{x}
= \int_{-a}^a 2a \sqrt{a^2-x^2} \dx{x} = \pi a^3 \; ,
\end{align*}
where we have used the trigonometric substitution $x=a\sin(t)$ with
$-\pi/2 \leq t \leq \pi/2$ to compute the last integral.

This should convince the reader that a good choice of parametric
representation may seriously simplify the computations.
\end{sol}

\begin{question}
Compute the surface integral $\displaystyle \iint_S( x^2 + y^2)\dx{S}$
over the portion $S$ of the sphere $\displaystyle x^2+y^2+z^2=25$
above $z=4$; namely, $z \geq 4$.
\end{question}

\begin{sol}
The surface $S$ is shown in the figure below.
\pdfbox{vect_calculus/question32}  
There are two possible parametric representations that immediately
come to mind:\\
$h(r,\theta) = ( r\cos(\theta), r\sin(\theta), \sqrt{25-r^2} )$
for $0 \leq r \leq 3$ and $0 \leq \theta \leq 2\pi$, and \\
$g(\theta,\phi) = ( 5\cos(\theta)\sin(\phi), 5\sin(\theta)\sin(\phi),
5 \cos(\phi) )$
for $0 \leq \phi \leq \arccos(4/5)$ and $0 \leq \theta \leq 2\pi$.
We will use the second parametric representation to compute the area
of $S$.
% \[
%   \pdydx{g}{\theta} = \left( -5 \sin(\theta)\sin(\phi) ,
%     5\cos(\theta)\sin(\phi), 0 \right)
% \]
% \[
%   \pdydx{g}{\phi} = \left( 5\cos(\theta)\cos(\phi),
%     5\sin(\theta)\cos(\phi),  -5 \sin(\phi) \right) \ ,
% \]
% \[
% \left\| \pdydx{g}{\theta} \times \pdydx{g}{\phi} \right\|
% = \left\| \left(-25\cos(\theta)\sin^2(\phi),
%     -25 \sin(\theta)\sin^2(\phi), -25 \sin(\phi)\cos(\phi) \right)\right\|
% = 25 \sin(\phi) \ .
% \]
Since
$\displaystyle \left\| \pdydx{g}{\theta} \times \pdydx{g}{\phi} \right\|
= 25 \sin(\phi)$, the area is
\begin{align*}
\iint_S (x^2 + y^2) \dx{S}
&= \int_0^{2\pi} \int_0^{\arccos(4/5)} 625 \sin^3(\phi) \dx{\phi}\dx{\theta} \\
&= 1250 \pi \int_0^{\arccos(4/5)} (1-\cos^2(\phi))\sin(\phi)
\dx{\phi} \\
&= 1250\pi \int_{4/5}^1 (1-u^2) \dx{u}
= 1250\pi \left(u-\frac{u^3}{3}\right)\bigg|_{u=4/5}^1 
= \frac{140\pi}{3}
\end{align*}
where we have used the substitution $u = \cos(\phi)$ for the third
equality.
\end{sol}

\begin{question}
Compute $\displaystyle \int_S (x^2 + y^2 - 2z^2) \dx{S}$ where $S$ is
the unit sphere centred at the origin.
\end{question}

\begin{sol}
We have
\[
\int_S (x^2 + y^2 - 2z^2) \dx{S}
= \int_S x^2 \dx{S} + \int_S y^2 \dx{S} -2 \int_S z^2 \dx{S} \ .
\]
A little observation may safe us of a long computation.  Because of
the symmetry, we have that
$\displaystyle \int_S x^2 \dx{S} = \int_S y^2 \dx{S} = \int_S z^2 \dx{S}$.
Thus $\displaystyle \int_S (x^2 + y^2 - 2z^2) \dx{S} = 0$.
\end{sol}

\begin{question}
Compute the integral $\displaystyle \iint_S xyz \dx{S}$ where $S$ is
the triangular surface represented in the following figure.
\pdfbox{vect_calculus/extra18}
\end{question}

\begin{sol}
We first find the equation of the plane containing the triangular
surface.  The vectors $\VEC{v}_1 = \VEC{p}_1-\VEC{p}_2 = (1,-1,-1)$ and
$\VEC{v}_2 = \VEC{p}_3 - \VEC{p}_2 = (0,1,-1)$ are parallel to that plane.  A
normal vector to the plane is given by
$\VEC{n} = \VEC{v}_1 \times \VEC{v}_2 = (2,1,1)$
and the equation of the plane is
$\ps{\big((x,y,z)-\VEC{p}_1\big)}{\VEC{n}} = 2x -2 +y+z = 0$.
A parametric representation of the triangular surface is given by
$\displaystyle \phi(x,y) = (x, y, 2-2x-y)$ for $0\leq x \leq 1$ and
$1-x\leq y \leq 2-2x$.
\pdfbox{vect_calculus/extra19}
We have that
$\displaystyle \dx{S}
= \left\| \pdydx{\phi}{x} \times \pdydx{\phi}{y} \right\| \dx{y}\dx{x}
= \|\VEC{n}\| \dx{y}\dx{x} = \sqrt{6}\ \dx{y}\dx{x}$.
Hence
\begin{align*}
\iint_S xyz \dx{S}
&= \int_0^1 \int_{1-x}^{2-2x} x y (2-2x-y) \sqrt{6}\ \dx{y}\dx{x} 
= \int_0^1 \left( xy^2 - x^2y^2 - \frac{xy^3}{3}\right)\bigg|_{y=1-x}^{2-2x}
\sqrt{6}\ \dx{x}\\
&= \frac{2\sqrt{6}}{3} \int_0^1  x (1-x)^3 \dx{x}
= \frac{2\sqrt{6}}{3} \int_0^1 \left( -x^4 +3x^3-3x^2 +x\right)\dx{x} \\
&= \frac{2\sqrt{6}}{3} \left( -\frac{x^5}{5} + \frac{3 x^4}{4}
- x^3 + \frac{x^2}{2}\right)\bigg|_{x=0}^1 = \frac{\sqrt{6}}{30} \ .
\end{align*}
Note that we could also have used the following formula to compute
$\dx{S}$.
\[
\dx{S} = \sqrt{\left(\pdydx{z}{x}\right)^2 + \left(\pdydx{z}{y}\right)^2
  + 1}\  \dx{y}\dx{x} = \sqrt{ (-2)^2 + (-1)^2 + 1}\ \dx{y}\dx{x}
= \sqrt{6}\ \dx{y}\dx{x} \ .
\]
\end{sol}

\begin{question}
Find the area of the surface $z=xy$ inside the cylinder
$\displaystyle x^2+y^2 = a^2$.
\end{question}

\begin{sol}
Let $S$ be the surface defined in the statement of the question.  A
parametric representation of this surface is given by
$\displaystyle g(r,\theta) = \left( r\cos(\theta),  r\sin(\theta) ,
r^2 \cos(\theta)\sin(\theta) \right)$
for $0 \leq r \leq a$ and $0\leq \theta \leq 2\pi$.
Since
$\displaystyle \pdydx{g}{r} = \left( \cos(\theta) , \sin(\theta) ,
2r \cos(\theta)\sin(\theta) \right)$
and\\
$\displaystyle \pdydx{g}{\theta} = \left( -r \sin(\theta) , r\cos(\theta) ,
r^2 (\cos^2(\theta)-\sin^2(\theta)) \right)$,
we get that\\
$\displaystyle \left\| \pdydx{g}{r} \times \pdydx{g}{\theta} \right\|
= \left\| \left(-r^2\sin(\theta), -r^2\cos(\theta), r \right)\right\|
= r \sqrt{r^2+1}$.
Hence, the area is
\[
\iint_S \dx{A} = \int_0^{2\pi} \int_0^a r \sqrt{r^2+1} \dx{r}\dx{\theta}
= \frac{2\pi}{3} (r^2+1)^{3/2} \bigg|_{r=0}^a
= \frac{2\pi}{3} \left((a^2+1)^{3/2} - 1 \right) \ .
\]
\end{sol}

\begin{question}
Find the area of the surface $\displaystyle z=x^2+y^2$ inside the cylinder
$\displaystyle x^2+y^2 = a^2$.
\end{question}

\begin{sol}
Let $S$ be the surface defined in the statement of the question.  A
parametric representation of this surface is given by
$\displaystyle g(r,\theta) = \left( r\cos(\theta), r\sin(\theta),  r^2
\right)$ for $0 \leq r \leq a$ and $0\leq \theta \leq 2\pi$.
Since
$\displaystyle \pdydx{g}{r} = \left( \cos(\theta) , \sin(\theta) ,
2r \right)$ and
$\displaystyle \pdydx{g}{\theta} = \left( -r \sin(\theta) ,
r\cos(\theta) , 0 \right)$, we get that
$\displaystyle \left\| \pdydx{g}{r} \times \pdydx{g}{\theta} \right\|
= \left\| \left(-2 r^2\cos(\theta), -2r^2\sin(\theta), r \right) \right\|
= r \sqrt{4r^2+1}$.
Hence, the area is
\[
\iint_S \dx{A} = \int_0^{2\pi} \int_0^a r \sqrt{4r^2+1} \dx{r}\dx{\theta}
= \frac{\pi}{6} (4r^2+1)^{3/2} \bigg|_{r=0}^a
= \frac{\pi}{6} \left((4a^2+1)^{3/2} - 1 \right) \ .
\]
\end{sol}

\begin{question}
Let $S$ be the solid bounded below by the paraboloid
$\displaystyle z=x^2+y^2$ and above by
the sphere $\displaystyle x^2+y^2+z^2=4z$ for $z\geq 0$.  Find the
area of the surface of $S$.
\end{question}

\begin{sol}
The value of $z$ at the intersection of the paraboloid with the sphere is
given by $\displaystyle z + z^2 = 4z$; namely,
$\displaystyle z^2-3z=z(z-3)=0$.  For $z=0$, the sphere
touches the paraboloid at its lowest point.  For $z=3$, we get the circle
$\displaystyle x^2+y^2=3$.

The surface $S$ is shown in the following figure.
\pdfbox{vect_calculus/finalB}
A parametric representation of the part of the sphere is given by
\[
\phi_1(\theta,\phi) =(2\cos(\theta)\sin(\phi), 2\sin(\theta)\sin(\phi),
(2 + 2\cos(\phi)))
\]
for $0\leq \theta \leq 2\pi$ and $0 \leq \phi \leq \pi/3 = \arccos(1/2)$.
A parametric representation of the part of the paraboloid is given by
\[
\phi_2(\theta,r) = (r\cos(\theta),r\sin(\theta),r^2)
\]
for $0\leq \theta \leq 2\pi$ and $0 \leq r \leq \sqrt{3}$.
We have
\[
\left\| \pdydx{\phi_1}{\theta} \times \pdydx{\phi_1}{\phi} \right\|
% &=
% \left\| \det \begin{pmatrix} \VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
% -2\sin(\theta)\sin(\phi) & 2\cos(\theta)\sin(\phi) & 0 \\
% 2\cos(\theta)\cos(\phi) & 2\sin(\theta)\cos(\phi) &
% -2\sin(\phi) \end{pmatrix} \right\| \\
= \left\|
\big(-4\sin(\theta)\sin^2(\phi), - 4\cos(\theta)\sin^2(\phi),
- 4 \sin(\phi)\cos(\phi) \big) \right\|
= 4\sin(\phi)
\]
and
\[
\left\| \pdydx{\phi_2}{\theta} \times \pdydx{\phi_2}{r} \right\|
% &=
% \left\| \det \begin{pmatrix} \VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
% -r\sin(\theta) & r\cos(\theta) & 0 \\
% \cos(\theta) & \sin(\theta) & 2r \end{pmatrix} \right\| \\
= \left\| \big( 2r^2 \cos(\theta), 2r^2\sin(\theta), -r\big) \right\|
= r \sqrt{4r^2+1} \ .
\]
Hence, the area is
\begin{align*}
\int_{\partial S} \dx{A}
&=\int_0^{2\pi} \int_0^{\pi/3} 4\sin(\phi) \dx{\phi}\dx{\theta}
+ \int_0^{2\pi} \int_0^{\sqrt{3}} r\sqrt{1+4r^2} \dx{r}\dx{\theta} \\
& = -8\pi \cos(\phi)\bigg|_{\phi=0}^{\pi/3} +
\frac{\pi}{6} (1+4r^2)^{3/2}\bigg|_{r=0}^{\sqrt{3}}
= 4\pi + \frac{\pi}{6} \left(13^{3/2}-1\right) \ .
\end{align*}
\end{sol}

\begin{question}
Given $0 < a < b$, compute the area of the torus obtained from the
rotation of the circle $\displaystyle (x-b)^2+z^2 = a^2$ about the $z$ axis.
\end{question}

\begin{sol}
\pdfbox{vect_calculus/question31}
A parametric representation of the circle $\displaystyle (x-b)^2+z^2 = a^2$
is given by\\
$\displaystyle h(\phi) =
\begin{pmatrix} b+ a \cos(\phi) & 0 & a\sin(\phi) \end{pmatrix}^\top$
for $0 \leq \phi \leq 2\pi$.  To obtain the torus, it suffices to
rotate this circle about the $z$ axis.  This is done by multiplying
$h(\phi)$ by the matrix of rotation by $\theta$ radians
counterclockwise about the $z$ axis given by
\[
R_\theta =
\begin{pmatrix}
\cos(\theta) & -\sin(\theta) & 0 \\ \sin(\theta) & \cos(\theta) & 0 \\   
0 & 0 & 1
\end{pmatrix} \ .
\]
We get the following parametric representation for the torus.
\[
g(\phi,\theta) = R_\theta
\begin{pmatrix}
b+ a \cos(\phi) \\ 0 \\ a\sin(\phi)
\end{pmatrix}
= \begin{pmatrix}
(b + a \cos(\phi))\cos(\theta) \\
(b + a \cos(\phi))\sin(\theta) \\ a \sin(\phi)
\end{pmatrix}
\]
for $0\leq \phi \leq 2\pi$ and $0 \leq \theta \leq 2\pi$.
Since
$\displaystyle \pdydx{g}{\phi} =
\begin{pmatrix}
-a \sin(\phi)\cos(\theta) \\
-a \sin(\phi)\sin(\theta) \\
a \cos(\phi) 
\end{pmatrix}$
and\\
$\displaystyle \pdydx{g}{\theta} =
\begin{pmatrix}
-(b+a\cos(\phi))\sin(\theta) \\
(b +a \cos(\phi)) \cos(\theta) \\
0 
\end{pmatrix}$,
we get
\[
\left\| \pdydx{g}{\phi} \times \pdydx{g}{\theta} \right\|
= \left\| \begin{pmatrix} -a (b+a\cos(\phi) )\cos(\theta)\cos(\phi) \\
  -a (b+a\cos(\phi)) \sin(\theta) \cos(\phi) \\
  -a (b+ a \cos(\phi) ) \sin(\phi) \end{pmatrix} \right\|
= a (b + a \cos(\phi)) \ .
\]
Hence, the area is
\[
\iint_S \dx{A} = \int_0^{2\pi} \int_0^{2\pi} a (b + a \cos(\phi))
\dx{\phi}\dx{\theta}
= 2\pi \left( a b \phi +a^2 \sin(\phi) \right)\bigg|_{\phi=0}^{2\pi} 
= 4 \pi^2 a b \ .
\]
\end{sol}

\begin{question}
A Mobius strip can be parameterized by
\[
g(u,v) = \big( (2 - v \sin(u/2) )\cos(u),
(2 - v \sin(u/2) )\sin(u), v\cos(u/2) \big)
\]
for $0\leq u < 2\pi$ and $|v| <1$.  Set up the integral to compute the
area of this Mobiüs strip.  What is the surface of a Mobiüs strip?
\end{question}

\begin{question}
Find the surface area of the portion of the paraboloid
$\displaystyle z=x^2+y^2$ which is
inside the region bounded by the cylinders $\displaystyle x^2+y^2=2$
and $\displaystyle x^2+y^2=6$.
\end{question}

\begin{question}
Find the area of the portion of the sphere of radius $R$ centred at
the origin which is inside the cylinder $\displaystyle x^2+y^2 -Ry\leq 0$ and
satisfies $x \geq 0$.
\end{question}

\begin{question}
Suppose that $f:[a,b]\to \RR$ is a continuously differentiable function.
We learn in calculus that the area $A$ of the surface of revolution $S$
obtained by revolving the graph of $f$ (in the $x,y$ plane) around the
$x$ axis is
$\displaystyle A = 2\pi \int_a^b |f(x)|\sqrt{1+(f'(x))^2}\dx{x}$.  Prove this
formula using a surface integral.
\end{question}

\begin{sol}
A parametric representation of the surface of revolution is given by\\
$\displaystyle \phi(x,\theta) = \big(x,f(x)\cos(\theta),
f(x)\sin(\theta)\big)$ for $a\leq x \leq b$ and $0 \leq \theta \leq 2\pi$.
Hence
\begin{align*}
\left\| \pdydx{\phi}{\theta} \times \pdydx{\phi}{x} \right\| &=
\left\| \det \begin{pmatrix} \VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
0 & -f(x)\sin(\theta) & f(x)\cos(\theta) \\
1 & f'(x)\cos(\theta) & f'(x)\sin(\theta) \end{pmatrix} \right\| \\
&= \left\| \big( -f(x)f'(x), f(x)\cos(\theta), f(x)\sin(\theta)\big)\right\|
= |f(x)| \sqrt{1+(f'(x))^2} \ .
\end{align*}
Thus, the area is
\[
\int_0^{2\pi} \int_a^b |f(x)| \sqrt{1+(f'(x))^2} \dx{x}\dx{\theta}
= 2\pi \int_a^b |f(x)|\sqrt{1+(f'(x))^2}\dx{x} \ .
\]
\end{sol}

\begin{question}
Evaluate directly the surface integral
$\displaystyle \iint_S \VEC{F} \cdot \dx{\VEC{S}}$ where
$F(x,y,z) = (x, y, z)$ and $S$ is the cylinder defined by
$\displaystyle x^2+y^2=1$ and $0\leq z \leq 1$.  The orientation on $S$ is
given by the unit normal to $S$ pointing away from the $z$ axis.
\end{question}

\begin{sol}
The surface $S$ is shown in the following figure.
\pdfbox{vect_calculus/extra20}
We choose the parametric representation
$\displaystyle \phi(\theta,z) = \big( \cos(\theta), \sin(\theta), z\big)$
for $0\leq \theta < 2\pi$ and $0\leq z \leq 1$.  Hence
\[
\pdydx{\phi}{\theta} \times \pdydx{\phi}{z} =
\det \begin{pmatrix} \VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
-\sin(\theta) & \cos(\theta) & 0 \\
0 & 0 & 1 \end{pmatrix}
= \big( \cos(\theta), \sin(\theta), 0 \big) \ .
\]
This is a vector pointing away from the $z$ axis as required by the
orientation on $S$.  Since it is a vector of norm one, we have that
$\displaystyle \VEC{n} = \pdydx{\phi}{\theta} \times \pdydx{\phi}{z}$
is the unit normal associated to the orientation on $S$.  Thus
\begin{align*}
\iint_S F \cdot \dx{\VEC{S}} &= \int_S F \cdot \VEC{n} \dx{S}
= \int_0^{2\pi} \int_0^1 \big(\cos(\theta), \sin(\theta), z \big)
\cdot \big(\cos(\theta), \sin(\theta),0 \big) \dx{z}\dx{\theta} \\
&= \int_0^{2\pi} \int_0^1 \dx{z}\dx{\theta} = 2\pi \ .
\end{align*}
\end{sol}

\begin{question}
Evaluate directly the surface integral
$\displaystyle \iint_S \VEC{F} \cdot \dx{\VEC{S}}$ where
$\displaystyle F(x,y,z) = \big( x^2y, -3 xy^2, 4y^3\big)$ and $S$ is the
portion of the surface $\displaystyle z=x^2+y^2+9$ with
$0\leq x \leq 2$ and $0\leq y \leq 1$.
The orientation on $S$ is given by the unit normal to $S$
pointing in the direction of $z$ negative.
\end{question}

\begin{sol}
The surface $S$ is shown in the following figure.
\pdfbox{vect_calculus/extra21}
We choose the parametric representation
$\displaystyle \phi(x,y) = (x,y, (x^2+y^2-9)\big)$
for $0\leq x < 2$ and $0\leq y \leq 1$.  Hence
\[
\pdydx{\phi}{x} \times \pdydx{\phi}{y} =
\det \begin{pmatrix} \VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
1 & 0 & 2x \\
0 & 1 & 2y \end{pmatrix}
= (-2x , - 2y, 1) \ .
\]
This is a vector pointing in the direction of $z$ positive.  Thus, in
the opposite direction of the unit normal that gives the orientation
on $S$.  Therefore
\begin{align*}
\VEC{n} &= - \left\|\pdydx{\phi}{x} \times \pdydx{\phi}{y}\right\|^{-1}
\left( \pdydx{\phi}{x} \times \pdydx{\phi}{y} \right) \\
&= \left( \frac{2x}{\sqrt{4x^2+4y^2+1}}, \frac{2y}{\sqrt{4x^2+4y^2+1}},
- \frac{1}{\sqrt{4x^2+4y^2+1}}\right)
\end{align*}
is a normal vector pointing in the direction of $z$ negative as
required and\\
$\displaystyle \dx{S} = \left\|\pdydx{\phi}{x} \times \pdydx{\phi}{y}\right\|
\dx{y}\dx{x} = \sqrt{4x^2+4y^2+1} \dx{y}\dx{x}$.
Hence
\begin{align*}
\iint_S F \cdot \dx{\VEC{S}} &= \int_S F \cdot \VEC{n} \dx{S}
= \int_0^2 \int_0^1 \left(x^2y, -3 xy^2, 4y^3\right)\cdot
\left(2x, 2y, -1\right) \dx{y}\dx{x} \\
&= \int_0^2 \int_0^1 \left( 2x^3y -6xy^3 -4y^3\right) \dx{y}\dx{x}
= \int_0^2 \left( x^3y^2 - \frac{3}{2}xy^4 - y^4\right)\bigg|_{y=0}^1 \dx{x} \\
&= \int_0^2 \left(x^3 - \frac{3x}{2} -1\right)\dx{x}
= \left(\frac{x^4}{4} - \frac{3x^2}{4} - x\right)\bigg|_{x=0}^2
= -1 \ .
\end{align*}
\end{sol}

\begin{question}
Evaluate directly the surface integral
$\displaystyle \iint_R F \cdot \dx{\VEC{S}}$ where
$F(x,y,z) = (x,0,y)$ and $R$ is one of the surfaces described below.

\subQ{a} $R$ is the surface with the parametric representation
$\displaystyle g(u,v) = \big( u + v, u^2 - v^2,  v\cos(u/2)\big)$
for $0 \leq u \leq 1$ and $0 \leq v \leq 1$.  We assume that this
parametric representation is consistent with the chosen orientation on
$R$.\\
\subQ{b} $R$ is the surface of the cylinder $\displaystyle y^2+z^2 = 1$ with
$0\leq x \leq 1$.  The orientation is given by the unit normal
pointing away from the $x$ axis.\\
\subQ{c} $R$ is the boundary of the unit cube
$\{(x,y,z) : 0 \leq x,y,z \leq 1\}$.  The orientation is given by the
unit normal pointing outward.
\end{question}

\begin{question}
Compute $\displaystyle \int_S F \cdot \dx{\VEC{S}}$    \label{surfQuestionA}
for each of the following vector fields $F$ and surfaces $S$.

\subQ{a} $F(x,y,z) = (xz,0,-xy)$ and $S$ is the portion of the surface
$z=xy$ for $0 \leq x \leq 1$ and $0\leq y \leq 2$.  The orientation on
$S$ is give by a normal pointing in the direction of $z$ positive.\\
\subQ{b} $\displaystyle F(x,y,z) = (x^2,z,-y)$ and $S$ is the unit
sphere centred at the origin.  The orientation on $S$ is give by a
normal pointing outward.\\
\subQ{c} $F(x,y,z) = (xy,z,0)$ and $S$ is the triangular surface with
vertices at $(2,0,0)$, $(0,2,0)$ and $(0,0,2)$.  The orientation on
$S$ is give by a normal pointing in the direction of $z$ positive.\\
\subQ{d} $\displaystyle F(x,y,z) = (0,0,z^2)$ and $S$ is the boundary
of the region enclosed by the cylinder $\displaystyle x^2+y^2=1$ and
the planes $z=a,b$ with $a < b$.  The orientation on $S$ is
given by a normal pointing outward.\\
\subQ{e} $F(x,y,z) = (x,y,z)$ and $S$ is the boundary of the region
enclosed by the surface $\displaystyle z=x^2+y^2$ and the sphere
$\displaystyle x^2+y^2+z^2=20$.
The orientation on $S$ is given by a normal pointing outward.
\end{question}

\begin{sol}
\subQ{a} we choose the parametric representation
$g(u,v) = (u,v,uv)$ for $0 \leq u \leq 1$ and $0 \leq v \leq 2$.
Since
$\displaystyle \pdydx{g}{u} = (1,0,v)$ and
$\displaystyle \pdydx{g}{v} = (0,1,u)$, we get that
$\displaystyle \pdydx{g}{u} \times \pdydx{g}{v} = (-v,-u,1)$.
Since $(-v,-u,1)$ is a vector that point in the direction of $z$
positive, the parametric representation is consistent with the
required orientation on $S$.  Thus
\begin{align*}
\iint_S F \cdot \dx{\VEC{S}}
&= \int_0^1 \int_0^2 (u^2v,0,-uv)\cdot (-v,-u,1) \dx{v}\dx{u}
= \int_0^1 \int_0^2 (-u^2v^2 - uv) \dx{v}\dx{u} \\
&= \int_0^1 \left(-\frac{u^2v^3}{3}
- \frac{uv^2}{2} \right)\bigg|_{v=0}^2  \dx{u}
= \int_0^1 \left(-\frac{8u^2}{3} - 2u \right)\dx{u} \\
&= \left(-\frac{8u^3}{9} - u^2 \right)\bigg|_{u=0}^1 =  -\frac{17}{9} \ .
\end{align*}

\subQ{b} We have that
$\displaystyle \iint_S F \cdot \dx{\VEC{S}} = \iint_S F \cdot \VEC{n} \dx{S}$
where $\VEC{n}$ is a unit vector pointing outside $S$ at each point of
$S$.  Since $S$ is a unit sphere centred at the origin, we have that
$\VEC{n} = (x,y,z)$ at every point $(x,y,z)$ of $S$.  Thus
\[
\iint_S F \cdot \dx{\VEC{S}} = \iint_S (x^2,z,-y) \cdot (x,y,z) \dx{S}
= \iint_S x^3 \dx{S} \ .
\]
Since $\displaystyle x \mapsto x^3$ is an odd function and $S$ is
symmetric with respect to the $y,z$ plane, the last integral is
null.  Hence $\displaystyle \iint_S F \cdot \dx{\VEC{S}} = 0$.

\subQ{c} We first need to find the equation of the plane that contains
the points $(2,0,0)$, $(0,2,0)$ and $(0,0,2)$.  A normal to this plane
is given by
\[
  \VEC{v} = \big( (0,2,0) - (2,0,0)\big) \times
  \big( (0,0,2) - (2,0,0)\big) = (4,4,4) \ .
\]
An equation for the plane is given by
\[
\big( (x,y,z) - (2,0,0)\big) \cdot (4,4,4)
= (x-2,y,z) \cdot (4,4,4) =  4x-8 + 4y + 4z = 0 \ ;
\]
namely, $z = 2 -x -y$.  We choose the parametric representation
$g(u,v) = (u,v,2-u-v)$ for $0 \leq u \leq 2$ and $0 \leq v \leq 2 - u$.
\pdfbox{vect_calculus/question33}
Since
$\displaystyle \pdydx{g}{u} = (1,0,-1)$ and
$\displaystyle \pdydx{g}{v} = (0,1,-1)$, we get
$\displaystyle \pdydx{g}{u} \times \pdydx{g}{v} = (1,1,1)$.
Since $(1,1,1)$ is a vector that point in the direction of $z$
positive, the parametric representation is consistent with the
required orientation on $S$.  Thus
\begin{align*}
\iint_S F \cdot \dx{\VEC{S}}
&= \int_0^2 \int_0^{2-u} (uv,2-u-v,0)\cdot (1,1,1) \dx{v}\dx{u}
= \int_0^2 \int_0^{2-u} (2-u-v+uv) \dx{v}\dx{u} \\
&= \int_0^2 \left(2v-uv-\frac{v^2}{2}+\frac{uv^2}{2}
\right)\bigg|_{v=0}^{2-u}\dx{u}
= \int_0^2 \left(2 -\frac{3u^2}{2} + \frac{u^3}{2} \right)\dx{u} \\
&= \left(2u -\frac{u^3}{2} + \frac{u^4}{8} \right)\bigg|_{u=0}^2
 = 2 \ .
\end{align*}

\subQ{d} We have
\[
  \iint_S F \cdot \dx{\VEC{S}} = \iint_S F \cdot \VEC{n} \dx{S}
= \iint_{S_1} F \cdot \VEC{n} \dx{S} + \iint_{S_2} F \cdot \VEC{n} \dx{S}
+ \iint_{S_3} F \cdot \VEC{n} \dx{S} \ ,
\]
where $S_1 = \{ (x,y,z) : x^2 + y^2 \leq 1 \text{ and } z=a\}$ is the
bottom of $S$,
$S_2 = \{ (x,y,z) : x^2 + y^2 = 1 \text{ and } a \leq z \leq b\}$ is the
side of $S$, and
$S_3 = \{ (x,y,z) : x^2 + y^2 \leq 1 \text{ and } z=b\}$ is the
top of $S$.
\pdfbox{vect_calculus/question34}
As usual, $\VEC{n}$ is a unit vector pointing
outside $S$.  So $\VEC{n} = (0,0,-1)$ on $S_1$,
$\VEC{n} = (x,y,0)$ on $S_2$ and $\VEC{n} = (0,0,1)$ on $S_3$.
Hence
\begin{align*}
  \iint_S F \cdot \dx{\VEC{S}} 
&= \iint_{S_1} (0,0,a^2) \cdot (0,0,-1) \dx{S}
+ \iint_{S_2} (0,0,z^2) \cdot (x,y,0) \dx{S} \\
& \qquad + \iint_{S_3} (0,0,b^2) \cdot (0,0,1) \dx{S}
= -a^2 \iint_{S_1} \dx{S} + b^2 \iint_{S_3} \dx{S} \ .
\end{align*}
Since
$\displaystyle \iint_{S_1} \dx{S} = \iint_{S_3} \dx{S} =
  \iint_{x^2+y^2\leq 1} \dx{S} = \pi$,
the area of a disk of radius $1$, we get that
$\displaystyle \iint_S F \cdot \dx{\VEC{S}} = (b^2-a^2)\pi$.

\subQ{e} We first find the intersection of the two surfaces.
On the intersection, $z$ must satisfy
$\displaystyle z^2+z-20 = (z+5)(z-4)=0$.  Since
$\displaystyle z = x^2+y^2$ is non negative, we get $z=4$.  Thus the
intersection is the circle $\displaystyle x^2+y^2=4$ with $z=4$.

We have
\[
  \iint_S F \cdot \dx{\VEC{S}} = \iint_S F \cdot \VEC{n} \dx{S}
= \iint_{S_1} F \cdot \VEC{n} \dx{S} + \iint_{S_2} F \cdot \VEC{n} \dx{S} \ ,
\]
where
$\displaystyle S_1 = \{ (x,y,\sqrt{20-x^2-y^2}) : x^2 + y^2 \leq 4 \}$ is the
top of $S$ and
$\displaystyle S_2 = \{ (x,y,x^2+y^2) : x^2 + y^2 \leq 1\}$ is the bottom
of $S$.
\pdfbox{vect_calculus/question35}
As usual, $\VEC{n}$ is a unit vector pointing outside $S$.

On $S_1$, we choose the parametric representation
\[
g_1(\phi,\theta) = \big(2\sqrt{5} \cos(\theta)\sin(\phi) ,
2\sqrt{5} \sin(\theta)\sin(\phi) ,
2\sqrt{5} \cos(\phi) \big)
\]
for $0 \leq \theta \leq 2\pi$ and $0 \leq \phi \leq \arccos(2/\sqrt{5})$.
\pdfbox{vect_calculus/question36}
Since
\[
\pdydx{g_1}{\phi} =
\left(2\sqrt{5} \cos(\theta)\cos(\phi), 2\sqrt{5} \sin(\theta)\cos(\phi),
  - 2\sqrt{5} \sin(\phi) \right)
\]
and
\[
\pdydx{g_1}{\theta} =
\left(-2\sqrt{5} \sin(\theta) \sin(\phi), 2\sqrt{5} \cos(\theta)\sin(\phi),
  0 \right) \ ,
\]
we get
\[
\pdydx{g_1}{\phi} \times \pdydx{g_1}{\theta}
=\left( 20 \cos(\theta)\sin^2(\phi), 20 \sin(\theta)\sin^2(\phi), 
  20 \cos(\phi)\sin(\phi) \right) \ .
\]
This is a vector that point in the direction of $z$
positive, thus the parametric representation is consistent with the
required orientation on $S_1$.  We have
\begin{align*}
\iint_{S_1} F \cdot \dx{\VEC{S}}
&= \iint_{S_1} \big(2\sqrt{5} \cos(\theta)\sin(\phi) ,
2\sqrt{5} \sin(\theta)\sin(\phi), 2\sqrt{5} \cos(\phi) \big) \\
&\qquad  \cdot
\left( 20 \cos(\theta)\sin^2(\phi), 20 \sin(\theta)\sin^2(\phi), 
20 \cos(\phi)\sin(\phi) \right) \dx{S} \\
&= \iint_{S_1} 40\sqrt{5}\sin(\phi) \dx{S}
= \int_0^{2\pi} \int_0^{\arccos(2/\sqrt{5}} 40\sqrt{5}\sin(\phi)
\dx{\phi}\dx{\theta} \\
&= -80 \pi \sqrt{5} \cos(\phi)\bigg|_{\phi=0}^{\arccos(2/\sqrt{5}}
= 80\pi \sqrt{5} - 160 \pi \ .
\end{align*}

On $S_2$, we choose the parametric representation
$\displaystyle
g_2(\theta,r) = \big( r \cos(\theta), r \sin(\theta), r^2 \big)$ for
$0 \leq \theta \leq 2\pi$ and $0 \leq r \leq 2$.  Since
$\displaystyle
\pdydx{g_2}{\theta} = \left(-r \sin(\theta), r \cos(\theta), 0 \right)$
and
$\displaystyle \pdydx{g_2}{r} = \left( \cos(\theta), \sin(\theta), 2r \right)$,
we get that
$\displaystyle \pdydx{g_2}{\theta} \times \pdydx{g_2}{r}
=\left( 2 r^2 \cos(\theta) , 2 r^2\sin(\theta), -r \right)$.
This is a vector that point in the direction of $z$
negative, thus the parametric representation is consistent with the
required orientation on $S_2$.  We have
\begin{align*}
\iint_{S_2} F \cdot \dx{\VEC{S}}
&= \iint_{S_2} \big( r \cos(\theta), r \sin(\theta), r^2 \big) \cdot
\left( 2 r^2 \cos(\theta) , 2 r^2 \sin(\theta), -r\right) \dx{S} \\
&= \iint_{S_2} r^3 \dx{S}
= \int_0^{2\pi} \int_0^2 r^3 \dx{r}\dx{\theta}
= 2 \pi \left(\frac{r^4}{4} \right)\bigg|_{r=0}^2
= 8 \pi \ .
\end{align*}
We therefore have that
$\displaystyle 
\iint_S F \cdot \dx{\VEC{S}} = 80\pi \sqrt{5} - 160\pi + 8\pi
= 8\pi(10\sqrt{5} - 19)$.
\end{sol}

\subsection{Green's, Stokes' and Divergence Theorems}

\begin{question}
Using two different methods, evaluate the line integral
$\int_C F \cdot \dx{\VEC{s}}$ where 
$F(x,y) = (y,x)$ and $C$ is the closed curve defined by the parametric
representation
$\displaystyle \sigma(t) = (t^2-1,t^3-t)$ for $-1 \leq t \leq 1$.
We assume that the parametric representation is consistent with the
orientation on $C$.
\end{question}

\begin{sol}
\stage{i} Since $\displaystyle \sigma'(t) = (2t, 3t^2-1)$. the line
integral is
\begin{align*}
\int_C F \cdot \dx{\VEC{s}} &= \int_{-1}^1
(t^3-t, t^2-1)\cdot (2t, 3t^2 -1) \dx{t} \\
&= \int_{-1}^1 \big( 5t^4 - 6t^2 +1 \big) \dx{t}
= \left( t^5 - 2t^3 +t\right)\big|_{t=-1}^1 = 0 \ .
\end{align*}

\stage{ii} Suppose that $D$ is the region enclosed by $C$.  Note that
$C$ is a closed curve like a circle.  To justify this claim, consider
$\displaystyle t^3 -t = t(t^2-1)$.  We have that $\displaystyle x=t^2-1$
decreases from $0$ to $-1$ with $\displaystyle y =t^3-t>0$ when $t$
goes from $-1$ to $0$, and $\displaystyle x=t^2-1$ increases from $-1$
to $0$ with $\displaystyle y =t^3-t<0$ when $t$ goes from $0$ to 
$1$.

We select the orientation on $C$ such that $D$ is to the left when
travelling along $C$.  Using Green's Theorem, we get
\[
\epsilon \int_C F \cdot \dx{\VEC{s}} =
\iint_D \left( \pdydx{F_2}{x} - \pdydx{F_1}{y} \right) \dx{x}\dx{y}
= \iint_D \left( 1 - 1 \right) \dx{x}\dx{y} = 0
\]
where $\epsilon = 1$ if the orientation on $C$ used for the Green's
theorem is the orientation on $C$ in the statement of the question or
$-1$ if it is the opposite orientation.   For this question, the
value of $\epsilon$ does not matter because the value of the integral
is null.
\end{sol}

\begin{question}
Compute $\displaystyle \int_C F \cdot \dx{\VEC{s}}$ using Green's
Theorem in each of the following cases.

\subQ{a} $F(x,y) = (x-y,x+y)$ and $C$ is the unit circle oriented
clockwise.\\
\subQ{b} $\displaystyle F(x,y) = (y^2, -2x)$ and $C$ is the triangle
with vertices $(0,0)$, $(1,0)$ and $(1,1)$ oriented counterclockwise.\\
\subQ{c} $\displaystyle F(x,y) = (x^2 + 10 xy + y^2, 5x^2 + 5xy)$ and
$C$ is the square with vertices $(0,0)$, $(2,0)$, $(0,2)$ and $(2,2)$ oriented
counterclockwise.\\
\subQ{d} $\displaystyle F(x,y) = (3 x^2 \sin(y^2), 2 x^3 y \cos(y^2))$
and $C$ is the boundary of a bounded region $D$ with a continuously
differentiable boundary where the orientation on
$C$ is the positive orientation with respect to $D$.
\end{question}

\begin{sol}
\subQ{a} Since clockwise is not the positive orientation on the
boundary of the disk $\displaystyle D = \{ (x,y) : x^2 + y^2 \leq 1
\}$, we have
\[
\int_C F \cdot \dx{\VEC{s}} = -\int_{\partial D} F \cdot \dx{\VEC{s}}
= - \iint_D \left( \pdydx{F_2}{x} - \pdydx{F_1}{y} \right) \dx{A}
= - 2\iint_D \dx{A} = - 2 \pi \ .
\]

\subQ{b}
We have that $C = \partial D$ where
$D = \{ (x,y) : 0\leq x \leq 1, \ 0 \leq y \leq x \}$.  Moreover $C$ has
the positive orientation with respect to $D$.  Thus
\begin{align*}
\int_C F \cdot \dx{\VEC{s}}
&= \iint_D \left( \pdydx{F_2}{x} - \pdydx{F_1}{y} \right) \dx{A}
= \iint_D \left( -2 -2 y \right) \dx{A}
= -2 \int_0^1 \int_0^x (1+y) \dx{y}\dx{x} \\
&= -2 \int_0^1 \left(y+\frac{y^2}{2}\right)\bigg|_{y=0}^x\dx{x}
= -2 \int_0^1 \left(x+\frac{x^2}{2}\right) \dx{x}
= -2 \left(\frac{x^2}{2}+\frac{x^3}{6}\right)\bigg|_{x=0}^1
= -\frac{4}{3} \ .
\end{align*}

\subQ{c} We have that $C = \partial D$ where
$D = \{ (x,y) : 0\leq x,y \leq 2 \}$.  Moreover $C$ has
the positive orientation with respect to $D$.  Thus
\begin{align*}
\int_C F \cdot \dx{\VEC{s}}
&= \iint_D \left( \pdydx{F_2}{x} - \pdydx{F_1}{y} \right) \dx{A}
= \iint_D \left( 10x + 5y - 10x - 2y \right) \dx{A} \\
&= 3 \int_0^2 \int_0^2 y \dx{y}\dx{x}
= 3 \int_0^2 \frac{y^2}{2}\bigg|_{y=0}^2 \dx{x}
= 6 \int_0^2 \dx{x} = 12 \ .
\end{align*}

\subQ{d} We have that $C = \partial D$ with the positive orientation
with respect to $D$.  Thus
\[
\int_C F \cdot \dx{\VEC{s}}
= \iint_D \left( \pdydx{F_2}{x} - \pdydx{F_1}{y} \right) \dx{A}
= \iint_D 0\dx{A} = 0 \ .
\]
\end{sol}

\begin{question}
Let $D$ be the annulus $\displaystyle \{ (x,y) : 1 \leq x^2 + y^2 \leq 4\}$.
Compute $\displaystyle \int_{\partial D} x y^2 \dx{y} - x^2 y \dx{x}$
where $\partial D$ has the positive orientation with respect to $D$.
\end{question}

\begin{sol}
We have $\displaystyle \int_{\partial D} F \cdot \dx{\VEC{s}}$ where
$\displaystyle F(x,y) = (-x^2y, x y^2)$.  Thus
\[
\int_{\partial D} x y^2 \dx{y} - x^2 y \dx{x}
= \int_{\partial D} F \cdot \dx{\VEC{s}}
= \iint_D \left( \pdydx{F_2}{x} - \pdydx{F_1}{y} \right) \dx{A}
= \iint_D \left( y^2 + x^2 \right) \dx{A} \ .
\]
To compute the double integral, we use the change of variables
$x = r\cos(\theta)$ and $y = r\sin(\theta)$ for $1 \leq r \leq 2$ and
$0 \leq \theta \leq 2\pi$.   Thus
$\displaystyle \left| \frac{\partial(x,y)}{\partial(r,\theta)} \right| = r$
and
\[
\iint_D \left( y^2 + x^2 \right) \dx{A}
= \int_0^{2\pi} \int_1^2 r^3 \dx{r}\dx{\theta}
= 2\pi \frac{r^4}{4}\bigg|_{r=1}^2
= 8 \pi - \frac{\pi}{2} \ .
\]
\end{sol}

\begin{question}
Find the simple closed curve $C$ of class $\displaystyle C^1$
that maximize the line integral
$\displaystyle I_C = \int_C F \cdot \dx{\VEC{s}}$ where
$\displaystyle F(x,y) = (y^3, 3x-x^3)$.
\end{question}

\begin{sol}
Suppose that $C = \partial D$ is the boundary of a bounded region $D$
with a boundary of class $\displaystyle C^1$.  Moreover, suppose that the
orientation on $C$ is the positive orientation with respect to $D$.
We have from Green's Theorem that
\[
I_C = \int_C F \cdot \dx{\VEC{s}}
= \iint_D \left( \pdydx{F_2}{x} - \pdydx{F_1}{y} \right) \dx{A}
= 3 \iint_D \left( 1 -x^2 -y^2 \right) \dx{A} \ .
\]
The maximum of the double integral is reached for
$\displaystyle D=\{ (x,y) : x^2 + y^2 \leq 1\}$, the largest region on which
$\displaystyle 1-x^2-y^2$ is non-negative.  Thus $C$ is the unit
circle with the counterclockwise orientation, the positive orientation
of $\partial D$ with respect to $D$
\end{sol}

\begin{question}
Let $f:[a,b] \to [0,\infty[$ be a continuously differentiable function.
Show that the area under the graph of $f$ for $a\leq x \leq b$
is given by $\displaystyle -\int_{\partial S} y \dx{x}$ where
$S = \{ (x,y) : a\leq x \leq b \text{ and } 0 \leq y \leq f(x) \}$
and the orientation on $\partial S$ is counterclockwise.
\end{question}

\begin{sol}
We show that
$\displaystyle \int_a^b f(x) \dx{x} = -\int_{\partial S} y \dx{x}$.
We have that
$\displaystyle \int_{\partial S} y \dx{x} = \sum_{i=1}^4 \int_{C_i} y \dx{x}$
where
$C_1$ is the straight line with parametric representation
$g_1(t) = (t,0)$ for $a\leq t \leq b$,
$C_2$ is the straight line with parametric representation
$g_2(t) = (b,t)$ for $0\leq t \leq f(b)$,
$C_3$ is the curve with parametric representation
$g_3(t) = (b+ t(a-b),f(b +t(a-b))$ for $ 0\leq t \leq 1$, and
$C_4$ is the straight line with parametric representation
$g_4(t) = (a,f(a)-t)$ for $ 0\leq t \leq f(a)$.
All parametric representations are respecting the positive orientation
on $\partial S$ with respect to $S$.  We can easily see that
$\displaystyle \int_{C_i} y \dx{x} = 0$ for $i=1$, $2$ and $4$ because
either $x$ is constant or $y=0$.  Moreover
\[
\int_{C_3} y\dx{x} = \int_0^1 f(b+t(a-b)) (a-b) \dx{t} 
= \int_b^a f(x) \dx{x} = - \int_a^b f(x) \dx{x} ,
\]
where we have used the substitution $x= b+t(a-b)$.   Thus
$\displaystyle \int_{\partial S} y \dx{x} = - \int_a^b f(x) \dx{x}$
as required.
\end{sol}

\begin{question}
Compute the area under one arch of the cycloid given by
$x=a(u - \sin(u))$ and $y=a(1 - \cos(u))$.
\end{question}

\begin{sol}
Since $\displaystyle \dydx{x}{u} = a (1 -\cos(u)) >0$ for
$u \neq 2n\pi$ with $n \in \ZZ$, we have
that $x$ is strictly increasing.  Moreover, $y \geq 0$ for all $u$ and
$y = 0$ only for $u = 2n \pi$ with $n\in \ZZ$.  Therefore, there is an
arch for each interval of the form $2n\pi \leq u \leq 2(n+1)\pi$ with
$n\in \ZZ$.
\figbox{vect_calculus/question30}{7cm}
The area under such an arch is the area of the region $D$ enclosed by
the horizontal line $C_1$ from $(2n\pi a,0)$ to $(2(n+1)\pi a,0)$ and
the section $C_2$ of the cycloid given by
$\{ ( a(u - \sin(u)) , a(1 - \cos(u)) ) : 2n\pi \leq u \leq 2(n+1)\pi\}$.

On $C_1$, we use the parametric representation
$g_1(u) = ( 2\pi a u, 0)$ for $n \leq u \leq n+1$.  On $C_2$, we use
the parametric representation
$g_2(u) = \big(a(2\pi u-sin(2\pi u)), a(1 - \cos(2\pi u))\big)$ for
$n \leq u \leq n+1$.  We note that this last parametric
representation is not consistent with the positive orientation
on $\partial D$.

Using Green's Theorem with $F(x,y) = (0,x)$, we find that the area of
the arch is given by
\[
\iint_D \dx{A} = \int_{\partial D} x \dx{y} 
= \int_{C_1} x \dx{y} - \int_{C_2} x \dx{y} \ .
\]
However $\displaystyle \int_{C_1} x \dx{y} = 0$ and
\begin{align*}
\int_{C_2} x \dx{y}
&= 2 \pi a^2 \int_n^{n+1}(2\pi u - \sin(2\pi u)) \sin(2\pi u)\dx{u} \\
&= (2 \pi a)^2 \int_n^{n+1} u \sin(2\pi u) \dx{u}
- 2 \pi a^2 \int_n^{n+1} \sin^2(2\pi u)\dx{u} \\
&= (2 \pi a)^2 \int_n^{n+1} u \sin(2\pi u) \dx{u}
- \pi a^2 \int_n^{n+1} \big( 1 - \cos(4 \pi u) \dx{u} \\
& = (2 \pi a)^2 \left( \frac{\sin(2\pi u)}{(2\pi)^2}
- \frac{u \cos(2 \pi u)}{2\pi} \right)\bigg|_{u=n}^{n+1}
-  \pi a^2 \left( u - \frac{\sin(4 \pi u)}{4\pi} \right)\bigg|_{u=n}^{n+1} \\
& = - 2 \pi a^2 - \pi a^2 = - 3\pi a^2   \ .
\end{align*}
Thus $\displaystyle \iint_D \dx{A} = 3\pi a^2$.

We could have used $n=0$ in the computation above because
each arch has the same shape and area due to the
$2\pi$ periodicity of the cosine and sine functions.
\end{sol}

\begin{question}
For each of the following vector fields $F$ and closed surfaces $S$,
compute the integral $\displaystyle \iint_S F \cdot \dx{\VEC{S}}$
using the divergence theorem where the positive orientation on $S$ is
given by the unit normal pointing outside the region enclosed by $S$.

\subQ{a} $\displaystyle F(x,y,z) = (x^2,z,-y)$ and $S$ is the sphere
of radius $1$ centred at the origin.\\
\subQ{b} $F(x,y,z) = (x,y,z)$ and $S$ is the boundary of the region\\
$\displaystyle R = \{ x^2+y^2 \leq z \leq \sqrt{20-x^2-y^2}$.\\
\subQ{c} $F(x,y,z) = (x^2,y^2,z^2)$ and $S$ is the surface of the cube
$R = \{ (x,y,z) : a \leq x,y,z \leq b \}$.\\
\subQ{d} $\displaystyle F(x,y,z) =
\left(\frac{x}{a^2}, \frac{y}{b^2}, \frac{z}{c^2}\right)$
and $S$ is the ellipsoid
$\displaystyle \frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} = 1$.\\
\subQ{e} $\displaystyle F(x,y,z) = (x^2, -2xy,z^2)$ and $S$ is the
boundary of the cylinder
$R = \{ (x,y,z) : (x,y)\in D \text{ and } a \leq z \leq b\}$,
where $\displaystyle D\subset \RR^2$ is a surface with a boundary of
class $\displaystyle C^1$ and an area that is equal to $A$.
\end{question}

\begin{sol}
\subQ{a} According to the divergence theorem, we have
\[
\iint_S F \cdot \dx{\VEC{S}} = \iiint_R \diV F \, \dx{V}
= \iiint_R 2x \dx{V}
\]
where $\displaystyle R = \{ (x,y,z) : x^2 + y^2 + z^2 \leq 1 \}$ is the
ball of radius $1$ centred at the origin and $S = \partial R$.
To compute the triple integral, we note that $x \mapsto 2x$ is a
symmetric function with respect to the $y$,$z$ plane and that the
integral is computed over a symmetric domain with respect to the
$y$,$z$ plane; namely, the ball $R$.  Thus
$\displaystyle = \iiint_R 2x \dx{V} = 0$.

\subQ{b} A sketch of the region $R$ and additional details about this
region can be found in the solution of Question~\ref{surfQuestionA} (e).
We use the information in that question to answer the present question.
According to the divergence theorem, we have
\[
\iint_S F \cdot \dx{\VEC{S}} = \iiint_R \diV F \, \dx{V}
= \iiint_R 3 \dx{V} \ ,
\]
To compute this triple integral, we use the cylindrical coordinates
$x = r \cos(\theta)$, $y = r \sin(\theta)$ and $z=z$ for
$0\leq r \leq 2$, $0 \leq \theta \leq 2\pi$ and
$r^2 \leq z \leq \sqrt{20 - r^2}$.  Since
$\displaystyle
\left|\frac{\partial(x,y,z)}{\partial(r,\theta,z)}\right| = r$,
we get
\begin{align*}
&\iiint_R 3 \dx{V}
= 3\int_0^{2\pi} \int_0^2 \int_{r^2}^{\sqrt{20-r^2}} r \dx{z}\dx{r}\dx{\theta}
= 6\pi \int_0^2 (r z)\bigg|_{z=r^2}^{\sqrt{20-r^2}} \dx{r} \\
&\qquad = 6\pi \int_0^2 \left(r \sqrt{20-r^2} - r^3 \right)\dx{r}
= 6\pi \left( -\frac{(20-r^2)^{3/2}}{3} - \frac{r^4}{4}
\right)\bigg|_{r=0}^2 
= 8\pi(10\sqrt{5} - 19) \ .
\end{align*}

\subQ{c} According to the divergence theorem, we have
\begin{align*}
\iint_S F \cdot \dx{\VEC{S}} &= \iiint_R \diV F \, \dx{V}
= \iiint_R (2x+2y+2z) \dx{V} \\
&= \int_a^b \int_a^b \int_a^b (2x+2y+2z) \dx{z}\dx{y}\dx{x}
= 3 \int_a^b \int_a^b \int_a^b 2x \dx{z}\dx{y}\dx{x} \\
&= 3(b-a)^2 \int_a^b 2x \dx{x}
= 3 (b-a)^2 x^2\bigg|_{x=a}^b = 3 (b-a)^2(b^2-a^2) \ .
\end{align*}

\subQ{d} According to the divergence theorem, we have
\[
\iint_S F \cdot \dx{\VEC{S}} = \iiint_R \diV F \, \dx{V}
= \iiint_R \left(\frac{1}{a^2} + \frac{1}{b^2} +\frac{1}{c^2}\right) \dx{V}
= \left(\frac{1}{a^2} + \frac{1}{b^2} +\frac{1}{c^2}\right) \iiint_R \dx{V} \ ,
\]
where $\displaystyle R = \left\{ (x,y,z) :
\frac{x^2}{a^2} + \frac{y^2}{b^2} + \frac{z^2}{c^2} \leq 1 \right\}$.
Let us assume that we do not know the formula to compute the volume of
an ellipsoid.  To compute the integral $\displaystyle \iiint_R \dx{V}$,
we first reduce it to an integral over a sphere of radius $1$ centred
at the origin.  We use the change of variables $x=au$, $y=bv$ and $z=cw$ for
$\displaystyle u^2 + v^2 + w^2 \leq 1$.  Since
$\displaystyle \left|\frac{\partial(x,y,z)}{\partial(u,v,w)}\right| = abc$,
we get
\[
\iiint_R \dx{V} = abc \iint_{x^2+y^2+z^2\leq 1} \dx{V}
= \frac{4\pi}{3} \, abc \ ,
\]
where we have used the well known formula
$\displaystyle V = 4\pi r^3/3$ to compute the volume of a ball
of radius $r$.  Thus
\[
  \iint_S F \cdot \dx{\VEC{S}} = 
\frac{4\pi}{3} \, abc \left(\frac{1}{a^2} + \frac{1}{b^2}
+\frac{1}{c^2}\right) \ .
\]

\subQ{e} According to the divergence theorem, we have
\begin{align*}
\iint_S F \cdot \dx{\VEC{S}} &= \iiint_R \diV F \, \dx{V}
= \iiint_R 2z \dx{V}
= \iint_W \left( \int_a^b 2z \dx{z} \right) \dx{A} \\
&= \iint_W \left(  z^2\bigg|_{z=a}^b \dx{z} \right) \dx{A}
= (b^2-a^2) \iint_W \dx{A} = (b^2-a^2)A \ .
\end{align*}
\end{sol}

\begin{question}
Let $F$ be the vector field
$\displaystyle F(x,y,z) = (x^2+y^2+z^2) (x, y, z)$ and $S$ be the
sphere of radius $a$ centred at the origin.  Suppose that the
orientation on $S$ is given by the unit normal pointing away from the
origin.  Compute $\displaystyle \iint_S F \cdot \dx{\VEC{S}}$ with and
without the divergence theorem.
\end{question}

\begin{sol}
\stage{i} To compute the integral directly, we use the parametric
representation of $S$ given by
$g(\phi,\theta)= (a \cos(\theta)\sin(\phi), a \sin(\theta)\sin(\phi),
 a \cos(\phi))$ for $0\leq \theta \leq 2\pi$ and
$0\leq \phi \leq \pi$.  We have
\[
  \pdydx{g}{\phi} \times \pdydx{g}{\theta}
= \big(a^2 \cos(\theta)\sin^2(\phi), a^2 \sin(\theta)\sin^2(\phi),
a^2\cos(\phi)\sin(\phi) \big) \ .
\]
We note that this parametric representation is consistent with the
selected orientation on $S$; namely,
$\displaystyle \pdydx{g}{\phi} \times \pdydx{g}{\theta}$ points outside the
ball $R$ of radius $a$ centred at the origin.  Thus
\begin{align*}
\iint_S F \cdot \dx{\VEC{S}}
&= \int_0^{2\pi} \int_0^\pi
\big(a^3 \cos(\theta)\sin(\phi), a^3 \sin(\theta)\sin(\phi),
a^3 \cos(\phi) \big) \\
& \qquad \cdot
\big(a^2 \cos(\theta)\sin^2(\phi), a^2 \sin(\theta)\sin^2(\phi),
a^2\cos(\phi)\sin(\phi) \big) \dx{\phi} \dx{\theta} \\
&= a^5 \int_0^{2\pi} \int_0^\pi \sin(\phi) \dx{\phi}\dx{\theta}
= 4 \pi a^5 \ .
\end{align*}

\stage{ii} According to the divergence theorem, we have
\[
\iint_S F \cdot \dx{\VEC{S}} = \iiint_R \diV F \, \dx{V}
= \iiint_R 5(x^2+y^2+z^2) \dx{V}
\]
where $R$ is the ball of radius $a$ centred at the origin.  To
compute the triple integral, we use the spherical coordinates
$x= r \cos(\theta)\sin(\phi)$, $y= r\sin(\theta)\sin(\phi)$ and
$z= r \cos(\phi)$ for $0 \leq r \leq a$, $0\leq \theta \leq 2\pi$ and
$0\leq \phi \leq \pi$.  Since
$\displaystyle \left| \frac{\partial(x,y,z)}{\partial(r,\theta,\phi)} \right|
  = r^2 \sin(\phi)$, we get
\begin{align*}
\iiint_R 5(x^2+y^2+z^2) \dx{V}
&= \int_0^{2\pi} \int_0^\pi \int_0^a 5r^4 \sin(\phi)
\dx{r}\dx{\phi}\dx{\theta} \\
&= 2\pi \int_0^\pi  \left(r^5\bigg|_{r=0}^a \right) \sin(\phi) \dx{\phi}
= 2 \pi a^5 \int_0^\pi \sin(\phi) \dx{\phi} = 4 \pi a^5 \ .
\end{align*}
\end{sol}

\begin{question}
Consider the vector field
$\displaystyle F(x,y,z) = \big(x^3 +y\sin(z), y^3+z\sin(x), 2z\big)$
and the solid
$\displaystyle R = \{ (x,y,z) : 1 \leq x^2 + y^2 + z^2 \leq 9
\ \text{and}\ z\geq 0\}$.
Compute $\displaystyle \iint_{\partial R} F\cdot \dx{\VEC{S}}$
where the positive orientation on $\partial R$ is given by the unit normal
pointing outside $R$.
\end{question}

\begin{sol}
From the divergence theorem, we have that
$\displaystyle \iint_{\partial R} F\cdot \dx{\VEC{S}}
= \iiint_{R} \diV F \dx{x}\dx{y}\dx{z}$
where
$\displaystyle \diV F = \pdydx{F_1}{x} + \pdydx{F_2}{y} + \pdydx{F_3}{z}
= 3x^2 + 3 y^2 + 2$.
We use the spherical coordinates to compute the triple integral.  The
region $R$ is the image of \\
$\displaystyle g(\theta,\phi, r) =
\big( r \cos(\theta)\sin(\phi) ,r \sin(\theta)\sin(\phi) ,r \cos(\phi)\big)$
for $1\leq r \leq 3$, $0\leq \theta \leq 2\pi$ and $0\leq \phi \leq \pi/2$.
Since $\displaystyle |\det \diff g(\theta,\phi,r)| = r^2 \sin(\phi)$,
we get
\begin{align*}
&\iiint_R \diV F \dx{x}\dx{y}\dx{z} \\
&\qquad = \int_0^{2\pi} \int_0^{\pi/2} \int_1^3 \left(
3r^2 \cos^2(\theta)\sin^2(\phi) + 3 r^2 \sin^2(\theta)\sin^2(\phi) + 2
\right) r^2\sin(\phi) \dx{r} \dx{\phi} \dx{\theta} \\
&\qquad = \int_0^{2\pi} \int_0^{\pi/2} \int_1^3
\left(3r^2 \sin^2(\phi) + 2\right) r^2\sin(\phi) \dx{r} \dx{\phi} \dx{\theta} \\
&\qquad = \int_0^{2\pi} \int_0^{\pi/2} \int_1^3
\left(3r^4 (1-\cos^2(\phi))\sin(\phi) + 2r^2\sin(\phi)\right)
\dx{r} \dx{\phi} \dx{\theta} \\
&\qquad = 
2\pi
\left(\frac{3r^5}{5}\right)\bigg|_{r=1}^3 \left( -\cos(\phi)
+\frac{1}{3}\cos^3(\phi) \right)\bigg|_{\phi=0}^{\pi/2}
+ 2\pi \left( \frac{2r^3}{3}\right)\bigg|_{r=1}^3 \left(
-\cos(\phi)\right)\bigg|_{\phi=0}^{\pi/2} \\
&\qquad = \frac{3432 \pi}{15} \ .
\end{align*}
\end{sol}

\begin{question}
Consider the vector field
$\displaystyle F(x,y,z) = \big( x^2y, xy^2, 2xyz\big)$.  Let $R$
be the tetrahedron with vertices at $(0,0,0)$, $(2,0,0)$, $(0,1,0)$ and
$(0,0,2)$.  Compute $\displaystyle \iint_{\partial R} F\cdot \dx{\VEC{S}}$
where the orientation on $\partial R$ is given by the unit normal
pointing outside $R$.
\end{question}

\begin{question}
Consider the vector Field $\displaystyle F:\RR^3\to \RR^3$ defined by
$\displaystyle F(x,y,z) = \big(xz^2, z, x^2z \big)$.  Compute the integral
$\displaystyle \iint_D F\cdot \dx{\VEC{S}}$ where $D$ is the surface of the
solid $\displaystyle R = \{(x,y,z) : 1 \leq x^2+z^2 \leq 4 \ \text{and}
\ -1 \leq y \leq 1\}$ and
the orientation on $D$ is given by the unit normal pointing outside of $R$.
\end{question}

\begin{sol}
From the divergence theorem, we have that
$\displaystyle \iint_D F\cdot \dx{\VEC{S}} = \int_R \diV F$
where $\displaystyle \diV F = z^2 + x^2$.  To compute the
integral on $R$, we use the cylindrical coordinates; namely,
$g(r,\theta,y) = \big(r\cos(\theta), y, r\sin(\theta)\big)$
for $-1\leq y \leq 1$, $0\leq \theta \leq 2\pi$ and $1 \leq r \leq 2$.
Since
\[
|\det \diff g| = \left| \det \begin{pmatrix}
\cos(\theta) & -r \sin(\theta) & 0 \\ 0 & 0 & 1 \\
\sin(\theta) & r\cos(\theta) & 0 \end{pmatrix} \right|
= | -r | = r \ ,
\]
we get
\[
\iiint_R \diV F = \int_0^{2\pi} \int_{-1}^1 \int_1^2 
r^3 \dx{r} \dx{y} \dx{\theta}
= 4\pi \frac{r^4}{4}\bigg|_{r=1}^2 = 15\pi \ .
\]
\end{sol}

\begin{question}
Let $R$ be a bounded region in $\displaystyle \RR^3$ with a piecewise
continuously differentiable boundary $\partial R$.  Show that the
volume of $R$ is given by
$\displaystyle \frac{1}{3} \iint_{\partial R} F \cdot \dx{\VEC{S}}$
where $F(x,y,z) = (x,y,z)$ and the orientation on $\partial R$ is
given by the unit normal to $\partial R$ pointing outside $R$.
\end{question}

\begin{sol}
Since $\diV F = 3$, we get from the divergence theorem that
\[
\iint_{\partial R} F \cdot \dx{\VEC{S}}
= \iiint_R \diV F \dx{V} = 3 \iiint_R \dx{V}
\]
where $\displaystyle \iiint_R \dx{V}$ is the volume of $R$.
\end{sol}

\begin{question}
Use Stokes' theorem to evaluate $\displaystyle \int_C F \cdot \dx{\VEC{s}}$
in each of the following cases.

\subQ{a} $F(x,y,z) = (x-z,x+y,y+z)$ and $C$ is the ellipse resulting
from the intersection of the plane $z=my+b$ with the cylinder
$\displaystyle x^2+y^2=4$.  The orientation on $C$ is counterclockwise
when viewed from the positive $z$ axis.\\
\subQ{b} $F(x,y,z) = (y, y^2,x+2z)$ and $C$ is the curve resulting
from the intersection of the plane $z=a-y$ with the sphere
$\displaystyle x^2+y^2+z^2=a^2$.
The orientation on $C$ is counterclockwise when viewed from the
positive $z$ axis.
\end{question}

\begin{sol}
\subQ{a}
The ellipse $C$ is the boundary of the region $S$ of the plane $z = my +b$
that is enclosed by $C$.  For $C$ to be positively oriented with respect
to $S$, the orientation on $S$ must be given by
the unit normal
$\displaystyle \VEC{n} = (0, -m/\sqrt{1+m^2}, 1/\sqrt{1+m^2})$.  This is
shown in the following figure for $m>0$ and $b=0$.
\pdfbox{vect_calculus/question37}
According to Stokes' theorem, we have that
$\displaystyle \int_C F\cdot \dx{\VEC{s}} = \iint_S \curL F \cdot
\dx{\VEC{S}}$
where
\[
\curL F = \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\
x-z & x+y & y+z
\end{pmatrix} = (1,-1,1) \ .
\]
The parametric representation for $S$ that we use is given by
\[
  g(r,\theta) = (r\cos(\theta), r\sin(\theta), b + m r\sin(\theta))
\]
for $0 \leq r \leq 2$ and $0 \leq \theta \leq 2\pi$.  We have
\[
  \pdydx{g}{r} \times \pdydx{g}{\theta}
= \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\cos(\theta) & \sin(\theta) & m \sin(\theta) \\
-r\sin(\theta) & r \cos(\theta) & m r\cos(\theta)
\end{pmatrix} = -m r \VEC{e}_2 + r \VEC{e}_3 \ .
\]
Thus, this parametric representation is consistent with the orientation on
$S$ since $(0,-m r,r)$ points in the same direction as $\VEC{n}$.
Hence
\begin{align*}
\iint_S \curL F \cdot \dx{\VEC{S}}
&= \int_0^{2\pi} \int_0^2 (1,-1,1) \cdot (0, -mr, r ) \dx{r}\dx{\theta}
= \int_0^{2\pi} \int_0^2 (1+m)r \dx{r}\dx{\theta} \\
&= 2\pi\, \frac{(1+m)r^2}{2}\bigg|_0^2 = 4(1+m) \pi \ .
\end{align*}
The answer does not depend on $b$.

\subQ{b}
To find the intersection of the sphere and the plane $z=a-y$, we solve
the following equation.
\begin{align*}
x^2+y^2+(a-y)^2 = a^2
&\Rightarrow x^2 + 2y^2 - 2ay = 0
\Rightarrow x^2 + 2\left(y - \frac{a}{2}\right)^2 = \frac{a^2}{2} \\
&\Rightarrow \frac{x^2}{a^2/2} + \frac{(y - a/2)^2}{a^2/4} = 1 \ .
\end{align*}
This is an ellipse centred at $(0,a/2)$ with major axis parallel to
the $y$ axis and minor axis parallel to the $x$ axis.

Let $S$ be the region $S$ of the plane $z=a-y$ that is enclosed by
$C$.  For $C$ to be positively oriented with respect to $S$, the
orientation on $S$ must be given by the unit normal
$\VEC{n} = (0, 1/\sqrt{2}, 1/\sqrt{2})$.  This is shown in the
following figure.
\pdfbox{vect_calculus/question38}
According to Stokes' theorem, we have that
$\displaystyle \int_C F\cdot \dx{\VEC{s}} = \iint_S \curL F \cdot \dx{\VEC{S}}$
where
\[
\curL F = \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\
y & y^2 & x+2z
\end{pmatrix} = (0,-1,-1) \ .
\]
We use the parametric representation for $S$ given by
\[
g(r,\theta) = \left( \frac{a r}{\sqrt{2}} \cos(\theta),
\frac{a}{2} + \frac{a r}{2}\sin(\theta),
\frac{a}{2} - \frac{a r}{2}\sin(\theta) \right)
\]
for $0 \leq r \leq 1$ and $0 \leq \theta \leq 2\pi$.  We have
\[
\pdydx{g}{r} \times \pdydx{g}{\theta}
= \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle (a/\sqrt{2}) \cos(\theta) &
\displaystyle (a/2)\sin(\theta) &
\displaystyle -(a/2)\sin(\theta) \\
\displaystyle -(a r/\sqrt{2}) \sin(\theta) &
\displaystyle (a r/2)\cos(\theta) &
\displaystyle -(a r/2)\cos(\theta)
\end{pmatrix} = \left( 0, \frac{a^2r}{2\sqrt{2}},  \frac{a^2r}{2\sqrt{2}}
\right) \ .
\]
Therefore, the parametric representation is consistent with the
orientation on $S$ because
$\displaystyle \left( 0,\frac{a^2r}{2\sqrt{2}},\frac{a^2r}{2\sqrt{2}}\right)$
points in the same direction as $\VEC{n}$.
Hence
\begin{align*}
\iint_S \curL F \cdot \dx{\VEC{S}}
&= \int_0^{2\pi} \int_0^1 (0,-1,-1) \cdot
\left( 0,\frac{a^2r}{2\sqrt{2}},\frac{a^2r}{2\sqrt{2}}\right)
\dx{r}\dx{\theta}
= \int_0^{2\pi} \int_0^1 \frac{-a^2r}{\sqrt{2}} \dx{r}\dx{\theta} \\
&= 2\pi\, \frac{-a^2r^2}{2\sqrt{2}}\bigg|_0^1
= -\frac{a^2\pi}{\sqrt{2}}  \ .
\end{align*}
\end{sol}

\begin{question}
Compute $\displaystyle \iint_S \curL F \cdot \dx{\VEC{S}}$ where
$\displaystyle F(x,y,z) = (y , x-2x^3z,xy^3)$ and $S$ is the upper half of the
sphere of radius $a$ centred at the origin.  The orientation on $S$ is
given by a normal pointing away from the origin.
\end{question}

\begin{sol}
We could obviously compute directly the integral but it may require
less work to use Stokes' theorem; namely,
$\displaystyle \iint_S \curL F \cdot \dx{\VEC{S}}
= \int_{\partial S} F \cdot \dx{\VEC{s}}$
where $\partial S$ is the circle of radius $a$ centred at the origin
and contained in the plan $z=0$.  The positive orientation on
$\partial S$ with respect to $S$ is counterclockwise.

A parametric representation of $\partial S$ is given by
$g(\theta) = (a\cos(\theta), a\sin(\theta),0)$ for $0 \leq \theta < 2\pi$.
It is consistent with the orientation on $\partial S$.  Thus
\begin{align*}
\int_{\partial S} F \cdot \dx{\VEC{s}}
% &= \int_0^{2\pi} F(a\cos(\theta), a\sin(\theta),0) \cdot
% \big(-a\sin(\theta), a\cos(\theta), 0\big) \dx{\theta} \\
&= \int_0^{2\pi} \big(a\sin(\theta), a\cos(\theta),
a^4\cos(\theta)\sin^3(\theta)\big) \cdot
\big(-a\sin(\theta), a\cos(\theta), 0\big) \dx{\theta} \\
&= a^2\int_0^{2\pi} \big(-\sin^2(\theta) + \cos^2(\theta) \big) \dx{\theta}
= a^2\int_0^{2\pi} \cos(2\theta) \dx{\theta}
= \frac{a^2}{2}\, \sin(2\theta)\bigg|_{\theta=0}^{2\pi} = 0
\end{align*}

\noindent{\bfseries Note}: Instead of computing the line integral
$\int_{\partial S} F \cdot \dx{\VEC{s}}$, we can use Stokes' theorem
again to replace this integral by a surface integral.  We have that
$\displaystyle \int_{\partial S} F \cdot \dx{\VEC{s}}
= \iint_S \curL F \cdot \dx{\VEC{S}}$
where $D$ is the disk
$\displaystyle D = \{ (x,y,0) : x^2 + y^2 \leq a^2 \}$ and the
orientation on $D$ is the orientation given by the unit vector $\VEC{e}_3$.
A parametric representation of $D$ is given by
$g(r,\theta) = (r\cos(\theta), r\sin(\theta),0)$ for $0\leq r \leq a$
and $0 \leq \theta \leq 2\pi$.  We have
\[
\pdydx{g}{r} \times \pdydx{g}{\theta}
= \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\cos(\theta) & \sin(\theta) & 0 \\
-r\sin(\theta) & r \cos(\theta) & 0
\end{pmatrix}
= (0,0,r) \ .
\]
Therefore, the parametric representation is consistent with the orientation
on $D$.  Since
\[
\curL F = \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\
y & x - 2 x^3 z & xy^3
\end{pmatrix}
=\big( 3xy^2 + 2 x^3, - y^3 ,- 6 x^2 z \big)\ ,
\]
we get
\begin{align*}
\iint_D \curL F \cdot \dx{\VEC{S}}
&= \int_0^{2\pi} \int_0^a 
\big( 3a^3\cos(\theta)\sin^2(\theta) + 2 a^3 \cos^3(\theta),
-a^3 \sin^3(\theta), 0) \cdot (0, 0, r) \dx{r} \dx{\theta} \\
&= \int_0^{2\pi} \int_0^a 0 \dx{r} \dx{\theta}
= 0 \ .
\end{align*}
\end{sol}

\begin{question}
Let $\displaystyle F(x,y,z) = (-x^2y, x^3, x^2 + yz)$ and $S$ be the
lower half of the ellipsoid
$\displaystyle \frac{x^2}{4} + \frac{y^2}{9} + \frac{z^2}{25} = 1$;
namely, for $z \leq 0$.  Compute the flow of $\curL F$ across the surface
$S$ if the orientation on $S$ is given by the unit vector pointing in
the direction of $z$ positive.
\end{question}

\begin{sol}
To compute the flow of $\curL F$ across the surface $S$, we need to
compute $\displaystyle \iint_S \curL F \cdot \dx{\VEC{S}}$.  We could
obviously compute directly this integral but it may require less work
to use Stokes' theorem; namely
$\displaystyle \iint_S \curL F \cdot \dx{\VEC{S}}
= \int_{\partial S} F \cdot \dx{\VEC{s}}$
where $\partial S$ is the ellipse
$\displaystyle \frac{x^2}{4} + \frac{y^2}{9} = 1$
contained in the plan $z=0$.  The positive orientation on $\partial S$
is counterclockwise when view from the positive side of the $z$ axis.

A parametric representation of $\partial S$ is given by
$g(\theta) = (2\cos(\theta), 3\sin(\theta),0)$ for $0 \leq \theta < 2\pi$.
It is consistent with the positive orientation on $\partial S$.  Thus
\begin{align*}
\int_{\partial S} F \cdot \dx{\VEC{s}}
% &= \int_0^{2\pi} F(2\cos(\theta), 3\sin(\theta),0) \cdot
% \big(-2\sin(\theta), 3\cos(\theta), 0\big) \dx{\theta} \\
&= \int_0^{2\pi} \big(-12\cos^2(\theta)\sin(\theta), 8\cos^3(\theta),
4\cos^2(\theta)\big) \cdot
\big(-2\sin(\theta), 3\cos(\theta), 0\big) \dx{\theta} \\
&= \int_0^{2\pi} \big(24\cos^2(\theta)\sin^2(\theta) + 24\cos^4(\theta)
\big) \dx{\theta} \\
&= 24 \int_0^{2\pi} \cos^2(\theta) \dx{\theta}
= 12 \int_0^{2\pi} (1 + \cos(2\theta)) \dx{\theta}
= 24 \pi \ .
\end{align*}

\noindent{\bfseries Note}: Instead of computing the line integral
$\displaystyle \int_{\partial S} F \cdot \dx{\VEC{s}}$, we may use
Stokes' theorem again to replace this integral by a surface integral;
namely, $\displaystyle \int_{\partial S} F \cdot \dx{\VEC{s}}
= \iint_D \curL F \cdot \dx{\VEC{S}}$
where $D$ is the region
$\displaystyle D = \left\{ (x,y,0) : \frac{x^2}{4} + \frac{y^2}{9}
\leq 1 \right\}$ with the orientation given by the unit vector $\VEC{e}_3$.
A parametric representation of $D$ is given by
$g(r,\theta) = (2r\cos(\theta), 3r\sin(\theta),0)$ for $0\leq r \leq 1$
and $0 \leq \theta \leq 2\pi$.  We have
\[
\pdydx{g}{r} \times \pdydx{g}{\theta}
= \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
2\cos(\theta) & 3\sin(\theta) & 0 \\
-2r\sin(\theta) & 3r \cos(\theta) & 0
\end{pmatrix}
= (0,0,6 r) \ .
\]
Thus, the parametric representation is consistent with the orientation
on $D$.  Since
\[
\curL F = \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\
2xy & 3x & x^2 + z^2
\end{pmatrix}
= (z,-2 x, 4x^2) \ ,
\]
we get
\begin{align*}
\iint_D \curL F \cdot \dx{\VEC{S}}
&= \int_0^{2\pi} \int_0^1 
\big(0, -4 r\cos(\theta), 16r^2 \cos^2(\theta)\big) \cdot (0, 0, 6r) \dx{r}
\dx{\theta} \\
&= 96 \int_0^{2\pi} \int_0^1 r^3 \cos^2(\theta) \dx{r} \dx{\theta}
= 24 r^4\bigg|_{r=0}^1 \,\int_0^{2\pi} \cos^2(\theta)\dx{\theta}
= 24\pi  \ .
\end{align*}
\end{sol}

\begin{question}
Let $\displaystyle F(x,y,z) = \left(\frac{-y}{x^2+y^2},
\frac{x}{x^2+y^2},0 \right)$ for $(x,y) \neq (0,0)$.

\subQ{a} Show that $\curL F = \VEC{0}$.\\
\subQ{b} Show that $\displaystyle \int_C F \cdot \dx{\VEC{s}} = 2 \pi$
where $C$ is the circle
$\displaystyle C = \{ (x,y,b) : x^2 +y^2 = a^2\}$ oriented
counterclockwise for $a,b \in \RR$ arbitrary but fixed.\\
\subQ{c} Explain why (a) and (b) do not contradict Stokes' theorem.
\end{question}

\begin{sol}
\subQ{a} We have
\[
\curL F = \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} &  \displaystyle \pdydx{}{y} &  
\displaystyle \pdydx{}{z} \\
\displaystyle \frac{-y}{x^2+y^2} &
\displaystyle \frac{x}{x^2+y^2}  & 0
\end{pmatrix}
= \left(0, 0, \pdfdx{\left(\frac{x}{x^2+y^2}\right)}{x} -
\pdfdx{\left(\frac{-y}{x^2+y^2}\right)}{y} \right) = \VEC{0}
\]

\subQ{b}
A parametric representation of $C$ is given by
$g(\theta) = (a\cos(\theta), a\sin(\theta),b)$ for $0 \leq \theta < 2\pi$.
It is consistent with the orientation on $C$.  Thus
\begin{align*}
\int_C F \cdot \dx{\VEC{s}}
% &= \int_0^{2\pi} F(a\cos(\theta), a\sin(\theta),0) \cdot
% \big(-a\sin(\theta), a\cos(\theta), 0\big) \dx{\theta} \\
&= \int_0^{2\pi} \left( \frac{-\sin(\theta)}{a}, \frac{\cos(\theta)}{a},
0\right) \cdot
\big(-a\sin(\theta), a\cos(\theta), 0\big) \dx{\theta} \\
&= \int_0^{2\pi} \big(\sin^2(\theta) + \cos^2(\theta) \big) \dx{\theta}
= \int_0^{2\pi} \dx{\theta} = 2 \pi \ .
\end{align*}

\subQ{c} We cannot use Stokes' theorem because there is no surface
$\displaystyle S \subset \RR^3$ such that $C = \partial S$ and $F$ is
continuously differentiable on an open set containing $S$.  The vector
field $F$ is not defined along the $z$ axis and it cannot be
continuously extended to the $z$ axis.
\end{sol}

\begin{question}
Consider the vector field
$\displaystyle F(x,y,z) = \big(xyz^3, xyz, \sin(xyz)\big)$.
Let $R$ be the portion of the sphere
$\displaystyle x^2 + y^2 +z^2 = 9$ between the
planes $z=0$ and $z=2$.  The orientation on $R$ is given by the unit
normal pointing away from the $z$ axis.  Compute the integral
$\displaystyle \iint_R \curL F \cdot \dx{\VEC{S}}$.
\end{question}

\begin{sol}
According to Stokes' theorem, we have that
$\displaystyle \iint_R \curL F \cdot \dx{\VEC{S}}
= \int_{\partial R} F \cdot \dx{\VEC{s}}$
where $\partial R$ is the union of two circles:
$C_1$ with the parametric representation
$\sigma_1(\theta) = \big(3\cos(\theta), 3\sin(\theta), 0 \big)$ and
$C_2$ with the parametric representation
$\sigma_2(\theta) = \big(\sqrt{5} \sin(\theta), \sqrt{5} \cos(\theta), 2 \big)$
for $0\leq \theta \leq 2\pi$.  The positive orientation on $C_1$ with
respect to $R$ is counterclockwise when view from the positive side of
the $z$ axis, and the positive orientation on $C_2$ with respect to
$R$ is clockwise when view from the positive side of the $z$ axis.
The parametric representations are consistent with these orientations.
Since
$\sigma_1'(\theta) = \big(-3\sin(\theta), 3\cos(\theta), 0 \big)$ and
$\sigma_2'(\theta) = \big(\sqrt{5} \cos(\theta), -\sqrt{5}
\sin(\theta), 0 \big)$, we get
\begin{align*}
\iint_R \curL F \cdot \dx{\VEC{S}} &= \int_{C_1} F\cdot \dx{\VEC{s}}
+ \int_{C_2} F \cdot \dx{\VEC{s}} \\
&= \int_0^{2\pi} 0 \dx{\theta}
+ \int_0^{2\pi} \left( 40\sqrt{5} \cos^2(\theta)\sin(\theta)
- 10\sqrt{5} \cos(\theta)\sin^2(\theta) \right)\dx{\theta} \\
&= \left( -40\sqrt{5}\, \frac{\cos^3(\theta)}{3} - 10\sqrt{5}\,
\frac{\sin^3(\theta)}{3} \right)\bigg|_0^{2\pi} = 0 \ .
\end{align*}
\end{sol}

\begin{question}
Consider the vector field
$\displaystyle F(x,y,z) = \big( yz, xyz, \cos(xy)e^{xz}\big)$.
Let $R$ be the portion of the paraboloid
$\displaystyle z= 11 - x^2 - y^2$ above the plan
$z=2$.  Compute
$\displaystyle \int_{\partial R} F \cdot \dx{\VEC{s}}$ where the
orientation on $\partial R$ is counterclockwise when view from the
positive side of the $z$ axis.
\end{question}

\begin{sol}
The region $R$ is shown in the following figure.
\pdfbox{vect_calculus/supp4}
According to Stokes' theorem, we have that
$\displaystyle \int_{\partial R} F \cdot \dx{\VEC{s}} =
\int_R \curL F \cdot \dx{\VEC{S}}$
where we choose the orientation on $R$ to be given by the unit normal
pointing in the direction of $z$ positive to ensure that the
orientation on $\partial R$ induced by $R$ matches the
orientation on $\partial R$ stated in the question.  Both integrals are
terrible to compute.  However, since the vector field
$\displaystyle F:\RR^3\to \RR^3$ is smooth, we
may use any surface $V$ whose boundary is $\partial R$.  We take $V$
to be the disk $\displaystyle x^2+y^2 \leq 9$ with $z=2$.
A parametric representation of $V$ is given by
$g(r,\theta) = (r\cos(\theta), r\sin(\theta), 2)$
for $0\leq \theta \leq 2\pi$ and $0\leq r \leq 3$.  We have that
\[
\left(\pdydx{g}{r} \times \pdydx{g}{\theta} \right)
= \det \begin{pmatrix} \VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\cos(\theta) & \sin(\theta) & 0 \\
-r\sin(\theta) & r\cos(\theta) & 0
\end{pmatrix} = (0,0,r)
\]
points in the direction of $z$ positive.
This is the direction of the normal that we need on $V$ to get
that the positive orientation on $\partial R$ with respect to $V$ be
counterclockwise when view from the positive side of the $z$ axis.
The parametric representation is therefore consistent with the
orientation that we need on $V$.  Moreover, because the unit normal to
$V$ is $\VEC{e}_3$, we only need the 
third component of $\curL F$, that is
$\displaystyle
(\curL F)_3 = \left( \pdfdx{(xyz)}{x} - \pdfdx{(yz)}{y}\right)\VEC{e}_3
= z(y-1)\VEC{e}_3$.
Hence
\begin{align*}
&\int_{\partial R} F \cdot \dx{\VEC{s}} = \int_V \curL F \cdot \dx{\VEC{S}}
% = \int_V \big( (\curL F)_1\VEC{e}_1 + (\curL F)_2 \VEC{e}_2 +
% z(y-1)\VEC{e}_3 \big) \cdot \dx{\VEC{S}}
=\int_0^{2\pi} \int_0^3 \big( (\curL F)_1, (\curL F)_2 ,
2(r\sin(\theta)-1) \big) \cdot (0,0,r) \dx{r}\dx{\theta} \\
&\qquad
=\int_0^{2\pi} \int_0^3 \left( 2r^2\sin(\theta)-2r\right) \dx{r}\dx{\theta}
= \left(\frac{2r^3}{3}\bigg|_{r=0}^3\right)
\left(-\cos(\theta)\bigg|_{\theta=0}^{2\pi}\right)
- 2\pi r^2\bigg|_{r=0}^3 = -18 \pi \ .
\end{align*}
\end{sol}

\begin{question}
Consider the vector field
$\displaystyle F(x,y,z) = \big(xy^3z, \sin(xyz) , xyz\big)$.
Let $R$ be the portion of the cone $\displaystyle y^2 = x^2+z^2$
between the planes $y=1$ and $y=3$.  The orientation on $R$ is given
by the unit normal pointing away from the $y$ axis.  Compute the integral
$\displaystyle \int_R \curL F \cdot \dx{\VEC{S}}$.
\end{question}

\begin{sol}
The region $R$ is shown in the following figure.
\pdfbox{vect_calculus/supp3}
We present two solutions.

\stage{i} According to Stokes' theorem, we have that
$\displaystyle
\int_R \curL F \cdot \dx{\VEC{S}} = \int_{\partial R} F \cdot \dx{\VEC{s}}$
where $\partial R$ is the union of two circles: $C_1$ with the
parametric representation
$\sigma_1(\theta) = \big( \cos(\theta), 1 , - \sin(\theta)\big)$ and
$C_3$ with the parametric representation
$\sigma_3(\theta) = \big(3\cos(\theta), 3, 3\sin(\theta) \big)$
for $0\leq \theta \leq 2\pi$.  The positive orientation on the
circle $C_1$ with respect to $R$ is clockwise when viewed from
the negative side of the $y$ axis, and the positive orientation on the
circle $C_3$ with respect to $R$ is counterclockwise when viewed from
the negative side of the $y$ axis.  The parametric representations are
consistent with these orientations.
Since $\sigma_1'(\theta) = \big(-\sin(\theta), 0,-\cos(\theta)\big)$
and $\sigma_3'(\theta) = \big(-3\sin(\theta), 0, 3\cos(\theta) \big)$,
we get
\begin{align*}
&\int_R \curL F \cdot \dx{\VEC{S}} = \int_{C_3} F\cdot \dx{\VEC{s}}
+ \int_{C_1} F \cdot \dx{\VEC{s}} \\
&= \int_0^{2\pi} \left( -3^6 \cos(\theta)\sin^2(\theta)
+3^4 \cos^2(\theta)\sin(\theta) \right)\dx{\theta}
+ \int_0^{2\pi} \left(\cos(\theta)\sin^2(\theta)
+ \cos^2(\theta)\sin(\theta) \right)\dx{\theta} \\
&= \left( -3^5 \sin^3(\theta) - 3^3 \cos^3(\theta) \right)\bigg|_0^{2\pi}
+ \left( \frac{\sin^3(\theta)}{3} - \frac{\cos^3(\theta)}{3}
\right)\bigg|_0^{2\pi} = 0 \ .
\end{align*}

\stage{ii} For $\rho=1$ and $\rho=3$, let $B_\rho$ be the disk in
the plane $y=\rho$ of radius $\rho$ centred at $(0,\rho,0)$.
If we keep the same orientation as before on $C_\rho = \partial B_\rho$
for $\rho =1$ and $3$, and assume that the orientation on $B_\rho$
is given by the unit normal $\VEC{e}_2$, then
\begin{equation}\label{supp3equ}
\int_{\partial R} F \cdot \dx{\VEC{s}} =
\int_{\partial B_1} F \cdot \dx{\VEC{s}}
+\int_{\partial B_3} F \cdot \dx{\VEC{s}} =
\int_{B_1} \curL F \cdot \dx{\VEC{S}}
- \int_{B_3} \curL F \cdot \dx{\VEC{S}}
\end{equation}
according to Stokes' theorem.  The minus sign in front of the second
integral comes from the fact that the orientation on $C_3$ is not the
positive orientation on $C_3$ with respect to $B_3$.

A parametric representation of $B_\rho$ is given by
$g_\rho(r, \theta) = \big(r\sin(\theta), \rho, r\cos(\theta)\big)$
for $0 \leq \theta \leq 2\pi$ and $0\leq r \leq \rho$.  We have that
\[
\left( \pdydx{g_\rho}{r} \times \pdydx{g_\rho}{\theta} \right)
=\det \begin{pmatrix} \VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\sin(\theta) & 0 & \cos(\theta) \\
r\cos(\theta) & 0 & -r\sin(\theta)
\end{pmatrix}
= (0,r,0) \ .
\]
This vector is pointing in the direction of $\VEC{e}_2$.  Therefore,
the parametric representation is consistent with the orientation on
$B_\rho$.  Since
\begin{align*}
\curL F &= \begin{pmatrix} \VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\[0.8em]
xy^3z & \sin(xyz) & xyz
\end{pmatrix} \\
&= \big( xz - xy\cos(xyz) , -(yz - xy^3), yz\cos(xyz) - 3x^2y^2 z\big) \ ,
\end{align*}
we get
\[
\int_{B_\rho} \curL F \cdot \dx{\VEC{S}} =
\int_0^{2\pi} \int_0^\rho \left(\rho r\cos(\theta) -
\rho^3r\sin(\theta)\right)r\dx{r}\dx{\theta} = 0
\]
for $\rho=1$ and $\rho=3$.  It follows from (\ref{supp3equ})
that $\displaystyle \int_{\partial R} F \cdot \dx{\VEC{s}} = 0$.

\noindent {\bfseries Note}: A parametric representation of the cone is
given by
$g(r, \theta) = \big( r\cos(\theta), r, r\sin(\theta) \big)$
for $0 \leq \theta \leq 2\pi$ and $1\leq r \leq 3$.  We have
\[
\left( \pdydx{g}{r} \times \pdydx{g}{\theta} \right)
=\det \begin{pmatrix} \VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\cos(\theta) & 1 & \sin(\theta) \\
-r\sin(\theta) & 0 & r\cos(\theta)
\end{pmatrix}
= \big( r\cos(\theta) , -r, r\sin(\theta) \big) \ .
\]
Since this vector points away from the $y$ axis, the
parametric representation is consistent with the orientation on $R$.
Hence, $\displaystyle \int_R \curL F \cdot \dx{\VEC{S}} =
\int_0^{2\pi} \int_1^3 \ldots \dx{r}\dx{\theta}$ is an integral of a function
involving expressions of the form $\cos(r^3\cos(\theta)\sin(\theta))$ which
cannot be integrated with standard methods.
\end{sol}

\begin{question}
Let $\displaystyle F:\RR^2\setminus \{\VEC{0}\} \to \RR^2$ be a continuously
differentiable vector fields such that
$\displaystyle \pdydx{F_2}{x} - \pdydx{F_1}{y} = 0$ on 
$\RR^2\setminus \{\VEC{0}\}$.

\subQ{a} Prove that $\displaystyle \int_{C_r} F \cdot \dx{\VEC{s}} = \alpha$, a
constant, for all circles $C_r$ of radius $r$ centred at the origin if we
assume that the orientation on $C_r$ is counterclockwise.\\
\subQ{b} Expand (a) by showing that
$\displaystyle \int_C F \cdot \dx{\VEC{s}} = \alpha$
for all closed curves $C$ that surround the origin if we
assume that the orientation on $C$ is ``globally'' counterclockwise.
We assume here that the closed curves $C$ can be continuously deformed 
into a circle without intersecting the origin.\\
\subQ{c} Let
$\displaystyle F_0(x,y) = \left( \frac{-y}{x^2+y^2}, \frac{x}{x^2+y^2}\right)$.
Prove that $\displaystyle G = F - \frac{\alpha}{2\pi} F_0$ is conservative on
$\displaystyle \RR^2\setminus \{\VEC{0}\}$ and thus is the gradient of
a function. Such a result is fundamental in the studies of Green's
Functions.
\end{question}

\begin{sol}
Let $\displaystyle C_r = \{ (x,y) : x^2 + y^2 = r^2 \}$ and
\[
S_r = \begin{cases}
\{ (x,y) : 1 \leq x^2 +y^2 \leq r^2 \} & \quad \text{if}\ r > 1 \\
\{ (x,y) : r^2 \leq x^2 +y^2 \leq 1 \} & \quad \text{if}\ 0 < r < 1
\end{cases}
\]
The orientation on $\partial S_r$ is counterclockwise.
\pdfbox{vect_calculus/question40}

\subQ{a} Using Green's Theorem, we get
\[
\int_{C_r} F \cdot \dx{\VEC{s}} - \int_{C_1} F \cdot \dx{\VEC{s}}
= \epsilon \int_{\partial S_r} F \cdot \dx{\VEC{s}}  
= \epsilon \iint_{S_r} \left( \pdydx{F_2}{x} - \pdydx{F_1}{y} \right) \dx{A}
= 0
\]
where $\epsilon = 1$ for $r > 1$ and $\epsilon = -1$ for $0 < r < 1$.
Note that the orientation on $C_1$ is not consistent with the
orientation on $\partial S_r$ if $r < 1$ while it is
the orientation on $C_r$ that is not consistent with the
orientation on $\partial S_r$ if $r < 1$.
Thus $\displaystyle \int_{C_r} F \cdot \dx{\VEC{s}}
= \int_{C_1} F \cdot \dx{\VEC{s}}$ for all $r$.  If we let
$\alpha = \displaystyle \int_{C_1} F \cdot \dx{\VEC{s}}$,
then $\displaystyle \int_{C_r} F \cdot \dx{\VEC{s}} = \alpha$ for all
$r>0$.

\subQ{b} Let $C$ be any closed curve surrounding the origin as
described in (b).  Since the origin is an interior point of the
region enclosed by the curve $C$, there exists $\epsilon >0$ such
that $C_\epsilon$ is included in the interior of the region enclosed
by the curve $C$.  See the figure above.  If $S$ is the region
enclosed by $C$ and the circle $C_\epsilon$, then we get from Green's
Theorem that
\[
\int_C F \cdot \dx{\VEC{s}} - \int_{C_\epsilon} F \cdot \dx{\VEC{s}}
= \int_{\partial S} F \cdot \dx{\VEC{s}}
= \iint_S \left( \pdydx{F_2}{x} - \pdydx{F_1}{y}\right) \dx{A}
= 0  \ .
\]
Note that the orientation on $C_\epsilon$ is not consistent with the
orientation on $\partial S$.  Thus $\displaystyle
\int_C F \cdot \dx{\VEC{s}} = \int_{C_\epsilon} F \cdot \dx{\VEC{s}} = \alpha$.

\subQ{c} If we use the parametric representation
$\sigma(\theta) = \big(r \cos(\theta), r\sin(\theta)\big)$ for
$0 \leq \theta < 2\pi$, then we find that
\[
\int_{C_r} F_0 \cdot \dx{\VEC{s}}
= \int_0^{2\pi} \left( \frac{-\sin(\theta)}{r}, \frac{\cos(\theta)}{r} \right)
\cdot (-r \sin(\theta), r \cos(\theta) ) \dx{\theta} \\
= \int_0^{2\pi} \dx{\theta} = 2\pi
\]
for all $r>0$.  As in (b), we get that
$\displaystyle \int_C F_0\cdot \dx{\VEC{s}} = 2\pi$ for any closed curve
surrounding the origin as described in (b).  Hence
\[
\int_C G \cdot \dx{\VEC{s}}
= \int_C \left( F - \frac{\alpha}{2\pi} F_0\right) \cdot \dx{\VEC{s}}
= \int_C F \cdot \dx{\VEC{s}}
- \frac{\alpha}{2\pi} \int_C F_0 \cdot \dx{\VEC{s}} = 0
\]
for any closed curve surrounding the origin as described in (b).
Moreover
\begin{align*}
\pdydx{G_2}{x} - \pdydx{G_1}{y}
&= \left( \pdydx{F_2}{x} - \frac{\alpha}{2\pi}
\pdfdx{\left(\frac{x}{x^2+y^2}\right)}{x} \right)
- \left( \pdydx{F_1}{y} - \frac{\alpha}{2\pi}
\pdfdx{\left(\frac{-y}{x^2+y^2}\right)}{y} \right) \\
&= \left( \pdydx{F_2}{x} - \pdydx{F_1}{y} \right)
+ \frac{\alpha}{2\pi} \left( \pdfdx{\left(\frac{x}{x^2+y^2}\right)}{x} 
- \pdfdx{\left(\frac{-y}{x^2+y^2}\right)}{y} \right) \\
&=  \frac{\alpha}{2\pi}
\left( \frac{1}{x^2+y^2} - \frac{2x^2}{(x^2+y^2)^2}
+ \frac{1}{x^2+y^2} - \frac{2y^2}{(x^2+y^2)^2}\right)
= 0
\end{align*}
on $\displaystyle \RR^2 \setminus \{\VEC{0}\}$.  Hence, using Green's
Theorem as we did in (a) and (b), we get that
$\displaystyle \int_C G \cdot \dx{\VEC{s}} = 0$ 
for any closed curve $C$ that does not surround the origin.

It follows from Proposition~\ref{DGoint} that $G$ is conservative in
$\displaystyle \RR^2 \setminus \{\VEC{0}\}$.  That $G$ is the gradient of a
function follows from Proposition~\ref{DGconserveA}.
\end{sol}

\begin{question}
\subQ{a} Suppose that $\displaystyle F:\RR^2\to \RR^2$      \label{GreenFormMV}
is a vector field of class $\displaystyle C^1$.
Prove that
\begin{equation} \label{equC}
\int_{\partial S} F \cdot \VEC{n} \dx{s} =
\iint_s \left(\pdydx{F_1}{x} + \pdydx{F_2}{y}\right) \dx{A} \ ,
\end{equation}
where $S$ is a bounded region in $\displaystyle \RR^2$ with a smooth
boundary, $\VEC{n}$ is the unit normal to $\partial S$ pointing
outside of $S$, and $\partial S$ is positively oriented with respect to $S$.\\
\subQ{b} Use the result in (a) to prove the
{\bfseries Green's formulas}\index{Green's Formulas}:
\begin{align}
\int_{\partial S} f \graD g \cdot \VEC{n} \dx{s} &=
\iint_S \left( \graD f \cdot \graD g + f \graD^2 g\right) \dx{A}
\label{equA}
\intertext{and}
\int_{\partial S} \left(f \graD g - g \graD f\right) \cdot \VEC{n} \dx{s} &=
\iint_S \left( f \graD^2 g - g \graD^2 f \right) \dx{A} \label{equB}
\end{align}
where $\displaystyle f:\RR^2\to \RR$ and
$\displaystyle g:\RR^2\to \RR$ are two twice continuously
differentiable functions.\\
Note that $\displaystyle \graD^2 f = \diV(\graD f)$ is the {\bfseries
Laplacian}\index{Laplacien} of $f$ and is more often denoted $\Delta f$.\\
\subQ{c} Let $\displaystyle g(x,y) = \ln(x^2+y^2)$.  Verify that
$\displaystyle \graD g = \frac{2}{x^2+y^2}\, (x,y)$ and
$\displaystyle \graD^2 g(x,y) = 0$ for $(x,y)\neq (0,0)$.\\
\subQ{d} Suppose that $\displaystyle f:\RR^2\to \RR$ is twice continuously
differentiable and $\displaystyle \graD^2 f = 0$.  Use $g$ defined in (c)
and the results in (b) to prove that mean value of $f$ on circles
$r_1$ and $r_2$ centred at the origin are equal.  Namely,
\begin{equation} \label{equD}
\frac{1}{2\pi r_2} \int_{C_{r_2}} f \dx{s} =
\frac{1}{2\pi r_1} \int_{C_{r_1}} f \dx{s}
\end{equation}
where $C_r$ is the circle of radius $r$ centred at the origin and the
orientation on $C_r$ is counterclockwise.\\
\subQ{e} Use (d) to prove that the mean value of $f$ on circles
centred at the origin is equal to the value of $f$ at the origin if we
assume that the orientation on the circles is counterclockwise.
\end{question}

\begin{sol}
\subQ{a} We apply the classical Stokes' theorem,
Theorem~\ref{StandardStokesTh}, to the vector field
$\displaystyle \tilde{F}:\RR^3 \to \RR^3$
defined by $\tilde{F}(x,y,z) = (-F_2(x,y), F_1(x,y), 0)$ and the region
$\tilde{S} = \{ (x,y,0) : (x,y) \in S\}$.  We get
\begin{equation}\label{twistedGreen1}
\oint_{\partial \tilde{S}} \tilde{F} \cdot \VEC{t} \dx{s}
= \int_{\tilde{S}} \curL \tilde{F} \cdot \VEC{e}_3 \dx{S}
\end{equation}
where $\VEC{t}(\VEC{x}) = (t_1(\VEC{x}), t_2(\VEC{x}),0)$ is a unit
vector tangent to the curve $\partial \tilde{S}$ at
$\VEC{x} \in \partial \tilde{S}$.
In the present case, $\VEC{t}(\VEC{x})$ points in the direction of the
positive orientation on $\partial \tilde{S}$ with respect to
$\tilde{S}$; namely, the orientation associated to the
counterclockwise motion on $\partial \tilde{S}$.

However
\begin{equation}\label{twistedGreen2}
\oint_{\partial \tilde{S}} \tilde{F} \cdot \VEC{t} \dx{s}
= \oint_{\partial \tilde{S}} (-F_2,F_1,0) \cdot (t_1,t_2,0) \dx{s}
= \oint_{\partial \tilde{S}} (F_1,F_2,0) \cdot (t_2,-t_1,0) \dx{s}
\end{equation}
and
\begin{equation}\label{twistedGreen3}
\int_{\tilde{S}} \curL \tilde{F} \cdot \VEC{e}_3 \dx{S}
= \iint_{\tilde{S}} \left( \pdydx{F_1}{x} + \pdydx{F_2}{y} \right)
\dx{S} \ .
\end{equation}
Since everything in the previous discussion is independent of the
third component in $\displaystyle \RR^3$, we may substitute
(\ref{twistedGreen2}) and (\ref{twistedGreen3}) in
(\ref{twistedGreen1}) to get the relation
\[
\oint_{\partial S} F \cdot \VEC{n} \dx{s}
= \oint_{\partial S} (F_1,F_2) \cdot (t_2,-t_1) \dx{s}
= \iint_{S} \left( \pdydx{F_1}{x} + \pdydx{F_2}{y} \right)
\dx{S} \ ,
\]
where we have use the fact that
$\VEC{n}(\VEC{x}) = ( t_2(\VEC{x}), -t_1(\VEC{x}))$
is a unit vector perpendicular to $\partial S$ at $\VEC{x} \in \partial S$
and $\VEC{n}(\VEC{x})$ points outside $S$.  This is shown in the
following figure.
\pdfbox{vect_calculus/twistedGreen}

\subQ{b} To prove (\ref{equA}), we substitute
$\displaystyle F=f \graD g = \left( f\pdydx{g}{x} , f \pdydx{g}{y} \right)$ in
(\ref{equC}) to get
\begin{align*}
&\int_{\partial S} f \graD g \cdot \VEC{n} \dx{s} =
\iint_s \left(\pdfdx{\left(f\pdydx{g}{x}\right)}{x}
+ \pdfdx{\left(f\pdydx{g}{y}\right)}{y}\right) \dx{A} \\
&\qquad = \iint_s \left(\pdydx{f}{x}\pdydx{g}{x} + f \pdydxn{g}{x}{2}
+ \pdydx{f}{y}\pdydx{g}{y} + f\pdydxn{g}{y}{2}\right) \dx{A}
= \iint_s \left(\graD f \cdot \graD g + f \graD^2 g \right) \dx{A} \ .
\end{align*}
If we interchange $f$ and $g$ in (\ref{equA}) and subtract from the original
(\ref{equA}), then we get (\ref{equB}).

\subQ{c} We have
\[
\graD g(x,y) = \left( \pdydx{g}{x}(x,y), \pdydx{g}{y}(x,y) \right)
= \left( \frac{2x}{x^2+y^2} , \frac{2y}{x^2+y^2} \right) \ .
\]
and
\begin{align*}
\graD^2 g(x,y) &= \pdydxn{g}{x}{2}(x,y) + \pdydxn{g}{y}{2}(x,y)
= \pdfdx{\left(\frac{2x}{x^2+y^2}\right)}{x}
+ \pdfdx{\left(\frac{2y}{x^2+y^2}\right)}{y} \\
&= \frac{2}{x^2+y^2} - \frac{4x^2}{(x^2+y^2)^2}
+ \frac{2}{x^2+y^2} - \frac{4y^2}{(x^2+y^2)^2}
= \frac{4}{x^2+y^2} - \frac{4(x^2+y^2)}{(x^2+y^2)^2} = 0 \ .
\end{align*}

\subQ{d}  Since $\graD^2 f = 0$ and $\graD^2 g = 0$, we get from
(\ref{equB}) that
$\displaystyle
\int_{\partial S} \left(f \graD g - g \graD f\right) \cdot \VEC{n} \dx{s} = 0$
where $S$ is the annulus bounded by the circle $C_{r_1}$ and $C_{r_2}$.  Thus
\begin{equation}\label{secondGEQ}
\int_{C_{r_1}} \left(f \graD g - g \graD f\right) \cdot \VEC{n} \dx{s}
= \int_{C_{r_2}} \left(f \graD g - g \graD f\right) \cdot \VEC{n} \dx{s}
\end{equation}
where both $C_{r_1}$ and $C_{r_2}$ have the counterclockwise orientation.
Note that the orientation on $C_{r_1}$ is not consistent with the
orientation on $\partial S$ if $r_1 < r_2$ while it is
the orientation on $C_{r_2}$ that is not consistent with the
orientation on $\partial S$ if $r_2 < r_1$.  This justifies the equality
above.  However, for $(x,y) \in C(r_1)$, we have
\[
\graD g(x,y) = \frac{2}{x^2+y^2} (x,y) = \frac{2}{\sqrt{x^2+y^2}} \VEC{n}
= \frac{2}{r_1} \VEC{n}
\]
and $\displaystyle g(x,y) = \ln(x^2+y^2) = \ln(r_1^2)$.  Thus
$\displaystyle \int_{C_{r_1}} f \graD g \cdot \VEC{n} \dx{s}
= \frac{2}{r_1} \int_{C_{r_1}} f \dx{s}$ and
\[
\int_{C_{r_1}} g \graD f \cdot \VEC{n} \dx{s} =
\ln(r_1^2) \int_{C_{r_1}} \graD f \cdot \VEC{n} \dx{s} =
\ln(r_1^2) \iint_{B_{r_1}(\VEC{0})} \graD^2 f \dx{S} = 0
\]
because of (\ref{equC}).  Similarly,
$\displaystyle \int_{C_{r_2}} f \graD g \cdot \VEC{n} \dx{s}
= \frac{2}{r_2} \int_{C_{r_2}} f \dx{s}$ and
$\displaystyle \int_{C_{r_2}} g \graD f \cdot \VEC{n} \dx{s} = 0$.
We get from (\ref{secondGEQ}) that
$\displaystyle
\frac{2}{r_2} \int_{C_{r_2}} f \dx{s} = \frac{2}{r_1} \int_{_{r_1}} f \dx{s}$.
Hence, after multiplying this equality by $1/(4\pi)$, we get (\ref{equD}).

\subQ{e}
From (d), we have that
$\displaystyle \frac{1}{2\pi r} \int_{C_r} f \dx{s} = M$
for all $r$, where $M$ is a constant.  From the Mean Value Theorem for
Integrals, we have for each $r$ that
$\displaystyle \frac{1}{2\pi r} \int_{C(r)} f \dx{s} = f(\VEC{a}_r)$
for some $\VEC{a}_r \in C_r$.  So $f(\VEC{a}_r) = M$ for all $\VEC{a}_r$.
Since $\displaystyle \lim_{r\to 0} \VEC{a}_r = \VEC{0}$ and
$f$ is continuous, we get that
$\displaystyle M = \lim_{r\to 0^+} f(\VEC{a}_r) = f(\VEC{0})$.
\end{sol}

\begin{question}
Let $R$ be a bounded region in $\displaystyle \RR^3$ with a piecewise smooth
boundary $\partial R$.  Suppose that $\displaystyle f,g:\RR^3\to \RR$ are two
continuously differentiable functions.  Prove that
\begin{equation}\label{MultIBP}
  \iiint_R f \pdydx{g}{x_1} \dx{V}
= - \iiint_R g \pdydx{f}{x_1} \dx{V} + \iint_{\partial R} f g\, n_1 \dx{S}
\end{equation}
where $\VEC{n}= (n_1, n_2, n_3)$ is the unit normal pointing outside $R$
at every point of $\partial R$ and the orientation on $\partial R$ is
given by this unit normal.  This is the orientation induced on
$\partial R$ by the orientation on $R$ as defined in
Definition~\ref{manifdbOrient}.

This is an higher dimensional version of integration by parts.  One can
get a similar result for the derivatives with respect to $x_2$ and
$x_3$.
\end{question}

\begin{sol}
Let $F(\VEC{x}) = (f(\VEC{x})g(\VEC{x}), 0,0)$.  Since
$\displaystyle \diV F = \pdydx{f}{x_1} g + f \pdydx{g}{x_1}$, we get
from the divergence theorem that
\begin{align*}
\iint_{\partial R} f g\, n_1 \dx{S}
&= \iint_{\partial R} F \cdot \VEC{n} \dx{S}
= \iint_{\partial R} F \cdot \dx{\VEC{S}}
= \iiint_R \diV F \dx{V} \\
&= \iiint_R \left( \pdydx{f}{x_1} g + f \pdydx{g}{x_1} \right) \dx{V} \ .
\end{align*}
We get (\ref{MultIBP}) by subtracting
$\displaystyle \iiint_R \pdydx{f}{x_1} g \dx{V}$
on both sides of the previous equality.
\end{sol}

\begin{question}
Suppose that $\displaystyle f:\RR^3\to \RR$           \label{divCons}
is a function of class $\displaystyle C^2$.
Let $R$ be a bounded region in $\displaystyle \RR^3$ with a piecewise smooth
boundary $\partial R$ and $\VEC{n}$ be the unit normal pointing outside
$R$ at every point of $\partial R$.  The orientation on
$\partial R$ given by this unit normal is the orientation induced on
$\partial R$ by the orientation on $R$ as defined in
Definition~\ref{manifdbOrient}.

\subQ{a} Show that
\[
\iint_{\partial R} \pdydx{f}{\VEC{n}} \cdot \dx{S}
= \iiint_R \graD^2 f \dx{V} \ .
\]
\subQ{b} If $\displaystyle \graD^2 f = 0$, show that
\[
\iint_{\partial R} f \pdydx{f}{\VEC{n}} \dx{S}
= \iiint_R \| \graD f \|^2 \dx{V} \ .
\]
\end{question}

\begin{sol}
\subQ{a} From the divergence theorem, we have
\[
\iint_{\partial R} \pdydx{f}{\VEC{n}} \dx{S}
= \iint_{\partial R} \graD f \cdot \VEC{n} \dx{S}
= \iint_{\partial R} \graD f \cdot \dx{\VEC{S}}
= \iiint_R \diV(\graD f) \dx{V}
= \iiint_R \graD^2 f \dx{V} \ .
\]

\subQ{b} We have
\begin{align*}
&\iint_{\partial R} f \pdydx{f}{\VEC{n}} \dx{S}
= \iint_{\partial R} f \left( \graD f \cdot \VEC{n} \right) \dx{S}
= \iint_{\partial R} f \graD f \cdot \dx{\VEC{S}} \\
&\qquad = \iiint_R \diV\left( f \graD f\right) \dx{V}
= \iiint_R \left( \graD f \cdot \graD f + f \graD^2 f \right) \dx{V}
= \iiint_R \| \graD f \|^2 \dx{V} \ .
\end{align*}
because $\displaystyle \graD^2 f = 0$ on $R$ by assumption.
\end{sol}

\begin{question}
Let              \label{introGreenFunct}
$\displaystyle g(\VEC{x}) = \frac{1}{\|\VEC{x}\|}$ for
$\displaystyle \VEC{x} \in \RR^3 \setminus \{\VEC{0}\}$.

\subQ{a} Compute $\graD g$ and show that
$\displaystyle \graD^2 g(\VEC{x}) = 0$ for all $\VEC{x} \neq \VEC{0}$.\\
\subQ{b} Show that
$\displaystyle \iint_{\partial B_r(\VEC{0})} \pdydx{g}{\VEC{n}} \dx{S}
= - 4 \pi$
where $B_r(\VEC{0})$ is the open ball of radius $r$ centred at the origin,
$\VEC{n}$ is the unit normal to $\partial B_r(\VEC{0})$ pointing outside
$B_r(\VEC{0})$, and the orientation on $\partial B_r(\VEC{0})$ is
given by the vector $\VEC{n}$.\\
\subQ{c} Explain why (a) and (b) do not contradict (a) of
Question~\ref{divCons}.\\
\subQ{d} Show that
$\displaystyle \iint_{\partial R} \pdydx{g}{\VEC{n}} \dx{S} = - 4 \pi$
for any bounded region $R$ with a piecewise smooth boundary such
that $\displaystyle \VEC{0} \in R^\circ$.  The
vector $\VEC{n}$ is the unit normal to $\partial R$ pointing outside
$R$ and the orientation on $\partial R$ is given by $\VEC{n}$.
\end{question}

\begin{sol}
\subQ{a} We have
\[
\graD g(\VEC{x})
= \sum_{i=1}^3 \pdfdx{(x_1^2 + x_2^2 + x_3^2)^{-1/2}}{x_i}\, \VEC{e}_i
= \sum_{i=1}^3 \left(-x_i (x_1^2 + x_2^2 + x_3^2)^{-3/2}\right) \VEC{e}_i
= - \frac{1}{\|\VEC{x}\|^3} \, \VEC{x}
\]
and
\begin{align*}
\graD^2 g(\VEC{x})
&= \sum_{i=1}^3 \pdfdxn{(x_1^2 + x_2^2 + x_3^2)^{-1/2}}{x_i}{2}
= \sum_{i=1}^3 \pdfdx{\left(-x_i (x_1^2 + x_2^2 + x_3^2)^{-3/2}\right)}{x_i} \\
&= \left( \frac{2x_1^2 -x_2 -x_3}{(x_1^2+x_2^2+x_3^2)^{5/2}}\right)
+ \left( \frac{2x_2^2 -x_1 -x_3}{(x_1^2+x_2^2+x_3^2)^{5/2}}\right)
+ \left( \frac{2x_3^2 -x_1 -x_2}{(x_1^2+x_2^2+x_3^2)^{5/2}}\right)
= 0
\end{align*}
for $\VEC{x} \neq \VEC{0}$.

\subQ{b} We have
\begin{align*}
\iint_{\partial B_r(\VEC{0})} \pdydx{g}{\VEC{n}} \dx{S}
&= \iint_{\partial B_r(\VEC{0})} \graD g \cdot \VEC{n} \dx{S}
= \iint_{\partial B_r(\VEC{0})} \left( \frac{-1}{\|\VEC{x}\|^3}
 \, \VEC{x} \right)\cdot \left( \frac{1}{\|\VEC{x}\|} \, \VEC{x}\right)
\dx{S} \\
&= - \iint_{\partial B_r(\VEC{0})} \frac{1}{\|\VEC{x}\|^2} \dx{S}
= -\frac{1}{r^2} \iint_{\partial B_r(\VEC{0})}  \dx{S}
\end{align*}
where we have used the fact that
$\displaystyle \VEC{n}(\VEC{x}) = \|\VEC{x}\|^{-1} \VEC{x}$ for
$\VEC{x} \in \partial B_r(\VEC{0})$.

For those who do not know by heart the formula for the area of the
sphere of radius $r$, they may use the parametric representation
$g(\theta,\phi) = \big(r\cos(\theta)\sin(\phi),
r\sin(\theta)\sin(\phi), r\cos(\phi)\big)$ for $0 \leq \theta \leq 2\pi$
and $0 \leq \phi \leq \pi$ to find that the area is
\[
\iint_{\partial B_r(\VEC{0})} \dx{S}
= \int_0^{2\pi} \int_0^{\pi} \left| \pdydx{g}{\theta} \times \pdydx{g}{\phi}
\right| \dx{\phi} \dx{\theta}
= \int_0^{2\pi} \int_0^{\pi} r^2 \sin(\phi) \dx{\phi} \dx{\theta}
= 4\pi r^2 \ .
\]
Thus $\displaystyle  \iint_{\partial B_r(\VEC{0})} \pdydx{g}{\VEC{n}} \dx{S}
= - 4\pi$.

\subQ{c} We get from (a) and (b) that
$\displaystyle  \iint_{\partial B_r(\VEC{0})} \pdydx{g}{\VEC{n}} \dx{S}
= - 4 \pi \neq 0 = \iiint_{B_r(\VEC{0})} \graD^2 g \dx{V}$.
The formula in (a) of Question~\ref{divCons} cannot be used
because $g$ is not defined at the origin (and cannot be continuously
extended to $\displaystyle \RR^3$) and thus it is certainly not
of class $\displaystyle C^2$ in any open set containing $B_r(\VEC{0})$
as required.

\subQ{d} Choose $\epsilon >0$ such that $B_\epsilon(\VEC{0}) \subset R$.
This is possible because $\VEC{0}$ is in the interior of $R$.
Let $R_\epsilon = R \setminus B_\epsilon(\VEC{0})$.

If we use (a) of Question~\ref{divCons} and (a) of the present
question, then we get
$\displaystyle \iint_{\partial R_\epsilon} \pdydx{g}{\VEC{n}} \dx{S}
= \iiint_{R_\epsilon} \graD^2 g \dx{V} = 0$
where the orientation on $\partial R$ is given by the
unit normal that point outside of $R$ at all points of $\partial R$.
Thus
\[
0 = \iint_{\partial R_\epsilon} \pdydx{g}{\VEC{n}} \dx{S}
= \iint_{\partial R} \pdydx{g}{\VEC{n}} \dx{S}
- \iint_{\partial B_\epsilon(\VEC{0})} \pdydx{g}{\VEC{n}} \dx{S}
= \iint_{\partial R} \pdydx{g}{\VEC{n}} \dx{S} + 4\pi
\]
because of (b).  The minus sign in front of the integral
$\displaystyle \iint_{\partial B_\epsilon(\VEC{0})} \pdydx{g}{\VEC{n}} \dx{S}$
comes from the fact that the orientation on
$\partial B_\epsilon(\VEC{0})$ given by the unit normal that point
outside $B_\epsilon(\VEC{0})$ for all $\VEC{x} \in B_\epsilon(\VEC{0})$
is not consistent with the orientation on $\partial R_\epsilon$.
Hence
$\displaystyle \iint_{\partial R} \pdydx{g}{\VEC{n}} \dx{S} = - 4\pi$.
\end{sol}

\begin{question}
In this question, we generalize the results presented in
Question~\ref{GreenFormMV}; in particular, we generalize the Green's
formulas presented in part (b) of that question.

\subQ{a} Prove the {\bfseries Green's formulas}\index{Green's Formulas}:
\begin{align}
\iint_{\partial R} f \graD g \cdot \VEC{n} \dx{S}
&= \iiint_R \left( \graD f \cdot \graD g + f \graD^2 g \right) \dx{V}
\nonumber
\intertext{and}
\iint_{\partial R} \left( f \graD g - g \graD f\right) \cdot \VEC{n} \dx{S}
&= \iiint_R \left( f \graD^2 g - g \graD^2 f\right) \dx{V}
\label{GreenFormNo2}
\end{align}
where $\displaystyle f, g : \RR^3 \to \RR$ are two functions of class
$\displaystyle C^2$, the vector $\VEC{n}(\VEC{x})$ is the unit normal
to $\partial R$ pointing outside $R$ at $\VEC{x} \in \partial R$, and
the orientation on $\partial R$ is given by the vector $\VEC{n}$.
This is the orientation induced on $\partial R$ by the orientation on
$R$ as defined in Definition~\ref{manifdbOrient}.\\
\subQ{b} Suppose that $\displaystyle f: \RR^3 \to \RR$ is a function
of class $\displaystyle C^2$ and $\displaystyle \graD^2 f = 0$, prove that
\[
\frac{1}{4\pi r_1^2} \iint_{\partial B_{r_1}(\VEC{0})} f \dx{S}
= \frac{1}{4\pi r_2^2} \iint_{\partial B_{r_2}(\VEC{0})} f \dx{S}
\]
where $B_r(\VEC{0})$ is the ball of radius $r$ centred at the origin,
and the orientation on $\partial B_r(\VEC{0})$ is given by the unit
normal to $\partial B_r(\VEC{0})$ pointing outside $B_r(\VEC{0})$.\\
\subQ{c} Use (b) to prove that
$\displaystyle f(\VEC{0})
= \frac{1}{4\pi r^2} \iint_{\partial B_r(\VEC{0})} f \dx{S}$
for all $r>0$.  In general, prove that
$\displaystyle f(\VEC{a})
= \frac{1}{4\pi r^2} \iint_{\partial B_r(\VEC{a})} f \dx{S}$
for all $\displaystyle \VEC{a} \in \RR^3$ and $r>0$.
\end{question}

\begin{sol}
\subQ{a} We apply the divergence theorem to the vector field
$F = f \graD g$.
\begin{align*}
\iint_{\partial R} f \left( \graD g \cdot \VEC{n} \right) \dx{S}
&= \iint_{\partial R} f \graD g \cdot \dx{\VEC{S}}
= \iiint_R \diV(f \graD g) \dx{V} \\
  &
= \iiint_R \left( \graD f \cdot \graD g + f \graD^2 g\right) \dx{V} \ .
\end{align*}
If we interchange $f$ and $g$ in the previous equation and subtract
the resulting equation from the previous equation, then we get
(\ref{GreenFormNo2}).

\subQ{b}  Without lost of generality, we may assume that $r_1 > r_2$.
Let $R = \overline{B_{r_1}(\VEC{0}) \setminus B_{r_2}(\VEC{0})}$.
From the second Green's formula with $f$ and
$\displaystyle g(\VEC{x}) = \frac{1}{\|\VEC{x}\|}$ for $\VEC{x} \in R$,
we get
\[
\iint_{\partial R} \left( f \graD g - g \graD f\right) \cdot \dx{\VEC{S}}  
= \iiint_R \left( f \graD^2 g - g \graD^2 f\right) \dx{V}
= 0
\]
because $\displaystyle \graD^2 f= 0$ by hypothesis and $\displaystyle
\graD^2 g = 0$ as we have shown in (a) of
Question~\ref{introGreenFunct}.  The orientation on
$\partial R$ is given by the unit normal to $\partial R$ that points
outside $R$.  Thus
\begin{equation}\label{GreenMVa}
\iint_{\partial B_{r_1}(\VEC{0})}
\left( f \graD g - g \graD f\right) \cdot \dx{\VEC{S}}  
= \iint_{\partial B_{r_2}(\VEC{0})}
\left( f \graD g - g \graD f\right) \cdot \dx{\VEC{S}} \ ,
\end{equation}
where the orientation on $\partial B_r(\VEC{0})$ is given by the unit
normal to $\partial B_r(\VEC{0})$ that points outside $B_r(\VEC{0})$.
To get (\ref{GreenMVa}), we note that the orientation on
$\partial B_{r_2}(\VEC{0})$ is not consistent with the orientation on
$\partial R$.  Using (a) of Question~\ref{introGreenFunct},
we get
\begin{align*}
\iint_{\partial B_{r_1}(\VEC{0})} f \graD g \cdot \dx{\VEC{S}}
&= \iint_{\partial B_{r_1}(\VEC{0})} f(\VEC{x})
\left( \frac{1}{\|\VEC{x}\|^3} \, \VEC{x} \right) \cdot
\left( \frac{-1}{\|\VEC{x}\|}\, \VEC{x} \right) \dx{S} \\
&= - \iint_{\partial B_{r_1}(\VEC{0})}
\left( \frac{1}{\|\VEC{x}\|^2} \right) \, f(\VEC{x}) \dx{S}
= - \frac{1}{r_1^2} \iint_{\partial B_{r_1}(\VEC{0})} f \dx{S} \ .
\end{align*}
Using the divergence theorem, we get
\begin{align*}
\iint_{\partial B_{r_1}(\VEC{0})} g \graD f \cdot \dx{\VEC{S}}
&= \iint_{\partial B_{r_1}(\VEC{0})}
\left( \frac{1}{\|\VEC{x}\|} \right) \graD f \cdot \dx{\VEC{S}} \\
&= \frac{1}{r_1} \iint_{\partial B_{r_1}(\VEC{0})} \graD f \cdot \dx{\VEC{S}}
= \frac{1}{r_1} \iiint_{B_{r_1}(\VEC{0})} \graD^2 f \dx{V}  = 0
\end{align*}
where we have used (a) of Question~\ref{divCons} to get that
last equality.  Thus
\[
\iint_{\partial B_{r_1}(\VEC{0})}
\left( f \graD g - g \graD f\right) \cdot \dx{\VEC{S}}  
= - \frac{1}{r_1^2} \iint_{\partial B_{r_1}(\VEC{0})} f \dx{S} \ .
\]
Similarly, we get
$\displaystyle \iint_{\partial B_{r_2}(\VEC{0})} f \graD g \cdot \dx{\VEC{S}}
= - \frac{1}{r_2^2} \iint_{\partial B_{r_2}(\VEC{0})} f \dx{S}$
and
$\displaystyle \iint_{\partial B_{r_2}(\VEC{0})} g \graD f \cdot \dx{\VEC{S}}
= 0$.  Thus
\[
\iint_{\partial B_{r_2}(\VEC{0})}
\left( f \graD g - g \graD f\right) \cdot \dx{\VEC{S}}
= - \frac{1}{r_2^2} \iint_{\partial B_{r_2}(\VEC{0})} f \dx{S} \ .
\]
Hence, we get the result in (b) from (\ref{GreenMVa}) after
dividing by $-4 \pi$.

\subQ{c} We have from (b) that
$\displaystyle \frac{1}{4\pi r^2} \iint_{\partial B_r(\VEC{0})} f \dx{S} = C$,
a constant, for all $r>0$.  Hence
$\displaystyle \lim_{r\to 0^+}
\frac{1}{4\pi r^2} \iint_{\partial B_r(\VEC{0})} f \dx{S} = C$.
Moreover, from the Mean Value Theorem for Integrals, we have that
$\displaystyle \frac{1}{4\pi r^2} \iint_{\partial B_r(\VEC{0})} f
\dx{S} = f(\VEC{a}_r)$ for some $\VEC{a}_r \in \partial B_r(\VEC{0})$.
Note that $\displaystyle \iint_{\partial B_r(\VEC{0})} f \dx{S} = 4\pi r^2$
is the area of the sphere of radius $r$.  Since $f$ is 
continuous and $\VEC{a}_r \to \VEC{0}$ as $\displaystyle r \to 0^+$, we get that
$\displaystyle
C = \lim_{r\to 0^+} \frac{1}{4\pi r^2} \iint_{\partial B_r(\VEC{0})} f \dx{S}
= \lim_{r\to 0^+} f(\VEC{a}_r) = f(\VEC{0})$.

We get the formula at $\VEC{x} = \VEC{a} \in \RR$ arbitrary from the formula
at the origin with the change of variable $\VEC{x} = \VEC{y} + \VEC{a}$.
\end{sol}

\begin{question}
Suppose that $\displaystyle S \subset \RR^3$ is a surface with a piecewise
continuously differentiable boundary $\partial S$.  Moreover,
assume that the orientation on $\partial S$ with respect to $S$ is
positive; namely, the orientation on $\partial S$ is the orientation
induced from the orientation on $S$.
If $\displaystyle f:\RR^3 \to \RR$ is a function of class
$\displaystyle C^1$ and $\displaystyle g : \RR^3 \to \RR$ is function
of class $\displaystyle C^2$, prove that
\begin{equation}\label{curlCons}
\int_{\partial S} f \graD g \cdot \dx{\VEC{s}}
= \iint_S (\graD f \times \graD g) \cdot \dx{\VEC{S}} \ .
\end{equation}
\end{question}

\begin{sol}
We prove that (\ref{curlCons}) is given by Stokes' theorem and the relation
$\displaystyle \curL( f \graD g) = \graD f \cdot \graD g$.
We present two methods to prove this relation.

\stage{First method} We use brute force.
\begin{align*}
&\curL( f \graD g)
= \det \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\
\displaystyle f\pdydx{g}{x} & \displaystyle f \pdydx{g}{y} &
\displaystyle f \pdydx{g}{z}
\end{pmatrix} \\
&= \bigg( \pdfdx{\left(f \pdydx{g}{z}\right)}{y}
- \pdfdx{\left(f \pdydx{g}{y}\right)}{z}  ,
- \left( \pdfdx{\left(f \pdydx{g}{z}\right)}{x}
- \pdfdx{\left(f \pdydx{g}{x}\right)}{z}\right) ,
\pdfdx{\left(f \pdydx{g}{y}\right)}{x}
- \pdfdx{\left(f \pdydx{g}{x}\right)}{y}\bigg) \\
&= \bigg( \pdydx{f}{y} \pdydx{g}{z} + f \pdydxnm{g}{y}{z}{2}{}{}
- \pdydx{f}{z}\pdydx{g}{y} - f \pdydxnm{g}{z}{y}{2}{}{} , 
- \left( \pdydx{f}{x} \pdydx{g}{z} + f \pdydxnm{g}{x}{z}{2}{}{}
- \pdydx{f}{z} \pdydx{g}{x} - f \pdydxnm{g}{z}{x}{2}{}{}\right) , \\
&\hspace{7em} \pdydx{f}{x} \pdydx{g}{y} + f \pdydxnm{g}{x}{y}{2}{}{}
- \pdydx{f}{y} \pdydx{g}{x} - f \pdydxnm{g}{y}{x}{2}{}{} \bigg) \\
&= \bigg( \pdydx{f}{y} \pdydx{g}{z} - \pdydx{f}{z}\pdydx{g}{y} ,
- \left( \pdydx{f}{x} \pdydx{g}{z} - \pdydx{f}{z} \pdydx{g}{x}\right) ,
\pdydx{f}{x} \pdydx{g}{y} - \pdydx{f}{y} \pdydx{g}{x} \bigg)
= \graD f \times \graD g
\end{align*}
because $\displaystyle \pdydxnm{g}{z}{y}{2}{}{} = \pdydxnm{g}{y}{z}{2}{}{}$,
$\displaystyle \pdydxnm{g}{z}{x}{2}{}{} = \pdydxnm{g}{x}{z}{2}{}{}$
and $\displaystyle \pdydxnm{g}{y}{x}{2}{}{} = \pdydxnm{g}{x}{y}{2}{}{}$
for functions of class $\displaystyle C^2$ like $g$.

\stage{Second method}
We use differential forms.  We have that
$\graD g \longleftrightarrow \df{g}$.  Thus
$f \graD g \longleftrightarrow f \df{g}$ and
$\curL( f \graD g) \longleftrightarrow \df{(f \df{g})}
= \df{f}\wedge \df{g} + f \df{(\df{g})}
= \df{f}\wedge \df{g}$
where we have used item (3) of Theorem~\ref{stokesDF} to conclude that
$\df{(\df{g})} = 0$. 
Moreover, we have
$\displaystyle \graD f \times \graD g \longleftrightarrow \df{f}
\wedge \df{g}$.  Thus
$\curL( f \graD g) = \graD f \times \graD g$.
The second method is much shorter than the first one.

To answer the question, we use Stokes' theorem to get
\[
\int_{\partial S} f \graD g \cdot \dx{\VEC{s}}
= \iint_S \curL( f \graD g) \cdot \dx{\VEC{S}}
= \iint_S (\graD f \times \graD g) \cdot \dx{\VEC{S}} \ .
\]
\end{sol}

\begin{question}
Suppose that $\displaystyle F:\RR^3 \to \RR^3$ is a continuously differentiable
vector field such that $\curL F \cdot \VEC{e}_2 = 0$ everywhere in the
$x,z$ plane.  Show that $\displaystyle \int_C F \cdot \dx{\VEC{s}}$
yields the same value for every closed curve $C$ entirely in the
$x,z$ plane that surrounds the origin if we
assume that the orientation on $C$ is ``globally'' counterclockwise
when view from the positive side of the $y$ axis.
We assume here that the closed curves $C$ can be continuously deformed 
in the $x,z$ plane into a circle without intersecting the origin.
\end{question}

\begin{sol}
Let $\displaystyle C_r = \{ (x,0,z) : x^2 + z^2 = r^2 \}$ and
\[
S_r = \begin{cases}
\{ (x,0,z) : 1 \leq x^2 +z^2 \leq r^2 \} & \quad \text{if}\ r > 1 \\
\{ (x,0,z) : r^2 \leq x^2 +z^2 \leq 1 \} & \quad \text{if}\ 0 < r < 1
\end{cases}
\]
The orientation on $S_r$ is given by the unit vector $\VEC{e}_2$ and
$\partial S_r$ is given the positive orientation consistent with the
orientation on $S_r$.
\pdfbox{vect_calculus/question39}

\stage{i} Using Stokes' theorem, we have
\[
\int_{C_r} F \cdot \dx{\VEC{s}} - \int_{C_1} F \cdot \dx{\VEC{s}}
= \epsilon \int_{\partial S_r} F \cdot \dx{\VEC{s}}  
= \epsilon \iint_{S_r} \curL F \cdot \dx{\VEC{S}}
= \epsilon \iint_{S_r} \curL F \cdot \VEC{e}_2 \dx{S} = 0  \ ,
\]
where $\epsilon = 1$ for $r > 1$ and $\epsilon = -1$ for $0 < r < 1$.
Note that the orientation on $C_1$ is not consistent with the
orientation on $\partial S_r$ if $r > 1$ while it is
the orientation on $C_r$ that is not consistent with the
orientation on $\partial S_r$ if $r < 1$.  Thus
$\displaystyle \int_{C_r} F \cdot \dx{\VEC{s}} = \int_{C_1} F \cdot
\dx{\VEC{s}}$ for all $r$.  If
$\displaystyle K = \int_{C_1} F \cdot \dx{\VEC{s}}$,
then $\displaystyle \int_{C_r} F \cdot \dx{\VEC{s}} = K$ for all $r>0$.

\stage{ii} Let $C$ be any closed curves entirely in the $x,z$ plane
that surrounds the origin as described in the statement of the
question.  Since the origin is an interior point of the region
enclosed by the curve $C$ in the $x,z$ plane, there exists
$\epsilon >0$ such that $C_\epsilon$ is included in the interior of
the region enclosed by the curve $C$ in the $x,z$ plane.  See 
the figure above.  If $S$ is the region in the $x,z$ plane enclosed 
by $C$ and the circle $C_\epsilon$, then we get from Stokes' theorem that
\[
\int_C F \cdot \dx{\VEC{s}} - \int_{C_\epsilon} F \cdot \dx{\VEC{s}}
= \int_{\partial S} F \cdot \dx{\VEC{s}}  
= \iint_S \curL F \cdot \dx{\VEC{S}}
= \iint_S \curL F \cdot \VEC{e}_2 \dx{S} = 0  \ .
\]
Note that the orientation on $C_\epsilon$ is not consistent with the
orientation on $\partial S$.  Thus
$\displaystyle \int_C F \cdot \dx{\VEC{s}}
= \int_{C_\epsilon} F \cdot \dx{\VEC{s}} = K$.
\end{sol}

\subsection{Vector Fields}

\begin{question}
For each of the vector fields $F$ below, determine if it is conservative and
if there exists a function $f$ such that $F = \graD f$.  If it is possible,
find a function $f$.\\
\subQ{a} $\displaystyle F(x,y,z) = \big( yz^2, xz^2, 2xyz \big)$.\\
\subQ{b} $\displaystyle F(x,y,z) = \big(2xy + x^2, x^2 - y^2, 0)$.\\
\subQ{c} $\displaystyle F(x,y,z) = \big(3y^2 + 5x^4, x^5 + 6xy, 0 \big)$.\\
\subQ{d} $\displaystyle F(x,y,z) = \big(yz -y \sin(xy),
xz -x \sin(xy)  + z\cos(yz), xy + y\cos(yz)\big)$.\\
\subQ{e} $\displaystyle F(x,y,z) = \big(y-z, x-z, x-y\big)$.
\end{question}

\begin{sol}
\subQ{a} Since
\[
\curL F(x,y,z) = \det
\begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\[0.7em]
yz^2 &  xz^2 & 2xyz
\end{pmatrix} = \VEC{0}
\]
for all $\displaystyle (x,y,z)\in \RR^3$ and $F$ is a continuously
differentiable vector field on the convex set $\displaystyle \RR^3$,
we get from Proposition~\ref{DGconserveB} that $F$ is conservative and
we get from Proposition~\ref{DGconserveA} that there exists a
function $\displaystyle f:\RR^3\to \RR$ such that $\graD f = F$.  The
function $f$ must satisfy the relations
\begin{equation} \label{finalB}
\pdydx{f}{x} = yz^2 \quad , \quad
\pdydx{f}{y} = xz^2 \quad \text{and}
\quad \pdydx{f}{z} = 2xyz \ .
\end{equation}
From the first equation in (\ref{finalB}), we get that
$\displaystyle f(x,y,z) = xyz^2 + \phi(y,z)$.  If we substitute this
expression for $f$ in the second equation in (\ref{finalB}), then we get that
$\displaystyle xz^2 + \pdydx{\phi}{y} = xz^2$.  Thus
$\displaystyle \pdydx{\phi}{y} = 0$ and we conclude that $\phi$ is only a
function of $z$.  If we substitute
$\displaystyle f(x,y,z) = xyz^2 + \phi(z)$ in the
last equation in (\ref{finalB}), then we get that
$\displaystyle 2xyz + \dydx{\phi}{z} = 2xyz$.  Thus
$\displaystyle \dydx{\phi}{z} = 0$ and $\phi(z) = C$, a
constant.  We find that $\displaystyle f(x,y,z) = xyz^2 + C$.

\subQ{b} Since
\[
\curL F(x,y,z) = \det
\begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\[0.7em]
2xy + x^2 &  x^2-y^2 & 0
\end{pmatrix} = \VEC{0}
\]
for all $\displaystyle (x,y,z)\in \RR^3$ and $F$ is a continuously
differentiable vector field on the convex set $\displaystyle \RR^3$,
we get from Proposition~\ref{DGconserveB} that $F$ is conservative and
we get from Proposition~\ref{DGconserveA} that there exists a
function $\displaystyle f:\RR^3\to \RR$ such that $\graD f = F$.  The
function $f$ must satisfy the relations
\begin{equation} \label{consQ4}
\pdydx{f}{x} = 2xy + x^2 \quad , \quad
\pdydx{f}{y} = x^2-y^2 \quad \text{and}
\quad \pdydx{f}{z} = 0 \ .
\end{equation}
From the first equation in (\ref{consQ4}), we get that
$\displaystyle f(x,y,z) = x^2y + \frac{x^3}{3} + \phi(y,z)$.  If we
substitute this expression for $f$ in the second equation in
(\ref{consQ4}), then we get that
$\displaystyle x^2 + \pdydx{\phi}{y} = x^2 - y^2$.  Thus
$\displaystyle \pdydx{\phi}{y} = -y^2$ and we conclude that
$\displaystyle \phi(y,z) = - \frac{y^3}{3} + \phi(z)$.  If we
substitute
$\displaystyle f(x,y,z) = x^2y + \frac{x^3}{3} - \frac{y^3}{3} + \phi(z)$
in the last equation in (\ref{consQ4}), then we get that
$\displaystyle \dydx{\phi}{z} = 0$.  Thus $\phi(z) = C$, a
constant.  We find that $\displaystyle
f(x,y,z) = x^2y + \frac{x^3}{3} - \frac{y^3}{3} + C$.

\subQ{c} We have
\[
\curL F(x,y,z) = \det
\begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\[0.7em]
3y^2 + 5x^4 &  x^5 + 6xy & 0
\end{pmatrix} = 5 x^4 \VEC{e}_3 \neq \VEC{0}
\]
except if $x=0$.  Since $F$ is a continuously differentiable
vector field on the convex set $\displaystyle \RR^3$, we get from
Proposition~\ref{DGconserveA} that $F$ cannot be conservative because
we would then have that $F = \graD f$ for a function
$\displaystyle f:\RR^3 \to \RR$
and hence $\curL F = \curL( \graD f) = \VEC{0}$ on $\displaystyle \RR^3$.

\subQ{d} Since
\[
\curL F(x,y,z) = \det
\begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\[0.7em]
yz -y\sin(xy) & xz -x\sin(xy)+z\cos(yz) & xy + y \cos(yz)
\end{pmatrix} = \VEC{0}
\]
for all $\displaystyle (x,y,z)\in \RR^3$ and $F$ is a continuously
differentiable vector field on the convex set $\displaystyle \RR^3$,
we get from Proposition~\ref{DGconserveB} that $F$ is conservative and
we get from Proposition~\ref{DGconserveA} that there exists a
function $\displaystyle f:\RR^3\to \RR$ such that $\graD f = F$.  The
function $f$ must satisfy the relations
\begin{equation} \label{consQ3}
\pdydx{f}{x} = yz - y \sin(xy) \ , \
\pdydx{f}{y} = xz - x\sin(xy) + z\cos(yz) \quad \text{and} \quad
\pdydx{f}{z} = xy + y \cos(yz)
\end{equation}
From the first equation in (\ref{consQ3}), we get that
$\displaystyle f(x,y,z) = xyz + \cos(xy) + \phi(y,z)$.  If we
substitute this expression for $f$ in the second equation in
(\ref{consQ3}), then we get that
$\displaystyle xz -x \sin(xy) + \pdydx{\phi}{y} = xz - x\sin(xy) + z
\cos(yz)$.   Thus $\displaystyle \pdydx{\phi}{y} = z\cos(yz)$ and we
conclude that $\displaystyle \phi(y,z) = \sin(yz) + \phi(z)$.  If we
substitute
$\displaystyle f(x,y,z) = xyz + \cos(xy) + \sin(yz) + \phi(z)$
in the last equation in (\ref{consQ3}), then we get that
$\displaystyle xy + y\cos(yz) + \dydx{\phi}{z} = xy + y \cos(yz)$.
Thus $\displaystyle \dydx{\phi}{z} = 0$ and $\phi(z) = C$, a
constant.  We find that $\displaystyle
f(x,y,z) = xyz + \cos(xy) + \sin(yz) + C$.

\subQ{e} We have
\[
\curL F(x,y,z) = \det
\begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\[0.7em]
y-z &  x-z & x-y
\end{pmatrix} = -2 \VEC{e}_2 \neq \VEC{0} \ .
\]
Since $F$ is a continuously differentiable
vector field on the convex set $\displaystyle \RR^3$, we get from
Proposition~\ref{DGconserveA} that $F$ cannot be conservative because
we would then have that $F = \graD f$ for a function
$\displaystyle f:\RR^3 \to \RR$
and hence $\curL F = \curL( \graD f) = \VEC{0}$ on $\displaystyle \RR^3$.
\end{sol}

\begin{question}
For each of the vector fields $F$ defined on $\displaystyle \RR^3$
below, determine if it is conservative and if there exists a vector
field $G$ such that $F = \curL G$.  If it is possible, find a vector
field $G$.\\
\subQ{a} $\displaystyle F(x,y,z)
= \big(3y^2z -3xz^2, x^2y, z^3 -x^2z\big)$.\\
\subQ{b} $\displaystyle F(x,y,z) = \big(0,2yz+z, z\big)$.\\
\subQ{c} $\displaystyle F(x,y,z) = \big(x^3+yz, y - 3x^2y, 4y^2-z) \big)$.\\
\subQ{d} $\displaystyle F(x,y,z) = \big(xy+z , xz, -yz+x\big)$.\\
\subQ{e} $\displaystyle F(x,y,z) = \big(x e^{-x^2z^2} - 6 x, 5y+2z,
z-z e^{-x^2z^2}\big)$.
\end{question}

\begin{sol}
\subQ{a}
Since
\[
\diV F(x,y,z)
= \pdfdx{(3y^2z -3xz^2)}{x} + \pdfdx{(x^2y)}{y} + \pdfdx{(z^3 -x^2z)}{z}
= -3 z^2 +x^2 +3z^2 -x^2 = 0
\]
for all $\displaystyle (x,y,z) \in \RR^3$ and
$\displaystyle F:\RR^3 \to \RR^3$ is continuously
differentiable on the convex set $\displaystyle \RR^3$, it follows
from Proposition~\ref{DGclosedexact} that there exists
$\displaystyle G:\RR^3\to \RR^3$ such that $\curL G = F$.
As explained in Remark~\ref{CEtrick}, we may seek
$\displaystyle G:\RR^3\to \RR^3$ such that
\begin{align*}
G_1(x,y,z) &= \int_0^z F_2(x,y,s)\dx{s} + \psi(x,y) 
= \int_0^z x^2y \dx{s} + \psi(x,y) = x^2yz + \psi(x,y) \ , \\
G_2(x,y,z) &= - \int_0^z F_1(x,y,s)\dx{s} + \phi(x,y) 
= - \int_0^z (3y^2s -3xs^2)\dx{s} + \phi(x,y) \\
&\qquad = -\frac{3}{2}y^2z^2 + xz^3 + \phi(x,y) \quad \text{and} \\
G_3(x,y,z) &= 0
\end{align*}
with
\[
\pdydx{G_2}{x} - \pdydx{G_1}{y} = F_3 \Rightarrow
z^3 + \pdydx{\phi}{x} - x^2z - \pdydx{\psi}{y}
= z^3 -x^2z
\Rightarrow \pdydx{\phi}{x}(x,y) - \pdydx{\psi}{y}(x,y) = 0 \ .
\]
If we choose $\phi(x,y) = 0$ and $\psi(x,y) = 0$ for all $(x,y)$,
then we get that\\
$\displaystyle
G(x,y,z) = \Big(x^2yz, -\frac{3}{2}y^2z^2 +xz^3, 0 \Big)$.

\subQ{b}
Since
\[
\diV F(x,y,z)
= \pdfdx{(2yz+z)}{y} + \pdfdx{(z)}{z}
= 2z + 1 \neq 0
\]
for $z \neq -1/2$, we cannot write $F$ as $F = \curL G$ for some vector
field $\displaystyle G:\RR^3\to \RR^3$ because we would then have that
$\diV F = \diV(\curL F) = 0$ on $\displaystyle \RR^3$.

\subQ{c}
Since
\[
\diV F(x,y,z)
= \pdfdx{(x^3+yz)}{x} + \pdfdx{(y-3x^2y)}{y} + \pdfdx{(4y^2 -z)}{z}
= 3 x^2 +1 -3x^2 -1 = 0
\]
for all $\displaystyle (x,y,z) \in \RR^3$ and
$\displaystyle F:\RR^3 \to \RR^3$ is continuously
differentiable on the convex set $\displaystyle \RR^3$, it follows
from Proposition~\ref{DGclosedexact} that there exists
$\displaystyle G:\RR^3\to \RR^3$ such that $\curL G = F$.
As explained in Remark~\ref{CEtrick}, we may seek
$\displaystyle G:\RR^3\to \RR^3$ such that
\begin{align*}
G_1(x,y,z) &= \int_0^z F_2(x,y,s)\dx{s} + \psi(x,y) 
= \int_0^z (y-3x^2y) \dx{s} + \psi(x,y) \\
&\qquad   = yz - 3x^2yz + \psi(x,y) \ , \\
G_2(x,y,z) &= - \int_0^z F_1(x,y,s)\dx{s} + \phi(x,y) 
= - \int_0^z (x^3 +ys) \dx{s} + \phi(x,y) \\
&\qquad = -x^3 z - \frac{yz^2}{2} + \phi(x,y) \quad \text{and} \\
G_3(x,y,z) &= 0
\end{align*}
with
\begin{align*}
\pdydx{G_2}{x} - \pdydx{G_1}{y} = F_3 &\Rightarrow
-3x^2 z + \pdydx{\phi}{x} - z + 3 x^2z - \pdydx{\psi}{y} \\
&= 4y^2 -z
\Rightarrow \pdydx{\phi}{x}(x,y) - \pdydx{\psi}{y}(x,y) = 4 y^2 \ .
\end{align*}
If we choose $\displaystyle \phi(x,y) = 4xy^2$ and $\psi(x,y) = 0$
for all $(x,y)$, then we get that
$\displaystyle G(x,y,z) = \Big(yz - 3x^2yz), -x^3z - \frac{yz^2}{2} + 4xy^2,
0 \Big)$.

\subQ{d}
Since
\[
\diV F(x,y,z)
= \pdfdx{(xy + z)}{x} + \pdfdx{(xz)}{y} + \pdfdx{(-yz+x)}{z}
= y -y = 0
\]
for all $\displaystyle (x,y,z) \in \RR^3$ and
$\displaystyle F:\RR^3 \to \RR^3$ is continuously
differentiable on the convex set $\displaystyle \RR^3$, it follows
from Proposition~\ref{DGclosedexact} that there exists
$\displaystyle G:\RR^3\to \RR^3$ such that $\curL G = F$.
As explained in Remark~\ref{CEtrick}, we may seek
$\displaystyle G:\RR^3\to \RR^3$ such that
\begin{align*}
G_1(x,y,z) &= \int_0^z F_2(x,y,s)\dx{s} + \psi(x,y) 
= \int_0^z xs \dx{s} + \psi(x,y) = \frac{xz^2}{2} + \psi(x,y) \ , \\
G_2(x,y,z) &= - \int_0^z F_1(x,y,s)\dx{s} + \phi(x,y) 
= - \int_0^z (xy + s) \dx{s} + \phi(x,y) \\
&= -xyz - \frac{z^2}{2} + \phi(x,y) \quad \text{and} \\
G_3(x,y,z) &= 0
\end{align*}
with
\[
\pdydx{G_2}{x} - \pdydx{G_1}{y} = F_3 \Rightarrow
-yz + \pdydx{\phi}{x} - \pdydx{\psi}{y} = -yz + x
\Rightarrow \pdydx{\phi}{x}(x,y) - \pdydx{\psi}{y}(x,y) = x \ .
\]
If we choose $\displaystyle \phi(x,y) = \frac{x^2}{2}$ and
$\psi(x,y) = 0$ for all $(x,y)$, then we get that
$\displaystyle G(x,y,z) = \Big( \frac{xz^2}{2} ,-xyz - \frac{z^2}{2}
+ \frac{x^2}{2} , 0 \Big)$.

\subQ{e}
Since
\begin{align*}
\diV F(x,y,z)
&= \pdfdx{(xe^{-x^2z^2} -6x)}{x} + \pdfdx{(5y+2z)}{y}
+ \pdfdx{(z-ze^{-x^2z^2})}{z}\\
&= (e^{-x^2z^2}- 2x^2z^2e^{-x^2z^2}-6) + 5 + (1 - e^{-x^2z^2} +
2x^2z^2e^{-x^2z^2})  = 0
\end{align*}
for all $\displaystyle (x,y,z) \in \RR^3$ and
$\displaystyle F:\RR^3 \to \RR^3$ is continuously
differentiable on the convex set $\displaystyle \RR^3$, it follows
from Proposition~\ref{DGclosedexact} that there exists
$\displaystyle G:\RR^3\to \RR^3$ such that $\curL G = F$.
As explained in Remark~\ref{CEtrick}, we may seek
$\displaystyle G:\RR^3\to \RR^3$ such that
\begin{align*}
G_1(x,y,z) &= -\int_0^y F_3(x,s,z)\dx{s} + \psi(x,z) 
= -\int_0^y (z-z e^{-x^2z^2}) \dx{s} + \psi(x,z) \\
&\qquad   = - yz + yz e^{-x^2z^2} + \psi(x,z) \ , \\
G_2(x,y,z) &= 0 \quad \text{and} \\
G_3(x,y,z) &=  \int_0^y F_1(x,s,z)\dx{s} + \phi(x,z) 
= \int_0^y (x e^{-x^2z^2} - 6 x) \dx{s} + \phi(x,z) \\
&\qquad = xy e^{-x^2z^2} - 6 xy + \phi(x,z)
\end{align*}
with
\begin{align*}
\pdydx{G_1}{z} - \pdydx{G_3}{x} = F_2 &\Rightarrow
-y + ye^{-x^2z^2} - 2x^2yz^2 e^{-x^2z^2} + \pdydx{\psi}{z} \\
& \qquad -ye^{-x^2z^2} + 2x^2yz^2 e^{-x^2z^2} + 6y - \pdydx{\phi}{x}
 = 5y+2z \\
&\Rightarrow \pdydx{\psi}{z}(x,z) - \pdydx{\phi}{x}(x,z) = 2z \ .
\end{align*}
If we choose $\displaystyle \psi(x,z) = z^2$ and
$\phi(x,z) = 0$ for all $(x,z)$, then we get that
$\displaystyle G(x,y,z) = \Big( -yz + yz e^{-x^2z^2} +z^2 , 0,
xy e^{-x^2z^2} - 6 xy \Big)$.
\end{sol}

\begin{question}
Consider the vector field $\displaystyle F:\RR^3 \to \RR^3$ defined by
$\displaystyle F(x,y,z) = \big( e^x\sin(y) , e^x\cos(y) , z^2 \big)$.
Evaluate the
integral $\displaystyle \int_C F\cdot \dx{\VEC{s}}$ where $C$ is the curve
with the parametric representation
$\displaystyle \sigma(t) = \big( t^{1/3}, t^5, e^{t^{1/2}} \big)$ for
$0 \leq t \leq 1$.  We assume that the parametric representation of
$C$ is consistent with the orientation on $C$.
\end{question}

\begin{sol}
Since
\[
\curL F = \begin{pmatrix}
\VEC{e}_1 & \VEC{e}_2 & \VEC{e}_3 \\
\displaystyle \pdydx{}{x} & \displaystyle \pdydx{}{y} &
\displaystyle \pdydx{}{z} \\
e^x\sin(y) & e^x \cos(y) & z^2
\end{pmatrix}
= \VEC{0}
\]
for all $\displaystyle (x,y,z)\in \RR^3$ and $F$ is a continuously
differentiable vector field on the convex set $\displaystyle \RR^3$,
we get from Proposition~\ref{DGconserveB} that $F$ is conservative and
we get from Proposition~\ref{DGconserveA} that there exists a
function $\displaystyle f:\RR^3\to \RR$ such that $\graD f = F$.
Hence
\begin{align*}
\int_C F\cdot \dx{\VEC{s}} &= \int_C \graD f \cdot \dx{\VEC{s}}
= \int_0^1 (\graD f)(\sigma(t)) \sigma'(t) \dx{t} \\
&= \int_0^1 \dfdx{f(\sigma(t))}{t} \dx{t}
= f(\sigma(1)) - f(\sigma(0)) = f(1.1.e) - f(0,0,1) \ .
\end{align*}
We only have to find $f$.  The function $f$ must satisfy the relations
\begin{equation} \label{finalA}
\pdydx{f}{x} = e^x\sin(y) \quad , \quad
\pdydx{f}{y} = e^x\cos(y) \quad \text{and}
\quad \pdydx{f}{z} = z^2 \ .
\end{equation}
From the first equation in (\ref{finalA}), we get that
$\displaystyle f(x,y,z) = e^x \sin(y) + \phi(y,z)$.  If we substitute
this expression for $f$ in the second equation in (\ref{finalA}), then
we get that
$\displaystyle e^x \cos(y) + \pdydx{\phi}{y} = e^x \cos(y)$.  Thus
$\displaystyle \pdydx{\phi}{y} = 0$ and we conclude that $\phi$ is only a
function of $z$.  If we substitute
$\displaystyle f(x,y,z) = e^x \sin(y) + \phi(z)$ in the
last equation in (\ref{finalA}), then we get that
$\displaystyle \dydx{\phi}{z} = z^2$.  Thus
$\displaystyle \phi(z) = \frac{z^3}{3}$.  We may ignore the constant
of integration because we are going to evaluate $f$ between two points
later and the constant will cancel out.  We have found that
$\displaystyle f(x,y,z) = e^x \sin(y) + \frac{z^3}{3}$.
Hence
$\displaystyle \int_C F\cdot \dx{\VEC{s}} = f(1.1.e) - f(0,0,1) =
e\sin(1) +(e^3-1)/3$.
\end{sol}

\begin{question}
Let $C$ be the path in $\displaystyle \RR^3$ defined by the segments
from $(0,0,0)$ to $(1,1,1)$, from $(1,1,1)$ to $(1,1,0)$, from
$(1,1,0)$ to $(1,0,0)$, from $(1,0,0)$ to $(2,2,2)$, from $(2,2,2)$ to
$(2,2,0)$, from $(2,2,0)$ to $(2,0,0)$, \ldots, from $(100,100,0)$ to
$(100,0,0)$ in the given order.  Compute
$\displaystyle \int_{C} 2xyz \dx{x} + x^2z \dx{y} + x^2y \dx{z}$.
\end{question}

\begin{question}
Compute the integral
$\displaystyle \int_C (2y-3z)\dx{x} + (2x+z)\dx{y} +(y-3x)\dx{z}$
where $C$ is the curve with the parametric representation
$\displaystyle \sigma(t) = (t^{1/3},  \sqrt{t} e^{-t}, e^{\cos(t\pi)})$
for $0\leq t \leq 1$.
We assume that the parametric representation of $C$ is consistent with
the orientation on $C$.
\end{question}

\begin{question}
Let $\displaystyle F(x,y,z) = - \frac{GMm}{(x^2+y^2+z^2)^{3/2}} \, ( x, y, z)$.
This is the gravitational force field of a object of mass $M$ on a particle
of mass $m$.  Show that the work done by $F$ on the particle as it moves from
$(x_0,y_0,z_0)$ to $(x_1,y_1,z_1)$ is a function of
$\|(x_0,y_0,z_0)\|$ and $\|(x_1,y_1,z_1)\|$ only.  Note that the work
to move a particle from $(x_0,y_0,z_0)$ to $(x_1,y_1,z_1)$ is given by
the integral of $F$ along the path from $(x_0,y_0,z_0)$ to
$(x_1,y_1,z_1)$.
\end{question}


%%% Local Variables: 
%%% mode: latex
%%% TeX-master: "notes"
%%% End:
