nag_1d_aitken_interp (e01aac) interpolates a function of one variable at a given point from a table of function values evaluated at equidistant or non-equidistant points , for , using Aitken's technique of successive linear interpolations.
nag_1d_aitken_interp (e01aac) interpolates a function of one variable at a given point
from a table of values
and
, for
using Aitken's method (see
Fröberg (1970)). The intermediate values of linear interpolations are stored to enable an estimate of the accuracy of the results to be made.
An estimate of the accuracy of the result can be made from a comparison of the final result and the previous interpolates, given in the array
c. In particular, the first interpolate in the
th set, for
, is the value at
of the polynomial interpolating the first
data points. It is given in position
of the array
c. Ideally, providing
is large enough, this set of
interpolates should exhibit convergence to the final value, the difference between one interpolate and the next settling down to a roughly constant magnitude (but with varying sign). This magnitude indicates the size of the error (any subsequent increase meaning that the value of
is too high). Better convergence will be obtained if the data points are supplied, not in their natural order, but ordered so that the first
data points give good coverage of the neighbourhood of
, for all
. To this end, the following ordering is recommended as widely suitable: first the point nearest to
, then the nearest point on the opposite side of
, followed by the remaining points in increasing order of their distance from
, that is of
. With this modification the Aitken method will generally perform better than the related method of Neville, which is often given in the literature as superior to that of Aitken.
nag_1d_aitken_interp (e01aac) is not threaded in any implementation.
This example interpolates at
the function value of a curve defined by the points