
numerical integration 361
√0.25
√0.5
√0.75
√1 – x√1 – x
C
–
n2
L
√1 – x
C
–
n4
Adding up the areas of all such trapezoids between a
and bgives the trapezoid rule:
Mathematicians have shown that the error in this
approximation is close to , for some constant C.
Thus doubling the number of points used to make the
approximation increases the accuracy of the result by a
factor of 4.
To illustrate the trapezoid rule, we estimate
∫1
0dx using n= 4. Here f(x) = and x0= 0,
x1= 0.25, x2= 0.5, x3= 0.75, x4= 1 with h= 0.25.
We have:
f0= 1
f1= = 0.866
f2= = 0.707
f3= = 0.500
f4= 0
Consequently:
(The true value of the integral is 2/3.)
2. Simpson’s Rule: While the trapezoidal rule uses
straight-line segments to approximate the curve,
Simpson’s rule uses the arcs of parabolas through
three points at a time: one through the points P0, P1,
and P2, the next through P2, P3, and P4, and so on.
(It is assumed that nis even for this method.) Writ-
ing the equations for each of these parabolic arcs
and summing the areas under each gives, after some
work, the rule:
Mathematicians have shown that the error in this
approximation is close to for some constant C.
Thus, doubling the number of points used to make the
approximation increases the accuracy of the result by a
factor of 16.
To illustrate Simpson’s rule, we again estimate
∫1
0dx using n= 4. We have:
If nis a multiple of 3, one can use arcs of cubic curves
to establish the rule:
This is sometimes called Simpson’s 3/8-rule.
These methods of approximation are incorrectly
attributed to English mathematics teacher T
HOMAS
S
IMPSON
(1710–61).
See also M
ONTE
C
ARLO METHOD
;
NUMERICAL
DIFFERENTIATION
.
fxdx hf f f f f
ff f
a
b
n
() (
)
≈++++
++ ++
∫3
833 23
32
012 34
56
L
11
30 25 1 4 0 866 2 0 707
4 0 500 0
0 657
0
1− ≈ × ×+× +×
+× +
=
∫xdx .( . .
.)
.
fxdx hf f f f f
fff
a
b
nnn
() (
)
≈ +++++
+++
∫
−−
1
34242
24
01234
21
11
20 25 1 2 0 866 2 0 707
2 0 500 0
0 643
0
1− ≈ × ×+× +×
+× +
=
∫xdx .( . .
.
.
fxdx hf f f f f
nn
a
b() ≈+++++
()
−
∫1
222 2
012 1
L