## Physical Intuition

Divergence (div) is โflux densityโโthe amount of flux entering or leaving a point. Think of it as the rate of flux expansion (positive divergence) or flux contraction (negative divergence). If you measure flux in bananas (and cโmon, who doesnโt?), a positive divergence means your location is a source of bananas. Youโve hit the Donkey Kong jackpot.

Remember that by convention, flux is positive when it leaves a closed surface. Imagine you were your normal self, and could talk to points inside a vector field, asking what they saw:

• If the point saw flux entering, heโd scream that everything was closing in on him. This is a negative divergence, and the point is capturing flux, like water going down a sink.
• If the point saw flux leaving, heโd sniff his armpits and say all flux was existing. This is a positive divergence, and the point is a source of flux, like a hose.

So, divergence is just the net flux per unit volume, or โflux densityโ, just like regular density is mass per unit volume (of course, we donโt know about โnegativeโ density). Imagine a tiny cubeโflux can be coming in on some sides, leaving on others, and we combine all effects to figure out if the total flux is entering or leaving.

The bigger the flux density (positive or negative), the stronger the flux source or sink. A div of zero means thereโs no net flux change in side the region. In plain english:

$\displaystyle{\mathit{ Divergence = \frac{Flux}{Volume} }}$

## Math Intuition

Now that we have an intuitive explanation, how do we turn that sucker into an equation? The usual calculus way: take a tiny unit of volume and measure the flux going through it. We need to add up the total flux passing through the x, y and z dimensions.

Imagine a cube at the point we want to measure, with sides of length dx, dy and dz. To get the net flux, we see how much the X component of flux changes in the X direction, add that to the Y componentโs change in the Y direction, and the Z componentโs change in the Z direction. If there are no changes, then weโll get 0 + 0 + 0, which means no net flux.

If there is some change in the field, we get something like 1 -2 +5 (flux increases in X and Z direction, decreases in Y) which gives us the divergence at that point.

In pseudo-math:

Total flux change = (field change in X direction) + (field change in Y direction) + (field change in Z direction)

Or in more formal math:

$\displaystyle{Divergence = \lim_{Vol \to 0}\frac{Flux}{Vol}}$

$\displaystyle{Divergence = \frac{\partial F_1}{\partial x} +\frac{\partial F_2}{\partial y} +\frac{\partial F_3}{\partial z}}$

Assuming F1 is the field in the X direction, F2 in the Y and F3 in the Z.

A few remarks:

• The symbol for divergence is the upside down triangle for gradient (called del) with a dot [$\displaystyle{\triangledown \cdot}$]. The gradient gives us the partial derivatives (dx, dy, dz), and the dot product adds them together (xdx + ydy + z*dz).
• Divergence is a single number, like density.
• Divergence and flux are closely related โ if a volume encloses a positive divergence (a source of flux), it will have positive flux.
• โDivergeโ means to move away from, which may help you remember that divergence is the rate of flux expansion (positive div) or contraction (negative div).

Divergence isnโt too bad once you get an intuitive understanding of flux. Itโs really useful in understanding in theorems like Gaussโ Law.