Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Procedures for extrapolation and interpolation

EMILIO ROSENBLUETH

Instituto de Ingenieria, UNAM, Ciudad Universitaria, D F 04510, Mdxico

KARMESHU

Departamento de Sistemas, Universidad Autdnoma Metropolitana, Azcapotzalco, D F 02000, Mdxico

The extrapolating procedure described herein is useful when one desires to find

y__A lim y(x)


X "~X c

if Y(Xc) cannot be directly computed and if the error y ( x ) - - y is of the form Z,an(X--Xc) n with
constant coefficients. First one computes Y~c =Y(Xc + 2gXo), k = 0, 1 , . . . , K, Xo = some small value
I ~ / 2x I~
of x. Next one finds Yk = linear combinations of the Yk whose errors are o tXo), Yk = linear combina-
tions of y~ with errors 0(Xao), and so on until attaining the desired degree of convergence. The
procedure is adapted to cases in which some of the an are nil. Applied to numerical integration it
yields Simpson's 2/3 rule and Romberg's quadrature. It is also applied to evaluate the limit of a ratio,
o f an inf'mite series, and of integrals with singularities. A comparable interpolation procedure, which
converges twice on fast, is also described.

DESCRIPTION OF THE E X T R A P O L A T I O N P R O C E D U R E then


The problem often arises of finding y(~]) = (4Jy(~2]-1) --y(2]-l)aff4J -- 1), ] = 1 K (4)
/~+1 .~ k ,...,

y =A lim y(x) has errors of 0(X~o~+~).


x-~xc The procedure is inadequate when the error cannot be
when y(Xc) cannot be directly computed. If the error expressed as a power series.
y ( x ) - - y can be expressed as When some of the an are nil and one fails to take this
oo
into consideration the procedure still converges as K grows
~ an(X_xc)n indefinitely but efficiency is lost thereby and results with
1 small ] can be poor.
The procedure can be regarded as an application of
with constant coefficients then the following procedure can Richardson's deferred approach to the limit. This is a
be useful, method for eliminating the leading error term when it is of
Compute known order.1
Yk A=Y(Xc+ 2tCXo), k = 0, 1 . . . . . K (1) In general the present approach is superior to Aitken's
extrapolation formula. This has been shown 1 by com-
Xo = some small value o f x, K is arbitrary. If a l, a2, ... ~ 0 paring the latter with the Romberg quadrature, which can
compute be considered a special application of the present
, procedure.
yk = 2y~--Y~+I

Y(~J) = ,(2/"(: kj -1) _.,~c1,(]+1-1)~1('~]~


. --. 1 ), . j. = 2, , K (2) ROMBERG QUADRATURE
~ 2
It is readily seen that y k - - y = 0(Xo), y.~.~y = 0(Xo),..., Suppose we compute
y(~])--y = 0(x~ +1) and so in general yt~, are increasingly
accurate approximations to y. ~
If some of the coefficients are nil one skips the f
corresponding step j. In particular if y = ~ f(x) dx
a
y ( x ) - - y = ~ a 2 n ( X - - X c ) ~n (3) using the trapezoid rule with uniform spacing Xo =
1 2-~Clb - - a l . It is well known that if f(x) is continuous the
error satisfies equation (3) with x c = 0. We must therefore
apply equation (4), which is Romberg's quadrature
Accepted January 1984. Discussion closes February 1985. formula, 1 proposed in 1955. In general the series y ? ) con-

0264-682X/84/010215-03 $02.00
© 1984 CML Publications EngineeringAnalysis, 1984, VoL 1, No. 4 215
Procedures f o r extrapolation and interpolation." E. R o s e n b l u e t h and Karmeshu

verges more rapidly than Yk (see example in ref. 1). The The procedure is twice as fast as the extrapolation one
approach has the advantage over other numerical integra- since the exponents in equation (7) are 2/" + 2 instead of
tion schemes that onceYl has been evaluated, f ( x ) is known f + 1. However, interpolation can only be used when y (x)
at all the nodes for all k ~< K and so the number o f values exists on both sides of x c. When y (x c -- a) = y (x c + a) +
o f f ( x ) that must be evaluated is only 1 + Ib - - a f f x o . 0(~.2k+2-~
o ) for all a = 0(Xo), coefficients an are zero for odd
Application of equation (4) to obtain y'~ gives n and so the interpolation procedure coincides with
Mikeladze's 1 result, extrapolation if the latter skips the steps for odd n, i.e. if
In some cases it is computationally advantageous to it uses equation (4) instead of (2).
apply equation (4) directly to successive evaluations of the
integral. In others it is preferable to apply it to the co-
efficients. In the latter manner we obtain the following EXAMPLES OF EXTRAPOLATION
integration coefficients. For examples whose results are displayed in the first
Y~" (½ 1 1 1 1 1 1 1 1 . . . ) x o t r a p e z o i d rule columns of Table 1 y is easily obtained analytically; they
serve to illustrate the procedure.
3"1:(1 4 2 4 2 4 2 4 2 ...) Xo/3Simpson's 2/3 rule In example 1,
y'~': (~ 16 6 16 7 16 6 16 7 . . . ) 4x0/45 1 --x z
y(x) -
1--x
TIIE INTERPOLATION PROCEDURE
x c = 1, x o = 0.1, a~ = 0, a n = 0 for n > 1. We know that
Suppose again that y ( x ) = 1 + x and soy'~ is exactly equal t o y .
y ~ lim y (x) For example 2,
x ~x c sin x
that y (xc) cannot be directly computed, and that y (x) -
x
y(x)--y =~ an(X--Xc) n X c = O, Xo = 1, which satisfies equation (3); we used
1 equation (4).
Examples 3a and 3b illustrate treatment of a slowly
and let Xo be some small value of x. Compute converging series:

Yx =y~(O) = Lv(x c _ 2exo) + y ( x c + 2kxo)l/2 ~t ( - 1) m -1


~ 4 y(M) = ~
(2~'x0) 2 (2 Xo) . i~(x , + ~ m
=y(xc) + - - y"(xc) + - - y ~ ~ ...
2! 4! x = 160/M, Xc=O, Xo = 1, a~ --/=O, a~ --/=O. In 3a we evaluate
(5) it directly. In 3b we add to y ( M ) an estimate of the
where yi = Oiy/Oxi ' i = 1 , 2 , . . . . Construct residual:
y(~]) = (2:~@(~]-')--y(~2+~'))/(2 2i - - 1 ) , E ( - 1)m -1
~o oo
1

/ = 1. . . . . K (6) M+I m - (-- 1)M~o ( M + 2 f + l ) ( M + 2 / + 2 )


Then -" ( -
y(kj) - - y = 0(Xo2j+2), / = 0,..., K (7) 2 .IM+ t
Again if some coefficients a n are known to be nil it is
advisable to skip the corresponding steps in the calculation = (-- 1)M
o f y g(j). 2(M + 1)

Table 1. Examples

Extrapolation ! Interpolation

Example Yl - y Y~ - y Yl - y Y~ - y Y~ - ~!
~ - ~

1 lx10 - l 0 0 0 0 0

2 -2x10 -3 -3xi0 -6 - I x i 0 -B -2x10 -3 -3xi0 -G - l x i 0 -B

3a - 3 x i 0 -3 - 2 x l O -s ixlO -s

3b -IxlO -s - 2 x l O "7 - 4 x l O -9

4 3 x l O -3 -3xlO -s 5 x l O -7

5 4xlO -l 4 x l O "3 - g x l O -~ 4 x l O -1 4 x l O -3 - 9 x l O -G

6 2 x l O -3 2 x l O -6 I x l O -~

7 -8xlO-SI2xlO-GI2xlO -8 - 8 x l O -7 5xlO -II 2 x l O -13


L ~

216 Engineering Analysis, 1984, Vol. 1, No. 4


Procedures f o r extrapolation and interpolation: E. R o s e n b l u e t h and Karmeshu

with which we dispose of the error term in Xo, so we can x in degrees, x c = 30, Xo-- 1, a~, a 2 , . . . , 4: 0. The ratio is
have a~ = 0, a2 =/:0, a34:0 and apply e.quation (2). Again we indeterminate at x = x
choose Xo-- 1. If in example 2 we had disregarded the fact that a~ =
Example 4 concerns a series that diverges at x = x c: a 3 = 0 and had applied equation (2) instead of equation (4),
we would have obtained, still for Xo--0.1, the successive
y(x)=~ xm errors - - 1 . 7 x 1 0 -3, 3 . 3 x 1 0 -3, 4 . 6 x 1 0 -s, - - 5 . 1 x 1 0 -s,
0 6 × 10 -6, confirming what was said about ignoring the fact
that some of the a n may be nil.
X c = - - 1,x = O.01,al 4:0, a~4: 0.
In example 5,
1 -x 2 EXAMPLES OF INTERPOLATION
dt
f The last three columns in Table 1 contain results for
y(t) = X~ x/~--t) examples 1, 2, 5 and 7. The others cannot be solved by
interpolation, as y is not defined for x < x c.
x c = 0 , x 0 = 0 . 1 , a~v~0, a 2 = 0 , a ~ 4 : 0 , the integral con- In example 1 y~ is exact, for the error in y is equal
tains a singularity at x = x c. to Xo.
In example 6, Results for example 2 coincide with those obtained by
extrapolation because y (x) is an even function. The same
y ( x ) = [0.5z(0) + Z(Xo) + z(2Xo) + ... + z(1 - - x o ) holds for example 5.
+ 0.5z (1)] Xo Example 7 illustrates the superiority of the interpolation
z (x) = e x procedure when it is applicable.

~.~ ACKNOWLEDGEMENTS

y = J e x dx Part of this communication was done while the first writer


o was visiting professor at the University of Waterloo, in
Ontario, Canada. Thanks are expressed to Gordon Gladwell
x c = 0 , X o = 0 . 1 2 5 , a ~ = a ~ = 0 , a~4=0, a44=0. This is a
and to Francisco J. S~inchez-Sesma for fruitful discussions
straightforward application of the procedure to numerical
integration, on the manuscript of this note.
And for example 7,
REFERENCES
sin x - - 0 . 5
y (x) - 1 Squire, w. Integration for Engineers and Scientists, American
x -- 30 Elsevier Publishing Company, Inc., New York, pp 149-52.

Engineering Analysis, 1984, Vol. 1, No. 4 217

You might also like