Adding up the areas of all such trapezoids between a
and b gives 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
0
dx using n = 4. Here f(x) =
and x 0 = 0,
x 1 = 0.25, x 2 = 0.5, x 3 = 0.75, x 4 = 1 with h = 0.25.
We have:
f 0 = 1
f 1 =
= 0.866
f 2 =
= 0.707
f 3 =
= 0.500
f 4 = 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 P 0 , P 1 ,
and P 2 , the next through P 2 , P 3 , and P 4 , and so on.
(It is assumed that n is even for this method.) Writing 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
0
dx using n = 4. We have:
If n is 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 THOMAS
SIMPSON (1710–61).
See also MONTE CARLO METHOD; NUMERICAL
DIFFERENTIATION.
f x dx
h f
f
f
f
f
f
f
f
a
b
n
( )
(
)
≈
+
+
+
+
+
+
+ +
∫
3
8
3
3
2
3
3
2
0
1
2
3
4
5
6 L
1
1
3
0 25 1 4 0 866 2 0 707
4 0 500 0
0 657
0
1
−
≈ ×
× + ×
+ ×
+ ×
+
=
∫
x dx
.
(
.
.
.
)
.
√1 – x
C
–
n
4
f x dx
h f
f
f
f
f
f
f
f
a
b
n
n
n
( )
(
)
≈
+
+
+
+
+
+
+
+
∫
−
−
1
3
4
2
4
2
2
4
0
1
2
3
4
2
1
L
1
1
2
0 25 1 2 0 866 2 0 707
2 0 500 0
0 643
0
1
−
≈ ×
× + ×
+ ×
+ ×
+
=
∫
x dx
.
(
.
.
.
.
√0.25
√0.5
√0.75
√1 – x
√1 – x
C
–
n
2
f x dx
h f
f
f
f
f
n
n
a
b ( ) ≈
+
+
+ +
+
(
)
−
∫
1
2
2
2
2
0
1
2
1
L
numerical integration 361
Précédent

- 370/576

Suivant