Limit of $nU_n$ with $U_n = \int _0^1 f(t)dt - \frac{1}{n} \sum _{k=0}^{n-1} f(\frac{k}{n})$ If $f$ is a continuous function, how do I calculate the limit of $nU_n$ ?
$$U_n = \int _0^1 f(t)dt - \frac{1}{n} \sum _{k=0}^{n-1} f(\frac{k}{n})$$
I've noticed that the sum is a Riemann sum, which gives me $U_n \rightarrow 0$ but I don't know how to proceed further?
 A: If $f$ is in fact twice continuously differentiable, we can proceed as follows. We have $$U_n = \sum_{k=0}^{n-1} \left[ \int_{k/n}^{(k+1)/n} \left( f(x) - f\left(\frac{k}{n} \right) \right) \, dx \right] =: \sum_{k=0}^{n-1} I_{n,k} $$ By Taylor's theorem, for each $k$ there exists $\xi_k \in (k/n, (k+1)/n)$ such that $$f(x) - f\left( \frac{k}{n} \right) = f' \left( \frac{k}{n} \right) \left( x - \frac{k}{n} \right) + \frac{f''\left( \xi_k \right)}{2} \left(x - \frac{k}{n} \right)^2$$ for all $x \in (k/n, (k+1)/n)$. Therefore $$I_{n,k} = f' \left( \frac{k}{n} \right) \frac{1}{2n^2} + f''(\xi_k) \frac{1}{6n^3} \implies U_n = \frac{1}{2n^2} \sum_{k=0}^{n-1} f'\left( \frac{k}{n} \right) + \frac{1}{6n^3} \sum_{k=0}^{n-1} f''(\xi_k)$$ Setting $M = \sup_{x\in [0,1]} |f''(x)|$, it follows that $$\left\vert n U_n - \frac{1}{2n} \sum_{k=0}^{n-1} f'\left( \frac{k}{n} \right) \right\vert \le \frac{M}{6n^2}$$ Taking $n \to \infty$ then yields $n U_n \to \frac{1}{2} \int_{0}^{1} f'(x) \, dx = (f(1) - f(0))/2$.
