
\vspace{-.9cm}

\section{Divergence and Curl}\label{sec:lecture41}
Consider a vector field $\mathbf{F} = F_1 \mathbf{i} + F_2 \mathbf{j} + F_3 \mathbf{k}$, defined on a domain $D\subset \mathbb{R}^3$, and assume that all component functions are $C^1$ on $D$.  We will sometimes refer to $C^1$ vector fields as \textbf{smooth}.
We focus on the following two functions related to our vector field.

\begin{definition}[Divergence and Curl]
The \textbf{divergence} of $\mathbf{F}$ is
\begin{equation}\label{eq:41divergencedefn}
\divg \mathbf{F} :=  \frac{\partial F_1}{\partial x} + \frac{\partial F_2}{\partial y} + \frac{\partial F_3}{\partial z},
\end{equation}
and the \textbf{curl} of $\mathbf{F}$ is
\begin{equation}\label{eq:41curldefn}
\curl \mathbf{F} := \left(\frac{\partial F_3}{\partial y} - \frac{\partial F_2}{\partial z} \right) \mathbf{i} - \left( \frac{\partial F_3}{\partial x} - \frac{\partial F_1}{\partial z} \right)\mathbf{j} + \left(\frac{\partial F_2}{\partial x} - \frac{\partial F_1}{\partial y}\right) \mathbf{k}.
\end{equation}
\end{definition}

The formulas \eqref{eq:41divergencedefn} and \eqref{eq:41curldefn} are easier to remember in vector notation. If we define the ``vector''
$$
\nabla : = \ii \frac{\partial}{\partial x} + \mathbf{j} \frac{\partial}{\partial y} +  \mathbf{k}\frac{\partial}{\partial z},
$$
then the divergence and curl of $\mathbf{F}$ are, formally,

$$
\boxed{
\divg \mathbf{F} = \nabla \cdot \mathbf{F}, \quad \curl \mathbf{F} = \nabla \times \mathbf{F}.
}
$$

The calculation for curl goes as follows:
\begin{eqnarray*}
\nabla \times \mathbf{F} & = &
\begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\
F_1 & F_2 & F_3
\end{vmatrix}
=
\mathbf{i}
\begin{vmatrix}
\frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\
F_2 & F_3
\end{vmatrix}
- \mathbf{j}
\begin{vmatrix}
\frac{\partial}{\partial x} & \frac{\partial}{\partial z} \\
F_1 & F_3
\end{vmatrix}
+ \mathbf{k}
\begin{vmatrix}
\frac{\partial}{\partial x} & \frac{\partial}{\partial y} \\
F_1 & F_2
\end{vmatrix},
\end{eqnarray*}
matching \eqref{eq:41curldefn} if the $2\times 2$ determinants are ``evaluated" by taking the indicated derivatives. We recommend memorizing the cross product formula (or equivalently, the determinant expression) for curl, as (\ref{eq:41curldefn}) can be difficult to remember any other way.
 We will spend most of this section determining what information about $\mathbf{F}$ the divergence and curl encode.

\subsection{Some Examples of Divergence and Curl}\label{subsec:divCurlExamples} Let us calculate the divergence and curl of some vector fields. We first remark that, whenever $\mathbf{F} = \mathbf{a}$ for some constant vector $\mathbf{a}$, then
$$
\divg \mathbf{F} = \nabla \cdot \mathbf{F} = 0, \quad \curl \mathbf{F} = \nabla \times \mathbf{F} = \mathbf{0}.
$$
So, for constant vector fields, we expect no divergence or curl (a helpful example to keep in mind when we start discussing the geometric interpretation of these functions). Let's see some more interesting examples.

\begin{example}
Suppose that $\mathbf{F}$ is a planar vector field, so that $\mathbf{F} = F_1 (x,y) \mathbf{i} + F_2 (x,y) \mathbf{j}$.  Then
$$
\curl \mathbf{F} = \left(\frac{\partial F_2}{\partial x} - \frac{\partial F_1}{\partial y} \right) \mathbf{k}
$$
since $F_3=0$ and all derivatives in $z$ are 0. Whenever we talk about the curl of a 2-dimensional vector field in the $xy$-plane, we understand it to be the above expression, with the third direction added.
\end{example}

