• Tidak ada hasil yang ditemukan

The Integration Formulas of Newton and Cotes

Dalam dokumen 4 Systems of Linear Equations 190 (Halaman 156-161)

The integration formulas of Newton and Cotes are obtained if the inte- grand is replaced by a suitable interpolating polynomialP(x) and if then 3b

aP(x)dxis taken as an approximate value for3b

af(x)dx. Consider a uni- form partition of the closed interval [a, b] given by

xi=a+i h, i= 0, 1, . . . , n,

of step lengthh:= (b−a)/n,n >0 integer, and letPn be the interpolating polynomial of degreenor less with

Pn(xi) =fi:=f(xi) for i= 0, 1, . . . , n.

By Lagrange’s interpolation formula (2.1.1.4), Pn(x)n

i=0

fiLi(x), Li(x) =

!n

k=0k=i

x−xk xi−xk, or, introducing the new variabletsuch thatx=a+ht

Li(x) =ϕi(t) :=

!n

k=0k=i

t−k i−k. Integration gives

# b

a

Pn(x)dx= n i=0

fi

# b

a

Li(x)dx

=h n i=0

fi

# n

0

ϕi(t)dt

=h n i=0

fiαi. Note that the coefficients orweights

αi:=

# n

0

ϕi(t)dt

depend solely onn; in particular, they do not depend on the functionf to be integrated, or on the boundariesa,b of the integral.

Ifn= 2 for instance, then α0=

# 2

0

t−1 01

t−2 02dt= 1

2

# 2

0

(t23t+ 2)dt=1 2

8 312

2 + 4

=1 3, α1=

# 2

0

t−0 10

t−2 12dt=

# 2

0

(t22t)dt= 8

3 4

=4 3, α2=

# 2

0

t−0 20

t−1 21dt= 1

2

# 2

0

(t2−t)dt=1 2

8 34

2

=1 3, and we obtain the following approximate value:

# b

a

P2(x)dx= h

3(f0+ 4f1+f2) for the integral3b

af(x)dx. This isSimpson’s rule.

For any natural numbern, theNewton-Cotes formulas (3.1.1)

# b

a

Pn(x)dx=h n i=0

fiαi, fi :=f(a+ih), h:= b−a n , provide approximate values for3b

af(x)dx. The weightsαi,i= 0, 1,. . .,n, have been tabulated. They are rational numbers with the property (3.1.2)

n i=0

αi=n.

This follows from (3.1.1) when applied tof(x) :1 for whichPn(x)1.

Ifsis a common denominator for the fractional weights αi so that the numbers

σi:=s αi, i= 0, 1, . . . , n, are integers, then (3.1.1) becomes

(3.1.3)

# b

a

Pn(x)dx=h n i=0

fiαi=b−a ns

n i=0

σifi.

For sufficiently smooth functions f(x) on the closed interval [a, b] it can be shown [see Steffensen (1950)] that the approximation error may be ex- pressed as follows:

(3.1.4)

# b

a

Pn(x)dx−

# b

a

f(x)dx=hp+1·K·f(p)(ξ), ξ∈(a, b).

Here (a, b) denotes the open interval from ato b. The values ofp andK depend only onnbut not on the integrand f.

Forn= 1,2, . . . ,6 we find the Newton-Cotes formulas given in the fol- lowing table. For larger n, some of the valuesσi 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 σi ns Error Name

1 1 1 2 h3 112f(2)(ξ) Trapezoidal rule

2 1 4 1 6 h5 190f(4)(ξ) Simpson’s rule

3 1 3 3 1 8 h5 380f(4)(ξ) 3/8-rule

4 7 32 12 32 7 90 h7 8945f(6)(ξ) Milne’s rule 5 19 75 50 50 75 19 288 h7 27512096f(6)(ξ) — 6 41 216 27 272 27 216 41 840 h9 91400f(8)(ξ) Weddle’s rule

Additional integration rules may be found by Hermite interpolation [see Section 2.1.5] of the integrandf by a polynomialP ∈Πn of degreen or less. In the simplest case, a polynomialP ∈Π3with

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

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

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

P(t) =f(0)[(t−1)2+ 2t(t−1)2] +f(1)[t22t2(t−1)]

+f(0)t(t−1)2+f(1)t2(t−1), integration of which gives

# 1

0

P(t)dt= 12(f(0) +f(1)) +121(f(0)−f(1)).

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

(3.1.5)

# b

a

f(x)dx≈M(h) :=h

2(f(a) +f(b)) +h2

12(f(a)−f(b)).

Iff ∈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:

(3.1.6) M(h)

# b

a

f(x)dx=−h5

720f(4)(ξ), ξ∈(a, b), h:= (b−a).

If the support abscissas xi, i= 0, . . ., n, x0=a, xn =b, are not equally spaced, then interpolating the integrandf(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 beenextended, giving rise to a correspondingcomposite rule. We proceed to examine some composite rules of this kind.

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

2[f(xi) +f(xi+1)]

in the subinterval [xi, xi+1] of the partitionxi =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) :=

N1 i=0

Ii

=h f(a)

2 +f(a+h) +f(a+ 2h) +· · ·+f(b−h) +f(b) 2

, which is thetrapezoidal sumfor step lengthh. In each subinterval [xi, xi+1] the error

Ii

# xi+1

xi

f(x)dx=h3

12f(2)(ξi), ξi(xi, xi+1),

is incurred, assumingf ∈C2[a, b]. Summing these individual error terms gives

T(h)

# b

a

f(x)dx=h3 12

N−1

i=0

f(2)(ξi) =h2

12(b−a)1 N

N1 i=0

f(2)(ξi).

Since

mini f(2)(ξi) 1 N

N1 i=0

f(2)(ξi)max

i f(2)(ξi) andf(2)(x) is continuous, there exists ξ∈[min

i ξi,max

i ξi](a, b) with

f(2)(ξ) = 1 N

N−1

i=0

f(2)(ξi).

Thus

T(h)

# b

a

f(x)dx=b−a

12 h2f(2)(ξ), ξ∈(a, b).

Upon reduction of the step lengthh(increase ofn) the approximation error approaches zero as fast ash2, so we have a method oforder 2.

If N is even, then Simpson’s rule may be applied to each subinterval [x2i, x2i+2],i= 0, 1,. . ., (N/2)1, individually yielding the approximation (h/3)(f(x2i) + 4f(x2i+1) +f(x2i+2)). Summing theseN/2 approximations results in the composite version of Simpson’s rule

S(h) := h

3[f(a) + 4f(a+h) + 2f(a+ 2h) + 4f(a+ 3h) +· · · + 2f(b−2h) + 4f(b−h) +f(b)], for the entire interval. The error ofS(h) is the sum of allN/2 individual errors

S(h)

# b

a

f(x)dx=h5 90

(N/2)1

i=0

f(4)(ξi) = h4 90

b−a 2

2 N

(N/2)1

i=0

f(4)(ξi), and we conclude, just as we did for the trapezoidal sum, that

S(h)

# b

a

f(x)dx= b−a

180 h4f(4)(ξ), ξ∈(a, b), providedf ∈C4[a, b]. The method is therefore oforder 4.

Extending the rule of integration M(h) in (3.1.5) has a remarkable effect: when the approximation to the individual subintegrals

# xi+1

xi

f(x)dx for i= 0,1, . . . , N−1

are added up, all the “interior” derivativesf(xi), 0< i < N, cancel. The following approximation to the entire integral is obtained:

U(h) : =h f(a)

2 +f(a+h) +· · ·+f(b−h) +f(b) 2

+h2

12[f(a)−f(b)]

=T(h) +h2

12[f(a)−f(b)].

This formula can be considered as a correction to the trapezoidal sumT(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 ruleU(h) in the same fashion as before. Thus

(3.1.8) U(h)

# b

a

f(x)dx=−b−a

720 h4f(4)(ξ), ξ∈(a, b),

provided f 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 minimum of additional effort, namely the computation off(a) andf(b).

If these 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.

Replacing f(a), f(b) by difference quotients with an approximation error of sufficiently high order, we obtain simple modifications [“end cor- rections”: see Henrici (1964)] of the trapezoidal sum which do not involve drivatives but still lead to methods of orders higher than 2. The following variant of the trapezoidal sum is already a method of order 3:

T(h) :=hˆ ,5

12f(a) +1312f(a+h) +f(a+ 2h) +· · ·+f(b−2h) +1312f(b−h) +125f(b)-

.

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

Dalam dokumen 4 Systems of Linear Equations 190 (Halaman 156-161)