Div

Div[{f1, ..., fn}, {x1, ..., xn}]
gives the divergence .

Div[{f1, ..., fn}, {x1, ..., xn}, chart]
gives the divergence in the coordinates chart.

DetailsDetails

  • All quantities that do not explicitly depend on the variables given are taken to have zero partial derivative.
  • In Div[f, x], if f is an array of dimensions , then x must have length , and the resulting divergence is an array of dimensions .
  • In Div[f, {x1, ..., xn}, chart], if f is an array, then it must have dimensions . The components of f are interpreted as being in the orthonormal basis associated with chart.
  • Coordinate charts in the third argument of Div can be specified as triples in the same way as in the first argument of CoordinateChartData. The short form in which dim is omitted may be used.
  • Div works with SparseArray and StructuredArray objects.

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Divergence of a vector field in Cartesian coordinates:

In[1]:=
Click for copyable input
Out[1]=

Divergence of a vector field in cylindrical coordinates:

In[1]:=
Click for copyable input
Out[1]=

Divergence in two-dimensional polar coordinates:

In[1]:=
Click for copyable input
Out[1]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »