Prerequisite concepts
Formulas for the Divergence
In each coordinate system, there exists a formula for the divergance. The standard examples are: \[\begin{align}\vec\nabla\cdot\vec v &= \frac{\partial v_x}{\partial x} + \frac{\partial v_y}{\partial y}+\frac{\partial v_z}{\partial z} \text{ in rectangular coodinates} \\ \vec\nabla\cdot\vec v &= \frac{1}{s}\frac{\partial \left(s v_s\right)}{\partial s} + \frac{1}{s}\frac{\partial v_\phi}{\partial \phi}+\frac{\partial v_z}{\partial z} \text{ in cylindrical coodinates} \\ \vec\nabla\cdot\vec v &= \frac{1}{r^2}\frac{\partial \left(r^2 v_r\right)}{\partial r} + \frac{1}{r \sin(\theta)}\frac{\partial \left(\sin(\theta)\ v_\theta\right)}{\partial \theta}+\frac{1}{r \sin(\theta)}\frac{\partial v_\phi}{\partial \phi} \text{ in spherical coodinates}\end{align}\]