Unit 5, lesson 37

Divergence and Curl

How divergence measures net outflow per unit volume and curl measures circulation per unit area at a point, how to compute both with del, and why the identities need smooth fields on open sets.

  • Theory part 73
  • Practice part 74
  • Divergence, Curl, and Green’s Theorem

Drop a tiny cube into a flowing fluid and ask two separate questions. Does more fluid leave the cube than enter it? And would a tiny paddle wheel placed there start to spin? The first answer is a rate of outflow per unit volume, the second a circulation per unit area. Divergence and curl turn these two questions into derivatives you can compute at every point.

Key terms

The del operator

Definition In R3\mathbb{R}^3 with right-handed coordinates, the del operator is the symbolic vector of partial derivatives

∇=⟨∂∂x,∂∂y,∂∂z⟩.\nabla = \left\langle \frac{\partial}{\partial x}, \frac{\partial}{\partial y}, \frac{\partial}{\partial z} \right\rangle.

It is not a vector of numbers. It acts by formal multiplication. Applied to a scalar function ff it gives the gradient ∇f\nabla f, dotted with a vector field it gives the divergence ∇⋅F\nabla \cdot \mathbf{F}, and crossed with a vector field it gives the curl ∇×F\nabla \times \mathbf{F}. In every case the needed partial derivatives must exist at the point.

In plain words Del is a bookkeeping device. Treat it like a vector, but where a product would appear, take a partial derivative instead.

Example For f(x,y,z)=x2y+sin⁡zf(x, y, z) = x^2 y + \sin z the gradient is

∇f=⟨2xy, x2, cos⁡z⟩.\nabla f = \langle 2xy,\ x^2,\ \cos z \rangle.

Divergence as local source strength

Definition Let F=⟨P,Q,R⟩\mathbf{F} = \langle P, Q, R \rangle be a vector field on an open set U⊆R3U \subseteq \mathbb{R}^3 whose components have first partial derivatives at a point of UU. The divergence of F\mathbf{F} there is the scalar

div⁡F=∇⋅F=∂P∂x+∂Q∂y+∂R∂z.\operatorname{div} \mathbf{F} = \nabla \cdot \mathbf{F} = \frac{\partial P}{\partial x} + \frac{\partial Q}{\partial y} + \frac{\partial R}{\partial z}.

If F\mathbf{F} is C1C^1 on UU and pp is a point of UU, then with BrB_r the ball of radius rr centered at pp and n\mathbf{n} the outward unit normal on its boundary sphere SrS_r,

div⁡F(p)=lim⁡r→0+1vol⁡(Br)∬SrF⋅n dS.\begin{aligned} &\operatorname{div} \mathbf{F}(p) \\[0.4em] &\quad = \lim_{r \to 0^+} \frac{1}{\operatorname{vol}(B_r)} \iint_{S_r} \mathbf{F} \cdot \mathbf{n} \, dS. \end{aligned}

This limit follows from the divergence theorem, which comes later in the course. The same limit holds with rectangular boxes in place of the balls, as long as every box contains pp, all its edge lengths tend to 00, and you divide by the volume of the box. The flux through such a box divided by its volume is the average of div⁡F\operatorname{div} \mathbf{F} over the box, and continuity of div⁡F\operatorname{div} \mathbf{F} makes that average tend to the value at pp.

In plain words Divergence is net outward flux per unit volume around a point. Positive means the point acts like a source and the flow spreads out, negative means a sink where the flow gathers in. If F\mathbf{F} is a velocity in meters per second, divergence has units of one per second.

Example Take F=⟨x,y,z⟩\mathbf{F} = \langle x, y, z \rangle. The formula gives ∇⋅F=1+1+1=3\nabla \cdot \mathbf{F} = 1 + 1 + 1 = 3 everywhere. Check it with the flux picture at the origin. On the sphere of radius rr the outward normal is n=⟨x,y,z⟩/r\mathbf{n} = \langle x, y, z \rangle / r, so F⋅n=r\mathbf{F} \cdot \mathbf{n} = r at every point, and

r⋅4πr243πr3=3.\frac{r \cdot 4\pi r^2}{\frac{4}{3}\pi r^3} = 3.

The field pushes outward uniformly, a pure expansion.

Curl as local circulation

Definition Let F=⟨P,Q,R⟩\mathbf{F} = \langle P, Q, R \rangle have first partial derivatives at a point of an open set U⊆R3U \subseteq \mathbb{R}^3. The curl of F\mathbf{F} there is the vector

∇×F=∣ijk∂x∂y∂zPQR∣,\nabla \times \mathbf{F} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \partial_x & \partial_y & \partial_z \\ P & Q & R \end{vmatrix},

which written out in components is

∇×F=⟨ Ry−Qz,Pz−Rx,Qx−Py ⟩.\begin{aligned} \nabla \times \mathbf{F} = \langle\, &R_y - Q_z, \\ &P_z - R_x, \\ &Q_x - P_y \,\rangle. \end{aligned}

