Example 3. Use
Romberg integration to compute a numerical approximation to the
integral
.
Use the tolerances
. Compare
with Mathematica's "numerical value" of the integral.
Solution 3.
3 (a). Plot the function over the interval [0, 2].
![[Graphics:../Images/RombergMod_gr_131.gif]](../Images/RombergMod_gr_131.gif)
![[Graphics:../Images/RombergMod_gr_132.gif]](../Images/RombergMod_gr_132.gif)
3 (b). Construct the Romberg table using tol = 0.001
3 (c). The last entry in the
table is
. Let's
find it.
3 (d). Look at 10 digits
in
.
3 (e). Are all 10 digits
correct ? Why ?
NO. The subroutine was called with the
accuracy
.
3 (f). Determine how to call the Romberg integration subroutine so that it will achieve 10 digits of accuracy.
We suspect the following answer might have 10 digits of accuracy.
Since the last row was row 10, the sequential trapezoidal rule used the following number of function calls.
3 (g). Use Mathematica to find the numerical solution to the integral.
3 (h). How close did our last numerical approximation using Romberg integration come to Mathematica's "numerical value" of the integral.
![[Graphics:../Images/RombergMod_gr_173.gif]](../Images/RombergMod_gr_173.gif)
(c) John H. Mathews 2004