Sei sulla pagina 1di 8

Chemical engineering Department Assist Lecturer Ghadeer Jassim

Simpson’s 1/3 Rule of Integration


After reading this chapter, you should be able to
1. derive the formula for Simpson’s 1/3 rule of integration,
2. use Simpson’s 1/3 rule it to solve integrals,
3. develop the formula for multiple-segment Simpson’s 1/3 rule of integration,
4. use multiple-segment Simpson’s 1/3 rule of integration to solve integrals,

What is integration?
Integration is the process of measuring the area under a function plotted on a
graph. A wide variety of numerical methods has been developed to simplify the
integral. Here, we will discuss Simpson’s 1/3 rule of integral approximation,
which improves upon the accuracy of the trapezoidal rule.
Here, we will discuss the Simpson’s 1/3 rule of approximating integrals of the form
b
I   f x dx
a

where
f (x) is called the integrand,
a  lower limit of integration
b  upper limit of integration

Simpson’s 1/3 Rule


The trapezoidal rule was based on approximating the integrand by a first order
polynomial, and then integrating the polynomial over interval of integration.
Simpson’s 1/3 rule is an extension of Trapezoidal rule where the integrand is
approximated by a second order polynomial.

Figure 1 Integration of a function

Page | 196
Chemical engineering Department Assist Lecturer Ghadeer Jassim

Method 1:
Hence
b b
I   f ( x)dx   f 2 ( x)dx
a a

where f 2 ( x) is a second order polynomial given by


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

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

as the three points of the function to evaluate a0 , a1 and a 2 .


f (a)  f 2 (a)  a0  a1a  a2 a 2

ab ab ab ab


2

f   f2    a0  a1    a2  
 2   2   2   2 
f (b)  f 2 (b)  a0  a1b  a2 b 2

Solving the above three equations for unknowns, a0 , a1 and a2 give


ab
a 2 f (b)  abf (b)  4abf    abf (a)  b f (a)
2

a0   2 
a  2ab  b 2
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  2ab  b
2 2

Then
b
 x3 
I   f 2 ( x)dx    
b b
x2
a0  a1 x  a 2 x dx  a0 x  a1
2
 a2 
a a  2 3 a

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

Page | 197
Chemical engineering Department Assist Lecturer Ghadeer Jassim

Substituting values of a 0 , a1 and a 2 give


ba ab 
b

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

Since for Simpson 1/3 rule, the interval a, b is broken into 2 segments, the
segment width
ba
h
2

Hence the Simpson’s 1/3 rule is given by


h ab 
b

 f ( x)dx  3  f (a)  4 f 
a
  f (b)
2  
Since the above form has 1/3 in its formula, it is called Simpson’s 1/3 rule.

Example 1
The distance covered by a rocket in meters from t  8 s to t  30 s is given by
   
30
140000
x    2000 ln    9.8t dt
8 140000  2100t  
a) Use Simpson’s 1/3 rule to find the approximate value of x .
b) Find the true error, E t .
c) Find the absolute relative true error, t .

Solution
ba ab 
a) x  f (a)  4 f    f (b)
6   2  
a 8
b  30
ab
 19
2
 140000 
f (t )  2000 ln   9.8t
140000  2100t 
 140000 
f (8)  2000 ln    9.8(8)  177.27m / s
140000  2100(8) 

Page | 198
Chemical engineering Department Assist Lecturer Ghadeer Jassim

 140000 
f (30)  2000 ln    9.8(30)  901.67m / s
140000  2100(30) 

 140000 
f (19)  2000 ln    9.8(19)  484.75m / s
 140000  2100(19) 

ba ab 
x  f (a )  4 f    f (b)
6   2  
 30  8 
  f (8)  4 f (19)  f (30)
 6 

 177.27  4  484.75  901.67 =11065.72 m


22
6

b) The exact value of the above integral is


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

So the true error is


Et  True Value  Approximate Value
=11061.34-11065.72
 4.38 m

c) Absolute Relative true error,


True Error
t   100
True Value
 4.38
  100
11061.34
 0.0396%

Multiple-segment Simpson’s 1/3 Rule


