Professional Documents
Culture Documents
Introduction. The polynomial of nth degree passing through the points (a:,/(a:,)),
i = 0, 1, -, n, is given by the Newton interpolation formula
f[Xk] = fixk)
r r1 _ /foo] - flxk]
(2) f[Xo'Xk] ~ x.-xk
Although Newton's interpolation formula is well known, it is not widely used due
to the popular misconception that it is inefficient. Usually recommended for
interpolation are the methods of Aitken [1], Neville [2], or Lagrange's formula.
Algorithms which make use of derivative values for interpolation are given in
[2], [3], and [4]; and algorithms for numerical differentiation are given in [3], [5],
and [6]. In all cases the algorithms given here are more efficient than other algo-
rithms in the literature.
Simple Interpolation. The algorithms given below follow naturally from Eqs.
(1) and (2). In these algorithms
Received February 12, 1968, revised June 25, 1969.
AMS Subject Classifications. Primary 6515, 6555.
Key Words and Phrases. Interpolation, numerical differentiation, Newton's interpolation
formula, Aitken interpolation, Neville interpolation, Lagrange interpolation, Hermite interpola-
tion, spline function.
* This work was done while the author was employed by TRW Systems.
** The recursion used in this definition gives the same results as obtained with the more usual
f[xo, Xi, -, Xk] = {f[xo, -, xt-i] f[xi, -, Xjfc]l/(x0 Xk). It has the minor advantages of
letting one save the divided differences used in Eq. (1) with no extra storage requirement, and of
giving indexes which do not decrease in the implementation of the algorithms (a convenience with
some FORTRAN compilers).
185
License or copyright restrictions may apply to redistribution; see http://www.ams.org/journal-terms-of-use
186 FRED T. KR0GH
Vik = f{xk) , i = 0,
= f[xa, Xi, , Xi-i, Xk] , i = 1,2,
(3) o>k = X Xk ,
iro = 1 ,
JTo= 1,
To,o = fix.) ,
Po = Fo,0 ,
Vo.k = fix/)
Vi., - Vi.k
i+l,k i = 0,1, ,& - 1
Xi Xk
k = 1, 2, -, n
0>k-l X Xk-i ,
Tk= co,i._i7r,_i ,
f k= 1,2,
Vi.i - Vi,
Vi+i,k i = 0, 1, k- 1
Xi xh '
Hermite Interpolation. Equations (1) and (2) hold (see e.g., Steffensen [8]) for
Xi = Xj+i = = xj+s provided one avoids division by zero in Eq. (2) and defines
1 44 ao.i
go So a0,<j
0+ 1 o>i,o
o+ 9i + 1 Si al.4?l
go + qi + 2 2 a2,n
where
Co = fix)
Pa = Co
Vok = yk
d - Vik
y i+i,k s = 0
Xi Xk
i = 0, 1, ,& - 1 - .s
(If s 2 k, do nothing.)
Vi+l,k-l V ik k = 1, 2, , ft .
s> 0
Xi Xk
An Interpolating Function in C1. If ft = 2m 1 (m > 1), and the a,* are always
selected so that m of them are on either side of x, then it is easy to construct an
interpolating function which is composed of ftth degree polynomials between
tabular points and has a continuous first derivative where the polynomials are
joined.
Let the table be given by (,-,/(S>)), * = 1, 2, -, N, with 4 < t+i. Define
Pn-iix) and PS-iix) as the polynomials passing through points with indices i = k
m + l,k m + 2, -,k + m 1 and i = k m + 2, k m + 3, , k + m
respectively, where * x < *+i- If x is so close to one end of the table that there
are not m points on either side of x, then PAiix) = P-iix) = the polynomial
passing through the n points nearest that end of the table. It is easy to verify that
the function
- f[x0, -,a;n_i]
and thus
Ox Xp)
Cnix) = Pn-1 + Ox X.) OX Xn-2) f[X0, ' j Xn2) Xn\
Xi X<
If the Xk are selected as indicated above, then the function pAA) defined by the
following algorithm has a continuous first derivative.
Algorithm IV.
ft = 2m 1 if there are m points on both sides of x
= 2m 2 otherwise.
Do everything as in Algorithm I, except replace u>k-i = x x,-i in Algorithm I with
03k-l = x Xn
\ if k = 2m - 1 .
Vk.k = V
\ a;i xo /
ATi = Ck+i-lTTi-1 + Ti , k = 1, 2, -, ft 1
r i = 1,2, -,n k , \
ck = ck + TiCk+i, J J (If ft 1 do nothing.)
The Cjt's give the coefficients of the interpolating polynomial expanded about x.
(Of course, one need not compute all of them.) That is
(10) VnOA)
= Z)ci(| - X)k
and
dkPnOK)
(11) = k\ck
d =x
Lyness and Moler [6] give a brief discussion of the errors in a process such as this,
and point out that iterative refinement can be used to reduce the rounding error
introduced by the algorithm.
where , = x Xi and Ank = IXi=o Oxk x). (The prime indicates that the term
with j = k is not included in the product.) Formula (12) is an efficient computa-
tional form of Lagrange's formula. It has the drawback that exceptional cases may
cause overflow or underflow. Lagrange's formula is most efficient if polynomial
interpolation of fixed degree is to be performed on several components of a vector
valued function.
Number of
Number of Number of Additions and
Divisions Multiplications Subtractions
Lagrange n + 1 (ft + 1) (ft + 2) (ft + 1) (n + 2)
Aitken or Neville*** \n{n + 1) ft(ft + 1) (ft + l)2
Algorithm I \nOn + 1) 2ft (ft + l)2 + ft - 1
Algorithm II \n{n + 1) (ft + l)2 + ft - 1
*** This is for the usual procedure which is based on linear interpolation with Lagrange's
formula. The referee points out that if this interpolation is given in the form of Newton's formula,
the algorithm requires \n(n + 1) fewer multiplications and \n{n + 1) more additions. At the
same time the round-off characteristics are improved. Thus for Aitken's algorithm.
fo.o = f(x.)
wo = x Xi,
Pk.o(x) = f(xk)
oik = X Xk
p(x) = P,