576 Chapter 20Numerical methods
EXAMPLE 20.11Find estimates of the integral by means of
Simpson’s rule (20.35) for 2 n 1 = 1 2, 4, 6,and 12.
We use the values of the integrand in Table 20.7 and construct Table 20.9.
Table 20.9 Simpson’s rule for
jx
j
f(x
j
)2n 1 = 122 n 1 = 142 n 1 = 162 n 1 = 112
0 0.0 0.000000 × 1 × 1 × 1 × 1
1 0.1 0.099005 × 4
2 0.2 0.192158 × 4 × 2
3 0.3 0.274179 × 4 × 4
4 0.4 0.340858 × 2 × 2
5 0.5 0.389400 × 4
6 0.6 0.418606 × 4 × 2 × 4 × 2
7 0.7 0.428838 × 4
8 0.8 0.421834 × 2 × 2
9 0.9 0.400372 × 4 × 4
10 1.0 0.367879 × 4 × 2
11 1.1 0.328017 × 4
12 1.2 0.284313 × 1 × 1 × 1 × 1
Totals 1.958737 3.819729 5.724269 11.446227
0.391747 0.381973 0.381618 0.381541
The exact value is 0.381536, and Simpson’s rule is accurate enough for many
applications even without correction.
0 Exercises 20–23
The Euler–MacLaurin formula
When the integrandf(x)can be expanded as a Taylor series in the intervala 1 ≤ 1 x 1 ≤ 1 b,
the approximate expression (20.32) for the trapezoidal rule can be replaced by the
Euler–MacLaurin formula
(20.36)
−
!
′− ′ −
!
′′′
−
′′′
−
!
B
h
ff B
h
ff B
h
2 nn
2
04
4
06
6
24 6
() ( ) (()ff
n
vv
−−
0
Z
a
b
nn
fxdx h f f f() =+++++f f
−
1
2
1
2
012 1
×=
h
I
3
Ixedx
x
==
−−
Z
0
1.2 2
Ixedx
x
=
−
Z
0
12. 2