Professional Documents
Culture Documents
FOR NUMERICAL
INTEGRATION
n Section 8.1 (ET Section 7.1), we studied three methods of numerical integration: the
I Trapezoidal Rule TN , the Midpoint Rule M N , and Simpson’s Rule S N . These “rules”
provide numerical approximations to a definite integral
b
f (x) d x
a
For each rule, we stated an Error Bound which provides an upper limit to the size of
the error in the approximation. In this supplement, we prove the Error Bounds for TN
and M N . The Error Bound for S N may be proved in a similar fashion, but the details are
somewhat more complicated and the proof is omitted.
x j = a + jx j = 0, 1, . . . , N
height f(cj)
y = f(x) y = f(x)
Δx
x0 = a c1 x1 xj −1 cj xj xN = b x0 = a c1 x1 xj −1 cj xj xN = b
(A) MN is the sum of the areas of (B) MN is also equal to the sum of the
the midpoint rectangles. areas of the tangential trapezoids.
FIGURE 1
1
2 E R R O R B O U N D S FO R N U M E R I C A L I N T E G R AT I O N
The jth midpoint rectangle is the rectangle of height f (c1 ) over the subinterval [x j−1 , x j ].
This rectangle has signed area
f (c j )x
and M N is equal to the sum of the signed areas of these rectangles:
M N = x f (c1 ) + f (c2 ) + · · · + f (c N ) 1
The error in the approximation M N is
b
Error(M N ) = f (x) d x − M N
a
THEOREM 1 Error Bound for MN Let K 2 be a number such that | f (x)| ≤ K 2 for
all x ∈ [a, b]. Then
K 2 (b − a)3
Error(M N ) ≤
24N 2
We will prove that E j is at most K 2 (x)3 /24 for all j, where x = (b − a)/N . In other
words,
K2 K2 b − a 3 K 2 (b − a)3
Ej ≤ (x)3 = = 2
24 24 N 24N 3
Since there are N subintervals, the total error is at most N times this quantity:
K 2 (b − a)3 K 2 (b − a)3
Error(M N ) ≤ N =
The area between the graph and the 24N 3 24N 2
tangent line is at most K2(Δx)3/24
This is the bound stated in Theorem 1. Therefore, Theorem 1 follows if we prove (2).
The error E j is equal to the signed area between the tangent line and the graph over
[x j−1 , x j ] (Figure 2). More precisely, let L(x) be the linear approximation to f (x) at
x = cj
y = L(x)
L(x) = f (c j ) + f (c j )(x − c j )
y = f (x)
The following inequality is valid for all Using inequality (3), we obtain
integrable functions g(x):
xj xj
b
f (x) − L(x) d x
b Ej = f (x) − L(x) d x ≤
g(x) d x ≤ |g(x)| d x 3 x j −1 x j −1
a a
Proof The linear function L(x) is the first Taylor polynomial for f (x) centered at x =
c j . According to the Error Bound for Taylor polynomials (LT Section 9.4, ET Section
8.4),
f (x) − L(x) ≤ 1 K 2 (x − c j )2
2
Therefore,
xj xj
f (x) − L(x) d x ≤ 1 K 2 (x − c j )2 d x 5
x j −1 2 x j −1
Note that
1 1 1
x j − c j = x j − (x j−1 + x j ) = (x j − x j ) = x
2 2 2
1
and similarly, x j−1 − c j = − x. Therefore
2
xj
1 x 3 1 −x 3 (x)3
(x − c j ) d x =
2
− = 6
x j −1 3 2 3 2 12
1 (x) 3 K 2 (x)3
f (x) − L(x) d x ≤ K 2 =
a 2 12 24
(xj −1, f (xj −1))
THEOREM 3 Error Bound for TN Let K 2 be a number such that | f (x)| ≤ K 2 for
In Theorem 3, the error in TN is defined by all x ∈ [a, b]. Then
b K 2 (b − a)3
Error(TN ) =
a
f (x) d x − TN
Error(TN ) ≤
12N 2
As we observed above in the case of the Midpoint Rule, the total error Error(TN ) is
not greater than the sum of the errors over the subintervals [x j−1 , x j ]. Again, we denote
the error over [x j−1 , x j ] by E j . Then
N
Error(TN ) ≤ Ej
j=1
We will prove that E j is at most K 2 (x)3 /12 for all j, where x = (b − a)/N . In other
words,
3
K2 K2 b−a K 2 (b − a)3
Ej ≤ (x)3 = = 7
12 24 N 12N 3
Since there are N subintervals, the total error is at most N times this quantity:
K 2 (b − a)3 K 2 (b − a)3
Error(TN ) ≤ N =
12N 3 12N 2
This is the bound stated in Theorem 1. Therefore, Theorem 3 follows if we prove (7).
The area between the graph and the To prove (7), note that the error E j is equal to the signed area between the secant line
secant line is at most K2(Δx)3/12
and the graph over [x j−1 , x j ] (Figure 4). Let S(x) be the linear function whose graph is
this secant line. For the record,
f (x j ) − f (x j−1 ) x j f (x j−1 ) − x j−1 f (x j )
y = S(x) S(x) = x+
x j − x j−1 x j − x j−1
y = f (x)
A key tool in the proof of Theorem 4 is the following version of Rolle’s Theorem.
E R R O R B O U N D S FO R N U M E R I C A L I N T E G R AT I O N 5
LEMMA 5 Rolle’s Theorem for a Function With Three Zeroes Assume that G(x) is
continuous on [x j−1 , x j ] and that G (x) exists on (x j−1 , x j ). Let t ∈ (x j−1 , x j ) and
assume further that
y Proof Rolle’s Theorem (Theorem 4 in Section 4.2) states that if f (x) is a continuous
y = G(x)
function on [x j−1 , x j ] such that f (x) exists on (x j−1 , x j ) and
G"(c) = 0
f (x j−1 ) = f (x j ) = 0
then there exists c ∈ (x j−1 , x j ) such that f (c) = 0. In other words, between any two
x
xj −1 r c t s xj
The solution is
f (t) − S(t)
q= 9
(t − x j−1 )(t − x j )
Similarly, G(x j ) = 0. Therefore, with our choice of q we find that G(x) has zeroes at
x = x j−1 , x j and t. By Lemma 5, there exists c ∈ (x j−1 , x j ) such that G (c) = 0.
We claim that G (x) = f (c) − 2q. Indeed,
d2 d2 2
2
(x − x j−1 )(x − x j ) = 2
x − (x j−1 + x j )x + x j−1 x j = 2
dx dx
On the other hand, S (x) = 0 since S(x) is linear, and thus
d2
G (c) = f (c) − S (c) − q 2
(x − x j−1 )(x − x j ) = f (c) − 2q
dx
Since G (c) = 0, q = 1
2 f (c), and since | f (c)| ≤ K 2 , Eq. (9) gives us
f (t) − S(t) 1 1
|q| = = f (c) ≤ K 2
(t − x j−1 )(t − x j ) 2 2
6 E R R O R B O U N D S FO R N U M E R I C A L I N T E G R AT I O N
Multiplying both sides of this inequality by |(t − x j−1 )(t − x j )|, we obtain:
f (t) − S(t) ≤ 1 K 2 (t − x j−1 )(t − x j )
2
This inequality is valid for all t ∈ (x j−1 , x j ). Now write x in place of t in this inequality
and integrate:
xj xj
f (x) − S(x) d x ≤ 1 K 2 (x − x j−1 )(x − x j ) d x 10
x j −1 2 x j −1
To evaluate this last integral, note that (x − x j−1 )(x − x j ) is negative for x ∈ (x j−1 , x j )
(since the first factor positive and the second is negative on (x j−1 , x j )). Therefore
xj xj
(x − x j−1 )(x − x j ) d x = − (x − x j−1 )(x − x j ) d x
x j −1 x j −1
x j −1 2 6 12