Example 1.  Consider the function  [Graphics:Images/NewtonCotesMod_gr_45.gif],  the equally spaced quadrature nodes  [Graphics:Images/NewtonCotesMod_gr_46.gif], [Graphics:Images/NewtonCotesMod_gr_47.gif],  [Graphics:Images/NewtonCotesMod_gr_48.gif],  [Graphics:Images/NewtonCotesMod_gr_49.gif], and [Graphics:Images/NewtonCotesMod_gr_50.gif],  and the corresponding function values  [Graphics:Images/NewtonCotesMod_gr_51.gif],  [Graphics:Images/NewtonCotesMod_gr_52.gif],  [Graphics:Images/NewtonCotesMod_gr_53.gif],  [Graphics:Images/NewtonCotesMod_gr_54.gif],  and  [Graphics:Images/NewtonCotesMod_gr_55.gif].  Apply the various quadrature formulas (4) through (7).

[Graphics:Images/NewtonCotesMod_gr_56.gif][Graphics:Images/NewtonCotesMod_gr_57.gif]
        Trapezoidal Rule                                                Simpson’s Rule 

[Graphics:Images/NewtonCotesMod_gr_58.gif][Graphics:Images/NewtonCotesMod_gr_59.gif]
        Simpson’s 3/8 Rule                                                Boole’s Rule

Solution 1.

[Graphics:../Images/NewtonCotesMod_gr_60.gif]


[Graphics:../Images/NewtonCotesMod_gr_61.gif]

Using (8) the Trapezoidal Rule:

    
[Graphics:../Images/NewtonCotesMod_gr_62.gif]    

Mathematica's Computation is:

[Graphics:../Images/NewtonCotesMod_gr_63.gif]
[Graphics:../Images/NewtonCotesMod_gr_64.gif]


Using (9) Simpson’s Rule:

    
[Graphics:../Images/NewtonCotesMod_gr_65.gif]    

Mathematica's Computation is:

[Graphics:../Images/NewtonCotesMod_gr_66.gif]
[Graphics:../Images/NewtonCotesMod_gr_67.gif]


Using (10) Simpson’s [Graphics:../Images/NewtonCotesMod_gr_68.gif]Rule:

    
[Graphics:../Images/NewtonCotesMod_gr_69.gif]      

Mathematica's Computation is:

[Graphics:../Images/NewtonCotesMod_gr_70.gif]
[Graphics:../Images/NewtonCotesMod_gr_71.gif]


Using (11) Boole’s Rule:

    
[Graphics:../Images/NewtonCotesMod_gr_72.gif]    

Mathematica's Computation is:

[Graphics:../Images/NewtonCotesMod_gr_73.gif]
[Graphics:../Images/NewtonCotesMod_gr_74.gif]


    It is important to realize that the quadrature formulas (4) through (7) applied in the example above give approximations for definite integrals over different intervals.  The graph of the curve  [Graphics:../Images/NewtonCotesMod_gr_75.gif]  and the areas under the Lagrange polynomials  [Graphics:../Images/NewtonCotesMod_gr_76.gif], [Graphics:../Images/NewtonCotesMod_gr_77.gif], [Graphics:../Images/NewtonCotesMod_gr_78.gif], and [Graphics:../Images/NewtonCotesMod_gr_79.gif]  are shown in the figures for this example.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004