Div

As of version 9.0, vector analysis functionality is built into Mathematica

Div[f]
gives the divergence, , of the vector field f in the default coordinate system.


gives the divergence of f in the coordinate system coordsys.

更多信息更多信息

  • To use , 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.

范例范例打开所有单元关闭所有单元

基本范例 (1)基本范例 (1)

In[1]:=
Click for copyable input

Compute the divergence of a vector field:

In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=

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

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