Sie sind auf Seite 1von 25

Simpson Rule

Rokiah @ Rozita Ahmad, Dr

10/31/2011 Rokiah @ Rozita Ahmad, Dr


Basis of Simpson Rule
Trapezoidal rule was based on approximating the integrand
by a first order polynomial, and then integrating the
polynomial in the interval of integration. Simpson’s 1/3rd
rule is an extension of Trapezoidal rule where the integrand is
approximated by a second order polynomial
b b
I   f ( x ) dx   f
a a
2 ( x ) dx

where f2(x) is a second order polynomial.

f 2 ( x )  a0  a1 x  a2 x 2

2 Rokiah 10/31/2011
@ Rozita Ahmad, Dr
Basis of Simpson Rule

 a  b  a  b  ( b , f ( b ))
( a , f ( a )),  ,f  ,
 2  2 

a0, a1 a2
f ( a )  f 2 ( a )  a 0  a1 a  a 2 a 2
2
a  b a  b a  b a  b
f   f 2   a 0  a1 
 2a 
 2   2   2   2 
f ( b )  f 2 ( b )  a 0  a1b  a 2 b 2

3 Rokiah 10/31/2011
@ Rozita Ahmad, Dr
Basis of Simpson’s 1/3rd Rule
a0, a1 a2
2 a  b 2
a f ( b )  abf ( b )  4abf    abf ( a )  b f(a)
a0   2 
a 2  2ab  b 2
a  b a b
af ( a )  4af    3af ( b )  3bf ( a )  4bf    bf ( b )
a1    2   2 
a 2  2ab  b 2
 a  b 
2 f ( a )  2 f    f ( b ) 
  2  
a2 
a 2  2ab  b 2
10/31/2011 Rokiah @ Rozita Ahmad, Dr 4
Basis of Simpson’s 1/3rd Rule

b
I   f 2 ( x )dx
a

  a0  a1 x  a 2 x 2 dx
b

b
 x x 
2 3
 a0 x  a1  a 2 
 2 3 a

b2  a2 b3  a3
 a0 ( b  a )  a1  a2
2 3

10/31/2011 Rokiah @ Rozita Ahmad, Dr 5


Basis of Simpson’s 1/3rd Rule
a0, a1 a2
b
ba   a b 

a
f2 (x)dx 
6  f (a)  4 f 
 2 
  f (b)

ba
h
2

6 Rokiah 10/31/2011
@ Rozita Ahmad, Dr
Basis of Simpson’s 1/3rd Rule

b
h  a b 

a
f2 ( x)dx   f (a)  4 f 
3  2


 f (b) 

10/31/2011 Rokiah @ Rozita Ahmad, Dr 7


Example 1

30
  140000  
x    2000ln   9.8t dt
8 140000 2100t  

x
Et
t

10/31/2011 Rokiah @ Rozita Ahmad, Dr 8


ba   a b 
a) x  f (a)  4 f    f (b)
6   2  
 140000 
a  8, b  30  f ( t )  2000 ln    9.8t
140000  2100t 
 140000 
f (8)  2000 ln    9.8(8)  177 .27 m / s
 140000  2100(8) 
 140000  1
f (30)  2000 ln    9.8(30)  901.67 ms
 140000  2100(30) 
 140000  1
f (19)  2000ln    9.8(19)  484.75 ms
 140000  2100(19) 
10/31/2011 Rokiah @ Rozita Ahmad, Dr 9
Solution
30
a) x  f (t )dt
8

 b  a  a b 
x  f ( a )  4 f    f ( b )
 6   2 
 30  8 
  f ( 8 )  4 f ( 19 )  f ( 30 )
 6 
 22 
  177.2667  4( 484.7455 )  901.6740
6
 11065.72 m
10/31/2011 Rokiah @ Rozita Ahmad, Dr 10
Solution

30
  140000  
x    2000 ln    9 . 8t dt
8 140000  2100t  
 11061.34 m

Et  11061.34  11065.72
 4.38 m

10/31/2011 Rokiah @ Rozita Ahmad, Dr 11


Solution

11061.34  11065.72
t   100%
11061.34
 0.0396%

10/31/2011 Rokiah @ Rozita Ahmad, Dr 12


Multiple Segment Simpson’s 1/3rd Rule

a, b n rd

n a, b n

ba
h
b xn n
 f ( x )dx   f ( x )dx
a x0

x0  a xn  b
b x2 x4 xn2 xn

 f ( x)dx   f ( x)dx   f ( x)dx    


a x0 x2 xn4
f ( x ) dx  
xn 2
f ( x ) dx

10/31/2011 Rokiah @ Rozita Ahmad, Dr 13


Multiple Segment Simpson’s 1/3rd Rule
rd

b
 f (x0 )  4 f (x1)  f (x2 )   f (x2 )  4 f (x3 )  f (x4 ) 

a
f (x)dx  (x2  x0 ) 
 6 

 (x4  x2 ) 
 6 

 f (xn4 )  4 f (xn3 )  f (xn2 )   f (xn2 )  4 f (xn1)  f (xn ) 


 (xn2  xn4 )    (xn  xn2 )  
 6   6 