\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .50\linewidth]{figures/41fig1.png}
\caption{In Example 4.1.3, the vector field ``circulates'' around the vector $\mathbf{-k}$. Imagine that the vector field represents the flow of water on a surface, and that you put a floating stick parallel to the $y$-axis on top of it. What do you think will happen to the stick?}
\end{minipage}
\end{figure}



\begin{example}
Let $\mathbf{F} = y \mathbf{i}$.  Then, $\nabla \cdot \mathbf{F} = 0$ and
$$
\curl \mathbf{F} =
\begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\
y & 0 & 0
\end{vmatrix}
=
- \mathbf{k}.
$$
We interpret the curl of $\mathbf{F}$ as the twisting motion of our vector field (see Figure 4.1).

\end{example}


\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .50\linewidth]{figures/41fig2.png}
\caption{The field $\mathbf{F}$ from Example 4.1.4 with $c > 0$. The sphere is included to show you the symmetry of the vector field about the origin.}
\end{minipage}
\end{figure}



\begin{example}
Let $\mathbf{F} = c \mathbf{r} = c(x \mathbf{i} + y \mathbf{j} + z \mathbf{k})$ for some constant $c \neq 0$. Then
$$
\nabla \cdot \mathbf{F} = c(1+1+1) = 3c,
$$
and
$$
\nabla \times \mathbf{F} =
\begin{vmatrix}
\mathbf{i} & \mathbf{j} & \mathbf{k} \\
\frac{\partial}{\partial x} & \frac{\partial}{\partial y} & \frac{\partial}{\partial z} \\
x&y&z
\end{vmatrix}
=
\mathbf{0}.
$$
Divergence is associated with expansion (if $c > 0$) or contraction (if $c < 0$).

\end{example}

The next example is quite general; so, we list it as a result (Proposition \ref{prop:consvecdivcurl} below) for future reference.

\begin{proposition}\label{prop:consvecdivcurl}
Suppose that $\mathbf{F} :D \rightarrow \mathbb{R}^3$ is $C^1$ and conservative, with $\nabla \phi = \mathbf{F}$. Then $\nabla \times \mathbf{F} = \mathbf{0}$ on $D$.
\end{proposition}

\begin{proof}
We know that $\mathbf{F} : = \phi_x \mathbf{i} + \phi_y \mathbf{j} + \phi_z \mathbf{k}$.  Calculating the curl then gives:
$$
\nabla \times \mathbf{F} = (\phi_{zy} - \phi_{yz}) \mathbf{i} - (\phi_{zx} - \phi_{xz})\mathbf{j} + (\phi_{yx} - \phi_{xy})\mathbf{k}.
$$
If $\mathbf{F}$ is $C^1$ on its domain, then $\phi$ is $C^2$ (why?). 
Hence, equality of mixed partials holds (e.g. $\phi_{zy} = \phi_{yz}$), and the above calculation shows that the curl of $\mathbf{F}$ is zero on the domain of $\mathbf{F}$.
\end{proof}



The special properties of having zero divergence and zero curl have a name.

\begin{definition}
A vector field $\mathbf{F} : D \rightarrow \mathbb{R}^3$ is said to be:
\begin{itemize}
\item \textbf{incompressible} if $\divg \mathbf{F} \equiv 0$;

\smallskip

\item \textbf{irrotational} if $\curl \mathbf{F} \equiv \mathbf{0}$.
\end{itemize}
\end{definition}

An important example is provided by the \textit{gravitational field} $\mathbf{G}=c\bfr/|\bfr|^3$. We have already 
seen that $\mathbf{G}$ is conservative; by Proposition \ref{prop:consvecdivcurl}, $\mathbf{G}$ is irrotational. Moreover, $\mathbf{G}$ is also incompressible, so that $\nabla \cdot \mathbf{G} = 0$.
We prove this in our Worked Problems Section. 



\begin{proposition}\label{41-prop-curlincompressible}
If $\mathbf{F}$ is $C^2$, then $\nabla \times \mathbf{F}$ is incompressible. That is: $\nabla \cdot (\nabla \times \mathbf{F}) = 0$.
\end{proposition}

\begin{proof}
This is a calculation similar to that in Proposition \ref{prop:consvecdivcurl} (and also based on the equality of mixed partials), but longer. The details are left as an exercise.
\end{proof}

