Lecture36 - Chapter 16 Numerical Integration b I = f x)dx a Numerical integration Newton-Cotes formulas based on idea b b a a I = f x)dx f n x)dx

# Lecture36 - Chapter 16 Numerical Integration b I = f x)dx a...

This preview shows page 1 - 9 out of 28 pages.

Chapter 16 Numerical Integration ( ) b a I f x dx =
Newton-Cotes formulas - based on idea dx x f dx x f I b a n b a 2245 = ) ( ) ( Approximate f ( x ) by a polynomial n n 1 n 1 n 1 0 n x a x a x a a x f + + + + = - - ) ( Numerical integration
Numerical Integration Newton-Cotes Closed Formulae -- Use both end points Trapezoidal Rule : Linear Simpson’s 1/3-Rule : Quadratic Simpson’s 3/8-Rule : Cubic Higher-order methods* Newton-Cotes Open Formulae -- Use only interior points midpoint rule Higher-order methods
Trapezoidal Rule Straight-line approximation [ ] ) ( ) ( ) ( ) ( ) ( ) ( 1 0 1 1 0 0 i 1 0 i i b a x f x f 2 h x f c x f c x f c dx x f + = + = = x 0 x 1 x f ( x ) L(x)
Composite Trapezoidal Rule [ ] [ ] [ ] [ ] ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( n 1 n i 1 0 n 1 n 2 1 1 0 x x x x x x b a x f x f 2 x 2f x f 2 x f 2 h x f x f 2 h x f x f 2 h x f x f 2 h dx x f dx x f dx x f dx x f n 1 n 2 1 1 0 + + + + + + = + + + + + + = + + + = - - - x 0 x 1 x f ( x ) x 2 h h x 3 h h x 4 n a b h - =
Simpson’s 1/3-Rule Approximate the function by a parabola [ ] ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( 2 1 0 2 2 1 1 0 0 i 2 0 i i b a x f x f 4 x f 3 h x f c x f c x f c x f c dx x f + + = + + = = x 0 x 1 x f ( x ) x 2 h h L ( x )
Simpson’s 3/8-Rule Approximate by a cubic polynomial [ ] ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( ) ( 3 2 1 0 3 3 2 2 1 1 0 0 i 3 0 i i b a x f x f 3 x f 3 x f 8 h 3 x f c x f c x f c x f c x f c dx x f + + + = + + + = = x 0 x 1 x f(x) x 2 h h L(x) x 3 h
Example: Simpson’s Rules Evaluate the integral Simpson’s 1/3-Rule Simpson’s 3/8-Rule dx xe 4 0 x 2 [ ] [ ] % . . . . . ) ( ) ( ) ( ) ( 96 57 926 5216 411 8240 926 5216 411 8240 e 4 e 2 4 0 3 2 4 f 2 f 4 0 f 3 h dx xe I 8 4 4 0 x 2 - = - = = + + = + + = ε [ ] % 71 . 30 926 . 5216 209 . 6819 926 . 5216 209 . 6819 832 . 11923 ) 33933 . 552 ( 3 ) 18922 . 19 ( 3 0 8 ) 4/3 ( 3 ) 4 ( f ) 3 8 ( f 3 ) 3 4 ( f 3 ) 0 ( f 8 h 3 dx xe I 4 0 x 2 - = - = = + + + = + + + = ε

#### You've reached the end of your free preview.

Want to read all 28 pages?

• Spring '09
• RAPHAELHAFTKA
• Composite Simpson