Divergence

Imagine a swimming pool in which the water is constantly being purified. This is actually a common practice in swimming pools: a pump continuously draws the water out, cleans it of impurities and pumps it back in, in such a way that the amount of water in the pool always stays at the same level. Clearly, the balance equation for such a pool has the form

Min\displaystyle M^{in} Mout\displaystyle - M^{out} =0\displaystyle = 0
(1)

where MinM^{in} — the amount of water flowing in after purification, MoutM^{out} — the amount of dirty water flowing out.

What is the amount of water? In essence it is the product of the flux and the area through which this flux passes; for example, for an arbitrary rectangle of area ΔxΔy\Delta x \cdot \Delta y the flux is given by the formula

F\displaystyle F =MΔxΔy\displaystyle = \dfrac{M}{\Delta x \cdot \Delta y}
(2)

Now let us think about a more complex example. We have a rectangular box of water of size (Δx,Δy,Δz)(\Delta x, \Delta y, \Delta z), through whose faces water can flow in or out. Then the balance equation changes

(MxinMxout)\displaystyle (M_x^{in} - M_x^{out}) +(MyinMyout)\displaystyle + (M_y^{in} - M_y^{out}) +(MzinMzout)\displaystyle + (M_z^{in} - M_z^{out}) =0\displaystyle = 0
(3)

where MiinM_i^{in} Miout, i- M_i^{out}, \space i (x,y,z)\in (x, y, z) — the difference between the inflowing and outflowing amounts of water through the faces of the box.

This difference, or discrepancy, is essentially the divergence, but we have not quite finished refining it yet, so let us move on. Let us introduce the notion of the difference of fluxes

ΔFi\displaystyle \Delta F_i =Fiin\displaystyle = F_i^{in} Fiout, i\displaystyle - F_i^{out}, \space i (x,y,z)\displaystyle \in (x, y, z)
(4)

Taking into account formulas (2) and (4), let us rewrite formula (3) in the following form

ΔFxΔyΔz\displaystyle \Delta F_x \cdot \Delta y \Delta z +ΔFyΔxΔz\displaystyle + \Delta F_y \cdot \Delta x \Delta z +ΔFzΔxΔy\displaystyle + \Delta F_z \cdot \Delta x \Delta y =0\displaystyle = 0
(5)

Now let us transform the resulting formula into the following form

(ΔFxΔx+ΔFyΔy+ΔFzΔz)ΔxΔyΔz\displaystyle \left( \dfrac{\Delta F_x}{\Delta x} + \dfrac{\Delta F_y}{\Delta y} + \dfrac{\Delta F_z}{\Delta z} \right) \cdot \Delta x \Delta y \Delta z =0\displaystyle = 0
(6)

Now we must split the box into an enormous (potentially infinite) number of primitives whose sizes are very small (potentially zero), and then sum the results over all the primitives.

limnlimmliml(i=1nj=1mk=1l(limΔxi0limΔyj0limΔzk0((ΔFxiΔxi+ΔFyjΔyj+ΔFzkΔzk)ΔxiΔyjΔzk)))\displaystyle \lim\limits_{n \to \infty}\lim\limits_{m \to \infty}\lim\limits_{l \to \infty}\left(\displaystyle\sum_{i=1}^n\displaystyle\sum_{j=1}^m\displaystyle\sum_{k=1}^l\left(\lim\limits_{\Delta x_i \to 0}\lim\limits_{\Delta y_j \to 0}\lim\limits_{\Delta z_k \to 0}\left(\left( \dfrac{\Delta F_{xi}}{\Delta x_i} + \dfrac{\Delta F_{yj}}{\Delta y_j} + \dfrac{\Delta F_{zk}}{\Delta z_k} \right) \cdot \Delta x_i \Delta y_j \Delta z_k\right)\right)\right) =0\displaystyle = 0
(7)

Let us pass from sums to integrals

x1x2y1y2z1z2(Fxx+Fyy+Fzz)xyz\displaystyle \displaystyle\int_{x_1}^{x_2} \displaystyle\int_{y_1}^{y_2} \displaystyle\int_{z_1}^{z_2} \left(\dfrac{\partial F_{x}}{\partial x} + \dfrac{\partial F_{y}}{\partial y} + \dfrac{\partial F_{z}}{\partial z} \right) \partial x \partial y \partial z =0\displaystyle = 0
(8)

When is this integral equal to zero? Obviously, when as much water flows in as flows out of our box, that is, when there are neither sources nor leaks in this volume. The flow of a fluid is essentially a vector field, and we have just obtained a characteristic of this field which, at a specific point, tells us whether there are sources or sinks there. This characteristic is called the divergence and is defined by the formula

divF\displaystyle div \bold{F} =Fxx\displaystyle = \dfrac{\partial F_{x}}{\partial x} +Fyy\displaystyle + \dfrac{\partial F_{y}}{\partial y} +Fzz\displaystyle + \dfrac{\partial F_{z}}{\partial z}
(9)

One can say that divergence computes a scalar field from a vector field. In practice, divergence is used to determine the sources of a field; for example, one of Maxwell's equations for vacuum looks like this

divE\displaystyle div \bold{E} =Exx\displaystyle = \dfrac{\partial E_{x}}{\partial x} +Eyy\displaystyle + \dfrac{\partial E_{y}}{\partial y} +Ezz\displaystyle + \dfrac{\partial E_{z}}{\partial z} =ρϵ0\displaystyle = \dfrac{\rho}{\epsilon_0}
(10)

where E\bold{E} =(Ex,Ey,Ez)= (E_x, E_y, E_z) — the field strength vector, ρ\rho — the electric charge density, ϵ0\epsilon_0 — the electric constant.

It is convenient to write divergence as the dot product of the nabla operator with the vector of the original field

divF\displaystyle div \bold{F} =F\displaystyle = \nabla \cdot \bold{F}
(11)