For a u:URnu:U\to\mathbb R^n, its divergence is

divu=u=i=1nxiui.\operatorname{div}u=\nabla\cdot u=\sum_{i=1}^n\partial_{x_i}u_i.

It is a scalar field. The condition divu=0\operatorname{div}u=0 defines a .

Product identity

For a scalar ff, the product rule gives div(fu)=fu+fdivu\operatorname{div}(fu)=\nabla f\cdot u+f\operatorname{div}u.

Cylindrical expression

Writing u=urer+uθeθ+uzezu=u_r e_r+u_\theta e_\theta+u_z e_z in the gives, for r>0r>0,

divu=1rr(rur)+1rθuθ+zuz.\operatorname{div}u=\frac1r\partial_r(ru_r)+\frac1r\partial_\theta u_\theta+\partial_z u_z.

The ur/ru_r/r term arises from differentiating the moving basis. Coordinate singularities at r=0r=0 require a separate Cartesian regularity check.

References