divide the interval of integration into n subintervals of equal length
. Then

We now apply our quadrature rule to each subinterval.
The trapezium rule gives



In the composite rule we have lost a power of h, and we see that
doubling the number of subintervals halves h and therefore reduces the
eror by a factor of 4, assuming that
is not altered.
To compute an integral we keep doubling the number of subintervals until successive answers differ by less than a prescribed tolerance.