Module

for

Simpson's Rule for Numerical Integration

   

    The numerical integration technique known as "Simpson's Rule" is credited to the mathematician Thomas Simpson (1710-1761) of  Leicestershire, England. His also worked in the areas of numerical interpolation and probability theory.

Theorem  (Simpson's Rule)  Consider [Graphics:Images/SimpsonRuleMod_gr_1.gif] over [Graphics:Images/SimpsonRuleMod_gr_2.gif], where [Graphics:Images/SimpsonRuleMod_gr_3.gif], and [Graphics:Images/SimpsonRuleMod_gr_4.gif].  Simpson's rule is   

    
[Graphics:Images/SimpsonRuleMod_gr_5.gif][Graphics:Images/SimpsonRuleMod_gr_6.gif].   

This is an numerical approximation to the integral of
[Graphics:Images/SimpsonRuleMod_gr_7.gif] over [Graphics:Images/SimpsonRuleMod_gr_8.gif] and we have the expression  

    [Graphics:Images/SimpsonRuleMod_gr_9.gif].  

The remainder term for Simpson's rule is  [Graphics:Images/SimpsonRuleMod_gr_10.gif],  where [Graphics:Images/SimpsonRuleMod_gr_11.gif] lies somewhere between [Graphics:Images/SimpsonRuleMod_gr_12.gif], and have the equality  

    [Graphics:Images/SimpsonRuleMod_gr_13.gif].

Proof  Simpson's Rule for Numerical Integration  Simpson's Rule for Numerical Integration  

 

Composite Simpson Rule

    Our next method of finding the area under a curve [Graphics:Images/SimpsonRuleMod_gr_14.gif] is by approximating that curve with a series of parabolic segments that lie above the intervals  [Graphics:Images/SimpsonRuleMod_gr_15.gif].  When several parabolas are used, we call it the composite Simpson rule.  

 

Theorem (Composite Simpson's Rule)  Consider [Graphics:Images/SimpsonRuleMod_gr_16.gif] over [Graphics:Images/SimpsonRuleMod_gr_17.gif].  Suppose that the interval [Graphics:Images/SimpsonRuleMod_gr_18.gif] is subdivided into [Graphics:Images/SimpsonRuleMod_gr_19.gif] subintervals  [Graphics:Images/SimpsonRuleMod_gr_20.gif]  of equal width  [Graphics:Images/SimpsonRuleMod_gr_21.gif]  by using the equally spaced sample points  [Graphics:Images/SimpsonRuleMod_gr_22.gif]  for  [Graphics:Images/SimpsonRuleMod_gr_23.gif].   The composite Simpson's rule for [Graphics:Images/SimpsonRuleMod_gr_24.gif] subintervals  is  

    
[Graphics:Images/SimpsonRuleMod_gr_25.gif][Graphics:Images/SimpsonRuleMod_gr_26.gif][Graphics:Images/SimpsonRuleMod_gr_27.gif].  

This is an numerical approximation to the integral of
[Graphics:Images/SimpsonRuleMod_gr_28.gif] over [Graphics:Images/SimpsonRuleMod_gr_29.gif] and we write  

    [Graphics:Images/SimpsonRuleMod_gr_30.gif].  

Proof  Simpson's Rule for Numerical Integration  Simpson's Rule for Numerical Integration  

 

Remainder term for the Composite Simpson Rule

Corollary  (Simpson's Rule:  Remainder term)   Suppose that [Graphics:Images/SimpsonRuleMod_gr_31.gif] is subdivided into [Graphics:Images/SimpsonRuleMod_gr_32.gif] subintervals  [Graphics:Images/SimpsonRuleMod_gr_33.gif]  of width  [Graphics:Images/SimpsonRuleMod_gr_34.gif].  The composite Simpson's rule  

    
[Graphics:Images/SimpsonRuleMod_gr_35.gif][Graphics:Images/SimpsonRuleMod_gr_36.gif][Graphics:Images/SimpsonRuleMod_gr_37.gif].  

is an numerical approximation to the integral, and  

    
[Graphics:Images/SimpsonRuleMod_gr_38.gif].  

Furthermore, if [Graphics:Images/SimpsonRuleMod_gr_39.gif],  then there exists a value [Graphics:Images/SimpsonRuleMod_gr_40.gif] with  [Graphics:Images/SimpsonRuleMod_gr_41.gif]  so that the error term  [Graphics:Images/SimpsonRuleMod_gr_42.gif]  has the form

    [Graphics:Images/SimpsonRuleMod_gr_43.gif].  

This is expressed using the "big [Graphics:Images/SimpsonRuleMod_gr_44.gif]" notation  [Graphics:Images/SimpsonRuleMod_gr_45.gif].  

Remark.  When the step size is reduced by a factor of [Graphics:Images/SimpsonRuleMod_gr_46.gif] the remainder term  [Graphics:Images/SimpsonRuleMod_gr_47.gif] should be reduced by approximately [Graphics:Images/SimpsonRuleMod_gr_48.gif].  

 

Algorithm Composite Simpson Rule.  To approximate the integral  

    [Graphics:Images/SimpsonRuleMod_gr_49.gif][Graphics:Images/SimpsonRuleMod_gr_50.gif][Graphics:Images/SimpsonRuleMod_gr_51.gif],  

by sampling  [Graphics:Images/SimpsonRuleMod_gr_52.gif]  at the  [Graphics:Images/SimpsonRuleMod_gr_53.gif]  equally spaced sample points  [Graphics:Images/SimpsonRuleMod_gr_54.gif] for  [Graphics:Images/SimpsonRuleMod_gr_55.gif],  where  [Graphics:Images/SimpsonRuleMod_gr_56.gif].  Notice that  [Graphics:Images/SimpsonRuleMod_gr_57.gif]  and  [Graphics:Images/SimpsonRuleMod_gr_58.gif].  

 

Animations (Simpson's Rule  Simpson's Rule).  

 

Computer Programs  Simpson's Rule for Numerical Integration  Simpson's Rule for Numerical Integration  

 

Mathematica Subroutine (Simpson Rule). Traditional programming.

[Graphics:Images/SimpsonRuleMod_gr_59.gif]

Mathematica Subroutine (Simpson Rule). Object oriented programming.

[Graphics:Images/SimpsonRuleMod_gr_60.gif]

Example 1.  Numerically approximate the integral  [Graphics:Images/SimpsonRuleMod_gr_61.gif]  by using Simpson's rule with  m = 1, 2, 4, and 8.
Solution 1.

 

Example 2.  Numerically approximate the integral  [Graphics:Images/SimpsonRuleMod_gr_78.gif]  by using Simpson's rule with  m = 10, 20, 40, 80,  and 160.
Solution 2.

 

Example 3.  Find the analytic value of the integral  [Graphics:Images/SimpsonRuleMod_gr_95.gif]  (i.e. find the "true value").   
Solution 3.

 

Example 4.  Use the "true value" in example 3 and find the error for the Simpson rule approximations in example 2.  
Solution 4.

 

Example 5.  When the step size is reduced by a factor of [Graphics:Images/SimpsonRuleMod_gr_115.gif] the error term  [Graphics:Images/SimpsonRuleMod_gr_116.gif] should be reduced by approximately [Graphics:Images/SimpsonRuleMod_gr_117.gif].  Explore this phenomenon.
Solution 5.

 

Example 6.  Numerically approximate the integral [Graphics:Images/SimpsonRuleMod_gr_126.gif] by using Simpson's rule with  m = 1, 2, 4, and 8.
Solution 6.

 

Example 7.  Numerically approximate the integral  [Graphics:Images/SimpsonRuleMod_gr_142.gif]  by using Simpson's rule with  m = 10, 20, 40, 80,  and 160  subintervals.
Solution 7.

 

Example 8.  Find the analytic value of the integral  [Graphics:Images/SimpsonRuleMod_gr_159.gif]  (i.e. find the "true value").   
Solution 8.

 

Example 9.  Use the "true value" in example 8 and find the error for the Simpson rule approximations in example 7.  
Solution 9.

 

Example 10.  When the step size is reduced by a factor of [Graphics:Images/SimpsonRuleMod_gr_176.gif] the error term  [Graphics:Images/SimpsonRuleMod_gr_177.gif] should be reduced by approximately [Graphics:Images/SimpsonRuleMod_gr_178.gif].  Explore this phenomenon.
Solution 10.

 

Various Scenarios and Animations for Simpson's Rule.

Example 11.   Let  [Graphics:Images/SimpsonRuleMod_gr_187.gif]  over  [Graphics:Images/SimpsonRuleMod_gr_188.gif].  Use Simpson's rule to approximate the value of the integral.
Solution 11.

 

Animations (Simpson's Rule  Simpson's Rule).  

 

Old Lab Project (Simpson's Rule  Simpson's Rule).  Internet hyperlinks to an old lab project.  

 

Research Experience for Undergraduates

Simpson's Rule for Numerical Integration  Simpson's Rule for Numerical Integration  Internet hyperlinks to web sites and a bibliography of articles.  

 

Download this Mathematica Notebook Simpson's Rule for Numerical Integration

 

Return to Numerical Methods - Numerical Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004