Just like in multiple-segment trapezoidal rule, one can subdivide the interval a, b
into n segments and apply Simpson’s 1/3 rule repeatedly over every two segments.
You should note that n needs to be even. Divide interval a, b into n equal
segments, so that the segment width is given by
Page | 199
Chemical engineering Department Assist Lecturer Ghadeer Jassim

ba
h .
n
Now
b xn

 f ( x)dx   f ( x)dx
a x0

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

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


a x0 x2 xn  4 xn  2

Apply Simpson’s 1/3rd Rule over each interval,


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

 f ( x)dx  ( x
a
2  x0 ) 
 6 

 ( x4  x2 ) 
 6   ...

 f ( x n  4 )  4 f ( x n 3 )  f ( x n  2 )   f ( xn2 )  4 f ( xn1 )  f ( xn ) 
 ( xn2  xn4 )    ( xn  xn2 ) 
 6   6 
Since
xi  xi 2  2h
i  2, 4, ..., n
then
 f ( x0 )  4 f ( x1 )  f ( x2 )   f ( x 2 )  4 f ( x3 )  f ( x 4 ) 
b

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

 2h 
 6   ...

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


h
 f ( x0 )  4 f ( x1 )  f ( x3 )  ...  f ( xn1 )  2 f ( x2 )  f ( x4 )  ...  f ( xn2 )  f ( xn )
3
 n 1 n2

h
 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
b

 f ( x )dx  f ( x 0 )  4  f ( xi )  2  f ( xi )  f ( x n ) 
3n  i 1 i 2

 
a
i odd i even

Page | 200
Chemical engineering Department Assist Lecturer Ghadeer Jassim

Example 2
Use 4-segment Simpson’s 1/3 rule to approximate the distance covered by a rocket
in meters from t  8 s to t  30 s as given by
   
30
140000
x    2000 ln    9.8t dt
8 140000  2100t  
a) Use four segment Simpson’s 1/3rd Rule to find the probability.
b) Find the true error, Et for part (a).
c) Find the absolute relative true error, t for part (a).

Solution:
a) Using n segment Simpson’s 1/3 rule,
 
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 
n4
a 8
b  30
b  a 30  8
h   5.5
n 4

 140000 
f (t )  2000 ln   9.8t
140000  2100t 

So
f (t 0 )  f (8)
 140000 
f (8)  2000 ln    9.8(8)  177.27m / s
140000  2100(8) 

f (t1 )  f (8  5.5)  f (13.5)

 140000 
f (13.5)  2000 ln    9.8(13.5)  320.25m / s
140000  2100(13.5) 

f (t 2 )  f (13.5  5.5)  f (19)

Page | 201
Chemical engineering Department Assist Lecturer Ghadeer Jassim

 140000 
f (19)  2000 ln    9.8(19)  484.75m / s
 140000  2100(19) 

f (t 3 )  f (19  5.5)  f (24.5)

 140000 
f (24.5)  2000 ln    9.8(24.5)  676.05m / s
140000  2100(24.5) 

f (t 4 )  f (t n )  f (30)

 140000 
f (30)  2000 ln    9.8(30)  901.67m / s
140000  2100(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 
 
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 (t3 )  2 f (t 2 )  f (30)
12

  f (8)  4 f (13.5)  4 f (24.5)  2 f (19)  f (30)


11
6

 177.27  4(320.25)  4(676.05)  2(484.75)  901.67


11
 11061.64 m
6

b) The exact value of the above integral is


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

So the true error is


Et  True Value  Approximate Value
Et  11061.34  11061.64
 0.30 m
Page | 202
Chemical engineering Department Assist Lecturer Ghadeer Jassim

c) Absolute Relative true error,


True Error
t   100
True Value
 0.3
  100
11061.34
= 0.0027%

Table 1 Values of Simpson’s 1/3 rule for Example 2 with multiple-segments


Approximate
n Et t
Value
2 11065.72 -4.38 0.0396%
4 11061.64 -0.30 0.0027%
6 11061.40 -0.06 0.0005%
8 11061.35 -0.02 0.0002%
10 11061.34 -0.01 0.0001%

Page | 203

Potrebbero piacerti anche