\begin{example}\label{example:puncturedPlaneCurl}
We return to another important example from Chapter 2. Let
$$
\mathbf{F}(x,y) : = \underbrace{- \frac{y}{x^2 +y^2}}_{F_1(x,y)} \mathbf{i} + \underbrace{\frac{x}{x^2 + y^2}}_{F_2 (x,y)} \mathbf{j}, \textrm{ for } (x,y) \in \mathbb{R}^2 \setminus \{(0,0)\}.
$$




\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .5\linewidth]{figures/41fig3.png}
\caption{The vector field $\mathbf{F}$  in Example 4.1.8 is irrotational, but not conservative. Imagine that the vector field represents the flow of water on a surface, and that you put a floating stick on top of it, away from the origin. Then the stick will travel in circles around the origin, but it will not rotate!
}
\end{minipage}
\end{figure}


Since $\mathbf{F}$ is a planar field, we know that
$$
\curl \mathbf{F} = \left(\frac{\partial F_2}{\partial x} - \frac{\partial F_1}{\partial y}\right)\mathbf{k}.
$$
Direct calculation gives
$$
\frac{\partial F_2}{\partial x} = \frac{x^2 - y^2}{y^2 + x^2} = \frac{\partial F_1}{\partial y},
$$
so that $\mathbf{F}$ is irrotational.  Nevertheless, we have already seen (with several different proofs) that $\mathbf{F}$ fails to be conservative.  
\end{example}







\subsection{Flux and Circulation Density}
We now come to some deeper results regarding the divergence and curl of $\mathbf{F}$. They relate these functions to certain integrals of $\mathbf{F}$ on curves and surfaces, providing several rigorous versions of the general statement that divergence is associated with expansion/contraction, and curl with twisting motion. We start with a local result.

\begin{theorem}[Divergence as Flux Density]
Let $\mathcal{S}_{\epsilon} \subset \mathbb{R}^3$ be a sphere of radius $\epsilon > 0$ centered at $P \in \mathbb{R}^3$, with $\mathbf{N}$ pointing outward. Assume that $\mathbf{F}$ is $C^2$ on some open set containing $B_\epsilon$, the solid ball of radius $\epsilon$ centered at $P$.
Then the divergence of $\mathbf{F}$ at $P$ satisfies
\begin{equation}\label{eq:41divergencefluxdensity}
\divg \mathbf{F} (P) = \lim_{\epsilon \rightarrow 0} \frac{1}{{\rm Vol}(\mathcal{S}_{\epsilon})} \iint_{B_{\epsilon}} \mathbf{F} \cdot \mathbf{N} d S = \lim_{\epsilon \rightarrow 0} \frac{1}{\frac{4}{3} \pi \epsilon^3} \iint_{\mathcal{S}_{\epsilon}} \mathbf{F} \cdot \mathbf{N} d S.
\end{equation}
In words, the divergence can be understood (in the limit) as the flux density of $\mathbf{F}$ over $\mathcal{S}_{\epsilon}$. Moreover, one has the approximation
\begin{equation}\label{eq:proofgoaldivflux}
\iint_{\mathcal{S}_{\epsilon}} \mathbf{F} \cdot \mathbf{N} \, d S 
= \frac{4}{3} \pi \epsilon^3 \cdot \divg \mathbf{F}(P)+ O(\epsilon^4)
\end{equation}
as $\epsilon \rightarrow 0$.
\end{theorem}

Here, $O(\epsilon^4)$ is the ``\textit{Big-O Notation}'', meaning that our error has magnitude at most $K \epsilon^4$ for some constant $K >0$. 


\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .25\linewidth]{figures/41fig4.png}
\caption{The sphere $\mathcal{S}_{\epsilon}$ about $P$ with associated normal vector $\mathbf{N}$.}
\end{minipage}
\end{figure}

\begin{proof}
Assume that $P = (0,0,0)$ and write $\mathbf{F} = F_1 \mathbf{i} + F_2 \mathbf{j} + F_3 \mathbf{k}$. Our goal is to show (\ref{eq:proofgoaldivflux}). To do that, we will start with the flux integral, apply linear approximation to $\mathbf{F}$, evaluate the leading term, and keep track of the error estimates. 


