Example 2.  Consider the integration of the function  [Graphics:Images/NewtonCotesMod_gr_86.gif]  over the fixed interval  [Graphics:Images/NewtonCotesMod_gr_87.gif].  Apply the various formulas (4) through (7).

[Graphics:Images/NewtonCotesMod_gr_88.gif][Graphics:Images/NewtonCotesMod_gr_89.gif]
        Trapezoidal Rule                                                Simpson’s Rule

[Graphics:Images/NewtonCotesMod_gr_90.gif][Graphics:Images/NewtonCotesMod_gr_91.gif]
        Simpson’s 3/8 Rule                                                Boole’s Rule

Solution 2.

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


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

For the trapezoidal rule using  [Graphics:../Images/NewtonCotesMod_gr_94.gif] we compute:  

Using (8) the Trapezoidal Rule:

    
[Graphics:../Images/NewtonCotesMod_gr_95.gif]    
            
Mathematica's Computation is:

[Graphics:../Images/NewtonCotesMod_gr_96.gif]
[Graphics:../Images/NewtonCotesMod_gr_97.gif]


For Simpson’s rule using  [Graphics:../Images/NewtonCotesMod_gr_98.gif] we compute:  

Using (9) Simpson’s Rule:

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

Mathematica's Computation is:

[Graphics:../Images/NewtonCotesMod_gr_100.gif]
[Graphics:../Images/NewtonCotesMod_gr_101.gif]


For Simpson’s [Graphics:../Images/NewtonCotesMod_gr_102.gif] rule using  [Graphics:../Images/NewtonCotesMod_gr_103.gif] we compute:  

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

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

Mathematica's Computation is:

[Graphics:../Images/NewtonCotesMod_gr_106.gif]
[Graphics:../Images/NewtonCotesMod_gr_107.gif]


For Boole’s rule using  [Graphics:../Images/NewtonCotesMod_gr_108.gif] we compute:  

Using (11) Boole’s Rule:

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

Mathematica's Computation is:

[Graphics:../Images/NewtonCotesMod_gr_110.gif]
[Graphics:../Images/NewtonCotesMod_gr_111.gif]


The true value of the definite integral is

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



[Graphics:../Images/NewtonCotesMod_gr_113.gif]
[Graphics:../Images/NewtonCotesMod_gr_114.gif]

[Graphics:../Images/NewtonCotesMod_gr_115.gif]
[Graphics:../Images/NewtonCotesMod_gr_116.gif]

[Graphics:../Images/NewtonCotesMod_gr_117.gif]
[Graphics:../Images/NewtonCotesMod_gr_118.gif]
[Graphics:../Images/NewtonCotesMod_gr_119.gif]
[Graphics:../Images/NewtonCotesMod_gr_120.gif]

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


We see that the approximation  1.30859  from Boole’s rule is best. The area under each of the Lagrange polynomials  [Graphics:../Images/NewtonCotesMod_gr_122.gif], [Graphics:../Images/NewtonCotesMod_gr_123.gif], [Graphics:../Images/NewtonCotesMod_gr_124.gif], and [Graphics:../Images/NewtonCotesMod_gr_125.gif]  are shown in the figures for this example.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004