Multivariable Calculus · Undergraduate

Curl and Divergence

Quick answer

Two derivatives of a vector field F = (P, Q, R) carry its local behavior. The divergence ∇ · F = P_x + Q_y + R_z is a number at each point: the net outflow per unit volume, positive at a source and negative at a sink. The curl ∇ × F is a vector: its direction is the axis a tiny paddle wheel spins around fastest, and its length is twice the spin rate. Gradient fields have zero curl, and curls have zero divergence.

What you'll learn

  • Compute the curl and divergence of a vector field
  • Interpret divergence as outflow and curl as rotation
  • Use curl F = 0 to test whether a field is conservative
  • Apply the identities curl ∇f = 0 and div curl F = 0

Two derivatives of a field

A function of one variable has one derivative. A vector field F=(P,Q,R)\mathbf{F} = (P, Q, R) has nine partial derivatives, three components each differentiated three ways. Two combinations of them carry most of the meaning. Both are written with the operator

∇=(∂∂x, ∂∂y, ∂∂z)\nabla = \left(\frac{\partial}{\partial x},\ \frac{\partial}{\partial y},\ \frac{\partial}{\partial z}\right)

treated as if it were a vector. Its dot product with F\mathbf{F} is the divergence, a 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}

Its cross product with F\mathbf{F} is the curl, a vector field:

curl⁡F=∇×F=∣ijk∂x∂y∂zPQR∣=(Ry−Qz, Pz−Rx, Qx−Py)\operatorname{curl}\mathbf{F} = \nabla \times \mathbf{F} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \partial_x & \partial_y & \partial_z \\ P & Q & R \end{vmatrix} = \left(R_y - Q_z,\ P_z - R_x,\ Q_x - P_y\right)

The last component, Qx−PyQ_x - P_y, is the circulation density from Green’s theorem.

Why divergence is outflow and curl is spin

Put a tiny box with sides Δx\Delta x, Δy\Delta y, Δz\Delta z in a fluid with velocity F\mathbf{F}. Through the two faces perpendicular to the xx-axis, fluid leaves at rate about P(x+Δx) Δy ΔzP(x + \Delta x)\,\Delta y\,\Delta z and enters at rate about P(x) Δy ΔzP(x)\,\Delta y\,\Delta z. The net outflow through that pair is about Px Δx Δy ΔzP_x\,\Delta x\,\Delta y\,\Delta z. Adding the other two pairs gives (Px+Qy+Rz) ΔV(P_x + Q_y + R_z)\,\Delta V. Divergence is the net outflow per unit volume: positive where fluid is produced, a source, and negative where it is absorbed, a sink.

For curl, look at the flat case F=(P,Q,0)\mathbf{F} = (P, Q, 0), where the curl is (0,0,Qx−Py)(0, 0, Q_x - P_y). Green’s theorem showed that Qx−PyQ_x - P_y is the circulation per unit area around a tiny loop in the xyxy-plane. A tiny paddle wheel with its axle along k\mathbf{k} is pushed by exactly that circulation, and it spins at rate 12(Qx−Py)\tfrac{1}{2}(Q_x - P_y). In space, the same holds for an axle in any direction n\mathbf{n}: the circulation per unit area around a loop perpendicular to n\mathbf{n} is (∇×F)⋅n(\nabla \times \mathbf{F}) \cdot \mathbf{n}. The curl points along the axle that spins fastest, and its length is twice that spin rate.

A shear flow, which spins without circling Arrows of the field (y, 0): horizontal arrows pointing right above the x-axis and left below it, longer farther from the axis. No arrow curves, yet a paddle wheel placed anywhere would be pushed right on its top and left on its bottom, so it spins clockwise. −3−2−1123−3−2−1123xy
A shear flow, which spins without circling

The shear flow (y,0,0)(y, 0, 0) has straight arrows, yet its curl is (0,0,−1)(0, 0, -1). A wheel in it feels a faster push on its upper side than on its lower side, so it turns clockwise. Curl measures that local spin, not whether the flow lines bend.

Worked examples

Two identities

For any function ff with continuous second partial derivatives,

∇×(∇f)=0\nabla \times (\nabla f) = \mathbf{0}

The first component of ∇×∇f\nabla \times \nabla f is fzy−fyz=0f_{zy} - f_{yz} = 0, and the others match the same way. This is the space version of the test from the fundamental theorem for line integrals: a gradient field has no spin. On all of space, or any region without holes, the converse holds too, so a field with zero curl there is conservative.

For any vector field F\mathbf{F} with continuous second partial derivatives,

∇⋅(∇×F)=0\nabla \cdot (\nabla \times \mathbf{F}) = 0

Expanding, the six terms cancel in pairs of equal mixed partials. A field with nonzero divergence therefore cannot be the curl of anything.

Common mistakes

