Example 5. Use the
adaptive Simpson's rule to compute a numerical approximation to the
integral
.
Use the tolerances
. Compare
with the analytic or "true value" of the integral.
Solution 5.
![[Graphics:../Images/AdaptiveQuadMod_gr_134.gif]](../Images/AdaptiveQuadMod_gr_134.gif)
![[Graphics:../Images/AdaptiveQuadMod_gr_135.gif]](../Images/AdaptiveQuadMod_gr_135.gif)
|
tol |
0.001` |
produces |
|
|
tol |
0.00001` |
produces |
|
|
tol |
1.`*^-7 |
produces |
|
|
true |
value |
is |
|
![[Graphics:../Images/AdaptiveQuadMod_gr_152.gif]](../Images/AdaptiveQuadMod_gr_152.gif)
![[Graphics:../Images/AdaptiveQuadMod_gr_153.gif]](../Images/AdaptiveQuadMod_gr_153.gif)
(c) John H. Mathews 2004