Professional Documents
Culture Documents
Statistics
Lecture 10:
Numerical Integration (II)
Objectives
(b a)5 ( 4)
Et f ()
6480
More accurate
from a = 0 to b = 0.8
h = (0.8-0)/3 = 0.2667
3(0.2667)
I 0.2 3(1.432724 3.487177) 0.232 1.51970
8
h = (0.8-0)/5 = 0.16
I c0 f (a ) c1 f (b)
(ba ) / 2
c0 c1 1 dx
(b a ) / 2
ba b a (ba ) / 2
c0 c1 x dx
2 2 ( b a ) / 2
c0 c1 b a
ba ba Solve simultaneously
c0 c1 0
2 2
ba
c0 c1
2
ba ba Trapezoidal rule
I f (a) f (b)
2 2
Dr. M. Hrairi MTH2212 - Computational Methods and Statistics 12
Two-Point Gauss-Legendre Formula
1
c0 f ( x0 ) c1 f ( x1 ) 1 dx 2
1
1
c0 f ( x0 ) c1 f ( x1 ) x dx 0
1
1
Solved simultaneously
2
c0 f ( x0 ) c1 f ( x1 ) x 2 dx
1
3 Notice that the integration
1 limits are from -1 to 1. This
c0 f ( x0 ) c1 f ( x1 ) x 3 dx 0 was done for simplicity and
1 make the formulation as
1 1 general as possible.
c0 c1 1, x0 , x1
3 3
Yields an integral
1 1 estimate that is third
I f f
3 3 order accurate
Dr. M. Hrairi MTH2212 - Computational Methods and Statistics 14
Two-Point Gauss-Legendre Formula
from a = 0 to b = 0.8
2 2 n 3 (n 1)!
4
Error for the Gauss-
Et f ( 2 n 2)
( )
(2n 3) (2n 2)! Legendre formulas
3
Computational Methods
20.41, 24.44, 24.55
Statistics
4.45, 4.46, 4.53, 4.71, 4.74, 4.84 (new textbook)
OR
4.43, 4.44, 4.49, 4.65, 4.71, 4.80 (old textbook)