xi  xi  2  2h, i  2, 4, ..., n

10/31/2011 Rokiah @ Rozita Ahmad, Dr 14


Multiple Segment Simpson’s 1/3rd Rule

b
 f ( x0 )  4 f ( x1 )  f ( x2 )   f ( x2 )  4 f ( x3 )  f ( x4 ) 

a
f ( x)dx  2h 
 6 

 2h 
 6 

 f ( xn  4 )  4 f ( xn 3 )  f ( xn  2 )   f ( xn  2 )  4 f ( xn 1 )  f ( xn ) 
  2h    2h  
 6   6 

10/31/2011 Rokiah @ Rozita Ahmad, Dr 15


Multiple Segment Simpson’s 1/3rd
Rule

b h
 f ( x )dx  3  f ( x0 )  4 f ( x1 )  f ( x3 )  ...  f ( xn 1 )  ...
a

...  2 f ( x2 )  f ( x4 )  ...  f ( xn  2 )  f ( xn )}]


 
h n 1 n2
 f ( x 0 )  4  f ( xi )  2  f ( xi )  f ( x n ) 
3 i 1 i 2 
 i odd i  even 
 
ba n 1 n2
 f ( x 0 )  4  f ( xi )  2  f ( xi )  f ( x n ) 
3n  i 1 i2 
 i  odd i even 
10/31/2011 Rokiah @ Rozita Ahmad, Dr 16
Example 2

30
  140000  
x    2000 ln    9 . 8t dt
8 140000  2100t  

x.
Et
a

17 10/31/2011 Rokiah @ Rozita Ahmad, Dr


Solution
a) n=4 ,
30  8
h  5 .5
4
f (t 0 )  f (8)
f (t1 )  f (8  5.5)  f (13.5)
f (t 2 )  f (13.5  5.5)  f (19)
f (t 3 )  f (19  5.5)  f (24.5)

f (t 4 )  f (30)
 
ba n 1 n2
x f (t 0 )  4  f (t i )  2  f (t i )  f (t n ) 
3n  i 1 i2 
 i  odd i  even
10/31/2011 Rokiah @ 
Rozita Ahmad, Dr 18
Solution
 
30  8  3 2
 f (8)  4  f (t i )  2  f (t i )  f (30)
3(4)  i 1 i 2 
 i  odd i  even 
22
  f (8)  4 f (t1 )  4 f (t 3 )  2 f (t 2 )  f (30)
12
11
  f (8)  4 f (13.5)  4 f (24.5)  2 f (19)  f (30)
6
11
 177.2667  4(320.2469)  4(676.0501)  2(484.7455)  901.6740
6
 11061.64 m

10/31/2011 Rokiah @ Rozita Ahmad, Dr 19


Solution

Et  11061.34  11061.64  0.30 m

11061.34  11061.64
t   100%
11061.34

 0.0027%

10/31/2011 Rokiah @ Rozita Ahmad, Dr 20


Solution

t t

10/31/2011 Rokiah @ Rozita Ahmad, Dr 21


Error in the Multiple Segment Simpson’s
1/3rd Rule

(b  a) 5 ( 4)
Et   f ( ), a    b
2880

n
( x2  x0 )5 (4) h5 (4)
E1   f ( 1 )   f ( 1 ), x0  1  x2
2880 90
( x4  x2 )5 (4) h5 (4) x2   2  x4
E2   f ( 2 )   f ( 2 ),
2880 90

10/31/2011 Rokiah @ Rozita Ahmad, Dr 22


Error in the Multiple Segment Simpson’s 1/3rd
Rule

( x2i  x2(i 1) )5 h 5


Ei   f (4) ( i )   f (4) ( i ), x2( i 1 )   i  x2i
2880 90

( xn  2  xn  4 )5 (4)   h5 (4)  
En   f  n    f  n , xn4   n  xn2
1 2880   90  1  1
2  2 1   2  2

( xn  xn  2 )5 4   h5 (4)   , xn  2   n  xn
En   f  n    f  n 
2880   90  
2  2  2 2

10/31/2011 Rokiah @ Rozita Ahmad, Dr 23


Error in the Multiple Segment Simpson’s
1/3rd Rule

n n n
2 h5 2 (b  a ) 5
( 4)2
Et   Ei   f
( 4)
( i )  5 
f ( i )
i 1
1 90 i 1
1 90n i 1
n
2 ( 4)
f ( i )
(b  a ) 5 i 1

90n 4 n

10/31/2011 Rokiah @ Rozita Ahmad, Dr 24


Error in the Multiple Segment Simpson’s
1/3rd Rule
n
2 ( 4)
f ( i )
i 1
n
f ( 4) ( x), a  x  b

(b  a) 5 ( 4 )
Et   4
f
90n
n
2 ( 4)
f ( i )
( 4)
f  i 1
n
10/31/2011 Rokiah @ Rozita Ahmad, Dr 25

Das könnte Ihnen auch gefallen