|
1.5.2 Differentiation


Here is the derivative of with respect to 
.
In[1]:= D[ x^n, x ]
Out[1]= 
Mathematica knows the derivatives of all the standard mathematical functions.
In[2]:= D[ ArcTan[x], x ]
Out[2]= 
This differentiates three times with respect to x.
In[3]:= D[ x^n, {x, 3} ]
Out[3]= 


The function D[x^n,x] really gives a partial derivative, in which n is assumed not to depend on x. Mathematica has another function, called Dt, which finds total derivatives, in which all variables are assumed to be related. In mathematical notation, D[f,x] is like , while Dt[
f,x] is like . You can think of Dt
as standing for "derivative total".

Dt gives a total derivative, which assumes that n can depend on x. Dt[n,x] stands for 
.
In[4]:= Dt[ x^n, x ]
Out[4]= 


This gives the total differential . Dt[x] is the differential 
.
In[5]:= Dt[ x^n ]
Out[5]= 

Some differentiation functions.

As well as treating variables like symbolically, you can also treat functions in Mathematica symbolically. Thus, for example, you can find formulas for derivatives of f[x], without specifying any explicit form for the function f
.
Mathematica does not know how to differentiate f, so it gives you back a symbolic result in terms of f'.
In[6]:= D[ f[x], x ]
Out[6]= 
Mathematica uses the chain rule to simplify derivatives.
In[7]:= D[ 2 x f[x^2], x ]
Out[7]= 
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT. SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION. | |