Use recursion to successively subdivide (a,b) integration approximation into sum of (a,$\frac{b+a}{2}$) and ($\frac{b+a}{2}$,b) integration approximations.
Continue to calculate integration approximations over smaller regions until the absolute value of the difference between two successive level approximations is smaller than a chosen tolerance.