Wichita State University Logo

Math 344: Calculus III

16.5 Divergence and Curl


16.5.1 The Gradient Operator

For some time now, we have been using the "del" or gradient operator $\nabla$ for $\text{grad}\,f = \nabla f$. For some function $f(x,y,z)$, we use this notation to represent

$$ \def\ihat{\mathbf{\hat{\mmlToken{mi}[mathvariant="bold"]{ı}}}} \def\jhat{\mathbf{\hat{\mmlToken{mi}[mathvariant="bold"]{ȷ}}}} \def\khat{\mathbf{\hat{k}}} \newcommand{\pzi}[2][]{\dfrac{\partial #1}{\partial #2}} \nabla f(x,y,z) = f_x(x,y,z)\,\ihat + f_y(x,y,z)\,\jhat + f_z(x,y,z)\,\khat $$

In this section, we wish to use similar notation to represent other differential operators that are useful for applications involving vector fields. To do this, we will think of $\nabla$ as an operator given by

$$ \nabla = \left\langle\,\pzi{x},\pzi{y},\pzi{z}\,\right\rangle = \ihat\pzi{x} + \jhat\pzi{y} + \khat\pzi{z} $$
with $\ihat$, $\jhat$, and $\khat$ written in front to avoid notational confusion.

16.5.2 Divergence

Suppose that $\mathbf{F} = P\,\ihat + Q\,\jhat + R\,\khat$ is a vector field in $\mathbb{R}^3$ and that the first partials $\pzi[P]{x}$, $\pzi[Q]{y}$, and $\pzi[R]{z}$ exist. The divergence of $\mathbf{F}$ is given by

$$ \text{div}\,\mathbf{F} = \pzi[P]{x} + \pzi[Q]{y} + \pzi[R]{z} $$
and this may be written using the del operator as

$$ \nabla\cdot\mathbf{F} = \left( \ihat\pzi{x} + \jhat\pzi{y} + \khat\pzi{z} \right)\cdot\left( P\,\ihat + Q\,\jhat + R\,\khat \right) = \pzi[P]{x} + \pzi[Q]{y} + \pzi[R]{z} = \text{div}\,\mathbf{F} $$

This quantity is a scalar field , even though it was generated by differentiating a vector field.

Example 1

Find the divergence of the vector field

$$ \mathbf{F}(x,y,z) = \dfrac{\sqrt{x}}{1+z}\,\ihat + \dfrac{\sqrt{y}}{1+x}\,\jhat + \dfrac{\sqrt{z}}{1+y}\,\khat $$

Solution

$$ \begin{align*} \nabla\cdot\mathbf{F} &= \pzi{x}\left( \dfrac{\sqrt{x}}{1+z} \right) + \pzi{y}\left( \dfrac{\sqrt{y}}{1+x} \right) + \pzi{z}\left( \dfrac{\sqrt{z}}{1+y} \right) \\ \\ &= \dfrac{1}{2\sqrt{x}(1+z)} + \dfrac{1}{2\sqrt{y}(1+x)} + \dfrac{1}{2\sqrt{z}(1+y)} \end{align*} $$


The divergence of a vector field is best understood in the context of fluid flow. Suppose that $\mathbf{F}$ represents the velocity of a flowing fluid (or gas, since gases are thought of as fluids for these applications). In this case, $\text{div}\,\mathbf{F}$ represents the rate of change of the mass per unit volume of this fluid with respect to time at a point. Mass per unit volume means density, so the divergence is a measure of how the density at a point for the fluid tends to change. If $\text{div}\,\mathbf{F} = 0$, the density is not changing and the fluid is called incompressible .

Exercise 1

Show that all vector fields of the form

$$ \mathbf{F}(x,y,z) = f(y,z)\,\ihat + g(x,z)\,\jhat + h(x,y)\,\khat $$
are incompressible.

Follow Along

$$ \nabla\cdot\mathbf{F} = \pzi{x}f(y,z) + \pzi{y}g(x,z) + \pzi{z}h(x,y) = 0 + 0 + 0 = 0 $$

16.5.3 Curl

Suppose again that $\mathbf{F} = P\,\ihat + Q\,\jhat + R\,\khat$ is a vector field in $\mathbb{R}^3$ and that the first partials $\pzi[P]{x}$, $\pzi[Q]{y}$, and $\pzi[R]{z}$ exist. The curl of $\mathbf{F}$ is given by

$$ \text{curl}\,\mathbf{F} = \left(\pzi[R]{y} - \pzi[Q]{z}\right)\,\ihat + \left(\pzi[P]{z} - \pzi[R]{x}\right)\,\jhat + \left(\pzi[Q]{x} - \pzi[P]{y}\right)\,\khat $$
and is often written using the del operator

$$ \nabla\times\mathbf{F} = \text{curl}\,\mathbf{F} $$

This notation is used because the raw formula for the curl is a chore to remember. Most people instead use the $\nabla\times\mathbf{F}$ form, since is easier to recall the heuristic

$$ \begin{align*} \nabla\times\mathbf{F} &= \begin{vmatrix} \ihat & \jhat & \khat \\ \pzi{x} & \pzi{y} & \pzi{z} \\ P & Q & R \end{vmatrix} \\ \\ &= \left(\pzi[R]{y} - \pzi[Q]{z}\right)\ihat + \left(\pzi[P]{z} - \pzi[R]{x}\right)\jhat + \left(\pzi[Q]{x} - \pzi[P]{y}\right)\khat \\ \\ &= \text{curl}\,\mathbf{F} \end{align*} $$

Example 2

Compute the curl of

$$ \mathbf{F}(x,y,z) = \ln(2y + 3z)\,\ihat + \ln(x+3z)\,\jhat + \ln(x+2y)\,\khat $$

Solution

$$ \begin{align*} \nabla\times\mathbf{F} &= \begin{vmatrix} \ihat & \jhat & \khat \\ \pzi{x} & \pzi{y} & \pzi{z} \\ \ln(2y + 3z) & \ln(x+3z) & \ln(x+2y) \end{vmatrix} \\ \\ &= \left(\dfrac{2}{x+2y} - \dfrac{3}{x+3z}\right)\ihat - \left(\dfrac{1}{x+2y} - \dfrac{3}{2y+3z}\right)\jhat + \left(\dfrac{1}{x+3z} - \dfrac{2}{2y+3z}\right)\khat \\ \\ &= \left(\dfrac{2}{x+2y} - \dfrac{3}{x+3z}\right)\ihat + \left(\dfrac{3}{2y+3z} - \dfrac{1}{x+2y}\right)\jhat + \left(\dfrac{1}{x+3z} - \dfrac{2}{2y+3z}\right)\khat \end{align*} $$


The curl of a vector field is its rotational element. Returning to the idea of fluid flow, a vector field's curl is the tendency of the field to "swirl" around a particular point. This swirling can be imagined as what would happen if put a buoy in a river and anchored it to the bottom. Does the vector field case the buoy to spin? If it does, then the vector field has a nonzero curl at that point. If the curl of a vector field is zero at a point, we call that vector field irrotational at that point (and the entire vector field irrotational if $\text{curl}\,\mathbf{F} = \mathbf{0}$ at every point).

16.5.4 Conservative Vector Fields

Recall that a conservative vector field is one satisfying the property that $\mathbf{F} = \nabla f$ for some scalar function $f$ (called the potential ). Conservative vector fields are very important in physics applications, and we see that the curl of conservative vector fields have a convenient property.

Theorem

If $f$ is a function of three variables with continuous second-order partial derivatives, then

$$ \text{curl}\left(\nabla f\right) = \mathbf{0} $$

Proof

$$ \begin{align*} \text{curl}\left(\nabla f\right) &= \begin{vmatrix} \ihat & \jhat & \khat \\ \pzi{x} & \pzi{y} & \pzi{z} \\ f_x & f_y & f_z \end{vmatrix} \\ \\ &= \left(f_{zy} - f_{yz}\right)\,\ihat +\left(f_{xz} - f_{zx}\right)\,\jhat + \left(f_{yx} - f_{xy}\right)\,\khat \\ \\ &= 0\,\ihat + 0\,\jhat + 0\,\khat = \mathbf{0} \end{align*} $$


since Clairaut's theorem states that $f_{xy} = f_{yx}$ and so on.

Corollary

If $\,\mathbf{F}$ is a conservative vector field, then $\text{curl}\,\mathbf{F} = \mathbf{0}$.

Since the curl of a conservative vector field must be zero, we can use this condition to check vector fields for being conservative.

Exercise 2

Determine if the vector field

$$ \mathbf{F}(x,y,z) = e^x\sin yz\,\ihat + ze^x\cos yz\,\jhat + ye^x\cos yz\,\khat $$
is conservative. If it is, find the potential $f$ such that $\mathbf{F} = \nabla f$.

Check Your Work
$$ f = e^x \sin yz + K,\qquad K\in\mathbb{R} $$

Follow Along First, we need to check if $\text{curl}\,\mathbf{F} = \mathbf{0}$.

$$ \begin{align*} \nabla\times\mathbf{F} &= \begin{vmatrix} \ihat & \jhat & \khat \\ \pzi{x} & \pzi{y} & \pzi{z} \\ e^x\sin yz & ze^x\cos yz & ye^x\cos yz \end{vmatrix} \\ \\ &= \left[-yze^x\sin yz + e^x\cos yz - \left(-yze^x\sin yz + e^x\cos yz\right)\right]\ihat \\ &\quad - \left(ye^x\cos yz - ye^x\cos yz\right)\jhat + \left(ze^x\cos yz - ze^x\cos yz\right)\khat \\ \\ &= \mathbf{0} \end{align*} $$
Next, we need to find $f$ such that

$$ \nabla f = e^x\sin yz\,\ihat + ze^x\cos yz\,\jhat + ye^x\cos yz\,\khat $$
Since $f_x = e^x\sin yz$, we have that $f = e^x\sin yz + g(y,z)$ after integration. Differentiating with respect to $y$ gives $f_y = ze^x\cos yz + g_y(y,z)$. Our condition on the gradient says that this must obey $f_y = ze^x\cos yz + g_y(y,z) = ze^x\cos yz$, so $g_y(y,z) = 0$. Therefore $g(y,z) = h(z)$ and hence $f = e^x\sin yz + h(z)$. To find $h(z)$, we use $f_z = ye^x\cos yz + h'(z) = ye^x\cos yz$ which implies that $h(z) = K\in\mathbb{R}$ since $h'(z)$ must be zero. Therefore, the potential is given by

$$ f = e^x \sin yz + K,\qquad K\in\mathbb{R} $$

16.5.5 Visualizing Divergence and Curl

Now that you have worked some with the divergence and curl of a vector field, watch this video from 3Blue1Brown to see these things in motion.

Notes

The video focuses on two-dimensional vector fields to make the idea clear but keep in mind that curl is really a three-dimensional concept.

There is a small error in the exposition. When describing curl, the narrator misspeaks and incorrectly describes positive curl as clockwise rotation and vice versa. The visual is correct. (Verify this for yourself using the right hand rule .)

16.5.6 Div and Curl Together

It is of paramount importance to always be aware of the key difference between divergence and curl.

Divergence

$\text{div}\,\mathbf{F} = \nabla\cdot\mathbf{F}$ is a scalar .

Curl

$\text{curl}\,\mathbf{F} = \nabla\times\mathbf{F}$ is a vector .

Because of this, it makes sense to talk about $\text{div}\,\text{curl}\,\mathbf{F}$, but $\text{curl}\,\text{div}\,\mathbf{F}$ is nonsense (because you can't take the curl of a scalar).

In fact, $\text{div}\,\text{curl}\,\mathbf{F}$ is an important identity.

Theorem

If $\,\mathbf{F} = P\,\ihat + Q\,\jhat + R\,\khat$ is a vector field in $\mathbb{R}^3$ and the second-order partials of $P$, $Q$, and $R$ are continuous, then

$$\text{div}\,\text{curl}\,\mathbf{F} = 0$$

Proof

$$ \begin{align*} \text{div}\,\text{curl}\,\mathbf{F} &= \nabla\cdot\left(\nabla\times\mathbf{F}\right) \\ \\ &= \pzi{x}\left(\pzi[R]{y} - \pzi[Q]{z}\right) + \pzi{y}\left(\pzi[P]{z} - \pzi[R]{x}\right) + \pzi{z}\left(\pzi[Q]{x} - \pzi[P]{y}\right) \\ \\ &= \dfrac{\partial^2 R}{\partial x \partial y} - \dfrac{\partial^2 Q}{\partial x \partial z} + \dfrac{\partial^2 P}{\partial y \partial z} - \dfrac{\partial^2 R}{\partial y \partial x} + \dfrac{\partial^2 Q}{\partial z \partial x} - \dfrac{\partial^2 P}{\partial z \partial y} \\ \\ &= 0 \end{align*} $$


with terms adding out due to Clairaut's Theorem.

16.5.7 The Laplace Operator

We have discussed the different cases of combining the divergence and curl operators as well as proven that $\text{curl}\,\nabla f = \mathbf{0}$ for all potential functions $f$. However, we have yet to talk about the divergence of the gradient $\text{div}\,\text{grad} f = \nabla\cdot\left(\nabla f\right)$. This is sensible because $\nabla f$ is a vector field and computing its divergence is defined. The result is

$$ \text{div}\,\text{grad} f = \nabla\cdot\left(\nabla f\right) = \dfrac{\partial^2 f}{\partial x^2} + \dfrac{\partial^2 f}{\partial y^2} + \dfrac{\partial^2 f}{\partial z^2} $$
the sum of the second-order partials of $f$. This expression is quite common in applications for engineering and physics so we assign it the notation $\nabla^2 f$ or $\Delta f$ where

$$ \nabla^2 = \Delta = \nabla\cdot\nabla $$\
and call it the Laplace operator after the partial differential equation (PDE)

$$ \nabla^2 f = \Delta f = \dfrac{\partial^2 f}{\partial x^2} + \dfrac{\partial^2 f}{\partial y^2} + \dfrac{\partial^2 f}{\partial z^2} = 0 $$
named for Pierre-Simon de Laplace (one of the most accomplished mathematicians and scientists in history).

This operator arises naturally in physics problems concerning diffusion and energy minimization, very common topics in PDE and upper division engineering.

16.5.8 Green's Theorem in Vector Form

Recall Green's Theorem from last section:

$$ \oint_C P\,dx + Q\,dy = \iint_D \left(\pzi[Q]{x} - \pzi[P]{y}\right)\,dA $$
where $C$ is a positively oriented, piecewise-smooth, simple closed curve bounding a region $D$. Assuming that $\mathbf{F} = P\,\ihat + Q\,\jhat$, we can rewrite the path integral part as $\oint_C \mathbf{F}\cdot\,d\mathbf{r}$ by considering $\mathbf{F}$ as a vector field in $\mathbb{R}^3$ with $0$ as its third scalar field. This gives

$$ \text{curl}\,\mathbf{F} = \begin{vmatrix} \ihat & \jhat & \khat \\ \pzi{x} & \pzi{y} & \pzi{z} \\ P(x,y) & Q(x,y) & 0 \end{vmatrix} = \left( \pzi[Q]{x} - \pzi[P]{y} \right)\khat $$
and hence

$$ \left(\text{curl}\,\mathbf{F}\right)\cdot\khat = \left( \pzi[Q]{x} - \pzi[P]{y} \right)\khat\cdot\khat = \pzi[Q]{x} - \pzi[P]{y} $$
This allows us to replace the integrand in the area integral for Green's Theorem, proving a vector version of the theorem

Green's Theorem in Vector Form (Curl)

If $\,\mathbf{F} = P\,\ihat + Q\,\jhat + 0\,\khat$ is a vector field in $\,\mathbb{R}^3$ and scalar fields $P$ and $Q$ have continuous partial derivatives in a region $D$ bounded by a simple, piecewise-smooth, closed curve $C$, then

$$ \oint_C \mathbf{F}\cdot\,d\mathbf{r} = \iint_D \left(\text{curl}\,\mathbf{F}\right)\cdot\khat\,dA $$

It is also possible to cast Green's Theorem in terms of the divergence. If the boundary curve $C$ is given by the vector equation

$$ \mathbf{r}(t) = x(t)\,\ihat + y(t)\,\jhat,\qquad t\in [a,b] $$
then the unit tangent vector is

$$ \mathbf{T}(t) = \dfrac{1}{\left|\mathbf{r}'(t)\right|} \left(x'(t)\,\ihat + y'(t)\,\jhat\right) $$
The outward unit normal to $C$ is then

$$ \mathbf{n}(t) = \dfrac{1}{\left|\mathbf{r}'(t)\right|} \left(y'(t)\,\ihat - x'(t)\,\jhat\right) $$
which may be checked by confirming that $\mathbf{T}(t)\cdot\mathbf{n}(t) = 0$.

A region bounded a simple, closed curve with no holes featuring its tangent and outward normal vectors plotted at a point.

From here, we recall that $\mathbf{F} = P\,\ihat + Q\,\jhat$ and have

$$ \begin{align*} \oint_C \mathbf{F}\cdot\mathbf{n}\,ds &= \int_a^b \left(\mathbf{F}\cdot\mathbf{n}\right)(t)\left|\mathbf{r}'(t)\right|\,dt \\ \\ &= \int_a^b \left[ \dfrac{P(x(t),y(t))y'(t)}{\left|\mathbf{r}'(t)\right|} - \dfrac{Q(x(t),y(t))x'(t)}{\left|\mathbf{r}'(t)\right|}\right]\left|\mathbf{r}'(t)\right|\,dt \\ \\ &= \int_a^b P(x(t),y(t))\underbrace{y'(t)\,dt}_{dy} - Q(x(t),y(t))\underbrace{x'(t)\,dt}_{dx} \\ \\ &= \int_C P\,dy + Q\,dx \\ \\ &= \iint_D \left(\pzi[P]{x} + \pzi[Q]{y}\right)\,dA \end{align*} $$
where the last equality follows by Green's Theorem. However, we see that the final expression is just the divergence of $\mathbf{F}$, so we may write Green's Theorem in terms of the divergence.

Green's Theorem in Vector Form (Divergence)

If $\,\mathbf{F} = P\,\ihat + Q\,\jhat$ is a vector field in $\,\mathbb{R}^2$ and scalar fields $P$ and $Q$ have continuous partial derivatives in a region $D$ bounded by a simple, piecewise-smooth, closed curve $C$, then

$$ \oint_C \mathbf{F}\cdot\mathbf{n}\,ds = \iint_D \text{div}\,\mathbf{F}(x,y),dA $$
where $\mathbf{n}$ is the outward unit normal to $C$.

Creative Commons Logo - White


Your use of this self-initiated mediated course material is subject to our Creative Commons License .


Creative Commons Attribution-NonCommercial-ShareAlike 4.0

Creative Commons Logo - Black
Attribution
You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.

Creative Commons Logo - Black
Noncommercial
You may not use the material for commercial purposes.

Creative Commons Logo - Black
Share Alike
You are free to share, copy and redistribute the material in any medium or format. If you adapt, remix, transform, or build upon the material, you must distribute your contributions under the same license as the original.