Example description

nag_numdiff_1d_real_eval (d04bac) Example Program Results

Find the derivatives of the polygamma (psi) function
using function values generated by nag_real_polygamma (s14aec).

Demonstrate the effect of successively reducing hbase.

 Derivative (1) calculated using nag_real_polygamma (s14aec):    4.0153e+02
 Derivative and error estimates for derivative (1)
          hbase        der[0]      erest[0]
     2.5000e-03    4.0204e+02       1.4e+02
     2.5000e-04    4.0153e+02       4.9e-11
     2.5000e-05    4.0153e+02       2.2e-10
     2.5000e-06    4.0153e+02       1.2e-09

 Derivative (2) calculated using nag_real_polygamma (s14aec):   -1.6002e+04
 Derivative and error estimates for derivative (2)
          hbase        der[1]      erest[1]
     2.5000e-03   -1.6022e+04       5.6e+03
     2.5000e-04   -1.6002e+04       1.3e-07
     2.5000e-05   -1.6002e+04       6.1e-06
     2.5000e-06   -1.6002e+04       9.6e-04

 Derivative (3) calculated using nag_real_polygamma (s14aec):    9.6001e+05
 Derivative and error estimates for derivative (3)
          hbase        der[2]      erest[2]
     2.5000e-03    9.1465e+05      -7.4e+06
     2.5000e-04    9.6001e+05       2.4e-04
     2.5000e-05    9.6001e+05       4.2e-02
     2.5000e-06    9.6001e+05       6.0e+01