Using the method can be inductively defined by or where and. In big O notation, the error for R is : The zeroeth extrapolation, R, is equivalent to the trapezoidal rule with 2n + 1 points; the first extrapolation, R, is equivalent to Simpson's rule with 2n + 1 points. The second extrapolation, R, is equivalent to Boole's rule with 2n + 1 points. Further extrapolations differ from Newton Cotes formulas. In particular further Romberg extrapolations expand on Boole's rule in very slight ways, modifying weights into ratios similar as in Boole's rule. In contrast, further Newton Cotes methods produce increasingly differing weights, eventually leading to large positive and negative weights. This is indicative of how large degree interpolating polynomial Newton Cotes methods fail to converge for many integrals, while Romberg integration is more stable. When function evaluations are expensive, it may be preferable to replace the polynomial interpolation of Richardson with the rational interpolation proposed by.
A geometric example
To estimate the area under a curve the trapezoid rule is applied first to one-piece, then two, then four, and so on. After trapezoid rule estimates are obtained, Richardson extrapolation is applied.
For the first iteration the two piece and one piece estimates are used in the formula The same formula is then used to compare the four piece and the two piece estimate, and likewise for the higher estimates
For the second iteration the values of the first iteration are used in the formula
The third iteration uses the next power of 4: on the values derived by the second iteration.
The pattern is continued until there is one estimate.
MA stands for more accurate, LA stands for less accurate
Example
As an example, the Gaussian function is integrated from 0 to 1, i.e. the error function erf ≈ 0.842700792949715. The triangular array is calculated row by row and calculation is terminated if the two last entries in the last row differ less than 10−8.
The result in the lower right corner of the triangular array is accurate to the digits shown. It is remarkable that this result is derived from the less accurate approximations obtained by the trapezium rule in the first column of the triangular array.
Implementation
Here is an example of a computer implementation of the Romberg method.