This page is a drill . The Divergence — definition, physical meaning (flux density) parent note built the idea (flux per tiny volume) and the formula. Here we hit every kind of problem that can appear, so you never meet a case you haven't already seen.
Before we compute anything, one reminder in plain words. A vector field just means: at every point of space, an arrow. The arrow F = ( F 1 , F 2 , F 3 ) has three numbers — how far east (F 1 ), how far north (F 2 ), how far up (F 3 ) it points. Divergence asks: around this point, is arrow-stuff net leaving (a tap) or net arriving (a drain)? We measure it with
div F = ∂ x ∂ F 1 + ∂ y ∂ F 2 + ∂ z ∂ F 3 .
The symbol ∂ x ∂ F 1 (read "partial of F 1 with respect to x ") means: how fast does the east-arrow F 1 grow as you step east , holding y , z frozen. We only ever take the matching partial — F 1 with x , F 2 with y , F 3 with z . That "diagonal" rule is the whole game.
Here is the full list of case-classes this topic can throw at you. Every cell below is covered by a worked example further down.
#
Case class
What's tricky
Example
A
Positive constant divergence (source)
reading a uniform "tap"
Ex 1
B
Negative constant divergence (sink)
sign of a "drain"
Ex 2
C
Zero divergence, big arrows (rotation)
size ≠ spreading
Ex 3
D
Sign-varying divergence (positive here, negative there)
one field, many behaviours
Ex 4
E
Degenerate: uniform field
biggest arrows, div = 0
Ex 5
F
Cross-term trap (∂ F 2 / ∂ x )
which partials count
Ex 6
G
Limiting check: shrink a real box, take V → 0
definition = formula
Ex 7
H
Real-world word problem (fluid tap)
units, interpretation
Ex 8
I
Exam twist: find where div = 0
solve, not just compute
Ex 9
J
2D radial with a singularity at the origin
zero everywhere yet a source
Ex 10
Mnemonic The one rule behind every cell
Diagonal Out = Tap. Add only the diagonal partials; positive total = tap (source), negative = drain (sink), zero = whatever comes in goes out.
Worked example Example 1: pure outward field
F = ( 2 x , 2 y , 2 z ) . Compute div F and interpret.
Forecast: the arrows point straight out and grow with distance — guess: positive, and the same number everywhere. What number?
∂ x ∂ ( 2 x ) = 2 .
Why this step? Diagonal rule: pair F 1 = 2 x with x . Since 2 x grows at rate 2 per step east, its partial is 2 .
∂ y ∂ ( 2 y ) = 2 and ∂ z ∂ ( 2 z ) = 2 by the same reasoning.
Add the diagonal: div F = 2 + 2 + 2 = 6 .
Meaning: + 6 everywhere → a uniform tap (source), spreading at a constant rate.
Verify: each component depends on only its own variable, so no cross-terms, and 2 + 2 + 2 = 6 . Positive matches "arrows point outward." ✓
Worked example Example 2: pure inward field
F = ( − 3 x , − 3 y , − 3 z ) . Compute and interpret.
Forecast: arrows point inward everywhere. Sign should be...?
∂ x ∂ ( − 3 x ) = − 3 .
Why this step? As you step east, the east-arrow gets more negative at rate − 3 .
Same for y and z : each gives − 3 .
Sum: div F = − 3 − 3 − 3 = − 9 .
Meaning: − 9 < 0 → a drain (sink) everywhere; stuff is vanishing.
Verify: negative, matching inward arrows; − 3 ⋅ 3 = − 9 . ✓
Worked example Example 3 (Cell C): rotation — big arrows, zero divergence
F = ( − y , x , 0 ) , a swirl about the z -axis (see figure).
Forecast: the arrows can be huge far from the axis. Big arrows ⇒ big divergence? Test your gut.
∂ x ∂ ( − y ) = 0 .
Why this step? − y contains no x , so stepping east changes it not at all → rate 0 .
∂ y ∂ ( x ) = 0 (no y inside x ), and ∂ 0/ ∂ z = 0 .
Sum: div F = 0 + 0 + 0 = 0 .
Meaning: the fluid just goes around — nothing created or destroyed. This field has rotation (Curl — rotation density ), not spreading.
Verify: In the figure, look at the small dotted balloon: exactly as many arrows enter as leave. Net = 0 . ✓
Worked example Example 5 (Cell E): the biggest-arrow trap — uniform field
F = ( 100 , 0 , 0 ) — a strong steady wind blowing east everywhere.
Forecast: magnitude 100 ! Surely large divergence?
∂ ( 100 ) / ∂ x = 0 — a constant doesn't change as you move.
Other diagonal partials are 0 too.
div F = 0 .
Meaning: whatever enters a balloon on the west side leaves on the east side — perfectly balanced. Size is not spreading.
Verify: all components constant ⇒ every partial 0 ⇒ sum 0 . ✓
Common mistake "Big arrows means big divergence."
Why it feels right: strong flow looks dramatic. Fix: Examples 3 and 5 have large arrows and divergence exactly 0 . Divergence measures change (net in vs out), never length.
Worked example Example 4: positive somewhere, negative elsewhere
F = ( x 2 − y 2 , 0 , 0 ) is a made-up 1D-ish flow. Where is it a source, where a sink?
Forecast: only F 1 varies, and only with x . So sign of div should follow the sign of some expression in x .
div F = ∂ x ∂ ( x 2 − y 2 ) + 0 + 0 = 2 x .
Why this step? Diagonal partial: differentiate x 2 − y 2 with respect to x , treating y as frozen, so − y 2 dies and x 2 → 2 x .
Set up the sign table: 2 x > 0 when x > 0 ; 2 x < 0 when x < 0 ; 2 x = 0 on the plane x = 0 .
Meaning: the same field is a tap in the region x > 0 , a drain in x < 0 , and neither on x = 0 . One field can wear every hat depending on where you stand.
Verify: at x = 3 : div = 6 > 0 (source). At x = − 3 : div = − 6 < 0 (sink). At x = 0 : div = 0 . ✓
Worked example Example 6: partials that look relevant but aren't
F = ( 3 y , 5 x , 7 z ) . Compute div F .
Forecast: there's a y in the first slot and an x in the second — tempting to differentiate them. Guess the answer, then check whether those go in.
F 1 = 3 y : the matching partial is ∂ ( 3 y ) / ∂ x = 0 (no x inside 3 y ).
Why this step? Divergence uses only ∂ F 1 / ∂ x — not ∂ F 1 / ∂ y . The cross-partial ∂ ( 3 y ) / ∂ y = 3 belongs to curl , not here.
F 2 = 5 x : matching partial ∂ ( 5 x ) / ∂ y = 0 .
F 3 = 7 z : matching partial ∂ ( 7 z ) / ∂ z = 7 .
Sum the diagonal: 0 + 0 + 7 = 7 .
Meaning: despite lots of cross-coupling, the net spreading comes entirely from the z -part.
Verify: only F 3 grows along its own axis; div = 7 . (If you'd wrongly used the cross-terms 3 and 5 , you'd get 15 — that's a curl-flavoured mistake.) ✓
Worked example Example 7: shrink a real box and recover the formula
F = ( x , 0 , 0 ) . The formula says div = 1 . Prove it by the geometric definition (flux per volume) on a cube of side 2 h centred at the origin.
Forecast: does actual flux ÷ volume give exactly 1 , independent of h ?
Only the two x -faces matter. On the top/bottom/front/back faces the outward normal is ± y ^ or ± z ^ , and F = ( x , 0 , 0 ) has zero y , z parts, so F ⋅ n ^ = 0 there.
Why this step? Flux is F ⋅ n ^ ; a field with no y , z components passes no flux through faces facing y , z .
Right face x = h : F 1 = h , outward normal + x ^ , area ( 2 h ) 2 = 4 h 2 . Flux out = h ⋅ 4 h 2 = 4 h 3 .
Left face x = − h : F 1 = − h , outward normal − x ^ , so F ⋅ n ^ = − ( − h ) = + h . Flux out = h ⋅ 4 h 2 = 4 h 3 .
Why this step? On the left, both the field value and the normal are negative — two minus signs make outflow positive . Fluid genuinely leaves both faces.
Total flux = 4 h 3 + 4 h 3 = 8 h 3 . Volume = ( 2 h ) 3 = 8 h 3 .
Flux per volume = 8 h 3 8 h 3 = 1 , for every h . Take h → 0 : still 1 .
Meaning: the geometric definition and the formula agree exactly — see the balloon shrinking in the figure.
Verify: 8 h 3 /8 h 3 = 1 = ∂ x / ∂ x . Independent of h , as the limit demands. ✓
Worked example Example 8: a leaky pipe field
Water velocity in a tank is v = ( 0.4 x , 0.4 y , − 0.8 z ) , measured in metres per second, position in metres. Is water being created or destroyed at the origin, and at what rate per unit volume?
Forecast: two positive spreads in x , y and a squeeze in z — will they cancel?
∂ x ∂ ( 0.4 x ) = 0.4 s − 1 .
Why this step? Units: velocity (m/s) differentiated by length (m) gives per-second (s − 1 ) — a rate , exactly what "per unit volume per second" needs.
∂ y ∂ ( 0.4 y ) = 0.4 s − 1 ; ∂ z ∂ ( − 0.8 z ) = − 0.8 s − 1 .
Sum: div v = 0.4 + 0.4 − 0.8 = 0 s − 1 .
Meaning: divergence 0 everywhere → the flow is incompressible ; nothing is created or destroyed. Water spreading sideways is exactly compensated by squeezing downward. This is the Continuity equation with constant density: ∇ ⋅ v = 0 .
Verify: 0.4 + 0.4 − 0.8 = 0 ; units all s − 1 , consistent. ✓
Worked example Example 9: solve for the source-free surface
F = ( x 2 , y 2 , z 2 ) . On what surface is the flow neither a source nor a sink?
Forecast: each partial is 2 x , 2 y , 2 z ; setting their sum to zero should define a flat surface (a plane).
div F = ∂ x ∂ x 2 + ∂ y ∂ y 2 + ∂ z ∂ z 2 = 2 x + 2 y + 2 z .
Why this step? Diagonal partials of x 2 , y 2 , z 2 are 2 x , 2 y , 2 z .
Set div = 0 : 2 x + 2 y + 2 z = 0 ⟺ x + y + z = 0 .
Why this step? "Neither source nor sink" is precisely div = 0 ; divide through by 2 .
Meaning: the flow is source-free exactly on the plane x + y + z = 0 ; a tap on one side, a drain on the other.
Verify: at the point ( 1 , − 1 , 0 ) : 2 ( 1 ) + 2 ( − 1 ) + 0 = 0 ✓ (on the plane). At ( 1 , 1 , 1 ) : 2 + 2 + 2 = 6 > 0 (source, off the plane). ✓
Worked example Example 10: the field that's source-free everywhere yet acts like a tap
In the plane, let F = ( x 2 + y 2 x , x 2 + y 2 y ) (arrows point out, but shrink with distance — see figure). Compute its divergence away from the origin , and explain the origin.
Forecast: the arrows point outward, so you'd guess a positive source. But they weaken outward — maybe that weakening exactly cancels the spreading?
Write r 2 = x 2 + y 2 , so F 1 = x / r 2 . Use the quotient rule with ∂ r 2 / ∂ x = 2 x :
∂ x ∂ ( r 2 x ) = r 4 1 ⋅ r 2 − x ⋅ 2 x = r 4 r 2 − 2 x 2 = r 4 y 2 − x 2 .
Why this step? F 1 is a fraction whose top and bottom both hold x ; the quotient rule handles "how fast does a ratio change."
By symmetry (x ↔ y ): ∂ y ∂ ( r 2 y ) = r 4 x 2 − y 2 .
Add: div F = r 4 y 2 − x 2 + r 4 x 2 − y 2 = 0 (for r = 0 ).
Meaning: away from the origin the outward spreading is exactly undone by the arrows shrinking — divergence 0 everywhere except one point. But total flux through any circle around the origin is a fixed positive number: all the "source" is concentrated at the singular origin , where the formula breaks down (division by zero). This is the flavour behind point sources and the Divergence Theorem (Gauss) .
Verify: the two fractions are exact negatives, summing to 0 for all r = 0 ; check at ( 1 , 0 ) : ( 0 − 1 ) /1 + ( 1 − 0 ) /1 = 0 ✓. At ( 1 , 2 ) : ( 4 − 1 ) /25 + ( 1 − 4 ) /25 = 3/25 − 3/25 = 0 ✓.
Recall Which cell was hardest for you?
Zero-divergence-with-big-arrows (C/E) and the singular source (J) trip up the most people. Both say the same thing: divergence measures net leaving, not arrow size, and not appearance.
Field with big arrows can still have zero divergence — true or false? True; e.g. ( 100 , 0 , 0 ) or the swirl ( − y , x , 0 ) , both div = 0 .
div ( 2 x , 2 y , 2 z ) = ? 2 + 2 + 2 = 6 .
On what surface does ( x 2 , y 2 , z 2 ) have zero divergence? The plane x + y + z = 0 .
Why does ( x / r 2 , y / r 2 ) have zero divergence away from the origin? Outward spreading is exactly cancelled by the arrows shrinking as 1/ r ; the source is concentrated at the singular origin.
Which partials enter divergence for F = ( 3 y , 5 x , 7 z ) ? Only the diagonal ones ∂ ( 3 y ) / ∂ x , ∂ ( 5 x ) / ∂ y , ∂ ( 7 z ) / ∂ z = 0 + 0 + 7 = 7 .