Simpson's 1/3 Rule of Integration

Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6

Chapter 07.

03

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, and
5. derive the true error formula for multiple-segment Simpson’s 1/3 rule.

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

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 )  a 0  a1 x  a 2 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 a 0 , a1 and a 2 .
f (a )  f 2 (a)  a 0  a1 a  a 2 a 2
2
ab ab ab ab
f   f2   a 0  a1    a2  
 2   2   2   2 

07.03.1
07.03.2 Chapter 07.03

f (b)  f 2 (b)  a 0  a1b  a 2 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)
 2   2 
a1  
a 2  2ab  b 2
 ab 
2 f (a )  2 f    f (b) 
 2 
a2   
a  2ab  b
2 2

Then
b
b b
 x3 
 2

I   f 2 ( x)dx   a 0  a1 x  a 2 x dx  a 0 x  a1
x2
2
 a2 
3 a
a a 
b a
2 2
b a
3 3
 a 0 (b  a )  a1  a2
2 3
Substituting values of 0 a , a1 and a 2 give
b
ba ab 
a f 2 ( x)dx  6  f (a)  4 f  2   f (b)
Since for Simpson 1/3 rule, the interval  a, b is broken into 2 segments, the segment width
ba
h
2
b
h ab 
Hence the Simpson’s 1/3 rule is given by  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  
Simpson’s 1/3 Rule of Integration 07.03.3

ab
 19
a8 b  30 2

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

 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 
22
 177.27  4  484.75  901.67 =11065.72 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  4.38 m
=11061.34-11065.72

c) The absolute relative true error is


True Error  4.38
t   100   100  0.0396%
11061 .34
True Value

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. Note that n
needs to be even. Divide interval  a, b  into n equal segments, so that the segment width is
given by
ba
h .
n
Now
07.03.4 Chapter 07.03

b xn


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

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


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

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

b
 f ( x0 )  4 f ( x1 )  f ( x2 )   f ( x 2 )  4 f ( x3 )  f ( x4 ) 
 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 ( x n 2 )  4 f ( x n 1 )  f ( x n ) 
 ( xn2  xn4 )   ( x n  x n2 )  
 6   6 
Since
x i  xi  2  2h i  2, 4, ..., n
then
b
 f ( x )  4 f ( x1 )  f ( x2 )   f ( x 2 )  4 f ( x3 )  f ( x 4 ) 
a f ( x)dx  2h  0 6   2 h  6   ...

 f ( x n  4 )  4 f ( x n 3 )  f ( x n  2 )   f ( x n  2 )  4 f ( x n 1 )  f ( x n ) 
 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  
ba  n 1 n 2

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

a
 i odd i  even 

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 estimate x.
b) Find the true error, Et for part (a).
c) Find the absolute relative true error, t for part (a).
Simpson’s 1/3 Rule of Integration 07.03.5

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
h
n  5.5

 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)


 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 
07.03.6 Chapter 07.03

 
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.27  4(320.25)  4(676.05)  2(484.75)  901.67
6
 11061 .64 m
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  Approximat e Value E t  11061.34  11061.64  0.30 m
c) The absolute relative true error is
True Error
t   100 
 0.3
 100
True Value 11061 .34 = 0.0027%
Table 1 Values of Simpson’s 1/3 rule for Example 2 with multiple-segments
n Approximate Value E t t
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%

You might also like