- Romberg's method
In
numerical analysis , Romberg's method Harv|Romberg|1955 generates a triangular array consisting of numerical estimates of the definite integral:
by using
Richardson extrapolation Harv|Richardson|1910 repeatedly on thetrapezium rule . Romberg's method evaluates the integrand at equally-spaced points.The integrand must have continuous derivatives, though fairly good resultsmay be obtained if only a few derivatives exist.If it is possible to evaluate the integrand at unequally-spaced points, then other methods such asGaussian quadrature andClenshaw–Curtis quadrature are generally more accurate.Method
The method can be defined inductively in this way:
:
:
:or:
where
:
:
:
In
big O notation , the error for "R"("n","m") is::
The zeroeth extrapolation, , is equivalent to the
Trapezoidal Rule with points; the first extrapolation, , is equivalent toSimpson's rule with points.When function evaluations are expensive, it may be preferable to replace the polynomial interpolation of Richardson with the rational interpolation proposed by Harvtxt|Bulirsch|Stoer|1967.
Python implementation of Romberg's method
Here is an implementation of Romberg's method in Python.
Example
As an example, the
Gaussian function is integrated from 0 to 1, i.e.theError function .The triangular array is calculated row by row and calculation is terminatedif the two last entries in the last row differ less than 1E-8.0.77174333 0.82526296 0.84310283 0.83836778 0.84273605 0.84271160 0.84161922 0.84270304 0.84270083 0.84270066 0.84243051 0.84270093 0.84270079 0.84270079 0.84270079 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 approximationsobtained by the trapezium rule in the first column of the triangular array.
References
*
*
*
*
*
*External links
* [http://www.mathworks.com/matlabcentral/fileexchange/loadFile.do?objectId=34&objectType=file ROMBINT] -- code for MATLAB (author: Martin Kacenak)
* [http://math.fullerton.edu/mathews/n2003/RombergMod.html Module for Romberg Integration]
Wikimedia Foundation. 2010.