Suppose we have a monotone, increasing function $f$ defined over an interval $[a,b]$ and we'd like to use a left and right Riemann sums, $L_n$ and $R_n$, to estimate $$\int_a^b f(x)\, dx.$$ If $n$ represents the number of terms in the sum, how large must $n$ be to ensure our error does not exceed some preprescribed tolerance?
Since the function is increasing, we certainly know that $$L_n \leq \int_a^b f(x)\, dx \leq R_n.$$ This implies that $$0 \leq \int_a^b f(x)\, dx  L_n \leq R_n  L_n$$ and $$L_n  R_n \leq \int_a^b f(x)\, dx  R_n \leq 0.$$ In both cases, the term in the middle is the actual error and we have that $$\text{error}\leq \leftR_nL_n\right.$$
But, there is a very simple interpretation of $R_nL_n$  it is the total area of the rectangles shown in red below, which yields $$\text{error}\leq \leftf(b)f(a)\right\frac{ba}{n}.$$
By the mean value theorem, we know that $$\frac{f(b)f(a)}{ba} = f'(c)$$ for some $c$ between $a$ and $b$. Thus, if $M$ is an upper bound for $f'$ on the interval, then we know that $$\text{error}\leq \frac{\leftf(b)f(a)\right}{ba}\cdot\frac{(ba)^2}{n} \leq M\frac{(ba)^2}{n}.$$ The nice thing about this last formulation is that it holds whether $f$ is monotone or not!
Sums and error bounds
Here are four approximating sums and error bounds that the inquiring calculus student should know. In these forumulae,
Method  Formula  Error 

Right sum 
$\displaystyle \sum_{i=1}^{n} f(x_{i})\Delta x$

$\displaystyle \text{error} \leq M_1\frac{(ba)^2}{n}.$

Left sum 
$\displaystyle \sum_{i=1}^{n} f(x_{i1})\Delta x$

$\displaystyle \text{error} \leq M_1\frac{(ba)^2}{n}.$

Trapezoidal sum 
$\displaystyle \sum_{i=1}^{n} \frac{f(x_i) + f(x_{i1})}{2}\Delta x$

$\displaystyle \text{error} \leq M_2\frac{(ba)^3}{12n^2}.$

Midpoint sum 
$\displaystyle \sum_{i=1}^{n} f\left(\frac{x_{i} + x_{i1}}{2}\right)\Delta x$

$\displaystyle \text{error} \leq M_2\frac{(ba)^3}{24n^2}.$
