Lecture09 - Numerical Integration (I)
Lecture09 - Numerical Integration (I)
Statistics
Lecture 9:
Numerical Integration (I)
Objectives
Introduction
Trapezoidal Rule
Multiple-Application Trapezoidal Rule
Simpson’s 1/3 Rule
Multiple-Application Simpson’s 1/3 Rule
f n ( x) a0 a1 x a2 x 2 ... an 1 x n1 an x n
f (a ) f (b)
I (b a) Trapezoidal rule
2
f (a ) f (b)
I (b a )
2
from a = 0 to b = 0.8
f ' ' ( x)
0
(400 4050 x 10800 x 2 8000 x 3 )dx
60
0.8 0
1 1
Ea f ' ' ( x )(b a ) 3 (60)(0.8 0) 3 2.56
12 12
Dr. M. Hrairi MTH2212 - Computational Methods and Statistics 12
Example 1 - Solution
Et = 1.640533 – 0.1728
= 1.467733 εt = 89.5%
Ea = 2.56
Discrepancy between Et
and Ea due to the fact that
f̅’’(x) is not an accurate
approximation of f’’(ξ) for
an interval of this size.
from a = 0 to b = 0.8
0.8 0
We have n = 2 h 0.4
2
( 0. 8 0 ) 3
Ea 2
( 60) 0.64
12(2)
h n 1 n2 (b a)5 ( 4)
I f ( x0 ) 4 f ( xi ) 2 f ( xi ) f ( xn ) Ea 4
f
3 i 1,3,5,... j 2, 4, 6,... 180n
h = (0.8-0)/4 = 0.2