nag_numdiff_1d_real_absci (d04bbc) (PDF version)
d04 Chapter Contents
d04 Chapter Introduction
NAG C Library Manual

NAG Library Function Document

nag_numdiff_1d_real_absci (d04bbc)

+ Contents

    1  Purpose
    7  Accuracy
    9  Example

1  Purpose

nag_numdiff_1d_real_absci (d04bbc) generates abscissae about a target abscissa x0 for use in a subsequent call to nag_numdiff_1d_real_eval (d04bac).

2  Specification

#include <nag.h>
#include <nagd04.h>
void  nag_numdiff_1d_real_absci (double x_0, double hbase, double xval[])

3  Description

nag_numdiff_1d_real_absci (d04bbc) may be used to generate the necessary abscissae about a target abscissa x0 for the calculation of derivatives using nag_numdiff_1d_real_eval (d04bac).
For a given x0 and h, the abscissae correspond to the set x0, x0 ± 2j-1 h , for j=1,2,,10. These 21 points will be returned in ascending order in xval. In particular, xval[10] will be equal to x0.

4  References

Lyness J N and Moler C B (1969) Generalised Romberg methods for integrals of derivatives Numer. Math. 14 1–14

5  Arguments

1:     x_0doubleInput
On entry: the abscissa x0 at which derivatives are required.
2:     hbasedoubleInput
On entry: the chosen step size h. If h<10ε, where ε=nag_machine_precision, then the default h=ε1/4 will be used.
3:     xval[21]doubleOutput
On exit: the abscissae for passing to nag_numdiff_1d_real_eval (d04bac).

6  Error Indicators and Warnings

None.

7  Accuracy

Not applicable.

8  Further Comments

The results computed by nag_numdiff_1d_real_eval (d04bac) depend very critically on the choice of the user-supplied step length h. The overall accuracy is diminished as h becomes small (because of the effect of round-off error) and as h becomes large (because the discretization error also becomes large). If the process of calculating derivatives is repeated four or five times with different values of h one can find a reasonably good value. A process in which the value of h is successively halved (or doubled) is usually quite effective. Experience has shown that in cases in which the Taylor series for for the objective function about x0 has a finite radius of convergence R, the choices of h>R/19 are not likely to lead to good results. In this case some function values lie outside the circle of convergence.

9  Example

See Section 9 in nag_numdiff_1d_real_eval (d04bac).

nag_numdiff_1d_real_absci (d04bbc) (PDF version)
d04 Chapter Contents
d04 Chapter Introduction
NAG C Library Manual

© The Numerical Algorithms Group Ltd, Oxford, UK. 2012