Example 6. 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 6.
![[Graphics:../Images/AdaptiveQuadMod_gr_159.gif]](../Images/AdaptiveQuadMod_gr_159.gif)
![[Graphics:../Images/AdaptiveQuadMod_gr_160.gif]](../Images/AdaptiveQuadMod_gr_160.gif)
|
tol |
0.001` |
produces |
|
|
tol |
0.00001` |
produces |
|
|
tol |
1.`*^-7 |
produces |
|
|
true |
value |
is |
|
![[Graphics:../Images/AdaptiveQuadMod_gr_177.gif]](../Images/AdaptiveQuadMod_gr_177.gif)
![[Graphics:../Images/AdaptiveQuadMod_gr_178.gif]](../Images/AdaptiveQuadMod_gr_178.gif)
(c) John H. Mathews 2004