NumericalCalculus`
NumericalCalculus`

# ND

ND[expr,x,x0]

gives a numerical approximation to the derivative of expr with respect to x at the point x0.

ND[expr,{x,n},x0]

gives a numerical approximation to the derivative of expr.

# Details

• To use ND, you first need to load the Numerical Calculus Package using Needs["NumericalCalculus`"].
• The expression expr must be numeric when its argument x is numeric.
• ND[expr,x,x0] is equivalent to ND[expr,{x,1},x0].
• ND is unable to recognize small numbers that should in fact be zero. Chop may be needed to eliminate these spurious residuals.
• The following options can be given:
•  Method EulerSum method to use Scale 1 size at which variations are expected Terms 7 number of terms to be used WorkingPrecision MachinePrecision precision to use in internal computations
• Possible settings for Method include:
•  EulerSum use Richardson's extrapolation to the limit NIntegrate use Cauchy's integral formula
• With Method->EulerSum, ND needs to evaluate expr at x0.
• If expr is not analytic in the neighborhood of x0, then the default method EulerSum must be used.
• The option Scale->s is used to capture the scale of variation when using Method->EulerSum.
• When the value of the derivative depends on the direction, the default is to the right. Other directions can be chosen with the option Scale->s, where the direction is s.
• The option Terms->n gives the number of terms to use for extrapolation when using Method->EulerSum.
• With , the expression expr must be analytic in a neighborhood of the point x0.
• The option Scale->r specifies the radius of the contour of integration to use with .

# Examples

open allclose all

## Basic Examples(1)

 In[1]:=
 In[2]:=
 Out[2]=
 In[3]:=
 Out[3]=