# Constructing partition to show that lower sum and upper sum differ by less than $\epsilon$

Let $$f$$ be a continuous, increasing function on $$[a,b]$$. I know that because $$f$$ is continuous, I can use epsilon-delta to prove that the lower sum $$L(f,P)$$ and upper sum $$U(f,P)$$ both converge given a partition of $$[a,b]$$: I can divide it equally into $$n$$ segments, such that the function differs by at most $$\frac{\epsilon}{b-a}$$ where the specific length of each section is determined by $$\delta$$ from the epsilon-delta definition. (I think this explanation is correct; if not, please let me know).

However, my main question is does this result hold for a non-continuous strictly increasing function on $$[a,b]$$? If so, how would we prove that?

Additionally, is there an explicit way to construct a partition (based on $$\epsilon, b, a$$) such that it is always the case for any strictly increasing function that the lower and upper sum get within epsilon of each other?

An increasing function has at worst a countable number of discontinuities where right- and left-hand limits exist.

Take a uniform partition $$P_n = (x_0,x_1, \ldots, x_n)$$ with $$x_k = a + (b-a)k/n$$ and let $$f_-(x)$$ and $$f_+(x)$$ denote the left- and right-hand limits. Of course if $$f$$ is continuous at $$x$$, then $$f_-(x) = f_+(x)$$.

Allowing for discontinuities at partition points we have $$f_-(x_k) \leqslant f(x_k) \leqslant f_+(x_k)$$ where the value $$f(x_k)$$ could be taken to be anywhere in $$[f_-(x_k), f_+(x_k)]$$ without affecting the integral.

It is always true that $$\sup_{x \in [x_{k-1},x_k]}f(x) = f(x_k)$$ and $$\inf_{x \in [x_{k-1},x_k]}f(x) = f(x_{k-1})$$ regardless of how values are defined at discontinuity points.

Thus,

$$U(P_n,f) - L(P_n,f) = \frac{b-a}{n}\sum_{k=1}^nf\left(x_k \right) - \frac{b-a}{n}\sum_{k=1}^nf\left(x_{k-1} \right) \\ = \frac{b-a}{n} \left(\sum_{k=1}^n [f(x_k) - f(x_{k-1})] \right) \\ = \frac{b-a}{n} \left(f(b) - f(a) \right),$$

where the last equality follows because the sum is telescoping.

Now observe that $$U(P_n,f) - L(P_n,f) \to 0$$ as $$n \to \infty$$ and for all $$n > \frac{(b-a)(f(b)-f(a))}{\epsilon}$$ we have

$$U(P_n,f) - L(P_n,f) < \epsilon$$