Trapezoidal Rule

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

A SHORT PROOF OF THE ERROR BOUND FOR THE

TRAPEZOIDAL RULE

YC

The approximation formula for the integral


Z b
∆x
f (t)dt ≈ (f (x0 ) + 2f (x1 ) + 2f (x2 ) + ... + 2f (xn−1 ) + f (xn )) .
a 2
We want to prove the error bound
K(b − a)3
|Error| ≤
12n2
provided |f 00 (x)| ≤ K. (i.e. f 00 has an upper bound K. )

Proof:
First, we divide the interval [a, b] by n-equal subintervals: a = x0 <
x1 < ... < xn−1 < xn = b with xi − xi−1 = b−a n
for any i = 1, 2, ...n.
Since the error |Error| is the difference of the exact value and the
approximation value, we have
n    X n Z xi
X b−a f (xi−1 ) + f (xi )
|Error| = | − f (t)dt|
i=1
n 2 i=1 x i−1

n    Z xi 
X b − a f (xi−1 ) + f (xi )
=| − f (t)dt |.
i=1
n 2 x i−1

For any i, 0 ≤ i ≤ n, we define


  Z xi
b − a f (xi−1 ) + f (xi )
Li = − f (t)dt,
2n 2 xi−1

xi−1 +xi
and we observe that if the midpoint ci = 2
,then we have
b−a
(1) xi − ci = ci − xi−1 = .
n

Date: March 4, 2014.


1
2 YC

We also have the observation by the integration by parts:

Z xi Z xi
0
(t − ci )f (t)dt = (t − ci )df (t)
xi−1 xi−1
Z xi
= (xi − ci )f (xi ) − (xi−1 − ci )f (xi−1 ) − f (t)dt
xi−1
Z xi
by(1) b − a
= (f (xi−1 + f (xi )) − f (t)dt = Li .
2n xi−1

Therefore,

Z xi
(2) Li = (t − ci )f 0 (t)dt.
xi−1

We can use the integration by parts again and the Fundamental The-
orem of Calculus,

xi
(t − ci )2
Z
Li = f 0 (t)d
xi−1 2
(xi − ci )2 0 (xi−1 − ci )2 0 1 xi
Z
= f (xi ) − f (xi−1 ) − (t − ci )2 f 00 (t)dt
2 2 2 xi−1
 2 Z xi
by(1) 1 b−a 1
= (f 0 (xi ) − f 0 (xi−1 )) − (t − ci )2 f 00 (t)dt
2 2n 2 xi−1
Z xi Z xi
F und.T hm. 1 1
= f 00 (t)dt − (t − ci )2 f 00 (t)dt
2 xi−1 2 xi−1
1 xi
 
b−a 2
Z
= ( ) − (t − ci ) f 00 (t)dt.
2
2 xi−1 2n
A SHORT PROOF OF THE ERROR BOUND FOR THE TRAPEZOIDAL RULE 3

Thus, if |f 00 (t)| ≤ K on the interval [a, b] we have

n
X
|Error| ≤ |Li|
i=1
n xi  
b−a 2
Z
1X
≤ | ( ) − (t − ci ) ||f 00 (t)|dt
2
2 i=1 xi−1 2n
n
K X xi b − a 2
Z
≤ ( ) − (t − ci )2 dt
2 i=1 xi−1 2n
 
K b−2 2 2n b − a 3
= ( ) (b − a) − ( )
2 2n 3 2n
K(b − a)3
= ,
12n2
and we have completed our proof. 
More questions:
Instead of the assumption for the second derivative |f 00 (x)| ≤ K, if
we only know the upper bound of the first derivative |f 0 (x)|, we can
still have the estimate of the upper bound of the error. However, the
accuracy is related to ( n1 ) which is worse than the previous, ( n12 ). In
fact, suppose |f 0 (x)| ≤ M for all x ∈ [a, b], by (2),
Z xi
|Li | ≤ M |t − ci |dt
xi−1
 Z ci Z xi 
M b−a 2
=M −t + ci dt + t − ci dt = ( ).
xi−1 ci 4 n
This implies
n
X M (b − a)2
|Error| ≤ |Li | ≤ .
i=1
4n

You might also like