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)



Practical error-estimates for (adaptive) Newton-Cotes Quadrature
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.


