Wolfram ResearchProductsPurchasingServices & ResourcesAbout UsOur Sites
Mathematica Technical FAQs Services & Resources / Mathematica / Kernels & Programming
-----
 /
Symbols
*Mathematica
*Network Mathematica
*webMathematica
*gridMathematica
*Personal Grid Edition
*Wolfram Workbench
*Wolfram Education Group
*Application Packages
*Mathematica for Students
*Mathematica CalcCenter
*Publicon
*A New Kind of Science Explorer
*Mathematical Explorer
*Mathematica Teacher's Edition
*Calculus WIZ
*Mathematica Player
*Ask about this page
*Print this page
*Email this page
*Give us feedback
*
Sign up for our newsletter:

Derivative


Usage Message:

f' represents the derivative of a function f of one argument. Derivative[n1, n2, ... ][f] is the general form, representing a function obtained from f by differentiating n1 times with respect to the first argument, n2 times with respect to the second argument, and so on.

Attributes[Derivative] = {}

Related Symbols:

D
ND

Notes:

Derivative is used in input when you want to enter a derivative without doing using the D function. For example, the following two inputs give the same result.

In[1]:= D[f[x, y], x, y, y]

         (1,2)
Out[1]= f     [x, y]

In[2]:= Derivative[1, 2][f][x, y]

         (1,2)
Out[2]= f     [x, y]
Since expressions involving Derivative are usually displayed in special notations, Derivative is not often seen in output except in formats such as InputForm and FullForm :
In[3]:= f'''[x] //InputForm

Out[3]//InputForm= Derivative[3][f][x]

Numerical derivatives

In Version 3.0 of Mathematica the Derivative function automatically uses numerical differentiation for functions that cannot be differentiated symbolically and when the arguments are inexact numbers. For example:
In[4]:= expr = D[Abs[x], x]

Out[4]= Abs'[x]

In[5]:= expr /. x -> 1.7

Out[5]= 1.
Numerical derivatives are computed by evaluating the function for several values of the arguments, and using interpolation to approximate the derivative at the specified point.

Numerical differentiation can give unreliable results if the interpolation used to approximate the derivative does not give a good representation of the function, such as if the points at which the function is evaluated fall on opposite sides of a sharp feature of the function. For example, Derivative can give unreliable results for the derivative of Abs[x] if x is near zero.

In[6]:= expr /. x -> 0.01

Out[6]= 0.251891
One recommended way to get reliable results for numerical derivatives is to use the ND function, which is defined in the NumericalMath`NLimit` package. The essential difference between numerical differentiation using ND and numerical differentiation using Derivative is that ND includes the Scale option, which allows you to specify both the direction of a derivative, and the scale of variation of the function. Specifying the scale of variation of a function is useful if the function has sharp features near the point at which you want the derivative.

For example, you can use ND to compute derivatives of Abs[x] along the real axis by using either a direction that does not include the singularity (such as by using the default positive value of Scale when x is positive), or by using a value of Scale that is small enough to avoid the singularity.

In[7]:= Needs["NumericalMath`NLimit`"]

In[8]:= Options[ND]       

Out[8]= {WorkingPrecision -> 16, Scale -> 1, Terms -> 7, Method -> EulerSum}

In[9]:= ND[Abs[x], x, 0.01]

Out[9]= 1.

In[10]:= ND[Abs[x], x, 0.01, Scale -> -0.005]

Out[10]= 1.
This result should be compared with the incorrect result that occurs when the value of Scale is such that the singularity is included in the calculation.
In[11]:= ND[Abs[x], x, 0.01, Scale -> -1]

Out[11]= 1.54
See the documentation for ND for more information about numerical differentiation.


Additional Online Documentation:

Mathematica 3.0
http://documents.wolfram.com/v3/RefGuide/Derivative.html

Mathematica 4.0
http://documents.wolfram.com/v4/RefGuide/Derivative.html




 © 2008 Wolfram Research, Inc.  Terms of Use  Privacy Policy