Previous Up Next

23.2.1  Approximating derivatives

The nDeriv command numerically approximates the value of a derivative.

For a more general command on numeric differentiation, see Section 13.2.4.

Examples

nDeriv(x^2,x)
     


x+0.001
2
x−0.001
2
· 500.0
          
subst(nDeriv(x^2,x),x=1)
     
2.0           
nDeriv(exp(x^2),x,0.00001)
     


e

x+1.0×10−5
2
 
e

x−1.0×10−5
2
 


· 50000.0
          
subst(exp(nDeriv(x^2,x,0.00001)),x=1)
     
7.38905609706           

which is an approximate value of e2≈ 7.38905609893.


Previous Up Next