# Is this upper bound ok to use when bounding the error between the Riemann sum and its integral?

I found this on some class notes, which gives several different estimates of the error term, when going from the Riemann sum to its corresponding Riemann integral:

$$\frac{b-a}{n}[f(b)-f(a)]$$

Does this bound always work? If so, it is an easy estimate to remember.

EDIT:

The notes show this bound, but only for the difference between the left-endpoint Riemann sum and its integral. I want to know whether it is applicable to right (and midpoint) sums, too.

Thanks

• What's the context? Note that if $f(a) = f(b)$, the 'error' term is bounded above by 0, for which there are a plethora of counterexamples to. – user217285 Aug 1 '15 at 3:39
• Awesome comment, @Nitin. In the context of a problem that I just worked on, the function is an increasing function. Does the bound work in this case? Thanks, – user258181 Aug 1 '15 at 3:44
• My concern is that if f(x), the continuous analog of the function in the Riemann sum, were an underestimate throughout the interval, then the bound doesn't work. – user258181 Aug 1 '15 at 3:47
• Left approximation: $$L(f,P_n) = \frac{b-a}{n} \sum_{i=0}^{n-1} \; f\left(a + i\,\frac{b-a}{n} \right)$$ Right approximation: $$U(f,P_n) = \frac{b-a}{n} \sum_{i=1}^{n} \; f\left(a + i\,\frac{b-a}{n} \right)$$ Since $L(f,P_n) < \int_a^b f < U(f,P_n)$ for monotone increasing $f$, we have $$\int_a^b f - L(f,P_n) < U(f,P_n) - L(f,P_n) = \frac{b-a}{n} [f(b) - f(a)]$$ since the sums telescope. – user217285 Aug 1 '15 at 3:57