Example
3. Consider the
integration of the function
over
. Use
exactly five function evaluations and compare the results from the
composite trapezoidal rule, composite Simpson rule, and Boole’s
rule. Use the uniform step
size
.
![[Graphics:Images/NewtonCotesMod_gr_142.gif]](../Images/NewtonCotesMod_gr_142.gif)
![[Graphics:Images/NewtonCotesMod_gr_143.gif]](../Images/NewtonCotesMod_gr_143.gif)
Composite
Trapezoidal
Rule Composite
Simpson’s Rule
![[Graphics:Images/NewtonCotesMod_gr_144.gif]](../Images/NewtonCotesMod_gr_144.gif)
Boole’s
Rule
Solution 3.
Using the Composite Trapezoidal Rule:
![]()
Mathematica's Computation is:
Using the Composite Simpson’s
Rule:
![]()
Mathematica's Computation is:
Using Boole’s Rule:
![]()
Mathematica's Computation is:
The true value of the definite integral is
We see that the approximation 1.30938 from Simpson’s rule is much better than the value 1.28358 obtained from the trapezoidal rule. Again, the approximation 1.30859 from Boole’s rule is closest. Graphs for the areas under the trapezoids and parabolas are shown in the figures for this example.
(c) John H. Mathews 2004