# Practical error-estimates for (adaptive) Newton-Cotes Quadrature

I am looking for practical error estimates for Newton-Cotes Quadrature rules.

Most books on numerical methods I have found mainly deal with theoretical error bounds/estimates for the respective methods.

Despite an extensive (but perhaps misdrirected) search I found almost nothing dealing with error estimation when automatic computation is concerned.

Example: The error of the Simpson-Rule is given by: $Ch^5 f^{(4)}(\xi)$ where $C$ is a constant and $\xi \in [a,b]$. Obviously $\xi$ usually is not known. One could certaily choose the maximum of $f^{(4)}$ to get an upper bound but this can be tricky to determine on the run.

This is why I am wondering: what are the best practices for estimating Integration-Error in numerical algorithms ? (above all I am interested in the ones concerning newton-cotes-quadrature)

• This was a standard topic for numerical computation manuals of the 1970s and 1980s. Maybe you aren't looking back far enough. One method that I recall was to use several values of $h$ and compare the estimates. – Brendan McKay Jul 27 '13 at 1:57
• still I wondering why hardly any traces of it remained in todays literature. Adaptive Quadrature is explained everywhere. Unfortunately the authors fail to mention how to actually implement it – Boldwing Jul 27 '13 at 6:04
• en.wikipedia.org/wiki/Romberg%27s_method – Federico Poloni Jul 28 '13 at 22:00
• @BrendanMcKay thanks to you comment I was at least able to determine that papers dealing with the subject exist. Fortunately I found a "fresh" one: arxiv.org/abs/1003.4629 – Boldwing Jul 29 '13 at 6:57

## 1 Answer

The principles behind embedded Runge-Kutta-Methods apply:

You compute the integral over a subinterval with two methods of different order. You use the difference between the two results as an estimate for the local quadrature error of the less accurate formula.

In order to meet a global tolerance, you sum up these local errors. If the sum is above the tolerance, you have to refine some of your intervals. This is best done with a greedy algorithm.

Instead of using a formula of higher order, you can compare the results on two consecutive meshes to estimate the local error. Then, you already have the computation on the refined mesh, when you need it. This is also more reliable if your integrated function is not smooth.

In all of these methods, you use the error estimate of the less accurate method, but the results of the better.