Module

for

The Adaptive Simpson's Rule

   

    The adaptive Simpson's rule for quadrature uses the two subroutines "Simpson" and "Adapt."  The program is "recursive".  There is no brake available if something goes wrong, i.e. if a pathological "bad" function is thrown it's way it may proceed on a slippery path of infinite recursion.

Proof  Adaptive Simpson's Rule  Adaptive Simpson's Rule  

 

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

 

Computer Programs  Adaptive Simpson's Rule  Adaptive Simpson's Rule  

 

Mathematica Subroutines (Adaptive Simpson's Rule).

[Graphics:Images/AdaptiveQuadMod_gr_1.gif]
[Graphics:Images/AdaptiveQuadMod_gr_2.gif]

Example 1.  Use the adaptive Simpson's rule to compute a numerical approximation to the integral  [Graphics:Images/AdaptiveQuadMod_gr_3.gif].  
Use the tolerances [Graphics:Images/AdaptiveQuadMod_gr_4.gif].  Compare with the analytic or "true value" of the integral.
Solution 1.

 

Example 2.  Use the adaptive Simpson's rule to compute a numerical approximation to the integral  [Graphics:Images/AdaptiveQuadMod_gr_37.gif].  
Use the tolerances [Graphics:Images/AdaptiveQuadMod_gr_38.gif].  Compare with the analytic or "true value" of the integral.
Solution 2.

 

Example 3.  Use the adaptive Simpson's rule to compute a numerical approximation to the integral  [Graphics:Images/AdaptiveQuadMod_gr_64.gif].  
Use the tolerances [Graphics:Images/AdaptiveQuadMod_gr_65.gif].  Compare with the analytic or "true value" of the integral.
Solution 3.

 

Execute the following Mathematica subroutine, which is the "long version" of the subroutine we have been using previously.

[Graphics:Images/AdaptiveQuadMod_gr_90.gif]

Example 4.  Use the adaptive Simpson's rule to compute a numerical approximation to the integral  [Graphics:Images/AdaptiveQuadMod_gr_91.gif]  that we investigated in example 2.  
The long solution is obtained if you add a print statement to investigate the in between computations.  
This subroutine is pedagogical and is intended to help us understand what's happening in a recursive program.
You would probably not want to always print out the in between steps, so you might want to re-execute the first version for some of your work.
Solution 4.

 

Example 5.  Use the adaptive Simpson's rule to compute a numerical approximation to the integral  [Graphics:Images/AdaptiveQuadMod_gr_132.gif].  
Use the tolerances [Graphics:Images/AdaptiveQuadMod_gr_133.gif].  Compare with the analytic or "true value" of the integral.
Solution 5.

 

Example 6.  Use the adaptive Simpson's rule to compute a numerical approximation to the integral [Graphics:Images/AdaptiveQuadMod_gr_157.gif].  
Use the tolerances [Graphics:Images/AdaptiveQuadMod_gr_158.gif].  Compare with the analytic or "true value" of the integral.
Solution 6.

 

Various Scenarios and Animations for the Adaptive Simpson's Rule.

Example 7.   Let  [Graphics:Images/AdaptiveQuadMod_gr_182.gif]  over  [Graphics:Images/AdaptiveQuadMod_gr_183.gif].  Use the adaptive Simpson's rule to approximate the value of the integral.  
Solution 7.

 

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

 

Research Experience for Undergraduates

Adaptive Simpson's Rule  Adaptive Simpson's Rule  Internet hyperlinks to web sites and a bibliography of articles.  

 

Download this Mathematica Notebook Adaptive Simpson's Rule

 

Return to Numerical Methods - Numerical Analysis

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004