nag_monotonic_intg (e01bhc) evaluates the definite integral of a piecewise cubic Hermite interpolant over the interval .
nag_monotonic_intg (e01bhc) evaluates the definite integral of a piecewise cubic Hermite interpolant, as computed by
nag_monotonic_interpolant (e01bec), over the interval
.
The function is derived from routine PCHIA in
Fritsch (1982).
The computational error in the value returned for
integral should be negligible in most practical situations.
nag_monotonic_intg (e01bhc) is not threaded in any implementation.
The time taken by nag_monotonic_intg (e01bhc) is approximately proportional to the number of data points included within the interval .
This example program reads in values of
n,
x,
f and
d. It then reads in pairs of values for
a and
b, and evaluates the definite integral of the interpolant over the interval
until end-of-file is reached.