The basic estimate for the rectangle method
Suppose that $ f(x) $ is a continuously differentiable function on $ [a,b] $. Let $ N $ be a positive integer and let $ M=\text{Max}\ \{ |f'(x)|: a\le x\le b\} $. Define $ R_N $ to the the right endpoint Riemann Sum
$ R_N = \sum_{n=1}^N f(a+n\Delta x)\Delta x $
where $ \Delta x = (b-a)/N $, and let
$ I=\int_a^b f(x)\ dx $.
We shall prove that the error, $ E=|R_N-I| $ satisfies the estimate,
$ E\le \frac{M(b-a)^2}{N} $.