D

D[f,x]
gives the partial derivative .

D[f,{x,n}]
gives the multiple derivative .

D[f,x,y,]
differentiates f successively with respect to .

D[f,{{x1,x2,}}]
for a scalar f gives the vector derivative .

D[f,{array}]
gives a tensor derivative.

Details and OptionsDetails and Options

  • D[f,x] can be input as . The character is entered as EscpdEsc or . The variable x is entered as a subscript.
  • All quantities that do not explicitly depend on the variables given are taken to have zero partial derivative.
  • D[f,var1,,NonConstants->{u1,}] specifies that every implicitly depends on every , so that they do not have zero partial derivative.
  • D[f,] threads over lists that appear in f.
  • D[f,{list}] effectively threads D over each element of list.
  • D[f,{list,n}] is equivalent to D[f,{list},{list},] where {list} is repeated n times. If f is a scalar, and list has depth 1, then the result is a tensor of rank n, as in the n^(th) term of the multivariate Taylor series of f.
  • D[f,{list1},{list2},] is normally equivalent to First[Outer[D,{f},list1,list2,]].
  • If f is a list, then D[f,{list}] effectively threads first over each element of f, and then over each element of list. The result is an array with dimensions Join[Dimensions[f],Dimensions[list]].
  • Numerical approximations to derivatives can be found using N.
  • D uses the chain rule to simplify derivatives of unknown functions.
  • D[f,x,y] can be input as . The character , entered as Esc,Esc, can be used instead of an ordinary comma. It does not display, but is still interpreted just like a comma.
  • If any of the arguments to D are SparseArray objects, the result will be a SparseArray object. »

ExamplesExamplesopen allclose all

Basic Examples  (7)Basic Examples  (7)

Derivative with respect to :

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

Fourth derivative with respect to :

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

Derivative with respect to and :

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

Derivative involving a symbolic function :

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

Vector derivative (gradient vector):

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

Secondorder derivative tensor:

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

Evaluate derivatives numerically:

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

Enter using EscpdEsc, and subscripts using Control+_:

In[1]:=
Click for copyable input
Out[1]=
Introduced in 1988
(1.0)
| Updated in 2008
(7.0)