0% found this document useful (0 votes)
59 views1 page

Romberg

This document describes how Romberg integration works by using it to calculate the integral from 1 to 2 of 1/x dx, which equals ln 2. It shows the trapezoid approximations for increasing values of n and then uses a formula to build a table to calculate additional digits of the result with each iteration, converging on the correct value of ln 2 to 15 decimal places using only 16 function evaluations.

Uploaded by

Prince Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
59 views1 page

Romberg

This document describes how Romberg integration works by using it to calculate the integral from 1 to 2 of 1/x dx, which equals ln 2. It shows the trapezoid approximations for increasing values of n and then uses a formula to build a table to calculate additional digits of the result with each iteration, converging on the correct value of ln 2 to 15 decimal places using only 16 function evaluations.

Uploaded by

Prince Kumar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Romberg integration example

Consider Z 2
1
dx = ln 2.
1 x
We will use this integral to illustrate how Romberg integration works. First, compute the trapezoid
approximations startingwith n = 2 and doubling n each time:
n = 1 : R10 = 1 + 12 21 = 0.75;
1
n = 2 : R20 = 0.5 1.5 + 0.5 1
2 (1 + 2 ) 
= 0.708333333
0 1
n = 4 : R3 = 0.25 1.25 + 1.5 + 1.75 + 0.25
1 1 1
2 (1 + 2 ) = 0.69702380952
0
n = 8 : R4 = 0.69412185037
n = 16 : R50 = 0.69314718191.
Next we use the formula:
4i Rki−1 − Rk−1
i−1
Rki =
4i − 1
The easiest way is to keep track of computations is to build a table of the form:

R10
R20 R21
R30 R31 R32
R40 R41 R42 R43
R50 R51 R52 R53 R53

Starting with the first column (which we just computed), all other entries can be easily computed. For
example starting with R10 , R20 we find

4R20 − R10
R21 = = 0.694444
3
4R30 − R20 16R31 − R21
R31 = = 0.693253; R32 = = 0.69317460
3 15
and so on. Every entry depends only on its left and left-top neighbour. Continuing in this way, we get the
following table:

0.75000000000
0.70833333333 0.69444444444
0.69702380952 0.69325396825 0.69317460317
0.69412185037 0.69315453065 0.69314790148 0.69314747764
0.69339120220 0.69314765281 0.69314719429 0.69314718307 0.69314718191

The correct digits are shown in bold (the exact answer to 15 digits is given by ln 2 = 0.693147180559945).
Here is the table listing error Rik − ln 2.

5.7e-02
1.5e-02 1.3e-03
3.9e-03 1.1e-04 2.7e-05
9.7e-04 7.4e-06 7.2e-07 3.0e-07
2.4e-04 4.7e-07 1.4e-08 2.5e-09 1.4e-09

Note that each successive iteration yields around two extra digits (why?). The final iteration only required
n = 16 function evaluations, plus O (ln n) arithmetic operations to build the table.
R1 4
Exercise. Use four iterations of Romberg integration to estimate π = 0 1+x 2 dx. Comment on the

accuracy of your result.

You might also like