Example 3.  Use Romberg integration to compute a numerical approximation to the integral  [Graphics:Images/RombergMod_gr_127.gif].  
Use the tolerances [Graphics:Images/RombergMod_gr_128.gif].  Compare with Mathematica's "numerical value" of the integral.

Solution 3.

[Graphics:../Images/RombergMod_gr_129.gif]
[Graphics:../Images/RombergMod_gr_130.gif]

3 (a). Plot the function over the interval  [0, 2].

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

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

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

3 (b). Construct the Romberg table using   tol = 0.001

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


[Graphics:../Images/RombergMod_gr_135.gif]
[Graphics:../Images/RombergMod_gr_136.gif]
[Graphics:../Images/RombergMod_gr_137.gif]
[Graphics:../Images/RombergMod_gr_138.gif]
[Graphics:../Images/RombergMod_gr_139.gif]
[Graphics:../Images/RombergMod_gr_140.gif]
[Graphics:../Images/RombergMod_gr_141.gif]
[Graphics:../Images/RombergMod_gr_142.gif]
[Graphics:../Images/RombergMod_gr_143.gif]

3 (c). The last entry in the table is  [Graphics:../Images/RombergMod_gr_144.gif].  Let's find it.

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


[Graphics:../Images/RombergMod_gr_146.gif]
[Graphics:../Images/RombergMod_gr_147.gif]

3 (d). Look at 10 digits in  [Graphics:../Images/RombergMod_gr_148.gif].

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


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

3 (e). Are all 10 digits correct ?   Why ?  
NO.  The subroutine was called with the accuracy  [Graphics:../Images/RombergMod_gr_151.gif].  

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.

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


[Graphics:../Images/RombergMod_gr_153.gif]
[Graphics:../Images/RombergMod_gr_154.gif]
[Graphics:../Images/RombergMod_gr_155.gif]
[Graphics:../Images/RombergMod_gr_156.gif]
[Graphics:../Images/RombergMod_gr_157.gif]
[Graphics:../Images/RombergMod_gr_158.gif]
[Graphics:../Images/RombergMod_gr_159.gif]
[Graphics:../Images/RombergMod_gr_160.gif]
[Graphics:../Images/RombergMod_gr_161.gif]
[Graphics:../Images/RombergMod_gr_162.gif]
[Graphics:../Images/RombergMod_gr_163.gif]
[Graphics:../Images/RombergMod_gr_164.gif]

Since the last row was row 10, the sequential trapezoidal rule used the following number of function calls.

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


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

3 (g). Use Mathematica to find the numerical solution to the integral.

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


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

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_169.gif]


[Graphics:../Images/RombergMod_gr_170.gif]
[Graphics:../Images/RombergMod_gr_171.gif]


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

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

[Graphics:../Images/RombergMod_gr_174.gif]
[Graphics:../Images/RombergMod_gr_175.gif]
[Graphics:../Images/RombergMod_gr_176.gif]

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

(c) John H. Mathews 2004