Practice problems

  1. Find the curl and divergence of F=(yz, xz, xy)\mathbf{F} = (yz,\ xz,\ xy).

    Answer

    ∇×F=0\nabla \times \mathbf{F} = \mathbf{0} and ∇⋅F=0\nabla \cdot \mathbf{F} = 0

    Full solution

    Curl: (x−x, y−y, z−z)(x - x,\ y - y,\ z - z). Divergence: 0+0+00 + 0 + 0. The field is ∇(xyz)\nabla(xyz).

  2. Find the curl of F=(x2y, yz, xz2)\mathbf{F} = (x^2 y,\ yz,\ xz^2).

    Answer

    (−y, −z2, −x2)(-y,\ -z^2,\ -x^2)

    Full solution

    Ry−Qz=0−yR_y - Q_z = 0 - y, Pz−Rx=0−z2P_z - R_x = 0 - z^2, and Qx−Py=0−x2Q_x - P_y = 0 - x^2.

  3. Find the divergence of the field in Exercise 2.

    Answer

    2xy+z+2xz2xy + z + 2xz

    Full solution

    ∂∂x(x2y)+∂∂y(yz)+∂∂z(xz2)\tfrac{\partial}{\partial x}(x^2 y) + \tfrac{\partial}{\partial y}(yz) + \tfrac{\partial}{\partial z}(xz^2).

  4. Show that F=(exsin⁡y, excos⁡y, z)\mathbf{F} = \big(e^x\sin y,\ e^x\cos y,\ z\big) is conservative and find a potential.

    Answer

    ∇×F=0\nabla \times \mathbf{F} = \mathbf{0}; f=exsin⁡y+z22f = e^x\sin y + \tfrac{z^2}{2}

    Full solution

    The curl is (0−0, 0−0, excos⁡y−excos⁡y)(0 - 0,\ 0 - 0,\ e^x\cos y - e^x\cos y), and the field is defined everywhere. Integrating PP in xx gives exsin⁡y+g(y,z)e^x\sin y + g(y, z); matching QQ gives gy=0g_y = 0, and matching RR gives g=z22g = \tfrac{z^2}{2}.

  5. Find the divergence of the field in Exercise 4.

    Answer

    11

    Full solution

    exsin⁡y−exsin⁡y+1e^x\sin y - e^x\sin y + 1.

  6. Find the curl of F=(0, 0, x)\mathbf{F} = (0,\ 0,\ x) and describe how a paddle wheel would turn.

    Answer

    (0, −1, 0)(0,\ -1,\ 0); it turns about the yy-axis

    Full solution

    Ry−Qz=0R_y - Q_z = 0, Pz−Rx=0−1P_z - R_x = 0 - 1, Qx−Py=0Q_x - P_y = 0. The field points up where x>0x > 0 and down where x<0x < 0, so a wheel with its axle along the yy-axis is pushed around, clockwise as seen from the positive yy-axis.

  7. Can G=(x, y, z)\mathbf{G} = (x,\ y,\ z) be the curl of a vector field?

    Answer

    No

    Full solution

    Its divergence is 33, but every curl has divergence 00.

  8. Verify that ∇⋅(∇×F)=0\nabla \cdot (\nabla \times \mathbf{F}) = 0 for the field of Example 1.

    Answer

    ∂∂x(−2y−xy)+∂∂y(x)+∂∂z(yz)=−y+0+y=0\tfrac{\partial}{\partial x}(-2y - xy) + \tfrac{\partial}{\partial y}(x) + \tfrac{\partial}{\partial z}(yz) = -y + 0 + y = 0

    Full solution

    The curl from Example 1 is (−2y−xy, x, yz)(-2y - xy,\ x,\ yz). Its three terms differentiate to −y-y, 00 and yy.

  9. A student says the curl of (−y, x, 0)(-y,\ x,\ 0) is (0,0,0)(0, 0, 0) because the field has no zz-component. What went wrong?

    Answer

    The third component of the curl, Qx−Py=1−(−1)=2Q_x - P_y = 1 - (-1) = 2, uses PP and QQ, not RR.

    Full solution

    A flat field spins about the axis perpendicular to its plane, so its curl points along k\mathbf{k}. The curl is (0,0,2)(0, 0, 2).

Frequently asked questions

What is the divergence of a vector field?

For F = (P, Q, R), div F = ∇ · F = ∂P/∂x + ∂Q/∂y + ∂R/∂z. It measures the net rate at which the field flows out of a tiny box around the point, per unit volume.

What is the curl of a vector field?

curl F = ∇ × F = (R_y − Q_z, P_z − R_x, Q_x − P_y). Its direction is the axis around which the field circulates most strongly, and its length measures how strongly.

How do you remember the curl formula?

Write it as a 3 by 3 determinant with i, j, k in the first row, the operators ∂/∂x, ∂/∂y, ∂/∂z in the second, and P, Q, R in the third, then expand along the first row.

How does curl test whether a field is conservative?

A gradient field always has zero curl. Conversely, a field with continuous partial derivatives and zero curl on all of space is the gradient of some function.

What does zero divergence mean?

As much flows into every small region as flows out. A fluid with a divergence-free velocity field is incompressible.

What to learn next