VectorAnalysis`
VectorAnalysis`

Div

As of Version 9.0, vector analysis functionality is built into the Wolfram Language »

Div[f]

gives the divergence, ·f, of the vector field f in the default coordinate system.

Div[f,coordsys]

gives the divergence of f in the coordinate system coordsys.

Details and Options

  • 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.

Examples

Basic Examples  (1)

Compute the divergence of a vector field:

Verify that the divergence of the curl of a vector field is 0: