• Tidak ada hasil yang ditemukan

Integrating by Extrapolation

Dalam dokumen R. Bartels, W. Gautschi, and C. Witzgall (Halaman 141-146)

Topics in Integration

3.4 Integrating by Extrapolation

value is (2m

+

1 )B2"'(0) = (2m

+

1 )B2".. The sign of the latter is ( - 1

r

+ 1 by

(3.3.14c).

Now for the final simplification of the error term (3.3.13). Since B2".+2(X) - B2".+2 does not change its sign in the interval of integration, there exists ~, 0 < ~ < 1, such that

r".+ 1 = (2m

~

2)! ((B2m+2(t) - B2".+2) dt .

g(2"'+2)(~).

From (3.3.10),

r

= _

B2m +2 g(2m+2)(-,,)

".+ 1 (2m

+

2)! ... ,

which completes the proof of (3.3.1).

o

Expansions of the form (3.4.1) are called asymptotic expansions in h if the coefficients tb k ~ m, do not depend on h, and am+l(h) satisfies (3.4.2). The summation formula of Euler and Maclaurin is an example of an asymptotic expansion. If all derivatives of

f

exist in [a, b], then by letting m --+ 00,

the right-hand side of (3.4.1) becomes an infinite series:

to

+

t I h2

+

t 2 h4

+ ....

This power series may diverge for any h

+-

O. Nevertheless, because of (3.4.2), asymptotic expansions are capable of yielding for small h results which are often sufficiently accurate for practical purposes [see, for instance, ErdeIyi (1956), Olver (1974)].

The above result (3.4.2) shows that the error term of the asymptotic expansion (3.4.1) becomes small relative to the other terms of (3.4.1) as h decreases. The expansion then behaves like a polynomial in h2 which yields the value to of the integral for h = O. This suggests the following method for finding to: For each step length hi in a sequence

where nl , n2 , ••• , nm are strictly increasing positive integers, determine the corresponding trapezoidal sums

i = 0,1, ... , m.

Let

fmm(h):= ao

+

al h2

+ ... +

amh2m be the interpolating polynomial in h2 with

i = 0,1, ... , m,

and take the "extrapolated" value

f

mJO) as the approximation to the desired integral to. This method of integration is known as Romberg integra- tion, having been introduced by Romberg (1955) for the special sequence hi = (b - a)/2i. It has been closely examined by Bauer, Rutishauser, and Stiefel (1963).

Neville's interpolation algorithm is particularly well suited for calculating Tmm(O). For indices i, k with 1 ~ k ~ i ~ m, let 7;k(h) be the polynomial of degree at most k in h2 for which

j

=

i - k, i - k

+

1, ... , i, and let

1ik := 7;k(O).

The recursion formula (2.1.2.7) becomes for Xi-=

h;:

(3.4.3)

It will be advantageous to arrange the intermediate values

1ik

in the triangu- lar tableau (2.1.2.4), where each element derives from its two left neighbors:

h~ T(ho)

=

Too

(3.4.4)

EXAMPLE. Calculating the integral

I

.1 tS dt '0

by extrapolation over the step lengths ho = 1, hi =

t,

h2 = -1, we arrive at the follow- ing tableau using (3.4.3) and 6-digit arithmetic (the fractions in parentheses indicate the true values)

h5

= 1 Too = 0.500 000 (= t)

Tl1 = 0.187 500 (= -h)

hi

= -1 TIO = 0.265 625 (= H)

T21 = 0.167969 (= -M.)

h~ =

-h

T20 = 0.192 383 (= ~)

T22 = 0.166 667 (= i)

Each entry

1ik

of the polynomial extrapolation tableau (3.4.4) represents in fact a linear integration rule for step length hi = (b - a)/ni:

1ik =

(Xo f(a)

+

(Xl f(a

+

h;)

+ ... +

(Xni-l f(b - h;)

+

(Xni f(b).

Some of the rules, but not all, with i

=

k turn out to be of the Newton-Cotes type (see Section 3.1).

For instance, if hi = ho/2 = (b - a)/2, then Tl1 is Simpson's rule. Indeed, Too

=

(b - a)(tf(a)

+

tf(b)),

T10 = t(b - a)(tf(a)

+

f(a; b)

+

tf(b)).

By (3.4.3),

and therefore

If we go one step further and put h2 = h1/2, then Tn becomes Milne's rule.

However, this pattern breaks down for h3

=

h2/2, since T33 is no longer a Newton-Cotes formula (see Exercise 10).

In the above cases, T21 and T31 are composite Simpson rules:

121 = -4-b-a (tf(a)

+

4f(a

+

h2)

+

if(a

+

2h2)

+

4f(a

+

3h2)

+

tf(b»

7;1 = -8- (tf(a) b-a

+

4f(a

+

h3)

+

if(a

+

2h3)

+ ... +

tf(b».

Very roughly speaking, proceeding downward in tableau (3.4.4) corresponds to extending integration rules, whereas proceeding to the right increases their order.

The following sequences of step lengths are usually chosen for extrapola- tion methods:

(3.4.5~

(a) (b)

ho=b-a, h 1

=2' ... , ,

ho h.=hi- 1 2' ho

=

b - a, h1

= 2'

ho h2

= ""3' ... ,

ho hi

=

-2-' hi- 2

i

=

2,3, ....

i = 3,4, ....

The first sequence is characteristic of Romberg's method [Romberg (1955)]' The second has been proposed by Bulirsch (1964). It has the advantage that the effort for computing T(h;) does not increase quite as rapidly as for the Romberg sequence.

For the sequence (3.4.5a), half of the function values needed for calcu- lating the trapezoidal sum T(hi+

d

have been previously encounterered in the calculation of T(hi ), and their recalculation can be avoided. Clearly

T(hi+ 1) = !T(hi)

+

hi+ 1(f(a

+

hi+ 1)

+

f(a

+

3hi+

d + ... +

f(b - hi+ 1»·

Similar savings can be realized for the sequence (3.4.5b).

An ALGOL procedure which calculates the tableau (3.4.4) for given m and the interval [a, b] using the Romberg sequence (3.4.5a) is given below. To save memory space, the tableau is built up by adding upward diagonals to the bottom of the tableau. Only the lowest elements in each column need to be stored for this purpose in the linear array t[O: m].

procedure romberg (a, b,f, m);

value a, b, m;

integer m;

real a, b;

real procedure f;

begin real h, s;

end;

integer i, k, n, q;

array t[O: m];

h:=b-a; n:=l;

t[0]:=0.5 x h x (f(a)+f(b));

for k := 1 step 1 until m do

begin s :=0; h :=0.5 x h; n :=2 x n; q:= 1;

for i:= 1 step 2 until n - 1 do s:= s

+

f(a

+

i x h);

end

t[k] :=0.5 x t[k - 1]

+

s x h;

print (t[k]);

for i := k - 1 step - 1 until 0 do begin q :=q X 4;

end

t[i] := t[i

+

1]

+

(t[i

+

1] - t[i])/(q - 1);

print (t[i])

We emphasize that the above algorithm serves mainly as an illustration of integration by extrapolation methods. As it stands, it is not well suited for practical calculations. For one thing, one does not usually know ahead of time how big the parameter m should be chosen in order to obtain the desired accuracy. In practice, one calculates only a few (say seven) columns of (3.4.4), and stops the calculation as soon as 17;,6 - 7;+ 1, 61 ::::; es, where e is a specified tolerance and s is a rough approximation to the integral

f

b If(t)1 dt.

a

Such an approximation s can be obtained concurrently with calculating one of the trapezoidal sums T(hJ A more general stopping rule will be described, together with a numerical example, in Section 3.5. Furthermore, the sequence (3.4.5b) of step lengths is to be preferred over (3.4.5a).

Finally, rational interpolation has been found to yield in most applications considerably better results than polynomial interpolation. A program with all these improvements can be found in Bulirsch and Stoer (1967).

When we apply rational interpolation (see Section 2.2), then the recursion (2.2.3.8) replaces (2.1.2.7):

(3.4~6)

T Ti,I<-1 - T i - 1,I<-1

i/c

=

Ti , I< - 1

+

....,...,...-T:;"..---.:.:...::..--=----=-~;:..,..:'----,---

1 _ T i ,I<-1 - T i - 1,I<-1 _ 1

T i ,I<-1 - T i - 1,I<-2

1::::; k::::; i::::; m.

The same triangular tableau arrangement is used as for polynomial extra~

polation: k is the column index, and the recursion (3.4.6) relates each tableau

element to its left-hand neighbors. The meaning of 1ik' however, is now as follows: The functions 1;dh) are rational functions in h2 ,

f.

(h):=Po

+

P1 h2

+ '" +

PI'h21'

lk Qo+Q1h2+"'+qvh2v' J1

+

v

=

k, J1

=

v or J1

=

v-I, with the interpolation property

j = i - k, i - k

+

1, ... , i.

We then define

and initiate the recursion (3.4.6) by putting Iio:= T(hJ for i

=

0, 1, ... , m, and Ii. -1 := 0 for i

=

0, 1, ... , m - 1. The observed superiority of rational extrapolation methods reflects the more flexible approximation properties of rational functions (see Section 2.2.4).

In Section 3.5, we will illustrate how error estimates for extrapolation methods can be obtained from asymptotic expansions like (3.4.1). Under mild restrictions on the sequence of step lengths, it will follow that, for polynomial extrapolation methods based on even asymptotic expansions, the errors of Iio behave like h?, those of Ii1 like h?-1 h?, and, in general, those of Iik like h?-k h?_k+ 1 ... h? as i -+ 00. For fixed k, consequently, the sequence 1ik' i = k, k

+

1, ... , approximates the integral like a method of order 2k

+

2. For the sequences (3.4.5) a stronger result has ~een found:

(3.4.7) 1ik - (f(X) dx = (b - a)h?-kh?_k+ 1 ... h?

(2:~ ~)!

j<2k+2)(O for a suitable ~ E (a, b) and

f

E C2k+ 2[a, b] [see Bauer, Rutishauser, and Stiefel (1963), Bulirsch (1964)].

Dalam dokumen R. Bartels, W. Gautschi, and C. Witzgall (Halaman 141-146)