• Tidak ada hasil yang ditemukan

The Integration Formulas of Newton and Cotes

Dalam dokumen R. Bartels, W. Gautschi, and C. Witzgall (Halaman 128-133)

Topics in Integration

3.1 The Integration Formulas of Newton and Cotes

The integration formulas of Newton and Cotes are obtained if the integrand is replaced by a suitable interpolating polynomial P{x) and if then

J!

P{x) dx

is taken as an approximate value for

J!!

(x) dx. Consider a uniform partition of the closed interval [a, b] given by

Xi = a

+

ih, i

=

0, ... , n,

of step length h:= (b - a)/n, n > 0 integer, and let Pn be the interpolating polynomial of degree n or less with

Pn{Xi) =};:= !(Xi) for i = 0, 1, ... , n.

By Lagrange's interpolation formula (2.1.1.4),

n

Pn{x) ==

L

};Li{x),

i=O

or, introducing the new variable t such that x

=

a

+

ht,

n t - k Li{X) = lI'i{t):=

n

-:--k·

Integration gives

k=O 1- kti

IJ n b

J

Pn{x) dx =

L 1; r

Li{X) dx

G i=O ala

=

h

L

n };(Xi·

i=O

Note that the coefficients or weights

(Xi:=

r

lI'i{t) dt

o

depend solely on n; in particular, they do not depend on the functionfto be integrated, nor on the boundaries a, b of the integral.

If n = 2 for instance, then

and we obtain the following approximate value:

r

b h

. P2(x) dx

="3

(fo

+ 4f1 +

f2)

a

for the integral J~f(x) dx. This is Simpson's rule.

For any natural number n, the Newton-Cotes formulas

b n

(3.1.1)

r

Pn(x)dx=h

L

h(Xi' h=f(a+ih),

"'a i=O

h:=--b-a , n

provide approximate values for J~f(x) dx. The weights (Xi' i = 0, 1, ... , n, have been t,abulated. They are rational numbers with the property

(3.1.2)

L

n (Xi

=

n.

i=O

This follows from (3.1.1) when applied tof(x):== 1, for which Pn(x) == L If s is a common denominator for the fractional weights (Xi' that is, if the numbers

i = 0, 1, ... , n, are integers, then (3.1.1) becomes

(3.1.3)

It can be shown [see Steffensen (1950)] that the approximation error may be expressed as follows:

.b

fb

(3.1.4)

J

Pn(x) dx - f(x) dx = hP+1 K . j<p)(~), ~ E (a, b).

a a

Here (a, b) denotes the open interval from a to b, The values of p and K depend only on n but not on the integrand

f

For n = 1,2, ... , 6 we find the Newton-Cotes formulas given in the following table. For larger n, some of the values (1i become negative and the corresponding formulas are unsuitable for numerical purposes, as cancella- tions tend to occur in computing the sum (3.1.3).

n (Ji ns Error Name

1 2 h3 -bf(2)(~) Trapezoidal rule

2 4 6 h5 -Jot<4)(~) Simpson's rule

3 3 3 8 h5 Jo-t<4)(~) 3/8-rule

4 7 32 12 32 7 90 h7 kt<6)(O Milne's rule 5 19 75 50 50 75 19 288 h 7 rmot<6)(~)

6 41 216 27 272 27 216 41 840 h9 r/o-ot<8)(O Weddle's rule

Additional integration rules may be found by Hermite interpolation (see Section 2.1.5) of the integrand fby a polynomial P E ITn of degree n or less.

In the simplest case, a polynomial P E IT3 with P(a) = f(a),

P(b)

=

f(b),

P'(a) = f'(a), P'(b)

=

f'(b)

is substituted for the integrand! The generalized Lagrange formula (2.1.5.3) yields for P in the special case a = 0, b = 1,

P{t) = f{O)[(t - 1)2

+

2t(t - 1)2]

+

f(I)[t2 - 2t2(t - 1)]

+

f'{O)t{t - 1)2

+

f'{l)t2{t - 1), integration of which gives

f

1 P{t) dt = t(f(O)

+

f(I))

+ 1~2(f'{0)

- 1'(1)).

o

From this, we obtain by a simple variable transformation the following integration rule for general a < b (h:= b - a):

(3.1.5)

f

b f(x) dx

~

M(h)

:=2

h (f(a)

+

f(b))

+

12 h2 (f'(a) - f'(b)),

"

If

f

E C4 [ a, b] then-using methods to be described in Section 3.2-the approximation error of the above rule can be expressed as follows:

b h5

(3.1.6) M(h) -

f

f{x) dx = -

720J<4)(~),

"

~E(a,u), h:=(b-a).

If the support abscissas Xi' i = 0, 1, ... , n, Xo = a, Xn = b are not equally spaced, then interpolating the integrand f(x) will lead to different integra- tion rules, among them the ones given by Gauss. These will be described in Section 3.6.

The Newton-Cotes and related formulas are usually not applied to the entire interval of integration [a, b], but are instead used in each one of a collection of subintervals into which the interval [a, b] has been divided. The full integral is then approximated by the sum of the approximations to the subintegrals. The locally used integration rule is said to have been extended, giving rise to a corresponding composite rule. We proceed to examine some composite rules of this kind.

The trapezoidal rule (n = 1) provides the approximate value Ii

:="2

h [f(x;)

+

f(X H1 )]

in the subinterval [x;, XH 1] of the partition Xi = a

+

ih, i = 0, 1, ... , N, h:= (b - a)/N. For the entire interval [a, b], we obtain the approximation (3.1.7)

T(h):=

~t:

Ii = h [f;a)

+

f(a

+

h)

+

f(a

+

2h)

+ ... +

f(b - h)

+

f;b)] ,

which is the trapezoidal sum for step length h. In each subinterval [Xi' XH

t1

the error

is incurred, assuming

f

E C2 [ a, b]. Summing these individual error terms gives

b h3 N - 1 h2 1 N - 1

T(h) -

t

f(x) dx =

12 i~O

f(2)g;) = 12 (b - a) N

i~O

j<2)(O·

Since

and j<2)(X) is continuous, there exists ~ E [mini ~;, maXi ~;] c (a, b) with j<2)(O

=! Nil j<2)(~;).

N i=O

Thus

T(h) - (f(x) dx = b

~

a

h2j<2)(~),

/J

~ E (a, b).

Upon reduction of the step length h (increase of N) the approximation error approaches zero as fast as h2 , so we have a method of order 2.

If N is even, then Simpson's rule may be applied to each subinterval

[X2i' X2i+l, X2i+2]' i = 0,1, ... , N/2 - 1, individually, yielding the approxi- mation (h/3)(f(X2i)

+

4f(X2i+

d +

f(X2i+2))' Summing these N/2 approxi- mations results in the composite version of Simpson's rule,

S(h) =

3

h [!(a)

+

4f(a

+

h)

+

2f(a

+

2h)

+

4f(a

+

3h)

+ ...

+

2f(b - 2h)

+

4f(b - h)

+

f(b)],

for the entire interval. The error of S(h) is the sum of all N/2 individual errors

f

b h5 (Nj2)-1 h4 b a 2 (Nj2)-1 S(h) - a f(x) dx = -90 i=O

L

P4)(~i) =

----=--

90 2 N i=O

L

P4)(~i)'

and we conclude, just as we did for the trapezoidal sum, that

~ E (a, b), provided

f

E C4[a, b]. The method is therefore of order 4.

Extending the rule of integration M(h) in (3.1.5) has a remarkable effect:

when the approximations to the individual subintegrals

(i+l f

(X) dx for i

=

0,1, ... , N - 1

"'Xi

are added up, all the" interior" derivatives f'(x;),

°

< i < N, cancel. The following approximation to the entire integral is obtained:

U(h):= h [f;a)

+

f(a

+

h)

+ ... +

f(b - h)

+

f;b)]

+ ~~

[f'(a) - f'(b)]

h2 \

=

T(h)

+

12 [f'(a);- f'(b)].

This formula can be considered as a correction to the trapezoidal sum T(h).

It relates closely to the Euler-Maclaurin summation formula, which will be discussed in Section 3.3 [see also Schoenberg (1969)]. The error formula (3.1.6) for M(h) can be extended to an error formula for the composite rule U(h) in the same fashion as before. Thus

(3.1.8) U(h) - (f(x) dx

= -

b7;oa

h4f(4)(~), ~

E (a, b),

a

provided

f

E C4 [ a, b]. Comparing this error with that of the trapezoidal sum, we note that the order of the method has been improved by 2 with a mini- mum of additional effort, namely the computation off'(a) andf'(b).lfthese two boundary derivatives are known to agree, e.g. for periodic functions, then the trapezoidal sum itself provides a method of order at least 4.

Replacingj'(a),f'(b) by difference quotients with an approximation error of sufficiently high order, we obtain simple modifications [" end correc- tions": see Henrici (1964)] of the trapezoidal sum which do not involve derivatives but sti11lead to methods of orders higher than 2. The following variant of the trapezoidal sum is already a method of order 3:

T(h) = hUd(a)

+

~U(a

+

h)

+

f(a

+

2h)

+ ...

+

f(b - 2h)

+

~U(b - h)

+

td(b))).

For many additional integration methods and their systematic examination see, for instance Davis and Rabinowitz (1975).

Dalam dokumen R. Bartels, W. Gautschi, and C. Witzgall (Halaman 128-133)