Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...
Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...
Numerical Methods Course Notes Version 0.1 (UCSD Math 174, Fall ...
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
frag replacements<br />
8.2. TRAPEZOIDAL RULE 101<br />
uright<br />
x i x i+1<br />
lleft<br />
Figure 8.3: The trapezoidal rule is an overestimate for a function which is concave up, i.e., has<br />
positive second derivative.<br />
8.2.2 Using the Error Bound<br />
Example Problem 8.9. How many intervals are required to approximate the integral<br />
ln 2 = I =<br />
∫ 1<br />
0<br />
1<br />
1 + x dx<br />
to within 1 × 10 −10 ?<br />
Solution: We have f(x) = 1<br />
1+x , thus f ′ (x) = − 1<br />
(1+x)<br />
. And f ′′ 2<br />
(x) = 2 (1+x)<br />
. Thus f ′′ (ξ) is<br />
3<br />
continuous and bounded by 2 on [0, 1]. If we use n equal subintervals then Theorem 8.8 tells us the<br />
error will be<br />
− 1 − 0 ( ) 1 − 0 2<br />
f ′′ (ξ) = − f ′′ (ξ)<br />
12 n<br />
12n 2 .<br />
To make this smaller than 1 × 10 −10 , in absolute value, we need only take<br />
√<br />
1<br />
1<br />
6n 2 ≤ 1 × 10−10 ,<br />
and so n ≥<br />
6 × 105 suffices. Because f ′′ (x) is positive on this interval, the trapezoidal rule will<br />
be an overestimate.<br />
⊣<br />
Example Problem 8.10. How many intervals are required to approximate the integral<br />
∫ 2<br />
0<br />
x 3 − 1 dx<br />
to within 1 × 10 −6 ?<br />
Solution: We have f(x) = x 3 − 1, thus f ′ (x) = 3x 2 , and f ′′ (x) = 6x. Thus f ′′ (ξ) is continuous<br />
and bounded by 12 on [0, 2]. If we use n equal subintervals then by Theorem 8.8 the error will be<br />
− 2 − 0 ( ) 2 − 0 2<br />
f ′′ (ξ) = − 2f ′′ (ξ)<br />
12 n<br />
3n 2 .