# Does the total variation of a function bound its numerical integration error, much like its first derivative?

When estimating the convergence of a Riemann sum to its integral, or equivalently the error in numerical integration, the commonly used bound is by upper bounding it's first derivative (see, for example the section on wikipedia).

Specifically, the inequality

$\left| \int_a^b f(x)\,dx - (b - a) f(a) \right| \leq {(b - a)^2 \over 2} \sup_{a \leq x \leq b} \left| f'(x) \right|$

implies that the error $E_{n}$ of an $n$ term Riemann sum is bounded by

$E_n \leq \frac{1}{2n}\sup_{0 \leq x \leq 1} \left| f'(x) \right|$

However, this is seemingly poor if the maximum of the first derivative is very peaked. A smooth step function, for example, would have Riemann sum converging faster than the bound suggests: consider the separately the subsets of the domain where the first derivative is small and large, and add the errors together. In the former subset you may use a smaller maximum for the derivative.

My question is about improving this to use the total variation of the function $f$ instead of the derivative. Intuitively if the function has large derivative --- but only briefly, like the step function --- then this should be evident from its total variation. Is such a bound possible?

-

If $m \le f \le M$ on $[a,b]$, $m(b-a) \le \int_a^b f(x) \ dx \le M(b-a)$, and $(b-a) f(t)$ satisfies the same bounds for any $t \in [a,b]$. Thus $|\int_a^b f(x)\ dx - (b-a) f(t)| \le (M-m)(b-a) \le (b-a) V_a^b(f)$. Adding this up for $n$ intervals $[a_{j-1},a_j]$ in a Riemann sum we get $$E_n \le \frac{b-a}{n} \sum_{j=1}^n V_{a_{j-1}}^{a_j}(f) = \frac{b-a}{n} V_a^b(f)$$