As of Version 9.0, vector analysis functionality is built into the Wolfram Language »
gives the divergence, ∇·f, of the vector field f in the default coordinate system.
gives the divergence of f in the coordinate system coordsys.
- To use Div, you first need to load the Vector Analysis Package using Needs["VectorAnalysis`"].
- The vector field f should be a 3-element list where each element is a function of the coordinates of the appropriate coordinate system.
Basic Examples (1)
Compute the divergence of a vector field:
Verify that the divergence of the curl of a vector field is 0: