\magnification=\magstep1
\overfullrule=0pt
\def\phi{\varphi}
\def\bF{{\bf F}}
\def\bN{{\bf N}}
\def\bR{{\bf R}}
\def\dint{\int\!\!\!\int}
\def\trint{\int\!\!\!\int\!\!\!\int}
\centerline{Mathematics 373 -- Applied Mathematics (PDE)}
\centerline{Vector Calculus -- The Essentials}
\bigskip
\noindent
{\it 0. Introduction}
\bigskip
In order to study applied problems such as heat flow in 2- and 
3-dimensional regions, we will need to use {\it line integrals
and Green's Theorem} and/or {\it surface integrals and 
the Divergence (Gauss's) Theorem}.  These topics were probably
either not discussed in much detail or not discussed at all
in Mathematics 241 (41), Multivariable Calculus.  So we will
need to introduce or reintroduce the key ideas now.
\bigskip
\noindent
{\it 1. Path Integrals, Line Integrals and Green's Theorem}
\bigskip
Let $\alpha : [a,b] \to D$ be a smooth parametric curve in 
the plane.  Let $T(t) = \alpha'(t)/\|\alpha'(t)\|$ be
its unit tangent vector, and write $ds = \|\alpha'(t)\|\,dt$
for the arclength element on $\alpha$ (that is, 
$\int_a^b ds$ computes the arclength along the curve from $t = a$
to $t = b$.  If $f(x,y)$ is a reasonably nice (e.g. continuous)
{\it scalar} function defined on $D$, 
we can define:

\bigskip
\proclaim Definition 1. The {\it path integral} of $f$ over
$\alpha$ is the integral
$$\int f ds = \int_a^b f(\alpha(t)) \|\alpha'(t)\|\,dt$$
\par

\noindent
{\bf Example 1.}
For example, let $f = 3x + 2y$, and let $\alpha : [0,\pi] \to \bR^2$
be defined by $\alpha(t) = (\cos(t), \sin(t))$ (the upper semicircle
of the circle of radius 1 centered at $(0,0)$).  The arclength
element of this curve is
$$ds = \|\alpha'(t)\| = \|(-\sin(t),\cos(t))\|\, dt = \sqrt{\sin^2(t) + \cos^2(t)}\, dt
 = dt, $$
Then the path
integral of $f$ over the curve $\alpha$ is 
$$\int_\alpha f ds = \int_0^\pi 3\cos(t) + 2\sin(t)\, dt = [3\sin(t) - 2\cos(t)]_0^\pi = 4$$

\bigskip
A closely related concept is the {\it line integral of a vector field.}
The best way to distinguish these in your mind is to remember that
path integrals are defined for scalar functions, while line
integrals are defined for vector functions (that is, vector fields).

Let $\bF(x,y) = (P(x,y),Q(x,y))$ be a continuous vector field 
on a region $D \subset \bR^2$.  In applications, $\bF(x,y)$
might represent a force field, the velocity field for a moving fluid, etc.
Let $\alpha : [a,b] \to D$ is a smooth parametric curve whose image
lies in $D$, with unit tangent $T$ as above.

\bigskip
\proclaim Definition 2.  We define the {\it line integral of $\bF$
along $\alpha$}, denoted 
$$\int_\alpha \bF\cdot T\, ds = \int_\alpha \bF \cdot \alpha'\, dt$$ 
as follows:
$$\int_\alpha \bF\cdot T\, ds = \int_a^b \bF(\alpha(t))\cdot \alpha'(t)\, dt$$
\par

\bigskip
The notation $\bF(\alpha(t))$ means this:  If $\alpha(t) = (x(t),y(t))$ is the 
parametrization, and $\bF = (P(x,y),Q(x,y))$, then 
$\bF(\alpha(t)) = (P(x(t),y(t)),Q(x(t),y(t))$.  That is, we substitute
the components of the parametrization for $x,y$ in $\bF$.

Note that the line integral of a vector field $\bF$ could 
also be defined as the path integral of the scalar function
$\bF\cdot T$ (which can be interpreted as {\it the component of 
$\bF$ in the direction of $T$,} the unit tangent to the curve).

In physics, if $\bF$ represents a {\it force\/} applied to an object moving 
along the path $\alpha$, then $\int_\alpha \bF\cdot T\, ds$
represents the {\it total work done\/} (the integral of the component
of $\bF$ in the direction of the path).  

For computing line integrals, we usually use the observation
that the factors of $\|\alpha'(t)\|$ in the denominator from $T$, and
in the numerator from $ds$ always cancel.  Hence there is no need
to compute $T$ or $ds$, and we almost always simply compute
$\int_a^b \bF(\alpha(t))\cdot \alpha'(t)\, dt$.

\bigskip
\noindent
{\bf Example 2.} Let $\alpha$ be the curve from Example 1.
If $\bF$ is the vector field $\bF = (x^2,y+1)$, then
the line integral of $\bF$ along $\alpha$ is equal to 
$$\eqalign{\int_0^\pi \bF(\alpha(t))\cdot \alpha'(t)\, dt&= 
\int_0^\pi (\cos^2(t),\sin(t) + 1)\cdot (-\sin(t),\cos(t))\, dt\cr
&= \int_0^\pi -\cos^2(t)\sin(t) + \sin(t)\cos(t)+\cos(t)\, dt\cr
&= [\cos^3(t)/3 - \cos^2(t)/2 + \sin(t)]_0^\pi\cr
&= -2/3\cr}$$

\bigskip
The most important theorem about line integrals
deals with the case where $\alpha$ is a {\it simple closed
curve \/} -- that is,
a smooth curve $\alpha$ where $\alpha(a) = \alpha(b)$
but $\alpha$ is one-to-one otherwise on the domain $[a,b]$.  This means,
intuitively, that $\alpha$ does not cross itself, except that 
the final point $\alpha(b)$ is the same as $\alpha(a)$.  A simple closed
curve divides the plane into an interior and an exterior region.  
(This fact seems intuitively obvious but is actually quite difficult
to prove rigorously -- it is the statement of a famous result
called the Jordan Curve Theorem.)
Green's Theorem gives an equality between the line integral 
of a vector field over a simple closed curve and a related double
integral over the interior region.

\bigskip
\proclaim Green's Theorem.  Let 
$\bF(x,y) = (P(x,y),Q(x,y))$ be a vector field whose components
have continuous first order partial derivatives on an open 
$U\subset \bR^2$ containing the simple closed curve $\alpha$ and the
region $D$ interior to $\alpha$.  If $\alpha$ is traced so that
the region $D$ is always to the left as we proceed along $\alpha$, 
then 
$$\int_\alpha \bF\cdot T\, ds 
= \dint_D {\partial Q\over \partial x} - {\partial P\over \partial y}\, dA\leqno(1)$$
(where $dA$ represents the area element in the plane).  
If $\alpha$ is traced in the other direction, then a minus sign
must be inserted on one side of this equation.
\par

\bigskip
\noindent
{\bf Example 3.}  For instance, let $\bF = (-y, x)$, and 
let $\alpha = (5\cos(t),\sin(t))$, $t \in [0,2\pi]$.  Here $\alpha$
is an ellipse (semi-major axis = 5, semi-minor axis = 1, center
at $(0,0)$, traced counterclockwise).  Hence the condition that
$\alpha$ is traced so that
the region $D$ is always to the left {\it is satisfied}.  
Let us verify that the conclusion (1) of Green's Theorem is true here.
The line integral evaluates to
$$\int_\alpha \bF\cdot T\, ds = \int_0^{2\pi} 5\sin^2(t) + 5\cos^2(t)\, dt 
= 10\pi$$
The double integral is 
$$\dint_D {\partial Q\over \partial x} - {\partial P\over \partial y}\, dA
=\int_{-5}^5\int_{-\sqrt{1 - x^2/25}}^{\sqrt{1 - x^2/25}} 2 \, dy\, dx $$
which equals 2 times the area of the ellipse.  Recalling the area formula
$A = \pi a b$
for an ellipse with semi-major axis $a$ and semi-minor 
axis $b$, this equals $2\cdot \pi \cdot 5 \cdot 1 = 10\pi$, which agrees
with the line integral calculation.  

\bigskip
Green's Theorem can be used in several ways.  First, the relation
given in the statement is an important step in many proofs about
line and double integrals in the plane.  Second, to compute a line
integral around a simple closed curve, it may sometimes be simpler to 
apply Green's Theorem and compute 
$\dint_D {\partial Q\over \partial x} - {\partial P\over \partial y}\, dA$
instead.

\bigskip
\noindent
{\bf Example 4.}
For instance, consider the vector field
$$\bF = (P,Q) = (x^2 + y, x + y^3)$$
Note that 
${\partial Q\over \partial x} - {\partial P\over \partial y} = 1 - 1 = 0.$
Hence, {\it the line integral of $\bF$ around any simple closed 
curve is {\bf zero}}, by Green's Theorem.  In fact, 
note $\bF$ is a gradient vector field:  $\bF = \nabla f$,
where $f = x^3/3 + xy + y^4/4$.  If $\bF = \nabla f$ is any
gradient vector field, then
Green's Theorem implies
$$\int_\alpha \nabla f \cdot T ds 
= \dint_D {\partial^2 f\over \partial x\partial y} - 
{\partial^2 f\over \partial y\partial x}\, dA$$
If $f$ has continuous second order partial derivatives, then the 
mixed second order partials are {\it equal}, so the integrand
is zero and the line integral is zero.  

In fact, even without using Green's Theorem, it can be seen that:

\bigskip
\proclaim Proposition.  Let $\bF$ be the gradient vector field of
a function $f$ with continuous first order partial derivatives on $U$.
Then the line integral of $\bF$ around every simple closed curve in $U$
is zero.
\par

\bigskip
\noindent
Proof: By the Chain Rule for partial derivatives,
$$\int_\alpha \bF \cdot T \, ds = \int_\alpha \nabla f \cdot T \, ds = \int_a^b \nabla f(\alpha)\cdot \alpha'(t)\, dt = 
\int_a^b {d\over dt} f(\alpha(t)) dt = f(\alpha(b)) - f(\alpha(a))$$
Since $\alpha$ is a simple closed curve the endpoints are the same, and 
the integral is zero.//

\bigskip
It also follows by the same reasoning that in this case, the line
integral of $\bF$ {\it depends only on the endpoints of the path of 
integration}, not on the actual curve $\alpha$.  
$\bF$ is said to be a {\it conservative} vector field if $\bF = \nabla f$
for some scalar function $f$.  If $\bF$ is conservative, then $f$ is 
called a {\it potential function\/} for $\bF$.  

There is also a partial converse of the proposition, which states that
if $\bF$ is continuous on a {\it simply connected} region (intuitively,
a region with ``no holes'') and 
the line integrals of $\bF$ around all simple closed curves are zero, 
then $\bF$ is a conservative vector field: $\bF = \nabla f$ for 
some potential function $f$.

\bigskip
\noindent
{\it 2.  Surface Integrals and the Divergence (Gauss's) Theorem}
\bigskip
Corresponding to line integrals over curves in the plane and 
Green's Theorem, we have integrals over surfaces in ${\bf R}^3$ 
and a result called the Divergence (or Gauss's) Theorem.  
This theorem asserts the equality of the surface integral of
a vector field over a closed surface and a triple integral over
the volume enclosed.

Let $\Phi : [a,b] \times [c,d] \to {\bf R}^3$ be a smooth
parametric surface in ${\bf R}^3$.  Then we can write 
$\Phi(u,v) = (x(u,v),y(u,v),z(u,v))$.  For instance:
\bigskip
\item{1)}  The graph $z = f(x,y)$ can be parametrized as the
image of $\Phi(u,v) = (u,v,f(u,v))$, where $(u,v)$ ranges
over the domain of $f$.
\item{2)}  The plane in ${\bf R}^3$ through the origin
spanned by vectors $(a,b,c)$ and $(d,e,f)$ can be
parametrized as 
$$\Phi(u,v) = u(a,b,c) + v(d,e,f) = (au+dv,bu+ev,cu+fv)$$
\item{3)}  Another important surface parametrization is
the spherical coordinate parametrization for the unit sphere:
$$\Phi(\theta,\phi) = (\sin(\phi)\cos(\theta),\sin(\phi)\sin(\theta),\cos(\phi))$$
for $\theta \in [0,2\pi)$ and $\phi\in[0,\pi]$.
\bigskip
\noindent
A parametric surface contains two families of coordinate curves
-- the $u$-curves obtained by setting $v$ equal to a constant and
letting $u$ vary, and the $v$-curves obtained by setting $u$ equal 
to a constant and letting $v$ vary.  At each point of the surface,
the vector 
$${\partial\Phi\over\partial u} = \left({\partial x\over \partial u},
{\partial y\over \partial u},{\partial z\over \partial u}\right)$$
is tangent to the $u$-curve through that point.  Similarly,
$${\partial\Phi\over\partial v} = \left({\partial x\over \partial v},
{\partial y\over \partial v},{\partial z\over \partial v}\right)$$
is tangent to the $v$-curve through that point.  Hence the 
{\it tangent plane} to the surface at $\Phi(u_0,v_0)$ is the plane
containing that point on the surface and the two vectors
${\partial\Phi\over\partial u}(u_0,v_0)$ and
${\partial\Phi\over\partial v}(u_0,v_0)$.
The {\it unit normal} to the surface is the unit vector
perpendicular to the tangent plane obtained via:
$${\bf N} = {{\partial\Phi\over\partial u}\times  {\partial\Phi\over\partial v}\over
\|{\partial\Phi\over\partial u}\times  {\partial\Phi\over\partial v}\|}$$
For example, the unit normal to a graph $\Phi(u,v) = (u,v,f(u,v))$
is
$${\bf N} = {\left(1,0,{\partial f\over \partial u}\right) \times
\left(1,0,{\partial f\over \partial u}\right) \over 
\|\left(1,0,{\partial f\over \partial u}\right) \times
\left(1,0,{\partial f\over \partial u}\right)\|}
={\left(-{\partial f\over \partial u},-{\partial f\over \partial v},1\right)
\over \sqrt{1 + \left({\partial f\over \partial u}\right)^2 +
\left({\partial f\over \partial v}\right)^2}}$$

The surface area element of a parametric surface is
$$dA = \left\|{\partial \Phi\over \partial u}\times
{\partial\Phi\over\partial v}\right\|\ dudv$$
Integrating $dA$ over a portion of the surface gives the 
surface area.  (Intuitively, the idea is that when we integrate
$dA$ we are summing up the areas of infinitesimal parallelograms
spanned by the tangent vectors to the $u$- and $v$-curves
at each point.  Recall that the area of the parallelogram
spanned by two vectors ${\bf A}$ and ${\bf B}$ 
in 3-space is $\|{\bf A} \times {\bf B}\|$.)

If ${\bf F}$ is a vector field on some $U \subset {\bf R}^3$ containing
the image of a parametrization mapping $\Phi$, then we can
define the surface integral of ${\bf F}$ over $\Phi$ as follows.

\proclaim Definition 3.  The surface integral of ${\bf F}$ over
$\Phi$, denoted $\dint {\bf F}\cdot {\bf N}\ dA$, is defined
to be 
$$\int_a^b\int_c^d {\bf F}(\Phi(u,v))\cdot {\bf N}(u,v)\ dA =
\int_a^b\int_c^d {\bf F}(\Phi(u,v))\cdot \left(
{\partial\Phi\over\partial u}\times {\partial\Phi\over\partial v}\right)\ 
dvdu.$$\par

As in the case of line integrals, the norm factors from the
unit normal and the area element {\it always cancel}.  Physically,
surface integrals have interpretations like this:  If ${\bf F}$
is the velocity vector field for a moving fluid in a 
3D region, then $\dint_\Phi {\bf F}\cdot {\bf N}\ dA$ represents
the total flow of fluid across the surface.

\bigskip
\noindent
{\bf Example 5.}  For instance, let us compute the surface integral
of ${\bf F} = (x,0,0)$ over the unit sphere in the spherical 
coordinate parametrization given above:
$$\Phi(\theta,\phi) = (\sin(\phi)\cos(\theta),\sin(\phi)\sin(\theta),\cos(\phi))$$
We begin by computing the normal vector:
$$\eqalign{
{\partial\Phi\over\partial \theta}&=(-\sin(\theta)\sin(\phi),\cos(\theta)\sin(\phi),0)\cr
{\partial\Phi\over\partial \phi}&=(\cos(\theta)\cos(\phi),\sin(\theta)\cos(\phi),-\sin(\phi))\cr
{\partial\Phi\over\partial\theta}\times{\partial\Phi\over\partial\phi} &=
(-\sin^2(\phi)\cos(\theta),-\sin^2(\phi)\sin(\theta),-\sin(\phi)\cos(\phi))\cr}$$
Hence
$$\eqalign{
\dint_\Phi {\bf F}\cdot{\bf N}\ dA &=
\int_0^{2\pi}\int_0^\pi (\sin(\phi)\cos(\theta),0,0)\cdot \left({\partial\Phi\over\partial\theta}\times{\partial\Phi\over\partial\phi}\right)\ d\phi d\theta\cr
&=\int_0^{2\pi}\int_0^\pi -\sin^3(\phi)\cos^2(\theta)\ d\phi d\theta\cr
&= -4\pi/3\cr}$$

If $\Phi$ describes a simple closed surface, then that surface
divides ${\bf R}^3$ into an exterior volume and an interior volume.
Depending on the parametrization, the vector ${\bf N}$ could
end up pointing inward or outward.  By the properties of 
the cross product, though, if we wanted an outward unit
normal and ${\partial\Phi\over\partial u}\times {\partial\Phi\over\partial v}$
pointed inward instead, then we could simply reverse the order of 
the factors to get an outward normal:
${\partial\Phi\over\partial v}\times {\partial\Phi\over\partial u}$.

If ${\bf F} = (P(x,y,z),Q(x,y,z),R(x,y,z))$ is a vector field on 
some region in ${\bf R}^3$ with differentialble component
functions, then we define the {\it divergence} of ${\bf F}$,
written $\nabla\cdot{\bf F}$ or ${\rm div}({\bf F})$ to be the
scalar function:
$$\nabla\cdot{\bf F} = {\partial P\over\partial x} + {\partial Q\over\partial y}
+ {\partial R\over\partial z}$$
Then the Divergence (Gauss's) Theorem states:

\proclaim Divergence Theorem.  Let ${\bf F}$ be a vector
field whose components have continuous first order partial
derivatives on an open set $U\subset {\bf R}^3$ containing
a simple closed surface $\Phi$ and the volume $D$ inside.  Let ${\bf N}$
be the outward unit normal to $\Phi$.  Then
$$\dint_\Phi {\bf F}\cdot {\bf N}\ dA = \trint_D \nabla\cdot{\bf F}\ dV\leqno(2)$$
(If ${\bf N}$ is the inward normal, then a minus sign must be 
inserted on one side to give an equality.)\par

\noindent
{\bf Example 6.} For instance, consider the vector field and 
surface from Example 5.  It is easy to see that the ${\bf N}$
we computed there is actually the {\it inward} normal
to the sphere.  On the other hand 
$$\nabla\cdot {\bf F} = {\partial x\over\partial x} + 0 + 0 = 1.$$
Hence the volume integral computes the volume inside the unit
sphere:
$$\trint_D \nabla\cdot{\bf F}\ dV = 4\pi/3$$
(from the volume formula for a sphere of radius $r = 1$.  Hence
the conclusion (2) of the Divergence Theorem does hold
after inserting the extra minus sign:
$$\dint_{\Phi} {\bf F}\cdot {\bf N}\ dA = -4/3 = -\trint_D\nabla\cdot{\bf F}\ dA,$$
\bigskip
\noindent
{\it 3.  An Alternate Form of Green's Theorem}
\bigskip
Using our notation, this result
reads as follows:  If $\alpha$ is a simple closed curve, then
$$\int_\alpha \bF\cdot \bN\, ds = \dint_D \nabla\cdot\bF\, dA, \leqno(3)$$
where $\bN$ is now the outward unit normal vector to the curve $\alpha$, and 
$\nabla\cdot\bF$ is the ``2D-divergence'' of $\bF$:  If $\bF = (P(x,y),Q(x,y))$, then
$$\nabla\cdot\bF = {\partial P\over \partial x} + {\partial Q\over \partial y}.$$
Let's see the connection between (3) and the original statement of Green's Theorem
above, (1).  

First, we note that if $\alpha(t) = (x(t),y(t))$, then the vector
$(y'(t),-x'(t))$ is orthogonal to the tangent vector $\alpha'(t)$.
(It is obtained by rotating $\alpha'(t)$ by $\pi/2$ clockwise.)
Hence as our unit normal we can take
$$\bN = {(y'(t),-x'(t)) \over \|(y'(t),-x'(t))\|} = {(y'(t),-x'(t))\over \|\alpha'(t)\|}.$$
(Whether $\bN$ points outward or inward for a simple closed curve depends on
the parametrization we started from.)  

Then, using this $\bN$, we have
$$\int_\alpha \bF\cdot \bN\, ds = \int_a^b P(x(t),y(t))y'(t) - Q(x(t),y(t))x(t)\, dt$$
Note that this is the same thing as we would get for the line
integral of 
$${\bf G} = (-Q(x,y),P(x,y))$$
around $\alpha$.  But then by the usual form (1) of Green's Theorem, if 
$\alpha$ is traversed so that $D$ lies to the left, we have:
$$\int_\alpha \bF\cdot \bN\, ds = \int_\alpha {\bf G}\cdot T\, ds 
= \dint_D {\partial P\over \partial x} + {\partial Q\over \partial y}\, dA = \dint_D \nabla\cdot\bF\, dA$$

\bye