We proceed as follows.
On the sphere $\mathcal{S}_{\epsilon}=\{\mathbf{r}:\ \vert \mathbf{r} \vert = \epsilon\}$, our normal vector $\mathbf{N}$ takes the form
$$
\mathbf{N} = \frac{1}{\epsilon}(x \mathbf{i} + y \mathbf{j} + z \mathbf{k}).
$$
To approximate the behaviour of $\mathbf{F}$ near the origin, we expand each  $F_j$ (for $j = 1,2,3$) in a Taylor series near $\mathbf{0}$.\footnote{
The error term estimate is the part that requires the $C^2$ assumption. See the chapter on Taylor approximation in Math 226.
} We then evaluate the contribution of each component function $F_j$ to the expression \eqref{eq:proofgoaldivflux}.  Let us do the calculation for $F_1$ in full detail.

The Taylor approximation about $\mathbf{0}$ gives, for $(x,y,z) \in \mathcal{S}_{\epsilon}$,
$$
F_1 (\mathbf{r}) = \underbrace{F_1 (\mathbf{0}) + F_{1,x} (\mathbf{0}) x + F_{1,y} (\mathbf{0})y + F_{1,z} (\mathbf{0})z}_{\textrm{linear approximation}} \ + \underbrace{O(\epsilon^2)}_{\textrm{error from higher order terms}}.
$$
Now, using our formulas for $\mathbf{N}$ and $F_1$, we have
$$
F_1 \mathbf{i} \cdot \mathbf{N} = F_1 \frac{x}{\epsilon} = \frac{1}{\epsilon} \big[F_1 (\mathbf{0})x + F_{1,x} (\mathbf{0}) x^2 + F_{1,y} (\mathbf{0}) xy + F_{1,z} (\mathbf{0}) xz \big] + \underbrace{\frac{x}{\epsilon} O(\epsilon^2)}_{(*)}.
$$
The new error $(*)$ still has order $O(\epsilon^2)$ because $|x| \leq \epsilon$ (so that $\vert \frac{x}{\epsilon} \vert \leq 1$) on $\mathcal{S}_{\epsilon}$. 

We now evaluate the contribution of $F_1 \mathbf{i} \cdot \mathbf{N}$ to the integral  \eqref{eq:proofgoaldivflux}.  
By symmetry, we have
$$
\iint_{\mathcal{S}_{\epsilon}} x d S = \iint_{\mathcal{S}_{\epsilon}} x y d S = \iint_{\mathcal{S}_{\epsilon}} xz d S = 0.
$$
because for each of the functions $x$, $xy$, and $xz$, the integrals of their positive and negative parts are equal in size and have opposite signs. Also  by symmetry, this time with respect to interchanging the $x,y,z$ variables,
\begin{eqnarray*}
\iint_{\mathcal{S}_{\epsilon}} x^2 dS& = & \frac{1}{3} \iint_{\mathcal{S}_{\epsilon}} (x^2 + y^2 + z^2) d S = \frac{1}{2} \iint_{\mathcal{S}_{\epsilon}} \epsilon^2 d S = \frac{\epsilon^2}{3} \big(\textrm{Area of } \mathcal{S}_{\epsilon} \big) \\[1ex]
\quad & = & \frac{4 \pi}{3} \epsilon^4.
\end{eqnarray*}


Putting these calculations together, we see that:
\begin{eqnarray*}
\iint_{\mathcal{S}_{\epsilon}} (F_1 \mathbf{i}) \cdot \mathbf{N} \, d S & = & \left(\frac{1}{\epsilon} F_{1,x} (\mathbf{0})\right) \cdot \left(\frac{4 \pi \epsilon^4}{3}\right) + \underbrace{\iint_{\mathcal{S}_{\epsilon}}}_{\textrm{Area} = O(\epsilon^2)} O(\epsilon^2) d S \\
\quad & =& \frac{4 \pi \epsilon^3}{3} F_{1,x} (\mathbf{0}) + O(\epsilon^4).
\end{eqnarray*}
Given that similar calculations hold for $F_2 \mathbf{j}$ and $F_3 \mathbf{k}$, we obtain \eqref{eq:proofgoaldivflux}.
\end{proof}

We also have a similar formula for the curl of $\mathbf{F}$.

