Divergence

The divergence of a vector field F, denoted div(F) or del ·F (the notation used in this work), is defined by a limit of thesurface integral
 del ·F=lim_(V->0)(∮_SF·da)/V
(1)
where the surface integral gives the value of F integrated over a closed infinitesimal boundary surface S=partialVsurrounding a volume element V, which is taken to size zero using a limiting process. The divergence of a vector fieldis therefore a scalar field. If del ·F=0, then the field is said to be a divergenceless field. The symbol del  is variously known as "nabla" or "del."
The physical significance of the divergence of a vector field is the rate at which "density" exits a given region of space. The definition of the divergence therefore follows naturally by noting that, in the absence of the creation or destruction of matter, the density within a region of space can change only by having it flow into or out of the region. By measuring the net flux of content passing through a surface surrounding the region of space, it is therefore immediately possible to say how the density of the interior has changed. This property is fundamental in physics, where it goes by the name "principle of continuity." When stated as a formal theorem, it is called the divergence theorem, also known as Gauss's theorem. In fact, the definition in equation (1) is in effect a statement of the divergence theorem.
For example, the continuity equation of fluid mechanics states that the rate at which density rho decreases in each infinitesimal volume element of fluid is proportional to the mass flux of fluid parcels flowing away from the element, written symbolically as
 del ·(rhou)=-(partialrho)/(partialt),
(2)
where u is the vector field of fluid velocity. In the common case that the density of the fluid is constant, this reduces to the elegant and concise statement
 del ·u=0,
(3)
which simply says that in order for density to remain constant throughout the fluid, parcels of fluid may not "bunch up" in any place, and so the vector field of fluid parcel velocities for any physical system must be a divergenceless field.
Divergence is equally fundamental in the theory of electromagnetism, where it arises in two of the four Maxwell equations,
del ·E=rho/(epsilon_0)
(4)
del ·B=0,
(5)
where MKS units have been used here, E denotes the electric field, rho is now the electric charge density, epsilon_0 is a constant of proportionality known as the permittivity of free space, and B is the magnetic field. Together with the two other of the Maxwell equations, these formulas describe virtually all classical and relativistic properties of electromagnetism.
A formula for the divergence of a vector field can immediately be written down in Cartesian coordinates by constructing a hypothetical infinitesimal cubical box oriented along the coordinate axes around an infinitesimal region of space. There are six sides to this box, and the net "content" leaving the box is therefore simply the sum of differences in the values of the vector field along the three sets of parallel sides of the box. Writing F=(F_x,F_y,F_z), it therefore following immediately that
 del ·F=(partialF_x)/(partialx)+(partialF_y)/(partialy)+(partialF_z)/(partialz).
(6)
This formula also provides the motivation behind the adoption of the symbol del · for the divergence. Interpreting del  as the gradient operator del =(partial/partialx,partial/partialy,partial/partialz), the "dot product" of this vector operator with the original vector field F=(F_x,F_y,F_z) is precisely equation (6).
While this derivative seems to in some way favor Cartesian coordinates, the general definition is completely free of the coordinates chosen. In fact, defining
 F=F_1u_1^^+F_2u_2^^+F_3u_3^^,
(7)
the divergence in arbitrary orthogonal curvilinear coordinates is simply given by
 del ·F=1/(h_1h_2h_3)[partial/(partialu_1)(h_2h_3F_1)+partial/(partialu_2)(h_3h_1F_2)+partial/(partialu_3)(h_1h_2F_3)].
(8)
The divergence of a linear transformation of a unit vector represented by a matrix A is given by the elegant formula
 del ·(Ax)/(|x|)=(Tr(A))/(|x|)-(x^(T)(Ax))/(|x|^3),
(9)
where Tr(A) is the matrix trace and x^(T) denotes the transpose.
The concept of divergence can be generalized to tensor fields, where it is a contraction of what is known as thecovariant derivative, written
 del ·A=A_(;alpha)^alpha.
(10)