If F\mathbf{F} is C1C^1 on UU, pp is in UU and u\mathbf{u} is a unit vector, let CrC_r be the circle of radius rr centered at pp in the plane through pp perpendicular to u\mathbf{u}, oriented counterclockwise when seen from the tip of u\mathbf{u} (the right-hand rule). Then

(∇×F)(p)⋅u=lim⁡r→0+1πr2∮CrF⋅dr.\begin{aligned} &(\nabla \times \mathbf{F})(p) \cdot \mathbf{u} \\[0.4em] &\quad = \lim_{r \to 0^+} \frac{1}{\pi r^2} \oint_{C_r} \mathbf{F} \cdot d\mathbf{r}. \end{aligned}

A planar field ⟨P,Q⟩\langle P, Q \rangle with PP and QQ depending only on xx and yy can be viewed as ⟨P,Q,0⟩\langle P, Q, 0 \rangle. Its curl is then ⟨0,0,Qx−Py⟩\langle 0, 0, Q_x - P_y \rangle, and the number Qx−PyQ_x - P_y is called the scalar curl.

In plain words Curl measures circulation per unit area around a tiny loop. Where the curl is not zero, its direction is the axis about which the flow turns most strongly, by the right-hand rule, and its length is that strongest circulation per unit area. A velocity field in meters per second again gives units of one per second, yet curl and divergence measure different things and neither tells you the other.

Example The rotation field F=⟨−y,x,0⟩\mathbf{F} = \langle -y, x, 0 \rangle has

∇×F=⟨0−0, 0−0, 1−(−1)⟩=⟨0,0,2⟩.\begin{aligned} \nabla \times \mathbf{F} &= \langle 0 - 0,\ 0 - 0,\ 1 - (-1) \rangle \\[0.4em] &= \langle 0, 0, 2 \rangle. \end{aligned}

On the circle r(t)=⟨rcos⁡t,rsin⁡t,0⟩\mathbf{r}(t) = \langle r\cos t, r\sin t, 0 \rangle, counterclockwise seen from above, the circulation is

∫02πr2(sin⁡2t+cos⁡2t)dt=2πr2,\int_0^{2\pi} r^2 \left( \sin^2 t + \cos^2 t \right) dt = 2\pi r^2,

and dividing by πr2\pi r^2 gives 22, the k\mathbf{k} component of the curl. Its divergence is 00, so the flow turns without expanding.

Laplacian

Definition Let ff have second partial derivatives on an open set U⊆R3U \subseteq \mathbb{R}^3. The Laplacian of ff is the divergence of its gradient,

∇2f=∇⋅∇f=fxx+fyy+fzz.\nabla^2 f = \nabla \cdot \nabla f = f_{xx} + f_{yy} + f_{zz}.

It is often written Δf\Delta f. A function that is C2C^2 on UU with ∇2f=0\nabla^2 f = 0 on all of UU is called harmonic on UU. In the plane the Laplacian is fxx+fyyf_{xx} + f_{yy}.

In plain words The Laplacian compares the value of ff at a point with its average nearby. Where it is positive, ff sits below the average of its neighbors, as at the bottom of a bowl. Harmonic functions equal their average on every small sphere, so they have no such dips or bumps.

Example Let f=1/ρf = 1/\rho with ρ=x2+y2+z2\rho = \sqrt{x^2 + y^2 + z^2}, defined on the open set R3\mathbb{R}^3 minus the origin. There fx=−x/ρ3f_x = -x/\rho^3 and

fxx=−1ρ3+3x2ρ5,f_{xx} = -\frac{1}{\rho^3} + \frac{3x^2}{\rho^5},

with matching formulas in yy and zz. Adding them gives

∇2f=−3ρ3+3ρ2ρ5=0.\nabla^2 f = -\frac{3}{\rho^3} + \frac{3\rho^2}{\rho^5} = 0.

So ff is harmonic on R3\mathbb{R}^3 minus the origin. At the origin it is not even defined, and that point must stay excluded.

Curl of a gradient

Definition If ff is C2C^2 on an open set U⊆R3U \subseteq \mathbb{R}^3, then

∇×(∇f)=0on U.\nabla \times (\nabla f) = \mathbf{0} \quad \text{on } U.

The proof is Clairaut’s theorem. The first component is fzy−fyzf_{zy} - f_{yz}, and the mixed partials are equal because they are continuous on the open set UU. The other two components work the same way.

In plain words A gradient field has no local swirl. Pushing a small loop around a gradient field gives zero circulation, because you climb exactly as much as you descend.

Example For f=x2yzf = x^2 y z the gradient is ∇f=⟨2xyz,x2z,x2y⟩\nabla f = \langle 2xyz, x^2 z, x^2 y \rangle, and

∇×∇f=⟨ x2−x2,2xy−2xy,2xz−2xz ⟩=0.\begin{aligned} \nabla \times \nabla f = \langle\, &x^2 - x^2, \\ &2xy - 2xy, \\ &2xz - 2xz \,\rangle = \mathbf{0}. \end{aligned}

