\documentclass[12pt,oneside]{amsart}
\usepackage{amssymb, amsmath, amsthm}
\usepackage{epsfig}
\usepackage{epstopdf}
\usepackage{graphicx}
\usepackage{color}
%\usepackage[shortalphabetic]{amsrefs}
\usepackage{mathptmx}
%\usepackage{hyperref}
%\usepackage{url}
%\usepackage{pinlabel}
%Define theorem styles
\theoremstyle{definition}
\newtheorem{theorem}{Theorem}[section]
\newtheorem*{theorem*}{Theorem}
\newtheorem{definition}[theorem]{Definition}
\newtheorem{exercise}[theorem]{Exercise}
\newtheorem{example}[theorem]{Example}
\newtheorem{conj}{Conjecture}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{claim}{Claim}
\newtheorem{lemma}[theorem]{Lemma}
% Define new commands
\newcommand{\R}{{\mathbb R}}
\newcommand{\C}{\mathbb C}
\newcommand{\Z}{\mathbb Z}
\newcommand{\N}{\mathbb N}
\newcommand{\Q}{\mathbb Q}
\newcommand{\nil}{\varnothing}
\newcommand{\til}{\tilde}
\newcommand{\boundary}{\partial}
\newcommand{\m}{\backslash}
\newcommand{\mc}[1]{\mathcal{#1}}
\newcommand{\vect}[1]{\mathbf{#1}}
\newcommand{\prob}[1]{\textbf{Problem {#1}: }}
\newcommand{\defn}[1]{\textbf{#1}}
\newcommand{\ob}[1]{\overline{#1}}
%\newcommand{\ker}{\operatorname{ker}}
\newcommand{\im}{\operatorname{im}}
\newcommand{\tr}{\operatorname{tr}}
\newcommand{\rank}{\operatorname{rank}}
\newcommand{\rref}{\operatorname{rref}}
\newcommand{\diver}{\operatorname{div}}
\newcommand{\curl}{\operatorname{curl}}
\newcommand{\grad}{\operatorname{grad}}
\newcommand{\vl}{\cdot d\vect{s}}
\newcommand{\wihat}[1]{\widehat{#1}}
\newcommand{\lpartial}[1]{\frac{\partial}{\partial #1}}
\newcommand{\llpartial}[2]{\frac{\partial #1}{\partial #2}}
\newcommand{\co}{\mskip0.5mu\colon\thinspace}
\newcommand{\spacing}{\parskip 6.6pt \parindent 0pt}
\newcommand{\custthm}[2]{
\framebox[0.95\linewidth]{
\begin{minipage}{0.9\linewidth}
\begin{theorem}\label{#1}
#2
\end{theorem}
\end{minipage}
}
}
\newenvironment{enumer}
{\begin{enumerate}
\parskip 6.6pt
\parindent 0pt
\renewcommand{\labelenumi}{(\alph{enumi})}
}
{\end{enumerate}}
\parskip 6.6pt
\parindent 0pt
%\renewcommand{\labelenumi}{(\alph{enumi})}
% The following mysterious maneuver gets rid of AMS junk at the top
% and bottom of the first page.
\makeatletter
\def\@setcopyright{}
\def\serieslogo@{}
\makeatother
% This ends the preamble. We now proceed to the document itself.
\begin{document}
% title
\title[short title]{long title}
\author{}
% Note that the short title for running heads goes in square
% brackets. This is optional. The long title goes in curly
% braces. In the long title, line breaks are indicated by \\.
%Here are two sets of commands for including images.
%\begin{center}
%\begin{figure}[h]
%\includegraphics[scale=0.4]{FinalExam-prob10.pdf}
%\end{figure}
%\end{center}
%\begin{figure}[ht]
%\scalebox{0.5}{\input{Pen.eps_t}}
%\caption{A pox on both your houses!}
%\end{figure}
% today's date, or fill in whatever date you prefer
\date{\today}
\framebox{
\raisebox{0in}[.5in][.2in]{
\textbf{MA 302: Selected Course notes}
}
}
\tableofcontents
\newpage
\section{Basic Concepts and Review from MA 122}
\subsection{Euclidean Vector spaces}
In this course, a vector space will always consist of a set of the form:
\[\R^n = \{(x_1, x_2, \hdots, x_n) : x_i \in \R\}\]
with component wise addition and scalar multiplication. For example, in $\R^3$:
\[ (1,2,3) + (-5,4,16) = ( -4,6,19)\] and \[\sqrt{3}(1,2,3) = (\sqrt{3}, 2\sqrt{3}, 3\sqrt{3}).\]
In these notes, an element (called a \defn{vector}) of $\R^n$ for $n \geq 2$ will be often be denoted in bold face, (eg. $\vect{x}$). On the blackboard, vectors are usually denoted by $\vec{x}$. If $\vect{x} = (x_1,x_2, \hdots, x_n) \in \R^n$, the numbers $x_i$ are called the \defn{coordinates} or \defn{components} of $\vect{x}$. We will often write a vector $(x_1, \hdots, x_n)$ in vertical format as $\begin{pmatrix}x_1\\ x_2\\ \vdots \\ x_n \end{pmatrix}$. The \textbf{zero vector} is the vector $\vect{0} = (0,0,\hdots,0)$.
In $\R^n$, the \defn{standard basis vectors} (for rectangular coordinates) are
\[\begin{array}{rcl}
\vect{e_1} &=& (1,0,0,\hdots, 0)\\
\vect{e_2} &=& (0,1,0,\hdots, 0)\\
&\vdots&\\
\vect{e_n} &=& (0,0,\hdots,0,1)\\
\end{array}\]
That is, $\vect{e_i}$ is the vector with the $i$th coordinate equal to $1$ and all other coordinates equal to 0. Notice that
\[(x_1,x_2,\hdots,x_n) = x_1\vect{e_1} + x_2\vect{e_2} + \hdots + x_n\vect{e_n}.\]
In $\R^2$ the standard basis vectors are sometimes denoted by $\vect{i}$ and $\vect{j}$ instead of $\vect{e_1}$, and $\vect{e_2}$. In $\R^3$ the standard basis vectors are sometimes denoted $\vect{i}$, $\vect{j}$, and $\vect{k}$ instead of $\vect{e_1}$, $\vect{e_2}$, and $\vect{e_3}$.
We can picture a vector $\vect{x}$ in $\R^2$ or $\R^3$ as an arrow \textit{with base at} $\vect{0}$ and the tip of the arrowhead at $\vect{x}$.
\begin{center}
\begin{figure}[h]
\includegraphics[scale=0.4]{Notes-Arrows1}
\caption{The vector $(.8,2.4)$ is in blue and the vector $(1.6,2.4)$ is in red.}
\end{figure}
\end{center}
The act of multiplying a vector $\vect{x} \in \R^n$ by a scalar $k \in \R$, stretches the arrow representing $\vect{x}$ if $k > 1$ and shrinks the arrow representing $\vect{x}$ if $0 < k < 1$. If $k < 0$, the vector $k\vect{x}$ is represented by an arrow pointing in the direction opposite the arrow representing $\vect{x}$. The sum of two vectors in $\R^2$ or $\R^3$ can be found using the parallelogram rule as in Figure \ref{Fig-vectorsum}.
\begin{center}
\begin{figure}[h]
\includegraphics[scale=0.4]{Notes-Arrows2}
\caption{The sum of the red vector and the blue vector is the purple vector.}
\label{Fig-vectorsum}
\end{figure}
\end{center}
\subsubsection{Length and Distance}
Given a vector $\vect{x} = (x_1, x_2, \hdots, x_n)$ in $\R^n$, its \defn{length} (or \defn{magnitude} or \defn{norm}) is denoted
\[||\vect{x}|| = \sqrt{x_1^2 + x_2^2 + \hdots + x_n^2}.\]
The (Euclidean) \defn{distance} between two vectors $\vect{x}$ and $\vect{y}$ is defined to be \[||\vect{x} - \vect{y}||.\]
\subsubsection{Dot product}
If $\vect{x} = (x_1, \hdots, x_n)$ and $\vect{y} = (y_1, \hdots, y_n)$ are two vectors in $\R^n$ their \defn{dot product} is defined to be:
\[\vect{x} \cdot \vect{y} = x_1y_1 + x_2y_2 + \hdots + x_n y_n.\]
Notice that this means that for any vector $\vect{x} \in \R^n$,
\[||\vect{x}||^2 = \vect{x} \cdot \vect{x}.\]
\framebox[0.95\linewidth]{
\begin{minipage}{0.9\linewidth}
\begin{theorem}
Suppose that $\vect{u}, \vect{v},\vect{w} \in \R^n$ and that $k,l,m \in\R$. Then the following are true:
\begin{enumer}
\item (Commutativity) \[\vect{u} \cdot \vect{v} = \vect{v}\cdot \vect{u}\]
\item (Vector Distributativity) \[\vect{u}\cdot (\vect{v} + \vect{w}) = \vect{u} \cdot \vect{v} + \vect{u} \cdot \vect{w}\]
\item (Scalar Associativity) \[k(\vect{u}\cdot\vect{v}) = (k\vect{u})\cdot\vect{v} = \vect{u}\cdot(k\vect{v})\]
\end{enumer}
\end{theorem}
\end{minipage}
}
\subsection{Linear functions and matrices}
The importance of linear functions arises from their ability to approximate differentiable functions.
\subsubsection{Linear functions}
A function $f \co \R^n \to \R^m$ is a \defn{linear function} if for all $\vect{x}, \vect{y} \in \R^n$ and for all $k,l \in \R$:
\[f(k\vect{x} + l\vect{y}) = kf(\vect{x}) + l\vect{y}.\]
\begin{exercise}
Prove that the linear functions $f\co \R \to \R$ are exactly those of the form $f(x) = mx$ for some $m \in \R$.
\end{exercise}
A function $g \co \R^n \to \R^m$ is an \defn{affine function} if there exists a linear function $f \co \R^n \to \R^m$ and a vector $\vect{b} \in \R^m$ such that for all $\vect{x} \in \R^n$.
\[g(\vect{x}) = f(\vect{x}) + \vect{b}.\]
\begin{exercise}
Prove that a function $g \co \R \to \R$ is affine if and only if it is of the form $g(x) = mx + b$ for some fixed $m,b \in \R$.
\end{exercise}
\begin{exercise}
Give examples of linear functions $\R^2 \to \R$, $\R \to \R^2$, and $\R^2 \to \R^2$.
\end{exercise}
\subsubsection{Matrices}
An $m \times n$ matrix $M$ is an array of the form
\[ M = \begin{pmatrix}
a_{11} & a_{12} & \hdots & a_{1n}\\
a_{21} & a_{22} & \hdots & a_{2n}\\
\vdots &&&\\
a_{m1} & a_{m2} & \hdots &a_{mn}\\
\end{pmatrix}.\]
We will sometimes place the dimensions of the matrix as subscripts on the name of the matrix. Thus we might write $M_{mn}$ for the above matrix.
If we let
\[\begin{array}{rcl}
\vect{r_1} &=& (a_{11}, a_{12}, \hdots, a_{1n})\\
\vect{r_2} &=& (a_{21}, a_{22}, \hdots, a_{2n})\\
\vdots &&\\
\vect{r_m} &=& (a_{m1}, a_{m2}, \hdots, a_{mn})\\
\end{array}\]
we can write the matrix $M_{mn}$ as
\[
M = \begin{pmatrix}\vect{r_1}\\ \vect{r_2}\\ \vdots \\ \vect{r_m} \end{pmatrix}.
\]
Similarly, if we let $\vect{c_1}, \hdots, \vect{c_n}$ be the columns of $M_{mn}$ then we can write
\[
M = \begin{pmatrix} \vect{c_1} & \vect{c_2} & \hdots & \vect{c_n} \end{pmatrix}.
\]
Suppose that
\[A_{mn} = \begin{pmatrix} \vect{A_1} \\ \vect{A_2} \\ \vdots \\ \vect{A_m}\end{pmatrix}\]
and
\[B_{np} = \begin{pmatrix} \vect{B_1} & \vect{B_2} & \hdots & \vect{B_p}\end{pmatrix}\]
are both matrices where $\vect{A_i}$ is the $i$th row of $A$ and $\vect{B}_j$ is the $j$th column of $B$. Botice that both $\vect{A_i}$ and $\vect{B_j}$ are in $\R^n$. Then the product $AB$ is an $m \times p$ matrix defined by
\[
AB = \begin{pmatrix}
\vect{A_1}\cdot \vect{B_1} & \vect{A_1}\cdot \vect{B_2} & \hdots & \vect{A_1} \cdot \vect{B_p}\\
\vect{A_2}\cdot \vect{B_1} & \vect{A_2}\cdot \vect{B_2} & \hdots & \vect{A_2} \cdot \vect{B_p}\\
\vdots &&&\\
\vect{A_m}\cdot \vect{B_1} & \vect{A_1}\cdot \vect{B_2} & \hdots & \vect{A_m} \cdot \vect{B_p}\\
\end{pmatrix}
\]
That is, the entry in the $i$th row and $j$th column of $AB$ is the dot product of the $i$th row of $A$ with the $j$th column of $B$.
\begin{exercise}
Let $A = \begin{pmatrix}1&2& 3\\4&5&6\\ 7&8&9\end{pmatrix}$ and let $B = \begin{pmatrix} -1 &7 &-1\\0&2&-2\\6&-3&0\\\end{pmatrix}$. Let $\vect{v} = (3,1,-5)$.
\begin{enumer}
\item Calculate $AB$
\item Calculate $BA$
\item Calculate $A\vect{v}$ and $B\vect{v}$.
\item Let $\vect{e_i}$ be the $i$th basis vector of $\R^3$. Calculate $A\vect{e_i}$ and $B\vect{e_i}$.
\end{enumer}
\end{exercise}
If $A$ is a matrix and if $k \in \R$, then $kA$ is defined to be the matrix obtained by multiplying all the entries of $A$ by $k$. If $A$ and $B$ are matrices with the same dimensions, then $A + B$ is defined to be the matrix obtained by adding the corresponding entries of $A$ and $B$.
\begin{exercise}
Let $A = \begin{pmatrix}1&2& 3\\4&5&6\\ 7&8&9\end{pmatrix}$ and let $k = 2$. Write down all the entries of $kA$.
\end{exercise}
\begin{exercise}
Let $A = \begin{pmatrix}1&2& 3\\4&5&6\\ 7&8&9\end{pmatrix}$ and let $B = \begin{pmatrix} -1 &7 &-1\\0&2&-2\\6&-3&0\\\end{pmatrix}$. Compute $A + B$.
\end{exercise}
The following theorem should come as no surprise:
\custthm{thm-MatrixManips}{
Suppose that $A,B,C$ are matrices and that $k,l \in \R$ such that all expressions in what follows are defined. Then
\begin{enumer}
\item $A(BC) = (AB)C$
\item $A(B + C) = AB + AC$
\item $(A + B)C = AC + BC$.
\item $(kA)BC = k(ABC)$
\item $(k + l)A = kA + lA$
\end{enumer}
}
\begin{exercise}
Let $A = \begin{pmatrix} 1&2&3\\4&5&6\end{pmatrix}$. Let $\vect{v} = (-4,8,2)$.
\begin{enumer}
\item Calculate $A\vect{v}$.
\item Define a function by $f(\vect{x}) = A\vect{x}$. What are the domain and codomain of $f$? Show that $f$ is a linear function.
\end{enumer}
\end{exercise}
The $n \times n$ \defn{identity matrix} $I_n$ is the matrix $\begin{pmatrix} \vect{e_1} & \hdots & e_{n} \end{pmatrix}$, where $\vect{e_i}$ is the $i$th basis vector of $\R^n$.
\begin{exercise}
\begin{enumer}
\item Suppose that $A$ is an arbitrary $n\times n$ matrix. Explain why $IA = AI = A$.
\item If $A$ is an $m \times n$ matrix such that $m \neq n$, is it still true that $IA = AI = A$? Why or why not?
\end{enumer}
\end{exercise}
The following theorem is fundamental to linear algebra. It is typically proved in a linear algebra course.
\custthm{thm-FTLA}{
A function $f \co \R^n \to \R^m$ is linear if and only if there is an $m \times n$ matrix $A$ such that $f(\vect{x}) = A\vect{x}$ for all $\vect{x} \in \R^n$.
}
\begin{exercise}
Consider the grid on $\R^2$ given by horizontal lines at integer $y$ values and vertical lines at integer $x$ values. What happens to this grid under the linear function $f \co \R^2 \to \R^2$ given by
\[f(\vect{x}) = \begin{pmatrix}1&2\\-1&2\\ \end{pmatrix}\vect{x}.\]
\end{exercise}
\newpage
\section{Visualizing functions $f \co \R^n \to \R^m$}
There are three basic situations to consider $n < m$, $n = m$, and $n > m$. Furthermore, we will almost always be considering the following types of functions:
\begin{itemize}
\item $f\co \R \to \R$ (the subject of Calculus I)
\item $f \co \R^2 \to \R$ and $f\co \R^3 \to \R$ (the subject of Calculus II)
\item $f \co \R \to \R^2$, and $f\co \R \to \R^3$ (parameterized curves)
\item $f \co \R^2 \to \R^3$ (a parameterized surface)
\item $f \co \R^2 \to \R^2$ and $f \co \R^3 \to \R^3$ (vector fields)
\end{itemize}
\subsection{Visualizing functions $f\co \R \to \R$ and $f\co \R^2 \to \R$.}
If $f \co \R \to \R$ then we (in principle) can draw the graph of $f$ in $\R^2$ with the horizontal axis representing the domain and the vertical axis representing the codomain. If $f \co \R^2 \to \R$ then we can draw the graph of $f$ in $\R^3$ with the horizontal plane representing the domain and the vertical axis representing the codomain.
\begin{exercise}
Define $f\co \R^2 \to \R$ by $f(\vect{x}) = ||x||$. Sketch the graph of $f$ in $\R^3$.
\end{exercise}
Humans often have a difficult time visualizing objects in $\R^3$. One of the most common methods of trying to gain a better understanding of an oject in $\R^3$ is to slice it by planes parallel to one of the $xy$, $yz$, or $xz$ planes in $\R^3$. This corresponds to fixing $f(x,y)$, $x$, or $y$ (respectively). Here are two examples:
\begin{example}
Draw 3 slices of the graph of $f(x,y) = x^2 - 2y^2$ using $x$-slices (that is slices parallel to the $yz$-plane.)
\textbf{Solution:} Fixing $x = 0$, we have the function $f(0,y) = -2y^2$. We draw the graph of this on the $yz$ plane. We also do this for $x = \pm 0.5$, getting $f(\pm 0.5, y) = .25 - 2y^2$ and $x = \pm 1$, getting $f(1,y) = 1 - 2y^2$.
\begin{center}
\begin{figure}[h]
\includegraphics[scale=0.4]{Notes-Slices1}
\caption{}
\label{Fig-slices1}
\end{figure}
\end{center}
Here is a 3-dimensional figure illustrating the fact that our graphs in the $yz$ plane come from slicing the graph of $f(x,y)$ in $\R^3$ by planes parallel to the $yz$ axis.
\begin{center}
\begin{figure}[h]
\includegraphics[scale=0.4]{Notes-Slices2}
\caption{}
\label{Fig-slices2}
\end{figure}
\end{center}
\end{example}
\section{Differentiation}
\subsection{Partial Derivatives}
You should recall that for $f \co \R^2 \to \R$, $\lpartial{y} f(a,b)$ is the slope of the line in the $x = a$ slice tangent to the graph of $z = f(x,y)$ at $y = b$. You can compute $\lpartial{y}f(a,b)$ by holding $x$ constant, taking the (1-variable) derivative of $f$ with respect to $y$ and then plugging in $(x,y) = (a,b)$. The \defn{gradient} of $f$ at $(a,b)$ is defined to be:
\[
\nabla f(a,b) = \left(\lpartial{x}f(a,b), \lpartial{y} f(a,b)\right)
\]
\begin{example}
Let $f\co \R^2 \to \R$ be the function $f(x,y) = x^2 - 2y^2$. Then
\[\begin{array}{rcl}
\lpartial{x}f(x,y) &=& 2x\\
\lpartial{y}f(x,y) &=& -4y\\
\nabla f(x,y) &=& (2x,-4y)\\
\end{array}\]
At the point $(x,y) = (1,.5)$ we have:
\[
\begin{array}{rcl}
\lpartial{x}f(1,.5) &=& 2\\
\lpartial{y}f(1,.5) &=& -2\\
\nabla f(x,y) &=& (2,-2)
\end{array}
\]
The fact that $\lpartial{y} f(1,.5) = -2$ can be seen from Figure \ref{Fig-slices3}.
\begin{center}
\begin{figure}[ht]
\includegraphics[scale=0.2]{Notes-slices3}
\includegraphics[scale=0.2]{Notes-slices4}
\caption{If $x = 1$, the equation for $f(x,y)$ becomes $f(x,y) = 1 - 2y^2$. The tangent line to this graph at $y = .5$ has equation $l(y) = -2(y-.5) + .5$. Thus, $\lpartial{y}f(1,.5) = -2$. In the figure on the right, you can see the 3-dimensional graphs of $f(x,y)$ and the tangent plane (in red) to $f(x,y)$ at $(1,.5)$. It is evident that the tangent plane slices through the plane $x = 1$ in a line of slope -2 which is the tangent line to the graph of $f(1,y) = 1 - 2y^2$.}
\label{Fig-slices3}
\end{figure}
\end{center}
\end{example}
For a function $f\co \R^n \to \R$, we keep constant all but one coordinate $x_i$ of $\vect{x} = (x_1, \hdots, x_i, \hdots, x_n)$ we have a partial function of $f$. If $f$ is differentiable, we can take the partial derivative of $f$ with respect to $x_i$.
\begin{example}
Let $f\co \R^4 \to \R$ be defined by \[f(x_1,x_2,x_3,x_4) = x_1^2 - x_2^2 + x_3 - 5x_4^5x_3.\] Then:
\[\lpartial{x_4}f(x_1,x_2,x_3,x_4,x_5) = -25x_4^4x_3.\]
\end{example}
The gradient of $f\co \R^n \to \R$ is:
\[
\nabla f = \left(\lpartial{x_1}f, \lpartial{x_2}f, \hdots, \lpartial{x_n}f\right) = \begin{pmatrix}\lpartial{x_1}f \\ \lpartial{x_2}f \\\vdots \\ \lpartial{x_n}f\end{pmatrix}.
\]
\begin{example}
Let $f\co \R^4 \to \R$ be defined by \[f(x_1,x_2,x_3,x_4) = x_1^2 - x_2^2 + x_3 - 5x_4^5x_3.\] Then:
\[\nabla f(x_1,x_2,x_3,x_4) = \begin{pmatrix}
2x_1\\
-2x_2\\
1\\
-25x_4^4x_3
\end{pmatrix}
\]
\end{example}
\framebox[0.95\linewidth]{
\begin{minipage}{0.9\linewidth}
\textbf{Important Observation:} If $f \co \R^n \to \R$ is differentiable, then
\[\nabla f \co \R^n \to \R^n\]
is a vector valued function.
\end{minipage}
}
We will sometimes think of \[\nabla = \begin{pmatrix}
\lpartial{x_1} \\ \lpartial{x_2} \\ \vdots \\\lpartial{x_n}
\end{pmatrix}\]
as a function of functions. Its input is a function $f \co \R^n \to \R$ and its output is a function $\nabla f \co \R^n \to \R^n$.
\subsection{Affine Approximation}
Suppose that $f\co \R^n \to \R$ is differentiable at $\vect{a}$. The gradient allows a nice formula for an affine approximation to $f$ near $\vect{0}$. (In previous calculus classes, you would have called this a linear approximation.)
Let:
\[L(\vect{x}) = \nabla f(\vect{a})\cdot (\vect{x} - \vect{a}) + f(\vect{a})\]
Then $L\co \R^n \to \R$ is a linear function which is a ``good approximation'' to $f$ near $\vect{a}$ in the sense that:
\[
\lim_{\vect{x} \to \vect{a} } \frac{f(\vect{x}) - L(\vect{x})}{||\vect{x} - \vect{a}||} = 0
\]
(You can summarize this equation by saying that the relative error between $f$ and $L$ goes to 0 as $\vect{x}$ approaches $\vect{0}$.)
The graph of $L$ is the ``tangent space'' to the graph of $f$ at the point $(\vect{a},f(\vect{a}))$.
Notice that, usually, $L$ will not be linear function. It will, however, always be an affine function. Nonetheless, $L$ is called the ``linear approximation'' to $f$ at $\vect{a}$. By introducing the notions of ``tangent space'' and ``differential'' it is possible to turn $L$ into a linear function between vector spaces. We will not do this here, but may come back to it later.
We will want to use ideas similar to the above to construct linear approximations to differentiable functions $f\co \R^n \to \R^m$. For that matter, we still need to \textit{define} the notion of derivative for functions $f\co \R^n \to \R^m$. We do this now.
Notice that the formula $\nabla f(\vect{a}) \cdot (\vect{x} - \vect{a})$ looks like the entry in a matrix resulting from a matrix multiplication. In fact, it is the result of the matrix multiplication:
\[ \begin{pmatrix}
\lpartial{x_1}f(\vect{a}) & \lpartial{x_2}f(\vect{a}) & \hdots &\lpartial{x_n}f(\vect{a}\\
\end{pmatrix}
\begin{pmatrix}
x_1 \\
x_2 \\
\vdots\\
x_n
\end{pmatrix}\]
\subsubsection{Derivatives}
The matrix \[Df(\vect{a}) = \begin{pmatrix}
\lpartial{x_1}f(\vect{a}) & \lpartial{x_2}f(\vect{a}) & \hdots &\lpartial{x_n}f(\vect{a}\\
\end{pmatrix}\] is called the \defn{derivative} of $f$ at $\vect{0}$. It is just the transpose of the vector $\nabla f(\vect{0})$.
Inspired by this, we set out to extend these notions to a function $f\co \R^n \to \R^m$.
The function $f$ can be written in the form:
\[
f(\vect{x}) = (f_1(\vect{x}), f_2(\vect{x}), \hdots, f_m(\vect{x}))
\]
The function $f_i$ keeps track of the $i$th coordinate of the result of plugging $\vect{x}$ into the function $f$. Notice that $f_i \co \R^n \to \R$, so we can talk about its partial derivatives. Assume that all partial derivatives of all the $f_i$ exist and define:
\[
Df(\vect{a}) = \begin{pmatrix}
\llpartial{f_1}{x_1}(\vect{a}) & \llpartial{f_1}{x_2}(\vect{a}) & \llpartial{f_1}{x_3}(\vect{a}) &\hdots & \llpartial{f_1}{x_n}(\vect{a})\\
\llpartial{f_2}{x_1}(\vect{a}) & \llpartial{f_2}{x_2}(\vect{a}) & \llpartial{f_2}{x_3}(\vect{a}) &\hdots & \llpartial{f_2}{x_n}(\vect{a})\\
\llpartial{f_3}{x_1}(\vect{a}) & \llpartial{f_3}{x_2}(\vect{a}) & \llpartial{f_3}{x_3}(\vect{a}) &\hdots & \llpartial{f_3}{x_n}(\vect{a})\\
\vdots & &&\vdots \\
\llpartial{f_m}{x_1}(\vect{a}) & \llpartial{f_m}{x_2}(\vect{a}) & \llpartial{f_m}{x_3}(\vect{a}) &\hdots & \llpartial{f_m}{x_n}(\vect{a})\\
\end{pmatrix}
\]
The entry in the $i$th row and $j$th column is the partial derivative at $\vect{a}$ of $f_i$ with respect to $x_j$. Equivalently, the $i$th row consists of $Df_i(\vect{a})$.
\begin{example}
Define $f\co \R^2 \to \R^4$ by
\[f(x,y) = (xy, x^2y, xy^3, x^4e^y)\]
Then
\[
Df(x,y) = \begin{pmatrix}
y & x\\
2xy & x^2\\
y^3 & 3xy^2\\
4x^3e^y & x^4e^y\\
\end{pmatrix}\]
and
\[
Df(1,2)= \begin{pmatrix}
2 & 1\\
4 & 1\\
8 & 12\\
4e^2 & e^2\\
\end{pmatrix}.\]
\end{example}
Here is another example, demonstrating an important point (to be made later).
\begin{example}
Define $f\co \R^2 \to \R^2$ and $g\co \R^2 \to \R^2$ by
\[\begin{array}{rcl}
f(x,y) &=& (x^2 + 2x, e^y)\\
g(x,y) &=& (\sin(x), 5y + x)\\
\end{array}\]
Notice that we can compose $f$ and $g$ to obtain $f\circ g \co \R^2 \to \R$. A formula for $f \circ g$ is:
\[ f\circ g(x,y) = (\sin^2 x + 2\sin x, e^{5y + x}).\] Notice that $g(0,0) = (0,0)$.
Compare $Df(g(\vect{0}))$, $Dg(\vect{0})$ and $D(f\circ g)(\vect{0})$.
\textbf{Solution:}
\[\begin{array}{rcl}
Df(\vect{0}) &=& \begin{pmatrix}2&0\\0&1\end{pmatrix}\\
Dg(\vect{0}) &=& \begin{pmatrix}1&0\\1&5\end{pmatrix}\\
D(f\circ g)(\vect{0}) &=& \begin{pmatrix}2 &0\\1&5 \end{pmatrix}
\end{array}\]
Notice that:
\[
D(f\circ g)(\vect{0}) = Df(g(\vect{0})) Dg(\vect{0}).
\]
This is an example of the chain rule at work.
\end{example}
\subsubsection{Differentiability}
Throughout this section, let $f\co \R^n \to \R^m$ be a differentiable function and let $f_i$ be the $i$th coordinate function. That is $f(\vect{x}) = (f_1(\vect{x}), \hdots, f_m(\vect{x}))$.
Recall from MA 122, that the existence of $Df(\vect{a})$ does not guarantee the differentiability of $f$ at $\vect{a}$. Put another way: Even if all partial derivatives exist, the function may not have a good affine approximation near $\vect{a}$. In this section we define the notion of differentiability for a function $f \co \R^n \to \R^m$ and we state a theorem which gives a necessary and sufficient condition for $f$ to be differentiable.
\framebox[0.95\linewidth]{
\begin{minipage}{0.9\linewidth}
\textbf{Definition:}
Let $X \subset \R^n$ be an open ball centered at $\vect{a}$. and that $f$ is defined on $X$. Suppose that all partial derivatives of $f$ at $\vect{a} \in \R^n$ exist and define:
\[h(\vect{x}) = Df(\vect{a})(\vect{x} - \vect{a}) + f(\vect{x}).\]
Notice that $h \co \R^n \to \R^m$ is an affine function.
We say that $f$ is \defn{differentiable} at $\vect{a}$ if
\[
\lim_{\vect{x} \to \vect{a}} \frac{||f(\vect{x}) - h(\vect{x})||}{||\vect{x} - \vect{a}||} = 0
\]
\end{minipage}
}
As before, this definition can be rephrased by saying that all partial derivatives of $f$ exist and the affine function $h$ is a good approximation to $f$ near $\vect{a}$.
\custthm{thm-differentiability}{
Suppose that $f \co \R^n \to \R^m$ has the property that each component function $f_i$ is differentiable at $\vect{a}$. Then $f$ is differentiable at $\vect{a}$. Furthermore, $f_i\co \R^n \to \R$ is differentiable at $\vect{a}$, if there is an open ball $X$ containing $\vect{a}$ such that $f_i$ is defined on $X$ and all partial derivatives of $f_i$ exist and are continuous on $X$.
}
\begin{example}
Let $f\co \R^3 \to \R^2$ be defined by
\[
f(x,y,z) = (\ln(|xyz|), x + y + z^2)
\]
Then
\[
Df(x,y,z) = \begin{pmatrix}
1/x & 1/y & 1/z \\
1 & 1 & 2z\\
\end{pmatrix}.
\]
Let $A$ be the coordinate axes in $\R^3$. That is, $A = \{(x,y,z) : xyz = 0\}$. Each entry in the matrix $Df(x,y,z)$ is continuous on $\R^3 - A$. The function $f$ is defined on $\R^3 - A$. Consequently, $f$ is differentiable at each point $\vect{a} \in \R^3 - A$.
\end{example}
Finally, here is the statement of the chain rule:
\custthm{thm-chainrule}{
Suppose that $g\co \R^n \to \R^m$ and $f\co \R^m \to \R^p$ are functions which are defined on open sets $Y \subset \R^n$ and $X \subset \R^m$ such that $g(Y)\subset X$. Assume that $g$ is differentiable at $\vect{y} \in Y$ and that $f$ is differentiable at $g(\vect{y}) \in X$. Then, $f\circ g \co \R^n \to \R^p$ is differentiable at $\vect{y}$ and
$D(f\circ g)(\vect{y}) = Df\big(g(\vect{y})\big) Dg(\vect{y}).$
}
\begin{example}
Define $f(x,y) = (x^2, x^2 + y^2)$. Let $\hat{f} \co \R^2 \to \R^2$ be the function $f$ with domain in polar coordinates. What is $D\hat{f}(r,\theta)$?
\textbf{Solution:}
Let $T\co \R^2 \to \R^2$ be the change from polar coordinates to rectangular coordinates. That is,
\[T(r,\theta) = (r\cos \theta, r \sin \theta).\]
Then, by definition, $\hat{f} = f \circ T$. Since the coordinates of $f$ and $T$ are polynomials and trig functions, $f$ and $T$ are everywhere differentiable. A calculation shows that:
\[
Df(x,y) = \begin{pmatrix} 2x & 0 \\2x & 2y\end{pmatrix}.
\]
Thus,
\[Df(T(r,\theta)) = \begin{pmatrix} 2r\cos \theta &0 \\ 2r\cos\theta & 2r \sin\theta \end{pmatrix}.\]
Another calculation shows that
\[DT(r,\theta) = \begin{pmatrix}\cos \theta & -r\sin\theta \\ \sin\theta & r\cos\theta \end{pmatrix}.\]
Thus, by the chain rule:
\[
D\hat{f}(r,\theta) = \begin{pmatrix} 2r\cos \theta &0 \\ 2r\cos\theta & 2r \sin\theta \end{pmatrix}\begin{pmatrix}\cos \theta & -r\sin\theta \\ \sin\theta & r\cos\theta \end{pmatrix} = \begin{pmatrix}2r\cos^2\theta & -2r^2\cos\theta\sin\theta \\2r & 0\end{pmatrix}
\]
\end{example}
\begin{proof}[Sketch of proof of Chain Rule]
Let $g\co \R^n \to \R^m$ and $f\co \R^m \to \R^k$ be such that $g$ and $f$ are both differentiable at $\vect{0}$ and $g(\vect{0}) = \vect{0}$ and $f(\vect{0}) = \vect{0}$.
\textbf{Special case:} $f$ and $g$ are both linear.
Then there exist matrices $A_{mk}$ and $B_{nm}$ so that
\[\begin{array}{rcll}
f(\vect{x}) &=& A\vect{x}&\hspace{.2in} \text{for all } \vect{x} \in \R^m\\
g(\vect{x}) &=& B\vect{x}&\hspace{.2in} \text{for all } \vect{x} \in \R^n
\end{array}\]
This implies that, for all $\vect{x} \in \R^n$
\[
f\circ g(\vect{x}) = A(B\vect{x}) = (AB)\vect{x}.
\]
Notice that:
\[\begin{array}{rcl}
Df(g(\vect{0})) &=& A\\
Dg(\vect{0}) &=& B\\
D(f\circ g)(\vect{0}) &=& AB
\end{array}\]
Thus,
\[D(f\circ g)(\vect{0}) = Df(g\vect{0})Dg(\vect{0})\]
as desired.
\textbf{General Case:} $f$ and $g$ are not necessarily linear.
Since $g\co \R^n \to \R^m$ is differentiable at $\vect{0}$, for $\vect{x}$ near $\vect{0}$,
\[
g(\vect{x}) \approx Dg(\vect{0})\vect{x}.
\]
Similarly, since $f \co \R^m \to \R^k$ is differentiable at $g(\vect{0}) = \vect{0}$, for $\vect{x}$ near $\vect{0}$,
\[
f(\vect{x}) \approx Df(g(\vect{0}))\vect{x}.
\]
To prove the theorem we just need to show that
\[
f\circ g(\vect{x}) \approx Df(g(\vect{0}))Dg(\vect{0}).
\]
Remember that $\approx$ in this context means that the relative error goes to 0 as $\vect{x} \to \vect{0}$. We didn't go over this in class, but here is a proof:
For convenience, define the following:
\[\begin{array}{rcl}
B &=& Dg(\vect{0})\\
A &=& Df(\vect{0})\\
\end{array}\]
We need to show that for each $\epsilon > 0$, there exists $\delta > 0$ so that if $0 < ||\vect{x}|| = ||\vect{x} - \vect{0}|| < \delta$ then
\[
\frac{||f\circ g(\vect{x}) - AB\vect{x}||}{||\vect{x} - \vect{0}||} < \epsilon.
\]
Notice that:
\[
||f\circ g(\vect{x}) - AB\vect{x}|| = ||f\circ g(\vect{x}) - Ag(\vect{x}) + Ag(\vect{x}) - AB\vect{x}||.
\]
By the triangle inequality,
\[
||f \circ g(\vect{x}) - AB\vect{x}|| \leq ||f \circ g(\vect{x}) - Ag(\vect{x})|| + ||A(g\vect{x}) - B\vect{x})||.
\]
Now there exists a constant $\alpha$, such that for all $\vect{y} \in \R^m$, $||A\vect{y}|| \leq \alpha ||\vect{y}||$. Thus,
\[\begin{array}{rc}
||f \circ g(\vect{x}) - AB\vect{x}|| &\leq \\
||f (g(\vect{x}) )- Ag(\vect{x})|| + ||A(g\vect{x}) - B\vect{x})|| & \leq \\
||f( g(\vect{x})) - Ag(\vect{x})|| + \alpha ||g(\vect{x} - B\vect{x}||&
\end{array}\]
We now consider the relative errors.
\textbf{Piece 1:} Since $g$ is differentiable at $\vect{0}$, there exists $\delta_1 > 0$, so that if $0 < ||\vect{x}|| < \delta_1$ then
\[
\frac{||g(\vect{x}) - B\vect{x}||}{||\vect{x}||} < \epsilon/2\alpha.
\]
\textbf{Piece 2:} There is a theorem, which guarantees that (since $g$ is differentiable at $\vect{0}$) there exists $\delta_2 > 0$ so that if $||\vect{x}|| < \delta_2$, then there is a constant $\beta$ such that
\[||g(\vect{x})|| \leq \beta||\vect{x}||.\]
\textbf{Piece 3:} Since $f$ is differentiable at $\vect{0} = g(\vect{0})$, there exists $\delta_3 > 0$ so that if $0 < ||\vect{y}|| < \delta _3$, then
\[
\frac{||f(\vect{y}) - A\vect{y}}{||\vect{y}||} < \epsilon/2\beta.
\]
This implies that
\[
||f(\vect{y}) - A\vect{y}|| < (\epsilon/2\beta)||\vect{y}||
\]
Pieces 2 and 3 imply: if $0 < \vect{x} < \min(\delta_2, \delta_3)$, setting $\vect{y} = g(\vect{x})$ we have
\[
||f(g(\vect{x}) - Ag(\vect{x})|| < (\epsilon/2\beta)||g(\vect{x})|| < (\epsilon/2\beta)\beta||\vect{x}||.
\]
Consequently, if $0 < \vect{x} < \min(\delta_2, \delta_3)$, we have
\[
\frac{||f(g(\vect{x})) - Ag(\vect{x})}{||\vect{x}||} < \epsilon/2.
\]
Piece 1 implies: if $0 < \vect{x} < \delta_1$, then
\[
\frac{\alpha||g(\vect{x}) - B\vect{x}||}{||\vect{x}||} < \epsilon/2.
\]
We conclude that if $0 < ||\vect{x}|| < \delta = \min(\delta_1, \delta_2, \delta_3)$ then
\[
\begin{array}{rc}
||f\circ g(\vect{x}) - AB\vect{x}||/||\vect{x}|| &\leq \\
||f(g(\vect{x})) - Ag(\vect{x})||/||\vect{x}|| + \alpha||g(\vect{x}) - B\vect{x}||/||\vect{x}|| & <\\
\epsilon/2 + \epsilon/2 & = \epsilon
\end{array}
\]
as desired.
\end{proof}
\newpage
\section{Space Curves}
After reviewing, the differentiation of functions $f \co \R^n \to \R^m$ we now turn to the situation when $n = 1$ and $m \geq 2$. For the sake of consistency with the text, we consider functions
\[\vect{x}\co \R \to \R^n\]
and we let $t \in \R$ be the independent variable. If $n = 2$, we are considering functions of the form:
\[\vect{x}(t) = (x(t), y(t))\]
and if $n = 3$, we consider functions of the form:
\[\vect{x}(t) = (x(t), y(t), z(t)).\]
We usually don't graph the function $\vect{x}$ (even in the case when $n = 2$). Instead, we draw the image of $\vect{x}$ in $\R^n$. The function $\vect{x}$ is often called a \defn{parameterization} of its image.
\begin{example}
$\vect{x}(t) = (\cos(t), \sin(t))$ and $\vect{x}(t) = (\cos(2t), \sin(2t))$ are both parameterizations of the unit circle in $\R^2$. In what way(s) are they different?
\end{example}
\begin{example}
Suppose that $f \co \R \to \R$ is a continuous function. Then $\vect{x}(t) = (t, f(t))$ is a parameterization of the graph of $f$ in $\R^2$.
\end{example}
\begin{example}
Suppose that $\vect{v}$ and $\vect{w}$ are distinct vectors in $\R^n$. Then $\vect{x}(t) = t\vect{v} + (1-t)\vect{w}$ is a parameterization of the line through $\vect{v}$ and $\vect{w}$. Restricting $\vect{x}$ to $t \in [0,1]$ is a parametrization of the line segment joining $\vect{v}$ and $\vect{w}$.
\end{example}
\begin{example}
Suppose that $\vect{v}$ and $\vect{w}$ are distinct vectors in $\R^n$. Then $\vect{x}(t) = \vect{v} + t \vect{w}$ is a parameterization of the line through $\vect{v}$ that is parallel to the vector $\vect{w}$.
\end{example}
The derivative (in rectangular coordinates) of $\vect{x}(t) = (x_1(t), x_2(t), \hdots, x_n(t))$ is the matrix:
\[
D\vect{x}(t) = \vect{x}'(t) = (x_1'(t), x_2'(t), \hdots, x_n'(t)) = \begin{pmatrix}x_1'(t) \\ x_2'(t) \\ \vdots \\ x_n'(t) \end{pmatrix}.
\]
The vector $\vect{x}'(t)$ has components which are the instantaneous rates of change of the coordinates of $\vect{x}$. The \defn{speed} of $\vect{x}$ is $||\vect{x}'(t)||$ and, if $\vect{x}'(t)$ is differentiable, the \defn{acceleration} of $\vect{x}(t)$ is $\vect{x}''(t)$. We sometimes write $\vect{v}(t) = \vect{x}'(t)$ and $\vect{a}(t) = \vect{x}''(t)$.
\begin{example}
Find $\vect{v}(t)$ and $\vect{a}(t)$ for the curve $\vect{x}(t) = (t, t\sin(t), t\cos(t))$. Also find the speed of $\vect{x}(t)$ at time $t$.
\textbf{Solution:}
\[\begin{array}{rcl}
\vect{v}(t) & = & (1, \sin(t) + t\cos(t), \cos(t) - t\sin(t))\\
||\vect{v}(t)|| &=& \sqrt{1 + \sin(t)\cos(t) - t^2\sin(t)\cos(t) - t\sin^2(t) + t\cos^2(t)} \\
\vect{a}(t) &=& (0, 2\cos(t) - t\sin(t), -2\sin(t) - t\cos(t))
\end{array}\]
\end{example}
The next theorem should not be surprising.
\begin{theorem}
Suppose that $\vect{x} \co \R \to \R^n$ is differentiable. Then $\vect{x}'(t_0)$ is parallel to the line tangent to the curve $\vect{x}(t)$ at $t_0$.
\end{theorem}
\begin{proof}
We consider only $n = 2$; for $n > 2$, the proof is nearly identical. A vector parallel to the tangent line to $\vect{x}(t)$ at $t = t_0$ can be obtained as in 1-variable calculus:
\[\begin{array}{rcl}
\text{tangent vector } &=& \lim_{\Delta t \to 0} \big(\vect{x}(t_0 + \Delta t) - \vect{x}(t_0)\big)/\Delta t\\
&=& \lim_{\Delta t \to 0} \Big(\big(x(t_0 + \Delta t), y(t_0 + \Delta t)\big) - \big(x(t_0), y(t_0)\big)\Big)/\Delta t\\
&=& \lim_{\Delta t \to 0} \Big(\frac{x(t_0 + \Delta t) - x(t_0)}{\Delta t}, \frac{y(t_0 + \Delta t) - y(t_0)}{\Delta t}\Big)\\
&=& \Big(\lim_{\Delta t \to 0}\frac{x(t_0 + \Delta t) - x(t_0)}{\Delta t} , \lim_{\Delta t \to 0} \frac{y(t_0 + \Delta t) - y(t_0)}{\Delta t} \Big)\\
&=& (x'(t), y'(t))\\
&=&\vect{x}'(t)
\end{array}
\]
\end{proof}
\begin{example}
Let $\vect{x}(t) = (3\cos(2t), \sin(6t))$. The image of $\vect{x}$ for $t \in [-6\pi,6\pi]$ is drawn in Figure \ref{Fig-planecurve1}. Find the equations of the tangent lines at the point $(-1.5,0)$.
\begin{center}
\begin{figure}[ht]
\includegraphics[scale=0.4]{Notes-planecurve1}
\caption{}
\label{Fig-planecurve1}
\end{figure}
\end{center}
\textbf{Solution:} The point $(-1.5,0)$ is crossed by $\vect{x}$ at $t_1 = \pi/3$ and at $t_2 = 2\pi/3$. The derivative of $\vect{x}$ is
\[\vect{x}'(t) = (-6\sin(2t), 6\cos(6t)).\]
At $t_1$, we have:
\[\vect{x}'(t_1) = (-6\sin(2\pi/3),6\cos(2\pi)) = (-3\sqrt{3}, 6).\]
Thus, one of the tangent lines has parameterization:
\[
L_1(t) = t(-3\sqrt{3},6) + (-1.5,0).
\]
At $t_2$, we have:
\[\vect{x}'(t_2) = (3\sqrt{3},6).\]
Thus, the other tangent line has a parameterization:
\[
L_2(t) = t(3\sqrt{3},6) + (-1.5,0).
\]
\end{example}
\section{Direction Vectors and Tangent spaces}
We saw in the last section that if $\vect{x}(t)$ is a curve in $\R^n$, then $\vect{x}'(t)$ is a vector \textit{parallel} to the line tangent to the image of $\vect{x}$ at the point $t$. This is the most we can hope for since we are always basing our vectors at $\vect{0}$. This is often somewhat inconvenient (although it remains convenient for other reasons) and so we need a work-around.
Here is the idea:
\begin{example}
Let $\vect{x}(t) = (\cos t, \sin t)$ and let $t_0 = (\pi/4,\pi/4)$. Notice that $\vect{x}'(t_0) = (1/\sqrt{2}, 1/\sqrt{2})$. If an object's position at time $t$ seconds is given by $\vect{x}(t)$ and if at time $t_0$ all forces stop acting on the object then 1 second later, the object will be at the position given by $\vect{x}(t_0) + \vect{x}'(t_0)$. That is, $\vect{x}'(t_0)$ denotes the direction the object will travel starting at $\vect{x}(t_0)$. It would be convenient to represent $\vect{x}(t_0)$ by a vector with tail at $\vect{x}(t_0)$ and head at $\vect{x}(t_0) + \vect{x}'(t_0)$.
\begin{center}
\begin{figure}[ht]
\includegraphics[scale=0.4]{Notes-directionvector1}
\caption{}
\label{Fig-directionvector1}
\end{figure}
\end{center}
\end{example}
To do this to each point $\vect{p} \in \R^n$ we associate a ``tangent space'' $T_\vect{p}$. This is simply a copy of $\R^n$ such that $\vect{p}$ corresponds to the origin of $T_\vect{p}$. In $\R^2$, the standard basis vectors are denoted $\vect{i}$ and $\vect{j}$. In $\R^3$ the standard basis vectors are denoted $\vect{i}$, $\vect{j}$, and $\vect{k}$. We usually think of $T_\vect{p}$ as an alternative coordinate system for $\R^n$ which is positioned so that $\vect{p} \in \R^n$ is at the origin.
\begin{example}
If $\vect{p} = (1,3)$ and if $(2,5) \in T_\vect{p}$ then $(2,5)$ corresponds to the point $(1,3) + (2,5) = (3,8)$ in $\R^2$.
\end{example}
We think of $T_\vect{p}$ as the set of directions at $\vect{p}$.
\begin{example}
Let $\vect{x}(t) = (\cos t, \sin t)$ and let $t_0 = \pi/6$. Suppose that an object is following the path $\vect{x}(t)$ and that at time $t_0$ all forces stop acting on the object. Then the direction in which the object will head is
\[
\vect{x}'(t_0) = (-\sin \pi/6, \cos \pi/6) = (-1/2, \sqrt{3}/2).
\]
That is, the object will travel $1/2$ units to the left of $\vect{x}(t_0)$ and $\sqrt{3}/2$ units up from $\vect{x}(t_0)$ in 1 second.
\end{example}
Put another way, the point $\vect{x}(t_0) + \vect{x}'(t_0)$ is the same as the point $\vect{x}'(t_0) \in T_{\vect{x}(t_0)}$.
\subsection{Derivatives and Tangent Spaces}
Suppose that $f \co \R^n \to \R^m$ is differentiable at $\vect{p} \in \R^n$. Then $L\co T_p \to T_{f(\vect{p})}$ defined by
\[
L(\vect{x}) = Df(\vect{p})\vect{x}
\]
is a linear map between tangent spaces.
\begin{example}
Let $\vect{p} = (1,2) \in\R^2$ and let $f(\vect{x}) = (1/4)(x^2 + y^2, x^2 - y^2)$ for all $\vect{x} = (x,y)$. Let $\vect{v} = (-2,3) \in T_\vect{p}$. Sketch the point $Df(\vect{p})\vect{v} \in T_{f(\vect{p})}$.
\textbf{Solution:}
Compute:
\[Df(x,y) = \begin{pmatrix}x/2 & y/2\\ x/2& -y/2\end{pmatrix}.\]
So that
\[Df(\vect{p}) = \begin{pmatrix}1/2 & 1 \\ 1/2 & -1 \end{pmatrix}.\]
Thus,
\[Df(\vect{p}) \vect{v}= \begin{pmatrix} 1/2 & 1 \\ 1/2 & -1 \end{pmatrix} \begin{pmatrix}-2 \\ 3 \end{pmatrix} = \begin{pmatrix}2 \\ -4 \end{pmatrix}.\]
In $\R^2$, we plot $Df(\vect{p})\vect{v}$ by starting at $f(\vect{p}) = (5/4, -3/4)$ and then travel over 2 and down 4. See Figure \ref{Fig-directionvector2}.
\begin{center}
\begin{figure}[ht]
\includegraphics[scale=0.4]{Notes-directionvector2} \hspace{.2in}
\includegraphics[scale=0.4]{Notes-directionvector3}
\caption{On the left is an arrow representing $\vect{v} \in T_\vect{p}$. On the right is an arrow representing $Df(\vect{p})\vect{v}$ in $T_{f(\vect{p})}$.}
\label{Fig-directionvector2}
\end{figure}
\end{center}
\end{example}
\subsection{Other coordinate systems on tangent spaces}
In $\R^2$, it is sometimes useful to use polar coordinates instead of rectangular coordinates. In $\R^3$
it is sometimes useful to use either cylindrical or spherical coordinates instead of rectangular coordinates. Using rectangular coordinates on tangent spaces in $\R^2$, the vectors $\vect{i}$, and $\vect{j}$ point in the directions in which $x$ and $y$ (respectively) increase.
Now suppose that we are using polar coordinates on $\R^2$ and that we want a basis of unit vectors $e_r$ and $e_\theta$ of $T_\vect{p}$ so that $e_r$ points in the direction of increasing $r$ and $e_\theta$ points in the direction of increasing $\theta$. Let $\vect{p} = (p_1,p_2)$. Since $r$ increases as $\vect{x}$ is moved radially from $\vect{0}$, starting at $\vect{p}$ and moving $p_1$ horizontally and $p_2$ vertically will increase $r$ the greatest. That is, move in the direction $p_1\vect{i} + p_2\vect{j} = \vect{p}$. We want $e_r$ to be a unit vector, so let
\[e_r = (p_1\vect{i} + p_2\vect{j})/||\vect{p}|| = \vect{p}/||\vect{p}||.\]
Notice that $e_r$ depends on $\vect{p}$.
To find $e_\theta$, notice that we can parameterize the circle of radius $||\vect{p}||$ by $\phi(t) = ||\vect{p}||(\cos t, \sin t)$. As $t$ increases, the angle $\theta$ is increasing. Suppose that $\phi(t_0) = \vect{p}$. Then $\phi'(t_0) \in T_\vect{p}$ will be the direction of greatest increase of $\theta$. We have
\[\phi'(t_0) = ||\vect{p}||(-\sin t_0, \cos t_0) = (-p_2, p_1).\]
Thus, to increase $\theta$ (and keep $r$ the same) we should move $-p_2$ horizontally and $p_1$ vertically. That is, move in the direction $-p_2\vect{i} + p_1\vect{j}$. The magnitude of this vector is $||\vect{p}||$ and so we define
\[e_\theta = (-p_2 \vect{i} + p_1\vect{j})/||\vect{p}||.\]
\subsection{Parameterizing interesting curves}
\begin{example}
Suppose that a circle of radius $\rho$ cm rolls along level ground so that the center of the circle is moving at 1 cm/sec. At time $t = 0$, the center of the circle is at $(0,0)$ and the top of the circle is a point $P = (0,\rho)$. As the circle rolls, the point $P$ traces out a curve $\vect{x}(t)$ (with $P = \vect{x}(0)$). Find an equation for $\vect{x}(t)$.
\textbf{Solution:} Let $\vect{c}(t)$ denote the center of the circle at time $t$. The circumference of the circle is $2\pi\rho$ and so the circle makes one complete rotation in $2\pi\rho$ sec. At time $t$, the line segment joining $\vect{c}(t)$ to $\vect{x}(t)$ makes an angle of $-t/\rho + \pi/2$ with the horizontal. That is, in $T_{\vect{c}(t)}$, $\vect{x}(t)$ is represented by the point $(\rho\cos(-t/\rho + \pi/2), \rho\sin(-t/\rho + \pi/2))$. Thus, with respect to the standard coordinates on $\R^2$:
\[
\vect{x}(t) = \vect{c}(t) + \begin{pmatrix}\rho \cos(-t/\rho + \pi/2) \\ \rho \sin(-t/\rho + \pi/2) \end{pmatrix}.\]
Since
\[ \vect{c}(t) = t\begin{pmatrix}1 \\ 0 \end{pmatrix},\]
we have
\[
\vect{x}(t) = \begin{pmatrix}t + \rho\cos(-t/\rho + \pi/2) \\ \rho\sin(-t/\rho + \pi/2) \end{pmatrix}.
\]
\begin{center}
\begin{figure}[ht]
\includegraphics[scale=0.5]{cycloid}
\caption{The point $P$ traces out a cycloid as the circle rolls down the $x$ axis.}
\label{Fig-cycloid}
\end{figure}
\end{center}
\end{example}
\textbf{Question:} Is the cycloid a differentiable curve?
\begin{example}
Suppose that a circle $C$ of radius $r$ is moving so that the center of $C$, $\vect{c}$ traces out the path $(R\cos(t), R\sin(t))$. As $C$ moves, it rotates counterclockwise so that it completes $k$ revolutions per second. Suppose that $E$ is the East pole of $C$ at time 0. What path does $P$ trace out?
\textbf{Solution:}
In $T_{\vect{c}(t)}$, $E$ has coordinates $(r\cos 2\pi k t , r \sin 2\pi k t)$. Thus in $\R^2$ coordinates, $E$ has position
\[\vect{x}(t) = \vect{c}(t) + (r\cos t, r\sin t) = (R\cos t + r \cos 2\pi k t, R \sin t + r\sin 2 \pi k t).\]
\begin{center}
\begin{figure}[ht]
\includegraphics[scale=0.5]{epicycle}
%\caption{}
\label{Fig-epicycle}
\end{figure}
\end{center}
\end{example}
\section{Arc Length}
Suppose that $\vect{x}\co [a,b] \to \R$ is a $C^1$ curve. We wish to find the length of $\vect{x}$. The formula is
\framebox[0.95\linewidth]{
\begin{minipage}{0.9\linewidth}
\begin{theorem}
The arc length of $\vect{x}$ is
\[
\int_a^b ||\vect{x}'(t)||\thinspace dt.
\]
\end{theorem}
Arc length is often denote by
\[
\int_\vect{x} \thinspace ds
\]
where
\[
ds = ||\vect{x}'||dt
\]
\end{minipage}
}
\begin{example}
Let $\vect{x}(t) = (t^2,2t^2)$ for $t \in [0,1]$. Then
\[||\vect{x}'(t)|| = ||(2t,4t)|| = \sqrt{4t^2 + 16t^2} = 2t\sqrt{5}.\]
The arclength of $\vect{x}$ is
\[
\int_\vect{x} \thinspace ds = \int_0^1 2t\sqrt{5}\thinspace dt = t^2\sqrt{5}\big|_0^1 = \sqrt{5}.
\]
\end{example}
\begin{example}
Let $\vect{x}(t) = (t,t^2)$ for $t \in [0,1]$. Then
\[
\int_\vect{x} \thinspace ds = \int_0^1 \sqrt{1 + 4t^2}\thinspace dt \approx 1.47894
\]
\end{example}
Here is why the formula for arclength is what it is. For convenience, we assume that $n = 2$.
Partition $[a,b]$ into $n$ subintervals $[t_{i-1},t_i]$ for $1 \leq i \leq n$, each of length $\Delta t = (b-a)/n$. Joining the points $\vect{x}(t_{i-1})$ and $\vect{x}(t_i)$ by straight lines creates a polygonal approximation $P_n$ to the image of $\vect{x}$. The length of the polygonal path is:
\[
\operatorname{length}(P_n) = \sum_{i = 1}^n ||\vect{x}(t_{i}) - \vect{x}(t_{i-1})||.
\]
We \textit{define} the \defn{arc length} of $\vect{x}$ to be
\[
L = \int_\vect{x} \thinspace ds = \lim_{n \to \infty} \sum_{i=1}^n ||\vect{x}(t_i) - \vect{x}(t_{i-1})||.
\]
Now suppose that $\vect{x}(t) = (x(t),y(t))$. Both $x$ and $y$ are $C^1$ functions. Notice that if we replace our current polygonal approximation with a polygonal approximation have vertices $(x(t_i^*),y(t_i^{**}))$, with $t_i^*,t_i^{**} \in [t_{i-1},t_i]$, we will still have:
\[
L = \int_\vect{x} \thinspace ds = \lim_{n \to \infty} \sum_{i=1}^n ||(x(t_i^*),y(t_i^{**})) - (x(t_{i-1}^*),y(t_{i-1}^{**}))||.
\]
Here's how to choose the values $t_i^*$ and $t_i^{**}$. By the mean value theorem (remember that?) There exists $t^*_i,t^{**}_i \in [t_{i-1},t_i]$ so that
\[
\begin{array}{rclcl}
x(t^*_i) &=& x'(t^*_i)(t_i - t_{i-1}) &=& x'(t^*_i)\Delta t\\
y(t^{**}_i) &=& y'(t^{**}_i)(t_i - t_{i-1}) &=& y'(t^{**}_i)\Delta t\\
\end{array}
\]
Thus,
\[
L = \lim_{n \to \infty} \sum_{i=1}^n \sqrt{\big(x'(t^*_i)^2 + y'(t^{**}_i)^2}\Delta t = \int_a^b \sqrt{x'(t)^2 + y'(t)^2}\thinspace dt = \int_a^b ||\vect{x}'(t)||\thinspace dt.
\]
We can also compute the arc length of paths which are piecewise $C^1$. These paths must be composed of a finite number of pieces.
\begin{example}
Compute the length of the curve $\vect{x}\co [0,2] \to \R$ defined by:
\[
\vect{x}(t) = \left\{ \begin{array}{rcl}
(t,t^2) &\hspace{.3in} & \text{ if } 0 \leq t \leq 1 \\
(t,(2-t)^2) & & \text{ if } 1 \leq t \leq 2
\end{array}\right\}
\]
\textbf{Solution:} Let $\vect{x_1}(t) = \vect{x}(t)$ for $0 \leq t \leq 1$ and let $\vect{x}_2(t) = \vect{x}(t)$ for $1 \leq t \leq 2$. Then
\[\begin{array}{rcl}
\int_{\vect{x}} \thinspace ds &=& \int_{\vect{x_1}} \thinspace ds + \int_{\vect{x_2}} \thinspace ds\\
&=& \int_0^1 \sqrt{1 + 4t^2} \thinspace dt + \int_1^2 \sqrt{1 + 4(2-t)^2}\\
&\approx& 2.95789
\end{array}
\]
\end{example}
The following example shows that it is possible for a ``finite'' curve to have infinite length.
\begin{example}
We will specify the graph of the curve $f(x)$. On the interval $[\frac{1}{n+2},\frac{1}{n}]$ erect a tent consisting of two straight lines with the bottoms of the lines on the $x$ axis and the top of the tent at the point $(\frac{1}{n+1},\frac{1}{n})$. See the figure below:
\begin{center}
\scalebox{0.5}{\input{jagged1.eps_t}}
\end{center}
Do this for each odd value of $n$, achieving the following graph:
\begin{center}
\includegraphics[scale=1]{jagged2}
\end{center}
If you want an equation for $f(x)$ do the following:
Begin by defining
\[
g_n(x) = \left\{\begin{array}{rcl}
0 & \hspace{.2in} & \text{ if } x < \frac{1}{n+2}\\
\frac{1}{n\left(\frac{1}{n+1} - \frac{1}{n}\right)}(x - \frac{1}{n+2}) & & \text{ if } \frac{1}{n+2} \leq x \leq \frac{1}{n+1}\\
&&\\
\frac{-1}{n\left(\frac{1}{n} - \frac{1}{n+1}\right)}(x - \frac{1}{n}) & & \text{ if } \frac{1}{n+1} \leq x \leq \frac{1}{n}\\
0 & & \text{ if } x > \frac{1}{n}
\end{array}\right\}
\]
Then define
\[
f(x) = \sum_{n=0}^\infty g_{2n+1}(x).
\]
Notice that $g_{2n + 1}(x) \neq 0$ only if $x \in [\frac{1}{2n+3}, \frac{1}{2n+1}]$. Thus, the sum defining $f(x)$ has only one term which is not zero.
Let's show that the length of the graph of $f$ is infinite. To do this, consider the line segment in the interval $[\frac{1}{n+1},\frac{1}{n}]$ for an odd value of $n$. This line segment has length
\[
L = \sqrt{(\frac{1}{n})^2 + (\frac{1}{n} - \frac{1}{n+1})^2} = \sqrt{\frac{2}{n^2} + \frac{1}{(n+1)^2} - \frac{2}{n(n+1)}}.
\]
Some algebra shows that $L \geq \frac{1}{n}$
Similarly, the line segment in the interval $[\frac{1}{n+2},\frac{1}{n+1}]$ has length at least $1/(n+1)$. Consequently, the length of the graph of $f$ is at least
\[
\sum_{n = 1}^\infty \frac{1}{n}.
\]
It is well known that this is the harmonic series which diverges to infinity.
\end{example}
The text gives an example of a function $f\co[0,1] \to [-1,1]$ which is differentiable on $(0,1]$ but whose graph has infinite arclength. An example similar to that one could be constructed from our example by rounding the points of the graph above.
\newpage
\section{Reparameterizing functions $f \co \R \to \R^n$}
What is the length of a quarter circle of radius 2?
\includegraphics[scale=0.5]{quartercircle}
Previously we defined the length of a \textit{parameterized} curve. Here we are given a curve that is not parameterized. To find its length in a way consistent with the previous section, we must first choose a parameterization. But this raises the question: To what extent does the parameterization affect the calculation of arc-length? This section addresses these issues. We state the concepts rather formally since we will generalize all of these ideas to surfaces later in the course.
\begin{definition}
Suppose that $L \subset \R^n$. We say that $\vect{x} \co [a,b] \to \R^n$ is a \defn{parameterization} of $L$ if $\vect{x}$ is one-to-one on $(a,b)$ and onto $L$. We also usually require $\vect{x}$ to be C$^1$.
\end{definition}
The curves $\vect{x}(t) = (2\cos t, 2\sin t)$ for $t \in [0,\pi/2]$ and $\vect{y}(t) = (2\cos 2t, 2\sin 2t)$ for $t \in [0,\pi/4]$ are both parameterizations of the quarter circle pictured above.
The next two definitions allow us to explore the consequences of choosing different parameterizations for $L$.
\begin{definition}
Suppose that $[a,b]$ and $[c,d]$ are intervals in $\R$. A \defn{change-of-coordinates function} is a function $h \co [c,d] \to [a,b]$ that is a C$^1$ bijection. (That is, $h$ has continuous derivative, is one-to-one, and is onto.)
\end{definition}
Since a change of coordinates function $h$ is strictly increasing or strictly decreasing (being one-to-one), either $h'(t) > 0$ or $h'(t) < 0$ for all $t$. If $h'(t) > 0$, we say that $h$ is \defn{orientation-preserving} and if $h'(t) < 0$, we say that $h$ is \defn{orientation-reversing}.
\begin{definition}
If $\vect{x}\co [a,b] \to \R^n$ and $\vect{y}\co[c,d] \to \R^n$ are curves, we say that $\vect{y}$ is a \defn{reparameterization} of $\vect{x}$ if there exists a change of coordinates function $h\co [c,d] \to [a,b]$ so that $\vect{y} =\vect{x} \circ h$. If $h$ is orientation-preserving, we say that $\vect{y}$ is an orientation-preserving reparameterization of $\vect{x}$, and if $h$ is orientation-reversing we say that $\vect{y}$ is an orientation-reversing reparameterization of $\vect{x}$.
\end{definition}
Intuitively, the change-of-coordinates function $h$ tells us how to speed up or slow down as we traverse that path laid down by $\vect{x}$. If $\vect{y}$ is an orientation-preserving reparameterization of $\vect{x}$, it traces out the path in the same direction that $\vect{x}$ did, otherwise it traces the path out in the opposite direction.
\begin{example}
Let $\vect{x}(t) = \begin{pmatrix} t^2 \\ 2t \end{pmatrix}$ for $t \in [0,5]$ and let $\vect{y}(t) = \begin{pmatrix} 9t^2 \\ 6t \end{pmatrix}$ for $t \in [0,5/3]$. Then $\vect{y}$ is an orientation-preserving reparameterization of $\vect{x}$. (What is the change-of-coordinates function $h$?)
\end{example}
\begin{example}
Let $\vect{x}(t) = (\cos t, \sin t)$ for $t\in [0,2\pi]$ and let $\vect{y}(t) = (\cos 3t, \sin 3t)$ for $t \in [0,2\pi]$. Then $\vect{y}$ is not a reparameterization of $\vect{x}$ since $\vect{x}$ traverses the unit circle once, but $\vect{y}$ traverses it three times.
\end{example}
\begin{example}
Suppose that $L$ is the graph of the function $y = f(x)$ for $a \leq x \leq b$. Find two parameterizations of $L$ that have opposite orientations.
\textbf{Answer:} There are many possibilities. One is $\vect{x}(t) = (t, f(t))$ for $t \in [a,b]$ and $\vect{y}(t) = (-t,f(-t))$ for $t \in [-b,-a]$.
\end{example}
We can now state and prove a theorem that says that arc-length is independent of parameterization. That is, arc length is \defn{intrinsic} to curves.
\begin{theorem}
Suppose that $\vect{x}\co [a,b] \to \R^n$ and $\vect{y}\co [c,d] \to \R^n$ are C$^1$ curves and that $\vect{y}$ is a reparameterization of $\vect{x}$. Then the length of $\vect{y}$ is equal to the length of $\vect{x}$.
\end{theorem}
\begin{proof}
Since $\vect{y}$ is a reparameterization of $\vect{x}$, there exists a change-of-coordinates function $h\co[c,d] \to [a,b]$ such that $\vect{y} = \vect{x} \circ h$. By the chain rule we have:
\[
\vect{y'}(t) = \vect{x'}(h(t)) h'(t).
\]
Taking magnitudes gives:
\[
||\vect{y'}(t)|| = ||\vect{x'}(h(t))|| \thinspace |h'(t)|.
\]
\textbf{Case 1:} $h$ is orientation-preserving.
In this case, $|h'(t)| = h'(t)$. Then, by definition, the length of $\vect{y}$ is:
\[\begin{array}{rcl}
L(\vect{y}) &=& \int_c^d ||\vect{y'}(t)|| \thinspace dt\\
&=& \int_c^d ||\vect{x'}(t)|| h'(t) \thinspace dt.
\end{array}
\]
Let $u = h(t)$. Then $du = h'(t)\thinspace dt$ and $u(c) = a$ and $u(d)= b$ since $h$ is orientation preserving. Thus, substitution shows that:
\[
\int_c^d ||\vect{x'}(t)|| h'(t) \thinspace dt = \int_a^b ||\vect{x}(u)|| \thinspace du.
\]
This latter integral is exactly the length of $\vect{x}$.
\textbf{Case 2:} $h$ is orientation-reversing.
This case is left to the reader. It follows from the observations that $|h'(t)| = -h'(t)$ and $h(c) = b$ and $h(d) = a$.
\end{proof}
\subsection{Parameterizing by arc length}
Consequently, when calculating arc length, we are free to choose any parameterization we want. We will frequently choose to ``parameterize by arc length''. Suppose that $\vect{x} \co [a,b] \to \R$ is $C^1$ and that $||\vect{x}'(t)|| > 0$ for all $t \in [a,b]$. Define $s\co [a,b] \to [0,L]$ by
\[
s(t) = \int_a^t ||\vect{x}'(\tau)|| \thinspace d\tau.
\]
Notice that $s$ is a strictly increasing $C^1$ function and so is an orientation preserving bijection $[a,b] \to [0,L]$. Furthermore, it's inverse function $s^{-1} \co [a,b] \to [a,L]$ is also strictly increasing bijection. Define $\vect{y}(t) = \vect{x} \circ s^{-1}$.
The function $s$ measures the distance travelled from time $a$ to time $t$ using the path $\vect{x}$. Composing $\vect{x}$ with $s^{-1}$ makes it so that $\vect{x}$ travels at one unit of distance per unit of time. (Like how driving at 60 mph means that you travel at 1 mile per minute.)
\begin{lemma}
Assume that $\vect{x}$ is a C$^1$ curve defined on $[a,b]$ such that for all $t$, $||\vect{x'}(t)|| \neq 0$. Let $\vect{y}$ be the reparameterization of $\vect{x}$ by arc length. Then for all $t$, $||\vect{y'}(t)|| = 1$ and the length of $\vect{y}$ on the interval $[0,t]$ is $t$.
\end{lemma}
\begin{proof}
Notice that:
\[
s'(t) = ||\vect{x}'(t)||
\]
by the fundamental theorem of Calculus. Also, $\vect{y} = \vect{x} \circ s^{-1}$ means that $\vect{x} = \vect{y} \circ s$. Consequently, by the chain rule,
\[
||\vect{x}'(t)|| = ||\vect{y'}(s(t))||\thinspace|s'(t)|
\]
Letting $\sigma = s(t)$ and recalling that $s'(t) = ||\vect{x'}(t)||$ we get:
\[
||\vect{x'}(t)|| = ||\vect{y'}(\sigma)|| \thinspace ||\vect{x}'(t)||.
\]
Thus, since $||\vect{x'}(t)|| \neq 0$,
\[
||\vect{y'}(\sigma)|| = 1.
\]
The length of $\vect{y}$ on the interval $[0,t]$ is, by definition,
\[
\int_0^t ||\vect{y}'(\sigma)|| \thinspace d\sigma.
\]
We see immediately that this equals $t$.
\end{proof}
\begin{example}
Let $\vect{x}(t) = (t^2,3t^2)$ for $t \in [1,2]$. Reparameterize $\vect{x}$ by arc length.
\textbf{Answer:} By definition,
\[\begin{array}{rcl}
s(t) &=& \int_{1}^t \sqrt{4\tau^2 + 36\tau^2} \thinspace d\tau\\
&=& \int_{1}^t \sqrt{40}\tau \thinspace d\tau\\
&=& \sqrt{40}(t^2 - 1)
\end{array}\]
We need, $s^{-1}$. Solving the previous equation for $t$ we find:
\[
t = \sqrt{1 + s/\sqrt{40}}
\]
Thus,
\[
s^{-1}(t) = \sqrt{1 + t/\sqrt{40}}
\]
To get $\vect{y}(t)$ which is the reparameterization of $\vect{x}$ by arclength, we plug this in for $t$ in the equation for $\vect{x}$, getting:
\[\begin{array}{rcl}
\vect{y}(t) &= & \vect{x}\circ s^{-1}(t) \\
&=& \big(\left(\sqrt{1 + t/\sqrt{40}}\right)^2, 3\left(\sqrt{1 + t/\sqrt{40}}\right)^2\big)\\
&=& \big(1 + t/\sqrt{40}, 3(1 + t/\sqrt{40})\big)
\end{array}
\]
\end{example}
To avoid much of this algebra, we will often simply write $\vect{x}(s)$ instead of $\vect{x}\circ s^{-1}$. This notation has the potential to be confusing. Thus, in the previous example, the reparameterization of $\vect{x}(t) = (t^2,3t^2)$ by arc length is
\[
\vect{x}(s) = \big(1 + s/\sqrt{40}, 3(1 + s/\sqrt{40})\big).
\]
\begin{example}
Let $\vect{x}(t) = (\cos t, \sin t, (2/3)t^{3/2})$ for $t \geq 3$. Find $\vect{x}(s)$.
\textbf{Answer:} Compute:
\[
||\vect{x}'(t)|| = ||(-\sin t, \cos t, t^{1/2})|| = \sqrt{1 + t}.
\]
Thus,
\[
s = \int_{3}^t \sqrt{1 + \tau}\thinspace d\tau = (2/3)(1 + t)^{3/2} - (2/3)(1 + 3)^{3/2} = (2/3)(1 + t)^{3/2} - 16/3.
\]
Consequently,
\[
t = \left(\frac{3(s + 16/3)}{2}\right)^{2/3}
\]
Thus,
\[
\vect{x}(s) = \Bigg(\cos \left(\frac{3(s + 16/3)}{2}\right)^{2/3}, \sin \left(\frac{3(s + 16/3)}{2}\right)^{2/3}, (2/3)\left(\frac{3(s + 16/3)}{2}\right)^{4/3}\Bigg)
\]
\end{example}
\begin{theorem}
A straight line in $\R^n$ is the unique shortest distance between two points.
\end{theorem}
\begin{proof}
The following proof contains the important ideas. We will show that in $\R^2$, the straight line segment joining $(0,0)$ to $(1,0)$ is the unique shortest path between those two points. Obviously, the distance between those two points is 1. That is also the length of the straight line segment.
Suppose that $\vect{x} = (x,y)$ is a differentiable plane curve joining $(0,0)$ to $(1,0)$. Assume that $x'(t) > 0$ for all $t$. We will show that the length of $\vect{x}$ is strictly greater than 1.
We may assume that $\vect{x}$ is parameterized by arclength. The length of $\vect{x}$ is
\[
\int_0^1 ||\vect{x}'(t)||\thinspace dt
\]
Suppose that $\vect{x}$ does not lie completely on the $x$ axis (If it does, we are done.) Then $y'(t)^2$ is positive on some interval $(a,b) \subset [0,1]$. Consequently,
\[\begin{array}{rcl}
\int_0^1 ||\vect{x}'(t)|| \thinspace dt &=& \int_0^1 \sqrt{x'(t)^2 + y'(t)^2} \thinspace dt\\
&>& \int_0^1 \sqrt{x'(t)^2} \thinspace dt \\
&=& \int_0^1 x'(t) \thinspace dt\\
&=& x(1) - x(0)\\
&=& 1 - 0\\
&= & 1.\\
\end{array}
\]
Thus, the length of $\vect{x}$ is greater than 1 and so $\vect{x}$ is not length-minimizing.
\end{proof}
\newpage
\section{Kepler's Laws of Motion}
\begin{lemma}[Warm-up Problem]
Suppose that $\vect{x}(t)$ is differentiable tnd that $||\vect{x}(t)||$ is constant. Then $\vect{x}$ is perpendicular to $\vect{x}'$.
\end{lemma}
\begin{proof}
Since $||\vect{x}||$ is constant, $\vect{x}$ is a differentiable curve lying on a sphere. For each $t$, $\vect{x}'(t)$ lies in the plane tangent to the sphere at $\vect{x}(t)$. The tangent plane is perpendicular to the radius $\vect{x}(t)$ of the sphere.
Alternatively,
\[
0 = \frac{d}{dt}||\vect{x}||^2 = \frac{d}{dt}(\vect{x} \cdot \vect{x}) = 2\left(\frac{d}{dt}\vect{x}\right) \cdot \vect{x} = 2\vect{x}\cdot\vect{x}'.
\]
\end{proof}
In this section we will use Newton's law of universal gravitation and Newton's second law to prove Kepler's first law of planetary motion. Suppose that the sun is at the origin $\vect{0} \in \R^3$ and that a planet is at vector $\vect{x}$. The force of gravitation is
\[\vect{F} = -\frac{k}{||\vect{x}||^3}\vect{x} = -\frac{k}{||\vect{x}||^2}\vect{u}.\]
Here $k > 0$ is a constant of proportionality which is the product of the mass of the sun, the mass of the planet, and the gravitational constant. The vector $\vect{u} = \vect{x}/||\vect{x}||$ is the unit vector in the direction of $\vect{x}$.
We begin with two lemmas:
\begin{lemma}\label{Lem: force accel}
We have
\[ \vect{x}'' = -\frac{k}{m||\vect{x}||^3} \vect{x} = -\frac{k}{m||\vect{x}||^2}\vect{u}\]
where $m$ is the mass of the planet.
\end{lemma}
\begin{proof}
Recall from Newton's second law of motion that $\vect{F} = m \vect{a}$. We know that $\vect{a} = \vect{x}''$. The equations follow from the law of universal gravitation.
\end{proof}
\begin{lemma}
The motion of the planet lies in a plane containing the sun.
\end{lemma}
\begin{proof}
We will show that there is a constant vector $\vect{c}$, such that $\vect{x}(t)$ is perpendicular to $\vect{c}$ (for all time $t$). Let $\vect{c} = \vect{x} \times \vect{x}'$. We will show that $\vect{c}$ is constant by showing that $\frac{d}{dt}\vect{c}(t) = 0$.
Well,
\[\frac{d}{dt} \vect{c} = \frac{d}{dt}(\vect{x} \times \vect{x'} = \left(\frac{d}{dt} \vect{x}\right) \times \vect{x}' + \left(\vect{x} + \frac{d}{dt}\vect{x'}\right) = \vect{x}' \times \vect{x}' + \vect{x} \times \vect{x}''.\]
Recall that any vector crossed with itself is the zero vector, so
\[\frac{d}{dt} \vect{c} = \vect{x} \times \vect{x}''.\]
By the previous lemma:
\[\vect{x} \times \vect{x}'' = \vect{x} \times \left(-\frac{k}{m||\vect{x}||^3} \vect{x}\right) = 0,\]
as desired.
\end{proof}
\begin{theorem}[Kepler's First Law (simplified)]
The orbit of the planet around the sun is either an ellipse, a parabola, or a hyperbola.
\end{theorem}
The challenge to proving this is to pick a useful coordinate system. In particular, we want a coordinate system that doesn't change with time. One direction that doesn't change with time is $\vect{c} = \vect{x} \times \vect{x}'$. We will consider that to be the $\vect{k}$ direction, so that the planet is contained in the $xy$ plane.
\begin{proof}
Without loss of generality, we may assume that the plane containing the orbit of the planet is the $xy$ plane, so that \[\vect{c} = \vect{x} \times \vect{x}' = \alpha \vect{e_3}.\]
\textbf{Step 1:} Find $\vect{c}$ in terms of $\vect{u}$, rather than in terms of $\vect{x}$.
By the product rule:
\[
\vect{x}' = \frac{d}{dt}(||\vect{x}||\vect{u}) = ||\vect{x}||'\vect{u} + ||\vect{x}||\vect{u'}.
\]
Hence,
\[\begin{array}{rcl}
\vect{c} &=&||\vect{x}|| \vect{u} \times \big(||\vect{x}||'\vect{u} + ||\vect{x}||\vect{u'}\big)\\
\vect{c} &=& ||\vect{x}||\cdot||\vect{x}||'\left(\vect{u} \times \vect{u}\right) + ||\vect{x}||^2\left(\vect{u} \times \vect{u}'\right).
\end{array}
\]
Since, $\vect{u} \times \vect{u} = 0$,
\[\vect{c} = ||\vect{x}||^2(\vect{u} \times \vect{u'}).\]
\textbf{Step 2:} $\vect{x}' \times \vect{c} = \beta\vect{u} + \vect{d}$ for some constants $\beta \in \R$ and $\vect{d}\in \R^3$.
Notice that:
\[
\begin{array}{rcl}
\vect{x}'' \times \vect{c} &=& \big(-\frac{k}{m||\vect{x}||^2}\vect{u}\big)\times ||\vect{x}||^2\left(\vect{u} \times \vect{u}'\right)\\
&=& -\beta\big(\vect{u} \times (\vect{u} \times \vect{u}')\big)\\
&=& \beta \big((\vect{u} \times \vect{u}') \times \vect{u}\big)\\
&=& \beta\big((\vect{u}\cdot \vect{u})\vect{u}' - (\vect{u} \cdot \vect{u}')\vect{u}\big)\\
&=& \beta \vect{u}'\\
\end{array}
\]
Also notice that:
\[
\begin{array}{rcl}
\frac{d}{dt}(\vect{x}' \times \vect{c}) &=& \vect{x}'' \times \vect{c} + \vect{x}' \times \vect{c}' \\
&=& \vect{x}'' \times \vect{c}
\end{array}
\]
Consequently,
\[ \begin{array}{rcl}
\frac{d}{dt}(\vect{x}' \times \vect{c}) &=& \beta \vect{u}' \\
\vect{x}' \times \vect{c} &=& \beta \vect{u} + \vect{d}.
\end{array}\]
\qed (Step 2)
Notice that $\vect{x}' \times \vect{c}$ lies in the $xy$ plane as does $\vect{u}$. Thus, $\vect{d}$ lies in the $xy$ plane.
Rotate the entire coordinate system, so that $\vect{d} = d\vect{e_1}$. Then the angle between $\vect{x}$ (or $\vect{u}$) and $\vect{d}$ is the polar angle $\theta(t)$ of $\vect{x}$.
We have
\[||\vect{c}||^2 = (\vect{x} \times \vect{x}') \cdot \vect{c} = \vect{x} \cdot (\vect{x} \times \vect{c}).
\]
Thus,
\[
||\vect{c}||^2 = ||\vect{x}||\vect{u} \cdot (\beta \vect{u} + \vect{d}) = \beta||\vect{x}|| + ||\vect{x}||||\vect{d}||\cos \theta.
\]
Solving for $||\vect{x}||$ we obtain:
\[
r = ||\vect{x}|| = ||\vect{c}||^2/(\beta + ||\vect{d}||\cos \theta).
\]
This is the polar equation for the planet's orbit. It remains to check that this is the polar form of a non-circular conic section. Some algebra shows that the equation
\[
r = \frac{c^2}{(\beta + d \cos \theta)}
\]
is equivalent in rectangular coordinates to
\[
(1 - e^2)x^2 + 2pex + y^2 = p^2
\]
where $p > 0$ and $e > 0$ are constants. If $0 < |e| < 1$, the path is elliptical; if $|e| = 1$, it is parabolic; and if $|e| > 1$ it is hyperbolic.
\end{proof}
\newpage
\subsection{The geometry of space curves}
In this section we will explore two concepts: The curvature of space curves and a moving coordinate system along a curve. Throughout, let $\vect{x}\co [a,b] \to \R^3$ be a C$^3$ path such that $||\vect{x}'(t)|| > 0$ for all $t$.
The \defn{unit tangent vector} $\vect{T} = \vect{T}(t)$ to $\vect{x}$ at time $t$ is defined as
\[
\vect{T} = \frac{\vect{x}'(t)}{||\vect{x}'(t)||}.
\]
Notice that if $\vect{y} = \vect{x} \circ \phi$ is an orientation reparameterization of $\vect{x}$ then:
\[
\vect{y}'(t) = \vect{x}'(\phi(t))\phi'(t)
\]
so
\[
\frac{\vect{y}'(t)}{||\vect{y}'(t)||} = \frac{\vect{x}'(\phi(t))\phi'(t)}{||\vect{x}'(\phi(t))||\phi'(t)} = \frac{\vect{x}'(\phi(t))}{||\vect{x}'(\phi(t))||}.
\]
Thus, $\vect{T}$ depends only on the orientation and position of the curve $\vect{x}$ and not on a particular (orientation-preserving) parameterization.
Consequently, if we parameterize $\vect{x}$ by arclength, then we can think of $\vect{T}$ as the rate of change of $\vect{x}$ with respect to distance travelled. Also, recall that since $\vect{T}$ is always a unit vector, it is perpendicular to $\vect{T}'$.
\begin{theorem}
$||\frac{d}{dt}|_{t = t_0} \vect{T}(t)||$ is the angular rate of change of the direction of $\vect{T}$ as $t$ increases.
\end{theorem}
\begin{proof}
On the interval $[t_0, t_0 + \Delta t]$ the average angular rate of of change of $\vect{T}$ is $\Delta \theta/\Delta t$. The limit
\[
\lim_{\Delta t \to 0^+} \Delta \theta/\Delta t
\]
is the angular rate of change of $\vect{T}$. It follows from some trigonometry that
\[
\lim_{\Delta t \to 0^+} \Delta \theta/||\Delta \vect{T}|| = 1
\]
where $\Delta \vect{T} = \vect{T}(t_0 + \Delta t) - \vect{T}(t_0)$.
Then,
\[\begin{array}{rcl}
\lim \limits_{\Delta t \to 0^+} \Delta \theta/\Delta t &=& \lim\limits_{\Delta t \to 0^+} \frac{\Delta \theta}{||\Delta \vect{T}||}\frac{||\Delta \vect{T}||}{\Delta t}\\
&&\\
&=& \lim\limits_{\Delta t \to 0^+} ||\Delta \vect{T}||/\Delta t\\
&&\\
&=& ||\frac{d\vect{T}}{dt}|_{t = t_0}||
\end{array}
\]
\end{proof}
Based on this idea, we define the \defn{curvature} $\kappa$ of $\vect{x}$ in $\R^3$ to be the angular rate of change of the direction of $\vect{T}$ as a function of distance. That is
\[
\kappa(t) = \frac{||d\vect{T}/dt||}{ds/dt} = \frac{||d\vect{T}/dt||}{||\vect{x}'(t)||}
\]
If $\vect{x}$ is parameterized by arc length, then $\kappa(t) = ||d\vect{T}/dt||$.
\begin{example}
Find the curvature of a line $\vect{x}(t) = t\vect{v} + \vect{b}$.
\textbf{Answer:} We have
\[
\vect{T} = \vect{x}'/||\vect{x}|| = \vect{v}/||\vect{v}||.
\]
Thus, $d\vect{T}/dt = \vect{0}$ and so $\kappa(t) = 0$.
\end{example}
\begin{example}
The curvature of a circle of radius $r > 0$ is $1/r$ at each point on the circle.
\end{example}
\begin{example}
Let $\phi(t) = (t,at^2)$ be a parameterized curve. Find the curvature of $\phi$ at $t = 0$.
\textbf{Answer:} We have: $\phi'(t) = (1,2at)$ and $\vect{T} = (1,2at)/\sqrt{1 + 4a^2t^2}$. Thus,
\[
\frac{d}{dt} \vect{T} = (0,2a)/\sqrt{1 + 4a^2t^2} + (1,2at)(-1/2)(1 + 4a^2t^2)^{-3/2}(8a^2t).
\]
Thus,
\[
||\phi'(0)|| = 1
\]
and
\[
||\frac{d}{dt}\vect{T}(0)|| = ||(0,2a)|| = 2a
\]
Consequently,
\[
\kappa(t) = 2a/1 = 2a
\]
\end{example}
A C$^3$ curve $\vect{x}$ can allow us to create a certain coordinate system (called the \defn{moving frame}) for the tangent spaces to $\R^n$ at the points of the curve.
One basis vector is $\vect{T}$. (This requires that $||\vect{x}'(t)|| > 0$.
Since $\vect{T}(t)$ is a unit vector for all time, it is always perpendicular to $\vect{T}'$. We take our second basis vector to be $\vect{N} = \vect{T}'/||\vect{T}'||$. This requires that $||\vect{T}'|| > 0$. $\vect{N}$ is called the \defn{principal normal vector} to $\vect{x}$. It follows from the chain rule that $\vect{N}$ is an intrinsic quantity (it remains the same after an orientation preserving parameterization change). To get a vector perpendicular to both $\vect{T}$ and $\vect{N}$ we use the \defn{binormal vector}
\[
\vect{B} = \vect{T} \times \vect{N}.
\]
\begin{example}
Compute the moving frame and curvature for the path $\vect{x}(t) = (\sin t - t\cos t, \cos t + t\sin t, 2)$ with $t \geq 0$.
\textbf{Answer:}
We compute:
\[\begin{array}{rclcl}
\vect{x'}(t) &=& (\cos t - \cos t+ t\sin t, -\sin t + \sin t + t\cos t, 0) &=& (t\sin t, t \cos t, 0)\\
\hline\\
||\vect{x'}(t)|| &=& \sqrt{t^2\sin^2 t + t^2\cos^2 t} &=& t\\
\hline\\
\vect{T} &=& \vect{x}'(t)/||\vect{x}'(t)|| &=& (\sin t, \cos t, 0)\\
\hline\\
\vect{T}' &=& (-\cos t, \sin t, 0) &&\\
\hline\\
||\vect{T}'|| &=& 1 &&\\
\hline\\
\vect{N} &=& \vect{T'}/||\vect{T'}|| &= & (-\cos t, \sin t, 0)\\
\hline\\
\kappa &=& ||\vect{T}'||/||\vect{x}'|| &=& 1/t\\
\end{array}
\]
Finally, to compute $\vect{B}$ we need the cross product:
\[
\vect{B} = (\sin t, \cos t, 0) \times (-\cos t, \sin t, 0) = (0,0,1).
\]
\end{example}
It turns out that
\[
\frac{\vect{B'}(t)}{||\vect{x'}(t)||} = -\tau \vect{N}
\]
for some scalar function $\tau$, called the \defn{torsion}. The torsion measures how much the curve twists out of a plane. If $\tau(t) = 0$ for all $t$, then the curve lies in a plane.
\begin{example}
Let $\vect{x}(t) = \begin{pmatrix} \sin t - t\cos t \\ \cos t + t\sin t\\t^2\end{pmatrix}$ for $t > 0$. Calculate $\vect{T}$, $\vect{N}$, $\vect{B}$, $\kappa$, and $\tau$ for $\vect{x}$.
Easy computations show that:
\[\begin{array}{rcl}
\vect{x'}(t) &=& \begin{pmatrix} t\sin t \\ t\cos t \\ 2t \end{pmatrix}\\
&&\\
||\vect{x'}(t)|| &=& t\sqrt{5}.
\end{array}
\]
More computations show:
\[\begin{array}{rcl}
\vect{T}(t) &=& \frac{1}{\sqrt{5}}\begin{pmatrix} \sin t \\ \cos t \\ 2 \end{pmatrix} \\
&&\\
\vect{T'}(t) &=& \frac{1}{\sqrt{5}} \begin{pmatrix} \cos t \\ -\sin t \\ 0 \end{pmatrix} \\
&&\\
\vect{N}(t) &=& \begin{pmatrix}\cos t \\ -\sin t \\ 0 \end{pmatrix} \\
&&\\
\kappa(t) &=& \frac{1}{5t} \\
&&\\
\vect{B}(t) &=& \frac{1}{\sqrt{5}} \begin{pmatrix} 2 \sin t \\ 2\cos t \\ -1 \end{pmatrix} \\
&&\\
\vect{B'}(t) &=& \frac{1}{\sqrt{5}} \begin{pmatrix} 2 \cos t \\ -2\sin t \\ 0 \end{pmatrix}\\
&&\\
\vect{B'}(t)/||\vect{x'}(t)|| &=& \frac{2}{5t}\vect{N}(t) \\
&&\\
\tau(t) &=& -\frac{2}{5t}.
\end{array}\].
\end{example}
\newpage
\section{Integrating over functions $f \co \R \to \R^n$}
In the last section we focused on differentiating functions $\phi \co \R \to \R^n$. In MA 122, we studied how to integrate functions $f \co \R^n \to \R$. In this section, we will discuss how to integrate a function $f \co \R^n \to \R$ \textit{over} a curve $\phi$. Certainly one way to do this is to use 1-variable calculus to integrate:
\[\int_{a}^b f \circ \phi(t) \thinspace dt\]
where $[a,b]$ is in the domain of $\phi$. This is a fine thing to do in many situations, however, consider the following example:
\begin{example}
Let $\phi \co [0,1] \to \R^2$ be given by $\phi(t) = (t,2t)$ and let $\psi\co \R \to \R^2$ be defined by $\psi(t) = (t^2,2t^2)$. Notice that $\phi$ and $\psi$ have the same image. Let $f \co \R^2 \to \R$ be defined by $f(x,y) = x^2 + y$. Then
\[\int_0^1 f \circ \phi(t) \thinspace dt = \int_0^1 t^2 + 2t\thinspace dt = 4/3.\]
However,
\[\int_0^1 f \circ \psi(t) \thinspace dt = \int_0^1 4t^4 + 2t^2 \thinspace dt = 4/5 + 1/3\]
\end{example}
\begin{example}
Show that $\phi$ and $\psi$ in the previous example are reparameterizations of each other.
\textbf{Solution:}
Define $p(t) = t^2$ and $q(t) = \sqrt{t}$. Both $p$ and $q$ are bijective functions $[0,1] \to [0,1]$. Clearly, $\phi = \psi \circ q$ and $\psi = \phi \circ p$.
\end{example}
Thus, the integral $\int_a^b f \circ \phi \thinspace dt$ depends on the parameterization of the curve $\phi$, not just on its image. In many cases, we will want to have an integral which depends only on the image of the curve, not on its parameterization. That way, in applications, we will be free to pick a parameterization which suits us and we won't have to worry about what would happen if we picked a different parameterization.
The following example demonstrates the important points.
\begin{example}
Let $L$ be a straight piece of wire in $\R^2$ with endpoints at $(0,0)$ and at $(1,2)$. Suppose that the temperature of the wire at point $(x,y)$ is $f(x,y) = x^2 + y$. Find the average temperature of the wire.
\textbf{Solution:}
Break the wire $L$ into little tiny segments, $L_1, \hdots, L_n$ each of length $\Delta s$. Since $L$ has a length of $\sqrt{5}$, $\Delta s = \sqrt{5}/n$.
Then the average temperature of $L$ is approximately
\[
T_n = \frac{1}{n} \sum_{i = 1}^n f(\vect{x^*_i})
\]
In fact, the average temperature of $L$ is exactly
\[
T = \lim_{n \to \infty} \frac{1}{n}\sum_{i = 1}^n f(\vect{x^*_i}).
\]
Recall that $1/n = (\Delta s)/\sqrt{5}$. Thus,
\[
T = \lim_{n \to \infty} \frac{1}{\sqrt{5}}\sum_{i=1}^n f(\vect{x^*_i})\Delta s
\]
This looks a lot like a limit of Riemann sums, so perhaps we can convert this to a definite integral and use the Fundamental Theorem of Calculus. Before we do that, however, notice that (up to proving that the limit exists) we have a perfectly fine definition of the quantity
\[
\text{Ave. value of } f \text{ on } L = \frac{1}{\text{length of } L}\int_L f \thinspace ds.
\]
We were able to define this integral without relying on a parameterization of $L$!
To calculate this, however, we need a parameterization. Suppose that there exists a parameterization $\phi\co [0,\sqrt{5}] \to \R^2$ of $L$ such that at time $t$, the distance from $(0,0)$ to $\phi(t)$ along $L$ is exactly $t$. That is, ``$L$ is parameterized by arc length''. Then, $\Delta s = \Delta t = \sqrt{5}/n$ so
\[
T = \frac{1}{\sqrt{5}}\lim_{n \to \infty} \sum_{i = 1}^n f(\phi(t^*_i))\Delta t = \frac{1}{\sqrt{5}}\int_0^{\sqrt{5}}f(\phi(t))\thinspace dt.
\]
\textbf{Exercise:} Find a parameterization of $L$ by arclength.
\textbf{Solution:} Define $\hat{\phi}(t)= (t,2t)$ and define $\phi(t) = \hat{\phi}(t/\sqrt{5})$.
\end{example}
This example has all the important points except that at the very end we had to pick a particular parameterization. You can imagine that in many situations, finding a suitable parameterization might be challenging!. The next sections will address that issue. In general, the nicest parameterizations are those which are parameterizations ``by arc length''.
Consequently, we make the following definition:
Suppose that $f\co \R^n \to \R$ is continuous and that $\vect{x}\co [a,b] \to \R^n$ is a (piecewise) C$^1$ path. Define
\[\int_\vect{x} f \thinspace ds = \int_a^b f(\vect{x}(t))||\vect{x}'(t)||\thinspace dt.\]
\begin{example}
Let $f(x,y) = x^2 + y$ and $\vect{x}(t) = t\begin{pmatrix}1\\2 \end{pmatrix}$ for $0 \leq t \leq 1$. Then,
\[\begin{array}{rcl}
\int_\vect{x} f \thinspace ds &=& \int_0^1 f(\vect{x}(t))|\thinspace ||\vec{x'}(t)||\thinspace dt\\
&=& \int_0^1 (t^2 + 2t)\sqrt{5} \thinspace dt.
\end{array}
\]
\end{example}
%
\begin{example}
Let $f(x,y,z) = 1/(xyz)$ and $\vect{x}(t) = \begin{pmatrix}\sin t \\ t\cos t \\ t \end{pmatrix}$ for $\pi/4 \leq t \leq 2\pi$.
Then
$||\vect{x'}(t)|| = \sqrt{\cos^2 t + (\cos t - t\sin t)^2 + 1}$.
Thus,
\[
\int_\vect{x} f \thinspace ds = \int_{\pi/4}^{2\pi} \frac{\sqrt{\cos^2 t + (\cos t - t\sin t)^2 + 1}}{t^2\sin t \cos t} \thinspace dt.
\]
\end{example}
\newpage
\section{Scalar Fields and Vector Fields}
A \defn{scalar field} on $\R^n$ is simply a function $f\co \R^n \to \R$. We think of $f$ as assigning a number $f(\vect{x})$ to each point $\vect{x}$ in $\R^n$. Below is a depiction of the scalar field $f(x,y) = x^2 + y^2$ on $\R^2$. To a point $(x,y) \in \R^2$, we assign the number $x^2 + y^2$. Points which are assigned small numbers are colored blue and points which are assigned large numbers are colored red.
\begin{center}
\includegraphics[scale=.2]{ScalarField}
\end{center}
A \defn{vector field} on $\R^n$ is a function $F$ such that for every $\vect{x}\in \R^n$, $F(\vect{x})$ is a vector in $T_\vect{x}$. Since $T_\vect{x}$ is simply a copy of $\R^n$ with origin at $\vect{x}$, we can think of $F$ as the assignment of a vector $F(\vect{x})$ in $\R^n$ to each point in $\R^n$. Since we think of this vector as living in $T_\vect{x}$, we draw it as a vector in $\R^n$ with tail at $\vect{x}$.
\begin{example}
Here is a picture of the vector field $\vect{F}(x,y) = (-y,x)$. The arrows are not drawn with the correct lengths.
\begin{center}
\includegraphics[scale=.4]{CircularFlow1}
\end{center}
\end{example}
\begin{example}
Here is the vector field $F(x,y) = (y,x)$. The arrows are not drawn with the right lengths.
\begin{center}
\includegraphics[scale=.4]{VectorField1}
\end{center}
\end{example}
A good way of thinking about a vector field is that it tells you the direction and speed of flow of water in a huge water system. To see this, suppose that we have an object in the stream at point (1,0) at time 0. Its position at time $t$ is given by $\phi(t) = (x(t),y(t))$. If the vector field $F(x,y) = (F_1(x,y), F_2(x,y))$ describes the direction and speed of the object, then
\[
\begin{array}{rcl}
x'(t) &=& F_1(\phi(t))\\
y'(t) &=& F_2(\phi(t))\\
\end{array}
\]
This a system of differential equations which we may or may not be able to solve. If $\phi$ exists, it is called a flow line for $F$.
\begin{example}
Find a flow line $\phi(t)$ for $\vect{F}(x,y) = (-y,x)$ passing through the point $(2,0)$.
\textbf{Solution:} Suppose that $\phi(t) = \begin{pmatrix}x(t) \\ y(t) \end{pmatrix}$. Then the equation $\phi'(t) = \vect{F}(\phi(t))$ becomes:
\[
\begin{pmatrix} x'(t) \\ y'(t) \end{pmatrix} = \begin{pmatrix} -y(t) \\ x(t) \end{pmatrix}.
\]
Thus we are looking for function $x$ and $y$ so that
\[\begin{array}{rcl}
x'(t) &=& -y(t) \\
y'(t) &= & x(t) \\
x(0) &=& 2\\
y(0) &=& 0\\
\end{array}
\]
The differential equations make us remember that $\sin$ and $\cos$ have derivatives related to each other in the way that we need.
Thus,
\[
\phi(t) = \begin{pmatrix} 2\cos t \\ 2\sin t \end{pmatrix}
\]
is the flow line we are looking for.
\end{example}
\begin{example}
Let $\vect{F}(x,y) = (y,x)$. Find flow lines through $(1,1)$ and through $(1,0)$.
\textbf{Answer:} Let $\phi(t) = \begin{pmatrix} x(t) \\ y(t) \end{pmatrix}$ be a flow line. Then,
\[
\begin{array}{rcl}
x'(t) &=& y(t) \\
y'(t) &=& x(t) \\
\end{array}
\]
As a first guess, we try $x(t) = e^t$ and $y(t) = e^t$. Sure enough, $\phi(t)= \begin{pmatrix} e^t \\ e^t \end{pmatrix}$ is a flow line for $\vect{F}$ passing through $(1,1)$.
To find a flow line passing through $(1,0)$ more ingenuity is required. Eventually, we might come up with:
\[\phi(t) = \begin{pmatrix} \cosh t \\ \sinh t \end{pmatrix} = \begin{pmatrix}
(e^t + e^{-t})/2\\
(e^t - e^{-t})/2
\end{pmatrix}\]
The image of this second flow line in the vector field $\vect{F}$ is pictured below.
\begin{center}
\includegraphics[scale=.4]{VectorField1wflow}
\end{center}
\end{example}
\subsection{Gradient}
Define the gradient by $\nabla \co C^1(\R^n) \to \R^n$ by
\[
\grad f = \nabla f= (\lpartial{x_1}, \lpartial{x_2}, \hdots, \lpartial{x_n}).
\]
If we think of $f \in C^1(\R^n)$ as a scalar field, then $\nabla$ (the gradient) converts the scalar field into a vector field. The vectors point in the direction of greatest increase of $f$.
\begin{example}
Consider $f\co \R^2 \to \R$ defined by $f(x,y)= \sin x \cos y$. Then $\nabla f = (\cos x \cos y, -\sin x \sin y)$. Below is the vector field $\nabla f$ on top of the scalar field $f$. Contour lines have been drawn on the scalar field so that you can see how the vectors $\nabla f$ are perpendicular to the contour lines.
\begin{center}
\includegraphics[scale=.4]{GradField1}
\end{center}
\end{example}
If $f\co \R^n \to \R$ is a scalar field and if $\vect{F} = \nabla f$, we say that $f$ is a \defn{potential function} for $\vect{F}$ and that $\vect{F}$ is a \defn{gradient field} or a \defn{conservative vector field}.
For a fixed constant $c$, the set of points $\{\vect{x} : f(\vect{x}) = c \}$ is called an \defn{equipotential set} for $f$ or $\vect{F}$.
\begin{example}
Find a potential function for $\vect{F}(x,y) = \begin{pmatrix} -x \\ y \end{pmatrix}$.
\textbf{Answer:} The function $f(x,y) = -\frac{1}{2} x^2 + \frac{1}{2} y^2$ is a potential function for $\vect{F}$ since $\nabla f = \vect{F}$. The hyperbolae
\[
-\frac{1}{2}x^2 + \frac{1}{2} y^2 = c
\]
are the equipotential lines for $f$. Notice in the figure below, that the equipotential line is perpendicular to a flow line. The flow line is black and the equipotential line is red.
\begin{center}
\includegraphics[scale=.3]{VFflowEquipotential}
\end{center}
\end{example}
\begin{theorem}
Suppose that $\vect{F}$ is a conservative vector field with potential function $f$. Suppose that $L$ is a smooth equipotential line for $f$ and that $\phi$ is a flow line for $\vect{F}$ intersecting $L$. Then $L$ and $\phi$ are perpendicular.
\end{theorem}
\begin{proof}
Suppose that $\phi$ and $L$ intersect at a point $\vect{x_0}$ and that $L$ has a unit tangent vector $\vect{v}$ at $\vect{x}_0$. Since $f$ is constant along $L$, the directional derivative $\lpartial{\vect{v}} f (\vect{x_0})$ is equal to zero. By a standard result from Calculus II, $\lpartial{\vect{v}} f(\vect{x_0}) = \nabla f(\vect{x_0}) \cdot \vect{v}$. Since this is zero, $\nabla f(\vect{x_0}) = \vect{F}(\vect{x}_0)$ is perpendicular to $L$ at $\vect{x_0}$.
\end{proof}
Another very useful fact is:
\begin{theorem}
Suppose that $\vect{F}$ is a gradient field and that $\phi$ is a flow line with $||\phi'(t)|| > 0$ for all $t$. Then $\phi$ does not close up on itself; in fact, for all $t_1$ and $t_2$ with $t_1 \neq t_2$, $\phi(t_1) \neq \phi(t_2)$.
\end{theorem}
\begin{proof}
Since $\vect{F}$ is a gradient field, there exists a potential function $f$ for $\vect{F}$. Consider $g(t) = f(\phi(t))$. Then
\[
g'(t) = Df(\phi(t))\phi'(t) = \nabla f(\phi(t)) \cdot \phi'(t)
\]
Since $\vect{F} = \nabla f$ and since $\phi'(t) = \vect{F}(\phi(t))$, we have
\[
g'(t) = \vect{F}(\phi(t)) \cdot \vect{F}(\phi(t)) = ||\vect{F}(\phi(t))||^2 = ||\phi'(t)||^2 > 0.
\]
Thus, $g'(t) > 0$ for all $t$. In particular, $g(t) = f(\phi(t))$ is a strictly increasing function.
Suppose that there exist $t_1 \neq t_2$ such that $\phi(t_1) = \phi(t_2)$. Then $g(t_1) = g(t_2)$, but this contradicts the fact that $g$ is strictly increasing. Hence, $\phi(t_1) \neq \phi(t_2)$ for all $t_1 \neq t_2$.
\end{proof}
\begin{example}
The vector field $\vect{F}(x,y) = (-y,x)$ has $\phi(t) = (\cos t, \sin t)$ as a flow line. Since $\phi(0) = \phi(2\pi)$, the vector field $\vect{F}$ is not a gradient field.
\end{example}
\subsection{Divergence}
Let $\vect{F} \co \R^n \to \R^n$ be a differentiable vector field. Then the divergence of $\vect{F}$ is
\[
\diver \vect{F} = \nabla \cdot \vect{F} = \lpartial{x_1}F_1 + \hdots + \lpartial{x_n}F_n
\]
The divergence converts a vector field into a scalar field.
\begin{example}
Let $\vect{F}(x,y) = (xy,\cos x \cos y)$. Then $\diver \vect{F}(x,y) = y - \cos x \sin y$. Below is plotted the vector field $\vect{F}$ and the scalar field $\diver \vect{F}$. The arrows of vector field are not drawn with the correct length (so that we can see all the arrows). The red areas of the vector field have positive divergence and the blue areas have negative divergence. The green area has zero divergence.
\begin{center}
\includegraphics[scale=.3]{Divergence}
\end{center}
\end{example}
\subsection{Curl}
Let $\vect{F} \co\R^3 \to \R^3$ be a differentiable vector field. Define the curl of $\vect{F}$ to be
\[
\curl \vect{F} = \nabla \times \vect{F} = \begin{pmatrix}
\lpartial{y} F_3 - \lpartial{z}F_2 \\
\lpartial{z} F_1 - \lpartial{x}F_3\\
\lpartial{x}F_2 - \lpartial{y}F_1\\
\end{pmatrix}
\]
\begin{example}
Let $\vect{F}(x,y,z) = (-yx, x, 0)$. Then $\vect{F}(x,y,z) = (0,0, 1+ x)$. Notice that the vector field $\vect{F}$ lies in the $xy$ plane and that $\curl \vect{F}$ is always a vector perpendicular to the $xy$ plane. Below is drawn the vector field $\vect{F}$ and the scalar field $||\curl \vect{F}||$. You can see that the farther from the origin a point is, the greater the magnitude of the curl.
\begin{center}
\includegraphics[scale=.3]{Curl1}
\end{center}
\end{example}
Where does this rather strange formula for curl come from and how could we come up with it? After discussing integration we'll be able to see the real answer, however here's a very handwavy way of thinking about it.
Suppose that $\vect{F} = (F_1,F_2,F_3)$ is a vector field. Let's find a way to create a vector field $\curl \vect{F} = (G_1,G_2,G_3)$ that measures how much $\vect{F}$ is (instantaneously) curling around the coordinate axes of the tangent space at a point $\vect{x_0} \in \R^3$.
We know that $H_1(x,y,z) = (0,-z,y)$ is a vector field ``rotating" around the $x$ axis. and that $H_2(x,y,z) = (z,0,-x)$ is a vector field rotating around the $y$-axis and that $H_3(x,y,z) = (-y,x,0)$ is a vector field rotating around the $z$-axis. The dot product measures how much one vector "looks like" another vector so we might guess that
\[
\begin{array}{rclcl}
G_1(x,y,z) &\approx & \vect{F} \cdot \vect{H}_1(x,y,z) &=& -zF_2(x,y,z) + yF_3(x,y,z) \\
G_2(x,y,z) & \approx & \vect{F} \cdot \vect{H}_2(x,y,z) &=& zF_1(x,y,z) - xF_3(x,y,z) \\
G_3(x,y,z) &\approx & \vect{F} \cdot \vect{H}_3(x,y,z) &=& -yF_1(x,y,z) + xF_2(x,y,z) \\
\end{array}
\]
However, we want exact values not approximations, so in place of the $x$, $y$, and $z$ coming from $\vect{H_1}$, $\vect{H_2}$, and $\vect{H_3}$, we use $\frac{\partial}{\partial x}$, $\frac{\partial}{\partial y}$, and $\frac{\partial}{\partial z}$. This gives us the formula:
\[
\curl \vect{F} = \begin{pmatrix} -\lpartial{z}F_2 + \lpartial{y}F_3 \\ \lpartial{z} F_1 - \lpartial{x} F_3 \\ -\lpartial{y}F_1 + \lpartial{x} F_2 \end{pmatrix}.
\]
\subsection{The relationship of Grad, Curl, Div}
In summary:
\[
\begin{array}{rcrcl}
\grad &\co& \text{ scalar field } &\to & \text{ vector field}\\
\diver &\co& \text{ vector field } &\to & \text{ scalar field}\\
\curl &\co& \text{ 3D vector field } &\to & \text{ 3D vector field}\\
\end{array}
\]
The following theorem is straightforward, but tedious to prove.
\begin{theorem}
\begin{enumerate}
\item Suppose that $f \co \R^3 \to \R$ is a $C^2$ scalar field. Then $\curl(\grad f) = \vect{0}$.
\item Suppose that $\vect{F} \co \R^3 \to \R^3$ is a $C^2$ vector field. Then $\diver (\curl \vect{F}) = 0$.
\end{enumerate}
\end{theorem}
The importance of this theorem is that it shows that the following:
\[
\{C^\infty \text{ s. f. } \} \stackrel{\grad}{\to} \{C^\infty \text{ v.f. }\} \stackrel{\curl}{\to} \{ C^\infty \text{ v. f. }\} \stackrel{\diver}{\to} \{C^\infty \text{ s.f. } \}
\]
is a \defn{co-chain complex}. See the section on cohomology for more on this.
\newpage
\section{Interlude: Some Topological Notions}
When we try to develop higher dimensional analogues of what we have done for space curves, we will have trouble precisely stating our mathematics unless we introduce a few terms from topology. The following definitions are given assuming the context of this course. None of the definitions are incorrect in this context, but in other contexts they may not be the correct definition.
\begin{itemize}
\parskip 6.6pt
\parindent 0pt
\item \textbf{Open ball:} Given $\vect{a} \in \R^n$ and $r > 0$, the \defn{open ball of radius $r$ centered at $a$} is the set \[B_r(\vect{a}) = \{\vect{x} \in \R^n : d(\vect{x},\vect{a}) < r \]
where $d$ is the usual distance function on $\R^n$.
\item \textbf{Open set:} A subset $U$ of $\R^n$ is \defn{open} if every $\vect{a} \in U$, there exists $r > 0$ so that $B_r(\vect{a}) \subset U$. That is, each point in an open set has an open ball containing it that is, in turn, contained in the open set.
\item \textbf{Homeomorphism:} A function $f\co U \to W$ such that $f$ is continuous, one-to-one (injective), onto (surjective), and with the inverse function $f^{-1}$ continuous.
\item \textbf{Diffeomorphism:} A function $f\co U \to W$ such that $f$ is a homeomorphism and both $f$ and $f^{-1}$ are differentiable. (Usually, we will require $f$ and $f^{-1}$ to be either C$^1$ or $C^\infty$.
\item \textbf{Closed set:} A subset $V$ of $\R^n$ is \defn{closed} if the set $\R^n - V$ is open. Equivalently: If a sequence $(\vect{x}_n)$ of points in $V$ converges to a point $\vect{x}$ in $\R^n$, then $\vect{x} \in V$.
\item \textbf{Bounded set:} A subset $X$ of $\R^n$ is \defn{bounded} if there exists an $r > 0$ so that $X \subset B_r(\vect{0})$.
\item \textbf{Compact set:} A subset $X$ of $\R^n$ is \defn{compact} if it is closed and bounded. Equivalently, every sequence of points in $X$ has a subsequence converging to a point in $X$.
\item \textbf{Closed curve:} A continuous function $f\co [a,b] \to \R^n$ such that $f(b) = f(a)$ or the image of such a function.
\item \textbf{Simple closed curve:} A closed curve $f\co[a, b] \to \R^n$ such that $f\co (a,b) \to \R^n$ is one-to-one (injective) or the image of such a function.
\item \textbf{$k$-dimensional manifold:} A subset $F$ of $\R^n$ such that if $\vect{a} \in F$, there exists an open ball $B_r(\vect{a}) \subset R^n$, such that $B_r(\vect{a}) \cap F$ is homeomorphic to either $\R^k$ or $\R^k_+ = \{(x_1,x_2, \hdots, x_k) : x_k \geq 0 \}$. The manifold $F$ is \defn{smooth} if ``homeomorphic'' can be replaced by ``diffeomorphic''. The set of homeomorphisms (or diffeomorphisms) is called an \defn{atlas} for $F$. The set of functions that are inverses to the functions in the atlas are called \defn{a parameterization} of $F$. If $F$ is compact, it turns out that we may assume that the atlas or parameterization has only finitely many functions in it.
\item \textbf{Surface:} A 2-dimensional manifold.
\item \textbf{Boundary of a $k$-dimensional manifold:} If $F$ is a $k$-dimensional manifold, the \defn{boundary} of $F$, denoted $\boundary F$, is the set of points $\vect{a} \in F$ such that there exists $r > 0$ with $B_r(\vect{a}) \cap F$ homeomorphic to $\R^k_+$.
\item \textbf{Closed $k$-dimensional manifold:} A compact manifold $F$ with $\boundary F = \nil$.
\end{itemize}
\newpage
\section{Integration of Scalar Fields and Vector Fields on $\R^n$ over Curves}
Suppose that $\vect{x}\co [a,b] \to \R^n$ is a C$^1$ curve. If $f \co \R^n \to \R$ is continuous, then define
\[
\int_{\vect{x}} f \thinspace ds = \int_a^b f(\vect{x}(t))||\vect{x}'(t)|| \thinspace dt.
\]
\begin{lemma}
Suppose that $\vect{y} \co \phi(t)$ is a reparameterization of $\vect{x}$. Then
\[
\int_\vect{y} f \thinspace ds = \int_\vect{x} f\thinspace ds.
\]
\end{lemma}
\begin{proof}
Assume that $\phi\co [a,b] \to [c,d]$. Recall from the chain rule that $||\vect{y}'(t)|| = ||\vect{x}(\phi(t))|| |\phi'(t)|$. Thus, if $\phi$ is orientation preserving:
\[
\int_\vect{y} f \thinspace ds = \int_c^d f(\vect{x}x(\phi(t)))|\vect{x}'(\phi(t))||\phi'(t) \thinspace dt.
\]
Perform the last integral by letting $u(t) = \phi(t)$ so that $du = \phi' \thinspace dt$. That last integral is then equal to
\[
\int_a^b f(\vect{x}(u))||\vect{x}'(u)||\thinspace du = \int_{\vect{x}} f \thinspace ds.
\]
If $\phi$ is orientation reversing, then $|\phi'(t)| = -\phi'(t)$ and so the work above is largely the same except that in the substitution $u(c) = b$ and $u(d) = a$. Reversing the limits of integration kills the negative sign coming from $-\phi'(t)$.
\end{proof}
If $\vect{F} \co \R^n \to \R^n$ is a continuous vector field, then define
\[
\int_{\vect{x}} \vect{F}\cdot d\vect{s} = \int_a^b \vect{F}(\vect{x}(t))\cdot \vect{x}'(t) \thinspace dt.
\]
The proof of the next lemma should be easy.
\begin{lemma}
If $\vect{y} = \vect{x} \circ \phi$ then if $\phi$ is orientation preserving,
\[
\int_\vect{y} \vect{F} \cdot d\vect{s} = \int_\vect{x} \vect{F} \cdot d\vect{s}.
\]
If $\phi$ is orientation reversing, then
\[
\int_\vect{y} \vect{F} \cdot d\vect{s} = -\int_\vect{x} \vect{F} \cdot d\vect{s}.
\]
\end{lemma}
\subsubsection{Alternative Notation 1:}
Let $\vect{T} = \vect{x}'/||\vect{x}'||$. This is the unit tangent vector. Then,
\[
\int_\vect{x} \vect{F}\cdot d\vect{s} = \int_a^b \frac{\vect{F}(\vect{x}(t))\vect{x}'(t)}{||\vect{x}'(t)||}|\\vect{x}'(t)|| \thinspace dt = \int_\vect{x} (\vect{F} \cdot \vect{T}) \thinspace ds
\]
Thus the integral of a vector field $\vect{F}$ over a path $\vect{x}$, ``adds'' up the tangential component of $\vect{F}$ along the image of $\vect{x}$.
\subsubsection{Alternative Notation 2:}
Suppose that $\vect{F} = (M,N,P)$ and that $\vect{x} = (x,y,z)$. Using the notation of differentials we can write
\[
\begin{array}{rcl}
dx &=& x'(t)\thinspace dt\\
dy &=& y'(t) \thinspace dt\\
dz &=& z'(t) \thinspace dt\\
\vect{F} \cdot \vect{x}'(t) &=& M\thinspace dx + N \thinspace dy + P \thinspace dz.
\end{array}
\]
Consequently, we can write
\[
\int_\vect{x} \vect{F}\cdot d\vect{s} = \int_\vect{x} M \thinspace dx + N \thinspace dy + P \thinspace dz.
\]
The object $ M \thinspace dx + N \thinspace dy + P \thinspace dz$ is an example of something called a ``differential form''.
Be careful to evaluate an integral like $\int_\vect{x} M \thinspace dx + N \thinspace dy + P \thinspace dz$ correctly. If you never use a parameterization for $\vect{x}$, you've done something incorrectly.
\begin{example}
Let $f(x,y) = 1/(x^2 + y^2)$. Let $\vect{F}(x,y) = \nabla f(x,y) = -2(x,y)/(x^2 + y^2)^2$. Let $\vect{x}(t) = (\cos t, \sin t)$ for $0 \leq t \leq 2\pi$.
Notice that $||\vect{x}'(t)|| = 1$.
Then,
\[
\int_\vect{x} f \thinspace ds = \int_0^{2\pi} 1/(\cos^2 t + \sin^2 t) \thinspace dt = \int_0^{2\pi} 1 \thinspace dt = 2\pi.
\]
And,
\[
\int_\vect{x} \vect{F} \cdot d\vect{s} = \int_0^{2\pi} -2\begin{pmatrix}\cos t \\ \sin t \end{pmatrix} \cdot \begin{pmatrix}-\sin t \\ \cos t \end{pmatrix} = 0
\]
\end{example}
\newpage
\subsection{Conservative Vector Fields have Path Independent Line Integrals}
\begin{lemma}
Suppose that $\vect{F} = \nabla f$. Assume that $f$ is C$^2$ on an open set $D \subset \R^n$. If $A,B \in D$ and if $\vect{x}$ is any path joining $A$ to $B$, then
\[
\int_\vect{x} \vect{F}\cdot d\vect{s} = f(B) - f(A).
\]
\end{lemma}
\begin{proof}
Recall that $\nabla f \cdot \vect{x}' = (Df)\vect{x}'$. Thus, $F(\vect{x}(t))\cdot \vect{x}'(t) = \frac{d}{dt} f(\vect{x}(t))$ by the chain rule. Consequently, by the Fundamental Theorem of Calculus:
\[\begin{array}{rcl}
\int_\vect{x} \vect{F}\cdot d\vect{s} &=& \int_a^b \vect{F}(\vect{x}(t))\cdot \vect{x}'(t) \thinspace dt \\
&=& \int_a^b \left(\frac{d}{dt} f(\vect{x}(t))\right) \thinspace dt \\
&=& f(\vect{x}(b))- f(\vect{x}(a)) \\
&=& f(B)- f(A).
\end{array}
\]
\end{proof}
Here is an application:
Suppose that $P$ is a charged particle at $\vect{x}$ and that $Q$ is a charged particle at $\vect{a}$ with charges $q_P$ and $q_Q$ respectively. The force exerted by $P$ on $Q$ is
\[
\vect{E}(\vect{x}, \vect{a}) = \frac{q_Pq_Q (\vect{x} - \vect{a})}{||\vect{x} - \vect{a}||^3}.
\]
If we fix $\vect{x}$ and let $\vect{a}$ vary, $\vect{E}(\vect{a})$ is a gradient field with potential function
\[
f(\vect{a}) = \frac{q_Pq_Q}{||\vect{x} - \vect{a}||}.
\]
By the previous lemma, the work required to move $Q$ from $\vect{a}$ to $\vect{b}$ is
\[
\frac{1}{||\vect{x} - \vect{b}||} - \frac{1}{||\vect{x} - \vect{b}||}
\]
In particular, it does not depend on the path taken by the particle.
If we have stationary particles $P_1, \hdots, P_n$ at $\vect{x}_1,\hdots, \vect{x}_n$ respectively, each with charge $+1$ and if $Q$ is a charged particle at $\vect{a}$, the force exerted by the stationary particles on $Q$ is
\[
\vect{E}(\vect{a}) = a\sum \frac{1}{||\vect{x}_i - \vect{a}||^3}
\]
Since the gradient is additive, this electric field is also a gradient field with potential function
\[
f(\vect{a})= q \sum \frac{1}{\vect{x}_i - \vect{a}}.
\]
Given this set-up, if $D$ is a collection of particles (possibly infinite) each with charge +1 we define the potential function of the electric field generated by $D$ to be
\[
f(\vect{a}) = \int_D \frac{1}{||\vect{x} - \vect{a}||}
\]
where the integration is performed with respect to $\vect{x}$.
Here is a specific example. Suppose that $D$ is the line segment $[-r, r]$ on the $y$--axis in $\R^2$. How much work is required to move a charged particle $Q$ from a point $\vect{a}= (a,0)$ on the positive $x$ axis to a point $\vect{b} = (b,0)$ on the positive $x$ axis, by a path with positive $x$--coordinates.
The work is the line integral of the electric field along the path taken by $Q$. By the lemma above, we need only use the potential function to find that the work is:
\[
\int_D \frac{1}{||\vect{x} - \vect{b}||} \thinspace ds - \int_D \frac{1}{||\vect{x} - \vect{a}||} \thinspace ds.
\]
To solve this, let $\vect{x}(t) = (0,t)$ for $-r \leq t \leq r$ be a parameterization of $D$. Then the expression above equals
\[
\int_{-r}^r \frac{1}{\sqrt{t^2 + b^2}} - \frac{1}{\sqrt{t^2 + a^2}} \thinspace dt.
\]
\newpage
\section{The Fundamental Theorem of Calculus Revisited}
\subsubsection{Another view of the FTC}
Let $I = [a,b]$ be an interval (oriented from $a$ to $b$) If $F\co I \to \R$ is a differentiable function, then you learn in one variable calculus that
\[
\int_I \frac{d}{dt} F(t) \thinspace dt = F(b) - F(a).
\]
To generalize this theorem to higher dimensions we introduce some new terminology.
\textbf{Terminology 1:} If $p \in \R$ is a point, then say that $p$ has ``positive orientation'' if we place an arrow on it pointing to the right. The point $p$ has ``negative orientation'' if we put an arrow on it pointing to the left. If we have chosen an orientation for $p$, we say that $p$ is oriented. If $A$ is a finite subset of $\R$ and if each point in $A$ has been given an orientation (not necessarily the same), we say that $A$ is oriented.
\textbf{Terminology 2:} Suppose that $p \in \R$ is an oriented point and that $f \co \R \to \R$ is a function. If $p$ has positive orientation, define $\int_p f = f(p)$. If $p$ has negative orientation, define $\int_p f = -f(p)$. If $A = \{p_1, \hdots, p_n\}$ is a finite set of oriented points in $\R$, define $\int_A = \sum_{i = 1}^n \int_{p_i} f$.
\textbf{Terminology 3:} Suppose that $a < b$ are real numbers. The interval $[a,b]$ is positively oriented and the interval $[b a]$ is negatively oriented. (Think of an arrow running from the small number $a$ to the big number $b$. If the arrow points right, the interval is positively oriented; if it points left it is negatively oriented.) If $I$ is an interval in $\R$ with endpoints $a < b$, then the ``boundary'' of $I$, denoted $\boundary I$, is the set $\{a,b\}$. If $I$ has positive orientation, we assign the points of $\boundary I$ the orientation with arrows pointing out of $I$. If $I$ has negative orientation, we assign the points of $\boundary I$, the orientations with arrows pointing into $I$. We say that $\boundary I$ has the orientation ``induced'' by the orientation from $I$.
Suppose that $I = [a,b]$ has positive orientation (i.e. $a < b$). Let $J = [b,a]$ be the same interval but with the opposite orientation. If $f \co \R \to \R$ is integrable, then by definition \[ \int_{I} f = \int_a^b f(x)\thinspace dx \hspace{.2in} \text{ and } \hspace{.2in} \int_{J} f = \int_b^a f(x) \thinspace dx = -\int_{I} f.\]
The fundamental theorem of calculus can then be stated as
\framebox[0.95\linewidth]{
\begin{minipage}{0.9\linewidth}
\begin{theorem}[Fundamental Theorem of Calculus]
Suppose that $F \co \R \to \R$ is a $C^1$ function. Let $DF \co \R \to \R$ be its derivative. Let $I \subset \R$ be an oriented interval and give $\boundary I$ the induced orientation. Then
\[
\int_I DF = \int_{\boundary I} F.
\]
\end{theorem}
\end{minipage}
}
\subsubsection{Returning to main lecture}
We will construct a version of the fundamental theorem of Calculus in 2-dimensions. It will have the form:
\begin{theorem*}[Vaguely Stated Version of Green's Theorem]
Let $D$ be a region in $\R^2$. Let $\vect{F}\co D \to \R^2$ be a $C^1$ vector field on $D$. Then:
\[
\iint \limits_D \text{ ``a derivative'' of } \vect{F} \thinspace dA = \int_{\boundary D} \vect{F}\cdot d\vect{s}
\]
\end{theorem*}
For the left side of the equation to make sense, it turns out that we need a derivative of $\vect{F}$ which is a \textit{scalar} function. Perhaps the idea of using $\diver \vect{F}$ appeals to you? Well, there is a version of the theorem which will use $\diver \vect{F}$, but for this version we'll use an adaptation of the curl. (Recall that $\curl \vect{F} = \nabla \times \vect{F}$.
\begin{theorem*}[Less Vaguely Stated Version of Green's Theorem]
Let $D$ be a region in $\R^2$. Let $\vect{F}\co D \to \R^2$ be a $C^1$ vector field on $D$ Then:
\[
\iint \limits_D (\curl \vect{F})\cdot \vect{k} \thinspace dA = \int_{\boundary D} \vect{F} \cdot d\vect{s}.
\]
\end{theorem*}
To get the precise version of Green's theorem we need to discuss what sort of regions $D$ are allowed and what $\boundary D$ means. We also need to review double integration.
\newpage
\section{Double Integration and Iterated Integrals}
\subsection{Integrals over Rectangles}
Suppose that $R = [a,b] \times [c,d]$ is a rectangle in $\R^2$. Let $f\co R \to \R$ be a function.
\begin{center}
\scalebox{0.5}{\input{Rectangle.eps_t}}
\end{center}
Partition $R$ into $n$ subrectangles each of area less than $\Delta A$ and in each subrectangle choose a sample point. Call the $i$th rectangle $R_i$ and the sample point in it $\vect{c}_i$. Let $\Delta A_i$ be the area of the $i$th subrectangle.
\begin{center}
\scalebox{0.5}{\input{SubRectangle.eps_t}}
\end{center}
The integral of $f$ over $R$ is defined as
\[
\iint\limits_R f \thinspace dA = \lim\limits_{\Delta A \to 0} \sum f(\vect{c_i}) \thinspace \Delta A_i
\]
if the limit exists.
Informally, the double integral is approximated by the sum of sample values of $f$ on the rectangle taken from the partition of $R$ into small rectangles. Naturally, we want to know if the double integral exists.
\begin{theorem}
Suppose that $R \subset \R^2$ is a rectangle and that $f\co R \to \R^2$ is a bounded function. If the set of discontinuities of $f$ has 0 area, then $\iint\limits_R f \thinspace dA$ exists.
\end{theorem}
Of course, this raises the question, ``What is area?'', but we won't answer that here.
Often we calculate $\iint\limits_R f \thinspace dA$ using the following theorem.
\begin{theorem}[Fubini's Theorem]
Suppose that $R \subset \R^2$ is a rectangle and that $f \co \R^2 \to \R$ is a bounded function. Suppose that the following are true:
\begin{itemize}
\item $\iint\limits_R f \thinspace dA$ exists
\item For all $x \in [a,b]$, the integral $\int_c^d f(x,y) \thinspace dy$ exists.
\item For all $y \in [c,d]$ the integral $\int_a^b f(x,y) \thinspace dx$ exists.
\end{itemize}
Then
\[
\iint\limits_R f \thinspace dA = \int_a^b \int_c^d f(x,y) \thinspace dy \thinspace dx = \int_c^d \int_a^b f(x,y) \thinspace dx \thinspace dy.
\]
\end{theorem}
\hrulefill
\begin{example}
Let $R = [0,1] \times [0,2]$. Let $f(x,y) = x^2 + y^2$. Then by Fubini's theorem
\[
\begin{array}{rcl}
\iint\limits_R f \thinspace dA &=& \int_0^2 \int_0^1 x^2 +y^2 \thinspace dx \thinspace dy \\
&=& \int_0^2 1 + y^2 \thinspace dy \\
&=& 14/3.
\end{array}
\]
\end{example}
\hrulefill
\subsection{Integrals over other regions}
We can also define integrals over regions other than rectangles.
Let $D \subset \R^2$ be a compact 2--dimensional region such that the area of $\boundary D$ is zero. Let $f \co D \to \R$ be a continuous function. We define $\iint_D f \thinspace dA$ as follows.
Let $\wihat{f} \co \R^2 \to \R$ be defined by $\wihat{f}(\vect{x}) = f(\vect{x})$ if $\vect{x} \in D$ and $\wihat{f}(\vect{x}) = 0$ if $\vect{x} \not\in D$. Notice that the set of discontinuities of $\wihat{f}$ is a subset of $\boundary D$ and so the discontinuities of $\wihat{f}$ have 0 area. Thus, if $R$ is any rectangle containing $D$ in its interior, $\iint\limits_R \wihat{f} \thinspace dA$ exists. (Such a rectangle $R$ does exists, since $D$ is bounded.) We \textit{define} $\iint\limits_D f \thinspace dA = \iint\limits_R \wihat{f} \thinspace dA$.
If $D \subset \R^2$ is an open region, we can define an \textit{improper} integral $\iint\limits_D f \thinspace dA$. For each $n$, let $C_n \subset D$ be a compact subset such that $\boundary C_n$ has zero area. Choose the sets $C_n$ so that for all $n$, $C_n \subset C_{n+1}$ and $D = \bigcup_n C_n$. (That is, the sets are nested and every point of $D$ is contained in some $C_n$. Then define
\[
\iint\limits_D f \thinspace dA = \lim\limits{n \to \infty} \iint\limits_{C_n} f \thinspace dA
\]
if the limit exists.
If $D$ is a compact, 2--dimensional region the set $D - \boundary D$ is open. We can ask if the integral $\iint\limits_D f \thinspace dA$ is equal to the improper integral $\iint \limits_{D - \boundary D} f \thinspace dA$. It turns out that if both integrals exist, then they are equal. It is possible for the improper integral to exist when the proper integral does not.
\subsection{Elementary Regions}
Before returning to Green's theorem, we introduce the concept of ``elementary region" and discuss iterated integrals over elementary region.
We say that a set $D \subset \R^2$ is a \defn{Type I region} (or ``vertically convex'') if there are continuous functions $\gamma$ and $\delta$ so that
\[
D = \Big\{(x,y) : a \leq x \leq b \text{ and } \gamma(x) \leq y \leq \delta(x) \}
\]
Here is an example:
\begin{center}
\scalebox{0.5}{\input{Type1.eps_t}}
\end{center}
We say that a set $D \subset \R^2$ is a \defn{Type II region} (or ``horizontally convex'') if there are continuous functions $\alpha$ and $\beta$ so that
\[
D = \Big\{(x,y) : c \leq y \leq d \text{ and } \alpha(y) \leq x \leq \beta(y) \}
\]
Here is an example:
\begin{center}
\scalebox{0.5}{\input{Type2.eps_t}}
\end{center}
Finally, a \defn{Type III} region is a region that is of both Type I and Type II. Here is an example:
\begin{center}
\scalebox{0.5}{\input{Type3.eps_t}}
\end{center}
A region that is of Type I, II, or III is called an \defn{elementary region}.
If $D$ is an elementary region and if $f\co D \to \R$ is a continuous function, by Fubini's theorem we can write:
\[
\begin{array}{rcll}
\iint\limits_D f \thinspace dA &=& \int_a^b \int_{\gamma(x)}^{\delta(x)} f \thinspace dy \thinspace dx & \text{ if } D \text{ is of Type I}.\\
\iint\limits_D f \thinspace dA &=& \int_c^d \int_{\alpha(y)}^{\beta(y)} f \thinspace dy \thinspace dx & \text{ if } D \text{ is of Type II}.\\
\end{array}
\]
\hrulefill
\begin{example}
Consider the region $D$ between the graphs of $y = (x-1)^2$ and $y=-(x-1)^2 + 2$. (See below.) Let $f(x,y) = xy$. Compute $\iint_D f \thinspace dA$.
\begin{center}
\includegraphics[scale=0.4]{IteratedIntegralRegion}
\end{center}
\textbf{Answer:} By Fubini's theorem, we have
\[
\iint\limits_D f \thinspace dA = \int_0^2 \int_{-(x-1)^2 + 2}^{(x-1)^2} xy \thinspace dy \thinspace dx.
\]
This iterated integral can be easily solved by a computer.
\end{example}
\hrulefill
\newpage
\section{Green's Theorem}
For this section, let $D \subset \R^2$ be a closed bounded region with $\boundary D$ a collection of piecewise smooth simple closed curves.
\begin{theorem}[Green's Theorem]
Let $D$ be as above. Orient $\boundary D$ so that $D$ is on the left as $\boundary D$ is traversed. (Equivalently, $\vect{N}$ points into $D$.) Let $\vect{F}\co D \to \R^2$ be a C$^1$ vector field on $D$. Then,
\[
\int_{\boundary D} \vect{F}\cdot d\vect{s} = \iint\limits_D (\curl \vect{F}) \cdot \begin{pmatrix}0\\0\\1\end{pmatrix} \thinspace dA.
\]
\end{theorem}
If we write $\vect{F}(x,y) = M(x,y)\vect{i} + N(x,y)\vect{j}$, then the conclusion of Green's theorem can be written as:
\[
\int_{\boundary D} M\thinspace dx + N \thinspace dy = \iint\limits_D \left( \frac{\partial N}{\partial x} - \frac{\partial M}{\partial y} \right) \thinspace dA.
\]
Before proving (part of) Green's theorem, we'll look at some examples.
\subsection{Examples relevant to Green's Theorem}
\begin{example} For this example, let $D \subset \R^2$be the solid square with corners $(1,-1)$, $(1,1)$, $(-1,1)$, and $(-1,-1)$. We will need a parameterization of $\boundary D$. Since $\boundary D$ is made up of 4 line segments, we can parameterize them as follows. For each of them $0 \leq t \leq 1$.
\[\begin{array}{rcl}
L_1(t) &=& (1,2t - 1)\\
L_2(t) &=& (1- 2t, 1)\\
L_3(t) &=& (-1, 1 - 2t)\\
L_4(t) &=& (2t - 1, -1)\\
\end{array}\]
We will also need the derivatives:
\[\begin{array}{rcl}
L'_1(t) &=& (0,2)\\
L'_2(t) &=& (-2,0)\\
L'_3(t) &=& (0,-2)\\
L'_4(t) &=& (2,0)\\
\end{array}\]
\textbf{Example 1a:} Let $\vect{F}(x,y) = (-x,y)$.
\textbf{Example 1a.i:} Compute $\int_{\boundary D} \vect{F} \cdot d\vect{s}$.
\textbf{Answer:} We have:
\[
\begin{array}{rcl}
\int_{\boundary D}\vect{F}\cdot d\vect{s} &=& \int_0^1 \vect{F}(L_1(t))\cdot L'_1(t) \thinspace dt + \int_0^1 \vect{F}(L_2(t))\cdot L'_2(t) \thinspace dt + \\
&& \int_0^1 \vect{F}(L_3(t))\cdot L'_3(t) \thinspace dt + \int_0^1 \vect{F}(L_4(t))\cdot L'_4(t) \thinspace dt\\
&=& \int_0^1 \begin{pmatrix} - 1 \\ 2t - 1 \end{pmatrix} \cdot \begin{pmatrix} 0 \\ 2 \end{pmatrix} +
\begin{pmatrix} 2t - 1 \\ 1 \end{pmatrix} \cdot \begin{pmatrix} -2 \\ 0 \end{pmatrix} +
\begin{pmatrix} 1 \\ 1 - 2t \end{pmatrix} \cdot \begin{pmatrix} 0 \\ -2 \end{pmatrix} +
\begin{pmatrix} 1 - 2t \\ -1 \end{pmatrix} \cdot \begin{pmatrix} 2 \\ 0 \end{pmatrix} \thinspace dt \\
& = & \int_0^1 2(2t - 1) + (-2)(2t -1) + (-2)(1- 2t) + 2(1- 2t) \thinspace dt\\
&=& 0
\end{array}
\]
\textbf{Example 1a.ii:} Compute $\iint\limits_D (\curl \vect{F})\cdot \vect{k} \thinspace dA$.
\textbf{Answer:} We have \[\curl \vect{F} \cdot \vect{k} = \frac{\partial (y)}{\partial x} - \frac{\partial (-x)}{\partial y} = 0.\]
Thus, $\iint\limits_D \curl\vect{F} \cdot \vect{k} \thinspace dA = \iint\limits_D 0 \thinspace dA = 0$. Notice that this matches the answer from Example 1a.i, as predicted by Green's theorem.
\textbf{Example 1b:} Let $\vect{F}(x,y) = (-y,x)$.
\textbf{Example 1b.i} Compute $\int_{\boundary D} \vect{F} \cdot d\vect{s}$.
\textbf{Answer:} We have:
\[
\begin{array}{rcl}
\int_{\boundary D}\vect{F}\cdot d\vect{s} &=& \int_0^1 \vect{F}(L_1(t))\cdot L'_1(t) \thinspace dt + \int_0^1 \vect{F}(L_2(t))\cdot L'_2(t) \thinspace dt + \\
&&\int_0^1 \vect{F}(L_3(t))\cdot L'_3(t) \thinspace dt + \int_0^1 \vect{F}(L_4(t))\cdot L'_4(t) \thinspace dt\\
&=& \int_0^1 \begin{pmatrix} 1 - 2t \\ 1 \end{pmatrix} \cdot \begin{pmatrix} 0 \\ 2 \end{pmatrix} +
\begin{pmatrix} -1 \\ 1 - 2t\end{pmatrix} \cdot \begin{pmatrix} -2 \\ 0 \end{pmatrix} +
\begin{pmatrix} 2t - 1 \\ -1 \end{pmatrix} \cdot \begin{pmatrix} 0 \\ -2 \end{pmatrix} +
\begin{pmatrix} 1 \\ 2t - 1 \end{pmatrix} \cdot \begin{pmatrix} 2 \\ 0 \end{pmatrix} \thinspace dt \\
& = & \int_0^1 2 + 2 + 2 + 2\thinspace dt\\
&=& 8
\end{array}
\]
\textbf{Example 1b.ii} Compute $\iint\limits_D (\curl \vect{F})\cdot \vect{k} \thinspace dA$.
In this case, $\curl \vect{F} \cdot \vect{k} = 2$. Thus,
\[
\iint \limits_D \curl \vect{F} \cdot \vect{k} \thinspace dA = \int_{-1}^1 \int_{-1}^1 2 \thinspace dA = 8.
\]
Notice that this is the same as in Example 1b.i as predicted by Green's theorem.
\end{example}
\begin{example}
Let $\vect{F}(x,y) = (\sin x, \ln(1 + y^2))$. Let $C$ be a simple closed curve which is made up of 24 line segments in a star shape. Compute $\int_C \vect{F} \thinspace d\vect{s}$.
\textbf{Answer:} Let $D$ be the region bounded by $C$. Notice that $\curl \vect{F} = \vect{0}$, so $\iint\limits_D \curl \vect{F} \cdot \vect{k} \thinspace dA = 0$. By Green's theorem, this is also the answer to the requested integral.
\end{example}
\begin{example}
Let $\phi(t)= \begin{pmatrix}\cos t \sin (3t) \\ \sin t \cos (3t) \end{pmatrix}$ for $0 \leq t \leq \pi/2$. Find the area of the region $D$ enclosed by $\phi$.
\textbf{Answer:} Notice that $\phi$ travels clock-wise around $D$, we need it to go counter-clockwise to use Green's theorem. Changing the direction that $\phi$ travels, changes the sign of a path integral of a vector field. Thus, by Green's theorem, the area of $D$ is given by
\[
\iint_D 1 \thinspace dA = -\int_\phi \vect{F} \cdot d\vect{s},
\]
where $\vect{F}$ is a vector field having the property that $\curl \vect{F} = (0,0,1)$. The vector field: $\vect{F}(x,y) = \frac{1}{2}(-y,x)$ has that property. Thus,
\[
\begin{array}{rcl}
\iint_D 1 \thinspace dA &=& -\int_\phi \vect{F} \cdot d\vect{s}\\
&=& -(1/2) \int_0^{\pi/2} (-\sin t \cos 3 t, \cos t \sin 3t)\cdot \phi'(t) \thinspace dt \\
&=& -(1/2) \int_0^{\pi/2} \cos 3t \sin 3t - 3\sin t\cos t \thinspace dt\\
&=& -(1/2) \int_0^{\pi/2} \sin(6t)/2 - 3\sin(2t)/2 \thinspace dt\\
&=& -(1/2)(1/6 - 3/2)\\
&=& 2/3.
\end{array}
\]
\end{example}
\newpage
\section{Proof of Green's Theorem}
No typed notes available.
\section{When is a field conservative?}
So far we know two theorems about conservative vector fields:
\begin{theorem}\label{Consv -> Curl}
Suppose that $D \subset \R^3$ is open. If $\vect{F}\co D \to \R^3$ is $C^1$ and conservative, then $\curl \vect{F}(\vect{x}) = \vect{0}$ for all $\vect{x} \in D$.
\end{theorem}
If $D \subset \R^n$ is open and if $\vect{F}$ is a $C^1$ vector field on $D$, we say that $\vect{F}$ has \defn{path independent line integrals on} $D$ if whenever $\phi_1$ and $\phi_2$ are two $C^1$ paths with the same endpoints and oriented in the same direction, then
\[\int_{\phi_1} \vect{F}\cdot d\vect{s} = \int_{\phi_2} \vect{F}\cdot d\vect{s}.\]
\begin{theorem}\label{Consv -> PI}
Suppose that $D \subset \R^n$ is open and that $\vect{F}$ is a $C^1$ conservative gradient field on $D$. Then $\vect{F}$ has path independent line integrals on $D$. In fact, if $\phi$ joins point $\vect{a}$ to $\vect{b}$ and if $f$ is a potential function of $\vect{F}$, then $\int_\phi \vect{F}\cdot d\vect{s} = f(\vect{b}) - f(\vect{a})$.
\end{theorem}
We set about showing some partial converses of these theorems. This will allow us to develop a good criterion for determining if a vector field on $\R^2$ is conservative.
In Calc I, you learn that if $f\co [a,b] \to \R$ is a continuous function, then $F(x) = \int_a^x f(t) \thinspace dt$ will always be an antiderivative of $f(x)$. The next theorem generalizes this to vector fields.
\begin{theorem}\label{PI -> Consv}
Suppose that $D \subset \R^n$ and that $\vect{F} \co D \to \R^n$ is a C$^1$ vector field. If $\vect{F}$ has path independent line integrals on $D$ then $\vect{F}$ is conservative.
\end{theorem}
\begin{proof}
We need to define a C$^2$ potential function $f\co D \to \R^2$ for $\vect{F}$. To that end, let $\vect{a} \in D$, be considered as a basepoint. If $\vect{x} \in D$, choose a path $\phi$ joining $\vect{a}$ to $\vect{x}$ and define $f(\vect{x}) = \int_\phi \vect{F}\cdot d\vect{s}$. Notice that definition of $f$ requires that the path $\phi$ be chosen, but that the choice does not matter -- any two paths will give the same answer, by our hypothesis.
We need to show that $f$ is differentiable and that $\nabla f = \vect{F}$. Since $D$ is open, there exists an open disc centered at $\vect{x}$ and contained in $D$. Let $\vect{x} + \vect{h}$ be a vector in this disc. Let $h = ||\vect{h}||$. Let $\phi$ be a path from $\vect{a}$ to $\vect{x}$ and let $\psi$ be a straight line path in $D$ from $\vect{x}$ to $\vect{x } + \vect{h}$. Then:
\[\begin{array}{rc}
\frac{1}{h}(f(\vect{x} + \vect{h}) - f(\vect{x}) &=\\
\frac{1}{h}\left(\int_{\phi} \vect{F} \cdot d\vect{s} + \int_\psi \vect{F} \vl - \int_\phi \vect{F} \vl \right) &=\\
\frac{1}{h} \int_\psi \vect{F} \vl &\\
\end{array}
\]
Since $\psi$ is a straight line path, we may assume that $\psi(t) =\vect{x} + t\vect{h}$ so that $\psi'(t) = \vect{h}$. Then,
\[
\frac{1}{h} \int_\psi \vect{F} \vl = \frac{1}{h} \int_0^1 \vect{F}(\psi(t))\cdot \vect{h} \thinspace dt.
\]
Write $\vect{h} = h\vect{u}$ with $\vect{u}$ a unit vector. Then
\[\begin{array}{rc}
\frac{1}{h} \int_\psi \vect{F} \vl &=\\
\frac{1}{h} \int_0^1 \vect{F}(\psi(t))\cdot (h\vect{u})\thinspace dt &=\\
\int_0^1 \vect{F}(\psi(t))\cdot \vect{u} \thinspace dt &=
\end{array}
\]
When $h$ is very small, $\vect{F}(\psi(t)) \approx \vect{F}(x)$ with the approximation improving as $\vect{h} \to \vect{0}$. Thus, if $\vect{u}$ is constant, we have the directional derivative of $f$ in the $u$ direction as:
\[
\lim_{h \to 0} \frac{1}{h}(f(\vect{x} + \vect{h}) - f(\vect{x})) = \vect{F}(\vect{x})\cdot \vect{u}
\]
By making wise choices of $\vect{h}$, we see that $\frac{\partial f}{\partial x} = \vect{F} \cdot \vect{i}$ and $\frac{\partial f}{\partial y} = \vect{F} \cdot \vect{j}$. Consequently, $\nabla f = \vect{F}$. Furthermore, because $\vect{F}$ is C$^1$, $f$ is differentiable and is C$^2$.
\end{proof}
It may be difficult to imagine why the previous theorem is useful, since it seems impossible to check the integral of a vector field over \textit{all} paths joining two points. However, the next theorem shows that, in fact, path-independence can be useful.
A region $D \subseteq \R^2$ is \defn{simply connected} if it is connected (i.e. consists of one piece) and if each loop in $D$ can be continuously shrunk to a point all the while remaining in $D$ (that is, $D$ has ``no holes'').
\begin{theorem}\label{curl -> PI}
Suppose that $D \subseteq \R^2$ is simply connected and that $\vect{F}\co D \to \R^2$ is a C$^1$ vector field. If $\curl \vect{F}(x,y) = \vect{0}$ for all $(x,y) \in D$, then $\vect{F}$ has path independent line integrals on $D$.
\end{theorem}
\begin{proof}[Proof Sketch]
We assume by hypothesis that $\curl \vect{F} = \vect{0}$. Let $\phi_1$ and $\phi_2$ be two paths which join $A$ to $B$. For simplicity, assume that the paths do not intersect except at $A$ and $B$. Then the images of $\phi_1$ and $\phi_2$ form the boundary of a region $E \subseteq D$ since $D$ is simply connected. Giving the boundary the correct orientation amounts to traversing one of $\phi_1$ and $\phi_2$ in the given direction and traversing the other in the reverse direction. Thus, by Green's theorem:
\[
\int_{\phi_1} \vect{F}\cdot d\vect{s} - \int_{\phi_2} \vect{F}\cdot d\vect{s} = \pm \int_{\boundary E} \vect{F}\cdot d\vect{s} = \iint\limits_E \curl \vect{F} \cdot \vect{k} \thinspace dA.
\]
By our initial hypothesis that $\curl \vect{F} = \vect{0}$, we have shown that this last integral is 0. Consequently, the line integrals over $\phi_1$ and over $\phi_2$ have the same values.
\end{proof}
For vector fields defined on regions in $\R^2$ we put all these results together to obtain:
\begin{theorem}[Poincar\'e]
Let $D \subset \R^2$ be simply connected, and let $\vect{F}\co D\to \R^2$ be a C$^1$ vector field. Then, the following are equivalent:
\begin{enumerate}
\item $\vect{F}$ is conservative.
\item $\vect{F}$ has path independent line integrals on $D$
\item $\curl \vect{F} = \vect{0}$.
\end{enumerate}
\end{theorem}
\begin{proof}
\textbf{(1) $\Rightarrow$ (3)}
This is Theorem \ref{Consv -> Curl}.
\textbf{(3) $\Rightarrow$ (2)}
This is Theorem \ref{curl -> PI}.
\textbf{(2) $\Rightarrow$ (1)}
This is Theorem \ref{PI -> Consv}.
\end{proof}
\newpage
\subsection{Surface Area of a Smooth Parameterized Surface}
\subsection{Reparameterizations}
\begin{definition}
Suppose that $D$ and $E$ are 2-dimensional regions in $\R^2$ with $C^1$ boundary. Let $h\co E \to D$ be a function such that:
\begin{enumerate}
\spacing
\item $h$ is a surjection.
\item except on a finite set of points, $h$ is $C^1$
\item Let $\mc{P}$ be the set of points such that the determinant of the derivative of $h$ is 0. If $\mc{P}$ is infinite, then $\mc{P} \subset \boundary E$.
\end{enumerate}
Then we say that $h$ is a \defn{change of coordinates} function.
\end{definition}
\begin{example}
Let $D$ be the disc $0 \leq s^2 + t^2 \leq 4$ in the $s-t$ plane. Let $E$ be the rectangle $[0,2\pi] \times [0,2]$ in the $u-v$ plane. Define:
\[
\begin{pmatrix} s \\ t \end{pmatrix} = h(u,v) = \begin{pmatrix} v \cos u \\ v\sin u \end{pmatrix}.
\]
\textbf{Claim:} $h$ is a change of coordinates function.
Clearly, $h$ is a surjection and $h$ is C$^1$. Notice that:
\[
Dh(u,v) = \begin{pmatrix} -v\sin u & \cos u \\ v\cos u & \sin u \end{pmatrix}.
\]
Thus, $\det Dh(u,v) = -v$. As long as $v > 0$, $\det Dh(u,v) \neq 0$. The set $\mc{P} = \{(0,v)\}$ lies in $\boundary E$. Thus, $h$ is a change of coordinates function.
\end{example}
\begin{lemma}
Suppose that $E$ is connected and that $h\co E \to D$ is a change of coordinates function. If $\vect{x}_1$ and $\vect{x}_2$ are points in $E$ at which $h$ is C$^1$ and with $\det Dh(\vect{x}_1) \neq 0$ and $\det Dh(\vect{x}_2) \neq 0$, then either both $\det Dh(\vect{x}_1)$ and $\det Dh(\vect{x}_2)$ are positive, or both are negative.
\end{lemma}
\begin{proof}
Let $\mc{P}$ be the set of points at which either $h$ is not C$^1$ or at which $\det Dh$ is zero. By our hypotheses on $\mc{P}$ and the fact that $E$ is connected, there is a continuous path in $E - \mc{P}$ joining $\vect{x}_1$ to $\vect{x}_2$. Since $h$ is C$^1$ on $E - \mc{P}$, $\det Dh$ varies continuously along the path. Since the path misses the places where $\det Dh(u,v)= 0$, $\det Dh(\vect{x}_1)$ and $\det Dh(\vect{x}_2)$ are both positive or both negative.
\end{proof}
\begin{definition}
If $h\co E \to D$ is a change of coordinates function, and if $E$ is connected then $h$ is \defn{orientation preserving} if $\det Dh > 0$ on all points where $\det Dh$ is defined and non-zero. Otherwise, $h$ is \defn{orientation reversing}.
\end{definition}
\begin{definition}
Suppose that $\vect{X}\co D \to\R^3$ is a surface and that $\vect{Y} \co E \to \R^3$ is a surface such that there exists a change of coordinates function $h \co E \to D$ with $\vect{Y} = \vect{X} \circ h$. Then $\vect{Y}$ is a reparameterization of $\vect{X}$.
\end{definition}
\begin{example}
Let $\vect{X}(s,t) = \begin{pmatrix}s \\ t \\ s^2 + t^2 \end{pmatrix}$ for $0 \leq s^2 + t^2 \leq 4$. Let $\vect{Y}(u,v) = \begin{pmatrix} v\cos u \\ v \sin u \\ v^2 \end{pmatrix}$. Notice that $\vect{X}$ and $\vect{Y}$ are parameterizations of the same paraboloid. Define $h(u,v) = \begin{pmatrix} v\cos u \\ v \sin u \end{pmatrix}$. Then $\vect{Y}$ is a reparameterization of $\vect{X}$ by an orientation reversing change of coordinates.
\end{example}
\begin{lemma}
Suppose that $\vect{X} \co D \to\R^3$ and that $h\co E \to D$ is a change of coordinates function. Let $\vect{Y} = \vect{X} \circ h$. Let $\vect{N}_\vect{X}$ and $\vect{N}_\vect{Y}$ be the normal vectors of $\vect{X}$ and $\vect{Y}$ respectively. Then,
\[
\vect{N}_{\vect{Y}}(u,v) = (\det Dh(u,v))\vect{N}_\vect{X}(h(u,v)).
\]
\end{lemma}
\begin{proof}
We simply provide a sketch for those who have taken Linear Algebra. The book provides a different method.
Let $S = \vect{X}(D) = \vect{Y}(E)$. Assume that both $\vect{X}$ and $\vect{Y}$ are smooth, so that there exists a tangent plane $TS_\vect{p}$ to $S$ at $\vect{p} = \vect{X}(s,t) = \vect{Y}(u,v)$. Assume that coordinates on $\R^3$ have been chosen so that $TS_\vect{p}$ is the $xy$-plane in $\R^3$.
We think of $TS(u,v)$ as lying in the tangent space $T_\vect{p}$ in $\R^3$ at $\vect{p}$. Since both $\vect{X}$ and $\vect{Y}$ are smooth, the sets of vectors $\{\vect{T}_s, \vect{T}_t\}$ and $\{\vect{T}_u, \vect{T}_v\}$ are each a basis for $TS_\vect{p}$. Identifying $TS_\vect{p}$ with both the $s-t$ plane and with the $u-v$ plane.
By the chain rule,
\[
D\vect{Y}(u,v) = D\vect{X}(h(u,v))Dh(u,v).
\]
We have
\[\begin{array}{rcl}
D\vect{Y}(u,v) &=& \begin{pmatrix} \vect{T}_u (u,v)& \vect{T}_v (u,v)\end{pmatrix}\\
D\vect{X}(h(u,v)) &=& \begin{pmatrix} \vect{T}_s (h(u,v))& \vect{T}_t (h(u,v))\end{pmatrix}\\
\end{array}
\]
Recall that the absolute value of the determinant of a $2 \times 2$ matrix is the area of the parallelogram formed by its column vectors. Recall also that determinant is multiplicative. Thus, by taking determinants and absolute values we get:
\[\begin{array}{rcl}
\text{( Area of parallelogram formed by } \vect{T}_u (u,v) \text{ and } \vect{T}_v(u,v) \text{ )} &= & \text{( Area of parallelogram formed by } \vect{T}_s (h(u,v)) \text{ and } \vect{T}_t(h(u,v)) \text{ )} |\det Dh(u,v)|\\
||\vect{N}_\vect{Y}(u,,v)|| &=& ||\vect{N}_\vect{X}(h(u,v))|| \thinspace |\det Dh(u,v)|.
\end{array}
\]
Since we have arranged that $TS_\vect{p}$ is the $xy$-plane, both $\vect{N}_\vect{Y}(u,v)$ and $\vect{N}_\vect{X}$ point in the $\pm \vect{k}$ direction. That is:
\[\begin{array}{rcl}
\vect{N}_\vect{Y}(u,,v) &=& \begin{pmatrix} 0 \\ 0 \\ \det D\vect{Y}(u,v) \end{pmatrix} \\
&&\\
\vect{N}_\vect{X}(h(u,v)) &=& \begin{pmatrix} 0 \\ 0 \\ \det D\vect{X}(h(u,v))\end{pmatrix}
\end{array}\]
Since, $\det D\vect{Y}(u,v)= \det D\vect{X}(h(u,v)) \det Dh(u,v)$,
the result follows.
\end{proof}
Thus, if $\vect{X}$ and $\vect{Y}$ are both smooth and connected surfaces and if $\vect{Y}$ is a reparameterization of $\vect{X}$ by a change of coordinates function $h$, then $\vect{Y}$ has the same normal orientation as $\vect{X}$ if and only if there exists a point $(u,v)$ with $\det Dh(u,v) >0$.
\begin{example}
Let $\vect{X}(s,t) = \begin{pmatrix}s \\ t \\ s^2 + t^2 \end{pmatrix}$ for $0 \leq s^2 + t^2 \leq 4$. Let $\vect{Y}(u,v) = \begin{pmatrix} v\cos u \\ v \sin u \\ v^2 \end{pmatrix}$. Notice that $\vect{X}$ and $\vect{Y}$ are parameterizations of the same paraboloid. Define $h(u,v) = \begin{pmatrix} v\cos u \\ v \sin u \end{pmatrix}$. Notice that $\vect{Y} = \vect{X} \circ h$ where $h(u,v) = (v\cos u, v\sin u)$.
Calculations show that:
\[ \begin{array}{rcl}
\vect{N}_\vect{X} &= & \begin{pmatrix} -2s \\ -2 t\\ 1 \end{pmatrix} \\
&&\\
\vect{N}_\vect{Y} & = & \begin{pmatrix} 2v^2 \cos u \\ 2v^2 \sin u \\ - v \end{pmatrix}
\end{array}\]
Recalling that $\det Dh(u,v) = -v$, we see that the lemma gives us the same relationship between $\vect{N}_\vect{X}$ and $\vect{N}_\vect{Y}$.
\end{example}
\subsection{Surface Integrals: Definitions and Calculations}
Suppose that $\vect{X}\co D \to \R^3$ is a smooth surface. Suppose that $f \co \vect{X}(D) \to \R$ and $f \co \vect{X}(D) \to \R^3$ are C$^1$. Then define:
\[
\begin{array}{rcl}
\iint_{\vect{X}} \vect{F} \cdot \thinspace d\vect{S} &=& \iint\limits_D (\vect{F} \circ \vect{X})\cdot \vect{N} \thinspace dA \\
\iint_{\vect{X}} f \thinspace dS &=& \iint\limits_D (f \circ \vect{X}) \thinspace ||\vect{N}|| \thinspace dA.
\end{array}
\]
\begin{example}
Let $\vect{Y}(u,v) = \begin{pmatrix} v\cos u \\ v \sin u \\ v^2 \end{pmatrix}$ for $(u,v) \in E$ where $E = [0,2\pi] \times [0,4]$. Let $\vect{F}(x,y,z) = \begin{pmatrix} -y \\ x \\ 0 \end{pmatrix}$. Calculate $\iint_\vect{X} \vect{F}\cdot d\vect{S}$.
Recall that $\vect{N}_\vect{Y} = \begin{pmatrix} 2v^2 \cos u \\ 2v^2 \sin u \\ - v \end{pmatrix}$. Thus,
\[
\begin{array}{rcl}
\iint_\vect{Y} \vect{F} \thinspace d\vect{S}&=& \iint_{E} \vect{F}(\vect{Y}(u,v))\cdot \vect{N}_\vect{Y} \thinspace dA \\
&&\\
&=& \int_0^4 \int_0^{2\pi} \begin{pmatrix} -v\sin u \\ v\cos u \\ 0 \end{pmatrix} \cdot \begin{pmatrix} 2v^2 \cos u \\ 2v^2 \sin u \\ - v \end{pmatrix} \thinspace du\thinspace dv \\
&&\\
&=& \int_0^4 \int_0^{2\pi} 0 \thinspace du \thinspace dv\\
&=& 0.
\end{array}
\]
\end{example}
You may wonder how surface integrals change under reparameterization. The following theorem provides the answer:
\begin{theorem}
Suppose that $\vect{X}$ and $\vect{Y}$ are parameterized connected surfaces and that $\vect{Y}$ is a reparameterization of $\vect{X}$. If the change of coordinate function $h$ is orientation-preserving, let $\epsilon = +1$. If $h$ is orientation reversing, let $\epsilon = -1$. Let $f$ be a C$^1$ scalar field and let $\vect{F}$ be a C$^1$ vector field, both defined in a neighborhood of the image of $\vect{X}$ and $\vect{Y}$. Then:
\[\begin{array}{rcl}
\iint_\vect{Y} f \thinspace dS &= & \iint_\vect{X} f \thinspace dS \\
&&\\
\iint_\vect{Y} \vect{F}\cdot \thinspace d\vect{S} &= & \iint_\vect{X} \vect{F} \cdot \thinspace d\vect{S} \\
\end{array}\]
\end{theorem}
\begin{proof}
We will need the change of variables theorem:
\begin{theorem*}
Suppose that $D$ and $E$ are regions in the $st$ plane and the $uv$ plane respectively and that $h\co E \to D$ is a change of coordinates function. Let $g\co D \to \R$ be C$^1$. Then
\[
\iint_E g \circ h \thinspace |\det Dh(u,v)| du \thinspace dv = \iint_D g \thinspace ds \thinspace dt
\]
\end{theorem*}
Both equations are a rather immediate application of this. We prove only the second, in the case when $h$ is orientation reversing.
\[\begin{array}{rcl}
\iint_\vect{Y} \vect{F} \thinspace d\vect{S} &=& \iint_E (\vect{F} \circ \vect{Y}) \cdot \vect{N}_\vect{Y} \thinspace du \thinspace dv\\
&=& \iint_E ((\vect{F} \circ \vect{X}) \circ h) \cdot (\vect{N}_\vect{X} \cdot h) \thinspace (\det Dh(u,v)) \thinspace du \thinspace dv \\
&=& \iint_D (\vect{F} \circ \vect{X}) \cdot \vect{N}_\vect{X} \thinspace ds \thinspace dt\\
&=& \iint_\vect{X} \vect{F} \cdot d \vect{S}.
\end{array}
\]
The second to last equality comes from an application of the change of variables theorem.
\end{proof}
\section{Flux}
If $\vect{F}\co \R^3 \to \R^3$ is a vector field and if $S \subset \R^3$ is an oriented surface, with normal orientation $\vect{n}$, then the \defn{flux} of $\vect{F}$ across $\vect{S}$ is, by definition, $\iint_\vect{X} \vect{F} \cdot d\vect{S}$, where $\vect{X}$ is any parameterization of $S$, with normal vector $\vect{N}$ pointing in the same direction as $\vect{n}$.
Informally, the flux of $\vect{F}$ across $S$, measures the rate of fluid flow across $S$.
\begin{example}
Let $S$ be the paraboloid which is the graph of $f(x,y) = x^2 + y^2$ for $x^2 + y^2 \leq 4$. Orient $S$. If $\vect{F}(x,y,z) = (-y,x, 0)$, then the flux of $\vect{F}$ across $S$ is 0 since the vector field is tangent to $S$. (Notice that the flow lines for $\vect{F}$ which contain points of $S$, actually lie on $S$.
\end{example}
\begin{example}
Let $S$ be the unit sphere in $\R^3$ with outward pointing normal. Let $\vect{F}(x,y,z) = (x,y,z)$. Then the flux of $\vect{F}$ across $S$ is simply the surface area of $S$ (which is $4\pi/3$) since, at $(x,y,z) \in S$.
To see this, let $\vect{X}\co D \to \R^3$ be a smooth parameterization of $S$ with outward pointing normal vector. Noticing that $||\vect{F}(\vect{X})|| = 1$, we have:
\[\begin{array}{rcl}
\iint_\vect{X} \vect{F} \cdot d\vect{S} &=& \iint_D \vect{F}(\vect{X}) \cdot \vect{N} \thinspace ds \thinspace dt\\
&=& \iint_D \left(\vect{F}(\vect{X})\cdot \frac{\vect{N}}{||\vect{N}||}\right) \thinspace ||\vect{N}|| \thinspace ds \thinspace dt\\
&=& \iint_D ||\vect{F}(\vect{X})|| ||\vect{N}|| \thinspace ds \thinspace dt\\
&=& \iint_D ||\vect{N}|| \thinspace ds \thinspace dt\\
&=& \iint_\vect{X} dS \\
\end{array}
\]
and this last expression is the surface area of $S$.
\end{example}
This last example can be generalized to:
\begin{theorem}
Suppose that $S$ is a compact surface in $\R^3$ and that $\vect{F}$ is a non-zero $C^1$ vector field defined in a neighborhood of $S$ such that for each $(x,y,z)\in S$, $\vect{F}(x,y,z)$ is perpindicular to $S$. If $||\vect{F}(x,y,z)|| > 0$ for all $(x,y,z) \in S$, then the flux of $\vect{F}$ across $S$ is simply $\pm \iint_S ||\vect{F}|| \thinspace dS$.
\end{theorem}
\begin{example}
Suppose that a thin sphere of radius 1 centered at the origin is given a constant $+1$ charge. Then the sphere generates an electric field given by:
\[
\vect{E}(a,b,c) = \nabla_{(a,b,c)} \cdot \iint_S f \thinspace dS,
\]
where $f(x,y,z) = \frac{-1}{(a-x)^2 + (b-y)^2 + (c-z)^2}$.
By the theorem, this does not depend on a parameterization for $S$.
\end{example}
\section{Stokes' and Gauss' Theorems}
\begin{definition}
Suppose that $S$ is a piecewise smooth surface which has normal orientation $\vect{n}$ (a unit vector). Let $\gamma$ be a component of $\boundary S$. Orient $\gamma$. We say that $\gamma$ has been oriented consistently with $\vect{n}$ if it is possible to put a little triangle on $\gamma$, give the edges of the triangle arrows circulating in the direction of the orientation of $\gamma$, use the right hand rule and obtain a normal vector pointing in the direction of $\vect{n}$. We also say that $\boundary S$ has been given the orientation induced from the orientation of $\vect{S}$.
\end{definition}
\begin{example}
Suppose that $A \subset \R^3$ is an oriented annulus (i.e. cylinder) with two boundary components. Those boundary components must have opposite orientations.
\end{example}
\begin{theorem}[Stokes' Theorem]
Let $S$ be a compact, oriented, piecewise smooth surface in $\R^3$. Give $\boundary S$ the orientation induced by the orientation of $S$. Let $\vect{F}$ be a C$^1$ vector field defined on an open set containing $S$. Then,
\[
\iint_S (\curl \vect{F}) \cdot d\vect{S} = \int_{\boundary S} \vect{F} \cdot d\vect{s}.
\]
\end{theorem}
\begin{theorem}[Divergence Theorem/Gauss' Theorem]
Let $D$ be a compact solid region in $\R^3$ such that $\boundary D$ consists of piecewise smooth, closed, orientable surfaces. Orient $\boundary D$ with unit normals pointing out of $D$. Suppose that $\vect{F}$ is a C$^1$ vectorfield defined on an open set containing $D$. Then:
\[
\iiint\limits_{D} \diver \vect{F} \cdot d\vect{S} =\iint\limits_{\boundary D} \vect{F}\cdot d\vect{S}
\]
\end{theorem}
\subsection{Gravity}
Suppose that for each point $\vect{x} \in \R^3$, there is a point mass $\rho(\vect{x})$. Then the gravitational field exerted by $\vect{x}$ is:
\[
\vect{F}(\vect{r}) = (G\rho(\vect{x}))\frac{\vect{x} - \vect{r}}{||\vect{x} - \vect{r}||^3}.
\]
where $G$ is the gravitational constant. It is easy to check that the divergence of $\vect{F}$ with respect to $\vect{r}$ (denoted $\nabla_{\vect{r}}\cdot \vect{F}$ is 0.
Fundamental to the study of gravitation is:
\begin{theorem}[Gauss' Law]
Let $V$ be a 3--dimensional region. The flux of the gravitational field exerted by $V$ across $\boundary V$ is:
\[
\iint_{\boundary V} \vect{F}\cdot d\vect{S} = -4\pi G \iiint_{V} \rho \thinspace dV
\]
\end{theorem}
\begin{proof}
\textbf{Case 1:} There exists a point $\vect{x} \in V$ with $\rho(\vect{x}) \neq 0$ and all other points in $V$ have zero mass. Let $S$ be a small sphere of radius $a$ enclosing $\vect{x}$ contained inside $V$. then
\[\begin{array}{rcl}
\iint_{S_a} \vect{F}\cdot d\vect{S} &=& \iint_{S_a} \vect{F}\cdot \vect{n} dS\\
&=& G\rho(\vect{x})\iint_{S} \frac{1}{||\vect{x} - \vect{r}||^3}(\vect{x} - \vect{r})\cdot \frac{-1}{||\vect{x} - \vect{r}||}(\vect{x} - \vect{r}) \thinspace dS\\
&=&-G\rho(\vect{x})\iint_{S} \frac{1}{||\vect{x} - \vect{r}||^3} \thinspace dS \\
&=& -G\rho(\vect{x}) \frac{1}{||\vect{x} - \vect{r}||^3} \iint_S \thinspace dS\\
&=& -G\rho(\vect{x}(4\pi)
\end{array}
\]
Now notice that since $\nabla_{\vect{r}}\cdot \vect{F} = 0$, by the divergence theorem, we have:
\[
\iint_{\boundary V} \vect{F} \cdot d\vect{S} = \iint_{S} \vect{F}\cdot d\vect{S} = -4\pi G \rho(\vect{x}).
\]
\textbf{Case 2:} There is a 3-dimensional region $R \subset V$ with non-zero mass (possibly all of $V$) then by superposition:
\[
\iint_{\boundary V}\vect{F}\cdot d\vect{S} = -4\pi G \iiint_{R} \rho \thinspace dV.
\]
\end{proof}
We can now prove an important theorem:
\begin{theorem}[Shell Theorem]
Suppose that $W$ is a 3--dimensional region of constant mass which is the region between a sphere of radius $a\geq 0$ and a sphere of radius $b > a$, both centered at the origin.
Then the following hold:
\begin{enumerate}
\item For a point $\vect{r}$, with $||\vect{r}|| > b$, the force of gravity is the same as if $W$ were a point mass.
\item In either case, for a point $\vect{r}$ with $a < ||\vect{r}|| < b$, the force of gravity varies linearly with distance from the origin.
\item For a point $\vect{r}$ with $||\vect{r}|| < a$, the force of gravity is zero.
\end{enumerate}
\end{theorem}
\begin{proof}
Let $\vect{r}$ be a point in $\R^3$. By the principal of superposition, the gravitational field at $\vect{r}$ is a vector that points toward the origin. That is, if $\vect{r} \neq \vect{0}$,
\[
\vect{F}(\vect{r}) = -f(r) \frac{\vect{r}}{||\vect{r}||}
\]
where $f(r)$ is a non-negative scalar function depending only on the magnitude $r$ of $\vect{r}$.
Let $S$ be a sphere of radius $r$ bounding a ball $V$ centered at $\vect{0}$. We have:
\[\begin{array}{rcl}
\iint_S \vect{F} \cdot d\vect{S} &=& f(r) \iint_{S} \frac{-x}{||\vect{x}||} \thinspace d\vect{S}\\
&=& -4\pi r^2 f(r).\\
\end{array}\]
By the differential form of Gauss' Law and the divergence theorem , we also have:
\[
\begin{array}{rcl}
\iint_S \vect{F} \cdot d\vect{S} &=& -4\pi G \iiint_B \rho \thinspace dV\\
\end{array}
\]
Thus,
\[
-4\pi r^2 f(r) = -4pi G \iint_B \rho \thinspace dV
\]
Thus:
\begin{itemize}
\item If $r > b$, for all $\vect{x} \in V - W$, $\rho(\vect{x}) = 0$, so the first result follows.
\item If $a < r < b$, we have the second result.
\item If $r < a$ we have the 3rd result, since for all $\vect{x} \in B$, $\rho(\vect{x}) = 0$.
\end{itemize}
\end{proof}
\newpage
\section{Cohomology Theory}
In this section we work entirely on subsets of $\R^3$. Throughout we assume that whenever every appropriate that the objects under consideration are C$^1$ or C$^2$.
\begin{theorem}
Suppose that $\vect{F}$ and $\vect{G}$ are vector fields defined on $D$ and that whenever $\phi$ is a simple closed curve in $D$, then $\int_\phi \vect{F} \cdot d\vect{s} = \int_\phi \vect{G} \cdot d\vect{s}$. Then there exists a scalar field $h\co D \to \R$ such that $\vect{F} = \vect{G} + \nabla f$.
\end{theorem}
\begin{proof}
Recall from the proof of Poincar\'e's Theorem that if a vector field has path independent line integrals then it is a gradient field. In particular, this result did not rely on $D$ being simply connected. Let $\vect{H} = \vect{F} - \vect{G}$.
\textbf{Claim:} $\vect{H}$ has path independent line integrals.
Assume that $\phi$ and $\psi$ are two paths joining a point $\vect{a}$ to a point $\vect{b}$. Let $C$ be the closed curve obtained by traversing $\phi$ and then traversing $\psi$ in the reverse direction. For simplicity, we assume that $C$ is simple. Then,
\[
\int_\phi \vect{H} \vl - \int_\psi \vect{H} \vl = \int_C \vect{H} \vl = \int_C (\vect{F} - \vect{G})\vl = \int_C \vect{F} \vl - \int_C \vect{G} \vl = 0.
\]
Thus, by Poincar\'e's Lemma, there exists a scalar function $f\co D \to \R$ such that $\vect{F} - \vect{G} = \nabla f$ as desired.
\end{proof}
\begin{corollary}
Let $D = \R^2 - \{0\}$. Suppose that $\vect{F} \co D \to \R$ and that $\curl \vect{F} = 0$. Then there exists a constant $k \in \R$ and a scalar field $f \co D \to \R$ such that
\[
\vect{F}(x,y) = \frac{k}{x^2 + y^2} \begin{pmatrix} -y \\ x \end{pmatrix} + \nabla f(x,y).
\]
\end{corollary}
\begin{proof}
Let $C$ be a counter-clockwise oriented simple closed curve enclosing the origin. Define $k = \frac{1}{2\pi}\int_C \vect{F}\vl $. Then evaluating both $\vect{F}$ and $\vect{G} = \frac{k}{x^2 + y^2}\begin{pmatrix}-y \\ x\end{pmatrix}$ around $C$ produces the same answer. Since $\curl\vect{F} = \vect{0}$ integrating $\vect{F}$ and $\vect{G}$ over any other simple closed curve containing the origin produces $k$ (by Green's theorem and some topology). If $C$ is a simple closed curve not enclosing the origin, since $\curl \vect{F} = \vect{0}$ and since $\curl \vect{G} = \vect{0}$, $\vect{F}$ and $\vect{G}$ once again have the same contour integrals. Thus, by the theorem $\vect{F} - \vect{G}$ is a gradient field.
\end{proof}
Let $\operatorname{cycle}^2(D)$ be the set of all vector fields on a region $D$ with $\vect{0}$ curl. $\operatorname{cycle}^2(D)$ is a real vector space. Let $\operatorname{boundary}^1(D)$ be the set of all gradient fields on $D$. $\operatorname{boundary}^1(D)$ is also a real vector space. Since $\curl \circ \grad = \vect{0}$, $\operatorname{boundary}^1(D) \subset \operatorname{cycle}^2(D)$. Let $H^1(D)$ be the quotient vector space $\operatorname{cycle}^2(D)/\operatorname{boundary}^1(D)$. That is, two vector fields with $\vect{0}$ curl on $D$ are considered ``the same'' if they differ by a gradient field. We conclude from the above example that $H^1(\R^2 - \{0\})$ is a 1--dimensional vector space. From Poincar\'e's Theorem, we know that $H^1(\R^2)$ is a 0--dimensional vector space (i.e. every vector field with $\vect{0}$ curl is a gradient field).
You might enjoy this (challenging) exercise: Let $D$ be the result of removing $n$ points from $\R^2$. Prove that $H^1(D)$ is $n$--dimensional.
\end{document}