Integration of functions with bounded variation I need to prove that if a function $f: [a,b] \to \mathbb{R}$ has bounded variation, than $f$ is integrable on $[a,b]$.
This is what I have tried:
Let $S(P)$ and $s(P)$ denote the upper and lower Riemann sums of $f$ over a partition $P$ of $[a,b]$. Then $S(P) - s(P) = \sum \limits_{i = 1}^{n} (M_i - m_i) \Delta x_i $, where $M_i = \sup_{x_{i-1} \leq x \leq x_i} f(x) $ and $m_i = \inf_{x_{i-1} \leq x \leq x_i} f(x) $. Now as $f$ must be bounded, $M_i - m_i \leq 2|f(a)$|. Then for all partitions $P$ with $\||P|| < \frac{\epsilon}{2|f(a)|} $, we have that $S(P) - s(P) \leq 2|f(a)| \cdot ||P|| < \epsilon \implies f$ is integrable. 
However this argument doesn't work, as if it did this would imply bounded functions are integrable, which isn't true. So I'm not sure where it goes wrong, and how to fix it. I most likely need to incorporate the definition of bounded variation somewhere, but I am not sure where. If anyone could help me fix this I would appreciate it.
 A: You are almost correct. Let $\epsilon >0$ and $P$ be a partition of $[a, b]$ such that $(M+1)||P||< \epsilon$ (see definition of $M$ below). Then 
$$S(P) - s(P) = \sum_i^n (M_i - m_i) \Delta x_i\ .$$
By definition of $M_i$ and $m_i$, there exists $a_i$ and $b_i$ in $[x_i, x_{i+1}]$ such that 
$$|f(a_i) - f(b_i)| > M_i - m_i - 1/n$$
Then 
$$S(P) - s(P) < \sum_{i=1}^n (|f(a_i) - f(b_i)| + 1/n) \Delta x_i \leq ||P||\big(\sum_{i=1}^n (|f(a_i) - f(b_i)|\big) +||P||$$. 
Let all these $a_i$ and $b_i$ be a subset of some partition of $[a, b]$, as $f$ is of bounded variation, $\sum_i (|f(a_i) - f(b_i)|<M$ for some $M$ (which depends only on $f$). Thus 
$$S(P) - s(P) < (M+1)||P|| < \epsilon\ .$$
Thus $f$ is Riemann integrable. Indeed, there is a result showing that every function of bounded variation can be written as the difference of two increasing functions. As increasing functions are Riemann integrable, so are functions of bounded variations.
See this Bounded variation, difference of two increasing functions for the last fact mentioned.
A: You have an obvious (very obvious in fact) flaw in your argument. If $M_{i} - m_{i} \leq 2|f(a)|$ and $\Delta x_{i} \leq \epsilon/(2|f(a)|)$ then we clearly have $$S(P) - s(P) \leq \sum_{i = 1}^{n}2|f(a)|\cdot\frac{\epsilon}{2|f(a)|} = n\epsilon$$ and normally when $\epsilon \to 0$ the variable $n \to \infty$ and therefore we can't say that $n\epsilon$ is small. You have removed the $n$ somehow from your calculation. If each term in a sum is less than $\epsilon$, it does not mean that the whole sum is also less than $\epsilon$.
However it is really very simple to modify your argument. When you have a sum like $\sum A_{i}B_{i}$ and you want to show that it is small (formally less than some arbitrary $\epsilon$) then you need to bound either each of $A_{i}$ or each of $B_{i}$ (but not both, you made the error of bounding both). Suppose we bound $B_{i}$ so that $B_{i} < \epsilon$ and the sum is less than $\epsilon\sum A_{i}$. So the next problem is not to bound $A_{i}$, but the whole sum $\sum A_{i}$ (and this should be made less than some constant value) and you are done. If you choose to bound $A_{i}$ (by $\epsilon$) then you need to bound the whole sum $\sum B_{i}$ (by some constant value).
In our case it is simpler to bound the $\Delta x_{i}$ by $||P||$ so that the difference $S(P) - s(P)$ is less than $||P||\sum (M_{i} - m_{i})$. Since the function is of bounded variation it is possible to bound the whole sum $\sum (M_{i} - m_{i})$ (as shown in answer by John Ma).
I hope you have understood the issue in your argument also the proper way to fix it.

If you know the standard result that a function of bounded variation can be expressed as a difference of two increasing functions then you can easily see that to establish the integrability of functions of bounded variation it is sufficient to establish the integrability of increasing functions. This is really really easy.
With your notation if $f$ is increasing then $M_{i} = f(x_{i}), m_{i} = f(x_{i - 1})$ and $\Delta x_{i} < ||P||$. So we can see that $$S(P) - s(P) \leq ||P||\sum (M_{i} - m_{i}) = ||P||\sum \{f(x_{i}) - f(x_{i - 1})\}$$ and the last sum on RHS telescopes to $f(b) - f(a)$ and hence $$S(P) - s(P) \leq ||P||\{f(b) - f(a)\}$$ Choosing $||P|| < \epsilon/\{f(b) - f(a) + 1\}$ we can see that $$S(P) - s(P) < \epsilon$$ and our job is done.
The only hard (but not too hard) part in this approach is proving the standard result mentioned in bold above.
