This is a question from Tom M. Apostol's Calculus, Volume 1 (Exercise 10.4):
$f$ is monotonically increasing and bounded on $[0,1]$. Define the sequences $\{s_n\}$ and $\{t_n\}$ as follows: $$s_n = \frac{1}{n}\sum_{k=0}^{n-1}f\left(\frac{k}{n}\right) \\ t_n = \frac{1}{n}\sum_{k=1}^{n}f\left(\frac{k}{n}\right)$$
a) Prove that $s_n \le \int^1_0 f(x) \mathrm{d}x\le t_n$ and that $0 \le \int^1_0f(x)\mathrm{d}x-s_n \le \frac{f(1)-f(0)}{n}$.
b) Prove that the sequences $\{s_n\}$ and $\{t_n\}$ converge to the limit $\int^1_0f(x)\mathrm{d}x$.
Here's what I have tried:
a) We know $s_n$ and $t_n$ are the sum of areas of the rectangles below and above the curve $f$ respectively, the equality holding when $f$ is a piecewise constant function (so $\int^1_0f(x)\mathrm{d}x$ lies between them).
b) The integral is sandwiched between $s_n$ and $t_n$, so when $n\to\infty$, the sums become equal to the integral.
Is there an "analytic" proof for a)?
(I presume an "analytic proof" is one that doesn't make use of the function's graph, though I may be wrong)
You have $$\frac{1}{n}f\left(\frac kn\right) \le \int_{k/n}^{(k+1)/n} f(x) \,\mathrm dx \le\frac{1}{n} f\left(\frac{k+1}n\right).$$ (This is true simply because the values of the function on the whole interval are between the two values.)
If you sum all these inequalities for $k=0,\dots,n-1$ you get $$s_n \le \int_0^1 f(x) \,\mathrm dx \le t_n.$$
This also implies that $$0 \le \int_0^1 f(x) \,\mathrm dx - s_n \le t_n-s_n.$$ It remains to show that $t_n-s_n=\frac{f(1)-f(0)}n$.