numerical derivative


The command nDeriv uses the central difference quotient formula to calculate the average rate of change of a graph over an interval of length 2h. Here, h is referred to as the step size and will usually be a small positive number or an expression representing the step size.

The nDeriv function can be used to approximate the value of the first derivative at a point for a given step size h.

From the Home screen, press to view the calculus menu. Then press to select numerical differentiation, nDeriv.

The syntax is: nDeriv( expression, variable [,step size] )

If step size is omitted, the default 0.001 is used.

Two examples are shown on the screen below. The top example gives the central difference quotient formula for the sine function. The bottom example gives the approximate value of the first derivative at using the default step size.