\begin{theorem}[Curl as Circulation Density]
If $\mathbf{F}$ is $C^2$ on a neighbourhood of $P$, and $\mathcal{C}_{\epsilon}$ is a circle of radius $\epsilon$ centred at $P$ in the plane normal to $\mathbf{N}$, and oriented counterclockwise when viewed from the direction of $\mathbf{N}$, then
\begin{equation}\label{eq:circulationdensity}
 \lim_{\epsilon \rightarrow 0} \frac{1}{\pi \epsilon^2} \oint_{\mathcal{C}_{\epsilon}} \mathbf{F} \cdot d \mathbf{r} = \mathbf{N} \cdot \curl \mathbf{F}(P).
\end{equation}
\end{theorem}

The proof uses similar ideas as the theorem on divergence and flux density. The starting point is, again, using linear approximation with error estimates for each component of ${\bf F}$. We use this approximation to evaluate the line integrals, then use symmetry and cancellation to simplify the integrals. The details are left for the interested student to work out.  




%\newpage

\begin{figure}[h]
\begin{minipage}{\linewidth}
\centering
\includegraphics[width = .25\linewidth]{figures/41fig5.png}
\caption{Curl as circulation density: the situation described in the theorem.}
\end{minipage}
\end{figure}






\section*{Worked Problems}

\begin{enumerate}[1.]
\item
{\it Let $\mathbf{r}= x \mathbf{i} + y \mathbf{j} + z \mathbf{k}$ and let $\mathbf{G}(\mathbf{r}) = c \frac{\mathbf{r}}{\vert \mathbf{r} \vert^3}$ (for a gravitational field, choose $c < 0$).  Show, via direct calculation, that $\nabla \cdot \mathbf{G} = 0$. 
}

\medskip

In terms of components, we have
$$
\mathbf{G}(x,y,z) = c \bigg(\frac{x}{(x^2 + y^2 + z^2)^{3/2}} \mathbf{i} + \frac{y}{(x^2 + y^2 + z^2)^{3/2}} \mathbf{j} + \frac{z}{(x^2 + y^2 + z^2)^{3/2}} \mathbf{k} \bigg).
$$
By the quotient rule,
$$
\frac{\partial G_1}{\partial x} = c\bigg[\frac{x^2 + y^2 + z^2}{(x^2 + y^2 + z^2)^{5/2}} - \frac{3x^2}{(x^2 + y^2 + z^2)^{5/2}} \bigg]
$$
and similarly for $G_2$ and $G_3$.  Hence, we have
$$
\nabla \cdot \mathbf{G} = c \bigg[\frac{3(x^2 + y^2 + z^2)}{(x^2 + y^2 + z^2)^{5/2}} - \frac{3x^2 + 3 y^2 + 3 z^2}{(x^2 + y^2 + z^2)^{5/2}} \bigg] = 0.
$$

\end{enumerate}
\section*{Practice Problems}
\begin{enumerate}[1.]
\item {
 Let ${\bf F}=(y+z)^2\ii+y\jj+z\kk$. Find the divergence and curl of ${\bf F}$.}
 
\medskip

\item
{(a) Let ${\bf F}=x\cos y\ii + e^z \jj + \cos y \kk$. Find the curl and divergence of ${\bf F}$.

\smallskip

\noindent
(b) Is it true that $\nabla\times  {\bf F}$ is always perpendicular to ${\bf F}$ for all $C^1$ vector fields ${\bf F}$
in $\mathbb{R}^3$? Explain why or why not. }

\medskip

\item
{Prove that if $f$ and $g$ are two $C^2$ functions on an open set
$X\subset {\mathbb R}^3$, then $\nabla\cdot(\nabla f\times \nabla g)=0$.}


\medskip

\item 
Let ${\bf F}$ be a 2-dimensional $C^2$ vector field on an open set $U$ in the $xy$-plane. Let $P\in U$, and  let ${\bf r}(t)$ be the field line of ${\bf F}$ that passes through $P$.
Assume that:
\begin{itemize}
\item ${\bf F}$ has constant magnitude $1$ on a neighbourhood of $P$,
\item the field line ${\bf r}(t)$ has curvature $a$ at $P$.
\end{itemize}
 Find the curl of ${\bf F}$ at $P$. Prove your answer.
 









\end{enumerate}

