Assume $f:[a,b] \to \mathbb R$ is an increasing function,if $P_n$ is a partition of $[a,b]$ into $n$ equal subintervals,then show that $$0\le U\left(P_{n},f\right)-\int_{a}^{b}f\left(x\right)dx\le\frac{b-a}{n}\left(f\left(b\right)-f\left(a\right)\right)$$
We have that $$ U\left(P_{n},f\right)=\sum_{i=0}^{n-1}M_{i}\Delta x_i=\frac{b-a}{n}\sum_{i=0}^{n-1}f(x_{i+1})$$
Where $\Delta x_i=x_{i+1}-x_i=(b-a)/n$ and $M_{i}=\sup \{f(x):x \in [x_{i},x_{i+1}]\}$ and $P_n=(a=x_0,x_1,...,x_n=b)$
On the other hand:
$$\int_{a}^{b}f\left(x\right)dx=\inf \{ U\left(P,f\right):P \in \mathcal P_{[a,b]} \}\le \inf \{ U\left(P_n,f\right):n \in \mathbb N^+\} \le U\left(P_n,f\right)$$
Where $\mathcal P_{[a,b]}$ is the set of all partitions of $[a,b]$ which shows that $$ 0\le U\left(P_n,f\right) -\int_{a}^{b}f\left(x\right)dx$$
But how to get the other inequality?
Use the Sup of $L(P_n,f)$'s for the definition of the integral of $f$, then for the same $P_n$: $ \displaystyle \int_{a}^b fdx \ge L(P_n,f)= \dfrac{b-a}{n}\cdot \displaystyle \sum_{i=0}^{n-1} f(x_i)\implies U(P_n,f) - \displaystyle \int_{a}^b fdx \le \dfrac{b-a}{n}\left(\displaystyle \sum_{i=1}^n f(x_i) - \displaystyle \sum_{i=0}^{n-1} f(x_i)\right)= \dfrac{b-a}{n}\cdot (f(x_n) - f(x_0)) = \dfrac{b-a}{n}\cdot (f(b) - f(a))$.