Curl and Divergence
The divergence and curl are two derivatives of a vector field F = ⟨P, Q, R⟩. The divergence, div F = ∇ · F = P_x + Q_y + R_z, is a number that measures how much F spreads out from a point. The curl, curl F = ∇ × F, is a vector that measures how much F spins around a point, and about which axis.
Before this lesson: Vector Fields, Partial Derivatives, Cross Product and Green’s Theorem
What divergence and curl measure
Picture F as the velocity of a fluid. Draw a tiny sphere around a point. If more fluid flows out of the sphere than in, the point acts like a source and the divergence is positive. If more flows in, it acts like a sink and the divergence is negative. If the divergence is 0 everywhere, the fluid is incompressible.
Now put a tiny paddle wheel at the point. If the flow makes it spin, the curl is not zero. The curl vector points along the wheel’s axis (by the right-hand rule), and its length is twice the wheel’s angular speed.
Divergence and curl formulas
Treat ∇ = ⟨∂/∂x, ∂/∂y, ∂/∂z⟩ as a vector of derivatives. The divergence is its dot product with F, and the curl is its cross product with F.
\operatorname{div} \mathbf{F} = \nabla \cdot \mathbf{F} = \dfrac{\partial P}{\partial x} + \dfrac{\partial Q}{\partial y} + \dfrac{\partial R}{\partial z}\operatorname{curl} \mathbf{F} = \nabla \times \mathbf{F} = \begin{vmatrix} \mathbf{i} & \mathbf{j} & \mathbf{k} \\ \dfrac{\partial}{\partial x} & \dfrac{\partial}{\partial y} & \dfrac{\partial}{\partial z} \\ P & Q & R \end{vmatrix} = \Big\langle R_y - Q_z,\; P_z - R_x,\; Q_x - P_y \Big\rangleFor a field in the plane, F = ⟨P, Q⟩, treat it as ⟨P, Q, 0⟩. Then div F = P_x + Q_y and curl F = ⟨0, 0, Q_x − P_y⟩, the same Q_x − P_y as in Green’s theorem.
Three facts to know
- curl(∇f) = 0 for every function f with continuous second partial derivatives.
- div(curl F) = 0 for every field F with continuous second partial derivatives.
- On all of space (or any region without holes), F is conservative exactly when curl F = 0.
Curl and divergence examples
Example 1: Divergence of a field in space
Find div F for F(x, y, z) = ⟨x²y, yz, xz²⟩, and evaluate it at (1, 2, −1).
P_x = \dfrac{\partial}{\partial x}(x^2y) = 2xyDifferentiate P with respect to x.
Q_y = \dfrac{\partial}{\partial y}(yz) = zDifferentiate Q with respect to y.
R_z = \dfrac{\partial}{\partial z}(xz^2) = 2xzDifferentiate R with respect to z.
\operatorname{div} \mathbf{F} = 2xy + z + 2xzAdd the three partial derivatives.
2(1)(2) + (-1) + 2(1)(-1) = 4 - 1 - 2 = 1
Substitute x = 1, y = 2, z = −1.
Answer: div F = 2xy + z + 2xz, and div F(1, 2, −1) = 1. The point acts like a weak source.
Example 2: Curl of the same field
Find curl F for F = ⟨x²y, yz, xz²⟩ and evaluate it at (1, 2, −1).
R_y - Q_z = 0 - y = -y
First component: R = xz² has no y; Q = yz gives Q_z = y.
P_z - R_x = 0 - z^2 = -z^2
Second component: P = x²y has no z; R_x = z².
Q_x - P_y = 0 - x^2 = -x^2
Third component: Q = yz has no x; P_y = x².
\operatorname{curl} \mathbf{F} = \langle -y, -z^2, -x^2 \rangleWrite the curl.
\operatorname{curl} \mathbf{F}(1, 2, -1) = \langle -2, -1, -1 \rangleSubstitute x = 1, y = 2, z = −1.
Answer: curl F = ⟨−y, −z², −x²⟩; at (1, 2, −1) it is ⟨−2, −1, −1⟩. Since the curl is not 0, F is not conservative.
Example 3: A source and a whirlpool
Find the divergence and curl of F = ⟨x, y⟩ and of G = ⟨−y, x⟩.
\operatorname{div} \mathbf{F} = 1 + 1 = 2For F: P_x = 1 and Q_y = 1.
\operatorname{curl} \mathbf{F} = \langle 0, 0, 0 - 0 \rangle = \mathbf{0}For F: Q_x = 0 and P_y = 0.
\operatorname{div} \mathbf{G} = 0 + 0 = 0For G: P = −y has no x, and Q = x has no y.
\operatorname{curl} \mathbf{G} = \langle 0, 0, 1 - (-1) \rangle = \langle 0, 0, 2 \rangleFor G: Q_x = 1 and P_y = −1.
Answer: F spreads out (div 2) without spinning (curl 0). G spins counterclockwise about the z-axis (curl ⟨0, 0, 2⟩) without spreading (div 0).
Example 4: Use the curl to test for a conservative field
Show that F = ⟨yz, xz + 2y, xy⟩ is conservative and find a potential function.
R_y - Q_z = x - x = 0
First component of the curl.
P_z - R_x = y - y = 0
Second component.
Q_x - P_y = z - z = 0
Third component. So curl F = 0 and F is conservative on all of space.
f = \int yz\,dx = xyz + g(y, z)
Integrate P in x.
xz + g_y = xz + 2y \Rightarrow g = y^2 + h(z)
Set f_y = Q and integrate g_y = 2y.
xy + h'(z) = xy \Rightarrow h(z) = 0
Set f_z = R. Any constant works, so take 0.
Answer: f(x, y, z) = xyz + y². Check: ∇f = ⟨yz, xz + 2y, xy⟩. See conservative vector fields for more on potential functions.
Example 5: Stirring water in a tank
Water in a tank moves with velocity v = ⟨2x − y, x + y, −3z⟩ centimeters per second. Is the flow incompressible? How fast does a tiny paddle wheel with a vertical axis spin?
\operatorname{div} \mathbf{v} = 2 + 1 + (-3)P_x = 2, Q_y = 1, R_z = −3.
= 0
Add. The divergence is 0 everywhere.
R_y - Q_z = 0 - 0 = 0, \quad P_z - R_x = 0 - 0 = 0
First two components of the curl.
Q_x - P_y = 1 - (-1) = 2
Third component.
\operatorname{curl} \mathbf{v} = \langle 0, 0, 2 \rangleThe spin axis is vertical.
\omega = \dfrac{|\operatorname{curl} \mathbf{v}|}{2} = 1The wheel’s angular speed is half the length of the curl.
Answer: yes, the flow is incompressible (div v = 0). The paddle wheel spins counterclockwise, seen from above, at 1 radian per second, at every point in the tank.
Common mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Treating the divergence as a vector | Writing div ⟨x, y⟩ = ⟨1, 1⟩ | The divergence is a number: add the partials, 1 + 1 = 2. |
| Treating the curl as a number | Writing curl ⟨−y, x⟩ = 2 | The curl is a vector: ⟨0, 0, 2⟩. Only its third component is 2. |
| Sign errors in the second component | Writing R_x − P_z for the j-component | The j-component is P_z − R_x. Expanding the determinant puts a minus sign on j. |
| Differentiating the wrong component | Using P_y + Q_x + R_z for the divergence | Each component is differentiated by its own variable: P by x, Q by y, R by z. |
| Saying curl F = 0 proves F conservative on any region | Using ⟨−y, x⟩/(x² + y²), which is undefined on the z-axis | The test needs a region without holes, such as all of space. |
Related methods
The Laplacian
The divergence of a gradient is the Laplacian: div(∇f) = f_xx + f_yy + f_zz, written ∇²f. Functions with ∇²f = 0 are called harmonic. They describe steady temperatures and electric potentials.
Divergence and curl in the big theorems
Green’s theorem uses the k-component of the curl. Stokes’ theorem uses the full curl on a surface, and the divergence theorem uses the divergence in a solid. Both appear at the end of this unit.
Practice problems
- Find div F for F = ⟨3x, −2y, 5z⟩.
- Find div F for F = ⟨xy, yz, zx⟩, and evaluate it at (1, 2, 3).
- Find curl F for F = ⟨y, z, x⟩.
- Find curl F for F = ⟨x², y², z²⟩.
- For the plane field F = ⟨x² − y, xy⟩, find div F and the k-component of curl F.
- Is F = ⟨2xy, x² + z, y⟩ conservative? If so, find a potential function.
- For F = ⟨xyz, x², yz⟩, find curl F and check that div(curl F) = 0.
- Let f = x²y³z. Find ∇f and check that curl(∇f) = 0.
- Find the number a so that F = ⟨ax + y, x − 3y, 2z⟩ has divergence 0.
- On a spinning turntable, the velocity of the surface is v = ⟨−3y, 3x, 0⟩ m/s. Find curl v, div v and the angular speed of the turntable.
Show answers
1.
\operatorname{div} \mathbf{F} = 3 + (-2) + 5 = 6Add P_x = 3, Q_y = −2 and R_z = 5.
Answer: 6
2.
\operatorname{div} \mathbf{F} = y + z + xP_x = y, Q_y = z, R_z = x.
2 + 3 + 1 = 6
Substitute (1, 2, 3).
Answer: x + y + z; 6 at (1, 2, 3)
3.
R_y - Q_z = 0 - 1 = -1
R = x has no y; Q = z gives Q_z = 1.
P_z - R_x = 0 - 1 = -1
P = y has no z; R_x = 1.
Q_x - P_y = 0 - 1 = -1
Q = z has no x; P_y = 1.
Answer: ⟨−1, −1, −1⟩
4.
R_y - Q_z = 0, \quad P_z - R_x = 0, \quad Q_x - P_y = 0
Each component depends only on its own variable.
Answer: 0 (the zero vector); F = ∇((x³ + y³ + z³)/3).
5.
\operatorname{div} \mathbf{F} = 2x + x = 3xP_x = 2x and Q_y = x.
Q_x - P_y = y - (-1) = y + 1
Q_x = y and P_y = −1.
Answer: div F = 3x; the k-component of curl F is y + 1.
6.
R_y - Q_z = 1 - 1 = 0, \quad P_z - R_x = 0 - 0 = 0, \quad Q_x - P_y = 2x - 2x = 0
Compute all three components: curl F = 0.
f = x^2y + g(y, z), \quad x^2 + g_y = x^2 + z \Rightarrow g = yz + h(z)
Integrate P in x, then match Q.
y + h'(z) = y \Rightarrow h = 0
Match R.
Answer: yes; f = x²y + yz
7.
\operatorname{curl} \mathbf{F} = \langle z - 0, xy - 0, 2x - xz \rangleR_y = z, Q_z = 0; P_z = xy, R_x = 0; Q_x = 2x, P_y = xz.
\operatorname{div}(\operatorname{curl} \mathbf{F}) = 0 + x + (-x) = 0Differentiate z by x, xy by y, and 2x − xz by z.
Answer: curl F = ⟨z, xy, 2x − xz⟩, and its divergence is 0.
8.
\nabla f = \langle 2xy^3z, 3x^2y^2z, x^2y^3 \rangle
Take the three partial derivatives.
R_y - Q_z = 3x^2y^2 - 3x^2y^2 = 0
First component of the curl.
P_z - R_x = 2xy^3 - 2xy^3 = 0, \quad Q_x - P_y = 6xy^2z - 6xy^2z = 0
Second and third components.
Answer: curl(∇f) = 0
9.
\operatorname{div} \mathbf{F} = a - 3 + 2 = a - 1P_x = a, Q_y = −3, R_z = 2.
a - 1 = 0 \Rightarrow a = 1
Set the divergence equal to 0 and solve.
Answer: a = 1
10.
\operatorname{curl} \mathbf{v} = \langle 0, 0, 3 - (-3) \rangle = \langle 0, 0, 6 \rangleQ_x = 3 and P_y = −3.
\operatorname{div} \mathbf{v} = 0 + 0 + 0 = 0No component depends on its own variable.
\omega = \dfrac{6}{2} = 3Angular speed is half the length of the curl.
Answer: curl v = ⟨0, 0, 6⟩, div v = 0, and the turntable spins at 3 rad/s.
Curl and divergence FAQ
What does the divergence of a vector field tell you?
It measures the net outflow per unit volume at a point. Positive divergence means a source, negative means a sink, and zero means the flow is incompressible there.
What does the curl of a vector field tell you?
It measures rotation. The curl points along the axis a tiny paddle wheel would spin around, and its length is twice the wheel’s angular speed.
Is the curl a vector or a scalar?
The curl is a vector, and the divergence is a scalar. For a field in the plane, people often call the single number Q_x − P_y the scalar curl, but it is really the k-component of the curl.
How do you know if a vector field is conservative using the curl?
If F has continuous partial derivatives on all of space (or a region without holes) and curl F = 0, then F is conservative. If curl F is not 0 anywhere, F is not conservative.
Summary
- div F = ∇ · F = P_x + Q_y + R_z, a scalar that measures outflow.
- curl F = ∇ × F = ⟨R_y − Q_z, P_z − R_x, Q_x − P_y⟩, a vector that measures rotation.
- curl(∇f) = 0 and div(curl F) = 0.
- On a region without holes, curl F = 0 means F is conservative.
- div F = 0 means incompressible; curl F = 0 means irrotational.
Previous lesson: Green’s Theorem
Next lesson: Parametric Surfaces
Back to the Calculus 3 Index