Divergence of a curl

Definition If F=⟨P,Q,R⟩\mathbf{F} = \langle P, Q, R \rangle is C2C^2 on an open set U⊆R3U \subseteq \mathbb{R}^3, then

∇⋅(∇×F)=0on U.\nabla \cdot (\nabla \times \mathbf{F}) = 0 \quad \text{on } U.

Expanding gives (Ryx−Qzx)+(Pzy−Rxy)+(Qxz−Pyz)(R_{yx} - Q_{zx}) + (P_{zy} - R_{xy}) + (Q_{xz} - P_{yz}), and the terms cancel in pairs by Clairaut’s theorem.

In plain words A curl field has no sources or sinks. Whatever flows into a small box flows back out.

Example Take F=⟨xyz,x2y,yz2⟩\mathbf{F} = \langle xyz, x^2 y, yz^2 \rangle. Then

∇×F=⟨z2, xy, 2xy−xz⟩,\nabla \times \mathbf{F} = \langle z^2,\ xy,\ 2xy - xz \rangle,

whose divergence is 0+x+(−x)=00 + x + (-x) = 0, as the identity promises.

Smoothness hypotheses and singular points

Definition The formulas for divergence, curl and the Laplacian need only the relevant partial derivatives at a point. The flux and circulation limits need F\mathbf{F} to be C1C^1 on an open set containing the point. The identities ∇×∇f=0\nabla \times \nabla f = \mathbf{0} and ∇⋅(∇×F)=0\nabla \cdot (\nabla \times \mathbf{F}) = 0 need C2C^2 on an open set, since they rest on equal mixed partials. Every statement holds only at points of the open domain. A point where the field is undefined is not covered, and loops or surfaces that surround such a point are not small loops or small spheres about a point of the domain.

In plain words Before you use an identity or read a meaning off a derivative, check where the field is smooth. A zero curl or zero divergence away from a singularity says nothing about a loop or sphere that encloses it.

Example The field

F=⟨−yx2+y2, xx2+y2, 0⟩\mathbf{F} = \left\langle \frac{-y}{x^2 + y^2},\ \frac{x}{x^2 + y^2},\ 0 \right\rangle

is C1C^1 on the open set of points off the zz-axis, and there ∇×F=0\nabla \times \mathbf{F} = \mathbf{0}. Yet around the unit circle in the xyxy-plane, counterclockwise seen from above, its circulation is 2π2\pi. There is no contradiction. The circle surrounds the zz-axis, where F\mathbf{F} is undefined, and every small circle that stays inside the domain does have circulation tending to zero per unit area.

Check yourself

  1. Compute the divergence and curl of the shear field F=⟨y,0,0⟩\mathbf{F} = \langle y, 0, 0 \rangle and describe what a small paddle wheel would do.
Show the answer

The divergence is 0+0+0=00 + 0 + 0 = 0 and the curl is ⟨0−0,0−0,0−1⟩=⟨0,0,−1⟩\langle 0 - 0, 0 - 0, 0 - 1 \rangle = \langle 0, 0, -1 \rangle. The flow neither expands nor compresses. A small paddle wheel with its axle parallel to the zz-axis feels a larger xx velocity on its side with larger yy than on its side with smaller yy, so it turns clockwise seen from above, even though every streamline is a straight line.

  1. Show that f(x,y)=ln⁡(x2+y2)f(x, y) = \ln(x^2 + y^2) is harmonic on the plane minus the origin.
Show the answer

For (x,y)≠(0,0)(x, y) \neq (0, 0) the function is C2C^2, and

fxx=2(y2−x2)(x2+y2)2,fyy=2(x2−y2)(x2+y2)2.\begin{gathered} f_{xx} = \frac{2(y^2 - x^2)}{(x^2 + y^2)^2}, \\[0.4em] f_{yy} = \frac{2(x^2 - y^2)}{(x^2 + y^2)^2}. \end{gathered}

Their sum is 00. The origin is excluded because ff is undefined there.

  1. The field G=⟨x,y,z⟩/ρ3\mathbf{G} = \langle x, y, z \rangle / \rho^3 with ρ=x2+y2+z2\rho = \sqrt{x^2 + y^2 + z^2} has divergence 00 at every point except the origin, yet its outward flux through the unit sphere is 4π4\pi. Why is this not a contradiction?
Show the answer

On the unit sphere G⋅n=1\mathbf{G} \cdot \mathbf{n} = 1, so the flux equals the area 4π4\pi. The divergence describes flux per unit volume only for small spheres around points where G\mathbf{G} is C1C^1. The unit sphere encloses the origin, where G\mathbf{G} is undefined, so zero divergence elsewhere says nothing about it.

How this lesson connects

It also uses Partial derivatives, gradients and mixed-partial symmetry and Dot products, cross products and line-integral orientation.

Resources for this lesson