Proving that $\lim\limits_{n\to\infty}n\left( \int_0^1 f(t)\, dt -\frac1n\sum_{k=0}^{n-1}f\left(\frac k n\right) \right)=\frac{f(1)-f(0)}{2}$
Let $f\in C^2([0,1])$. Prove that $$ \lim_{n\to+\infty}n\left( \int_0^1 f(t)\, dt -\frac1n\sum_{k=0}^{n-1}f\Big(\frac k n\Big) \right)=\frac{f(1)-f(0)}{2}. $$
The second term is clearly the Riemann sum of the function $f$; since the function $f$ is integrable (it is continuous) $\displaystyle \frac1n\sum_{k=0}^{n-1}f\Big(\frac k n\Big)$ converges to $\displaystyle\int_0^1 f(t)\, dt$ when $n \to + \infty$.
So we have an indeterminate form, "$\infty \cdot 0$". How can we start? I thought we should use Taylor expansion ($f$ is $C^2$) but I cannot see how. Would you please help me?
Thanks in advance.
Solution 1:
Using the Taylor series for $f$, we get $$ \begin{align} &n\left(\int_0^1f(t)\,\mathrm{d}t-\frac1n\sum_{k=0}^{n-1}f(k/n)\right)\\ &=n\sum_{k=0}^{n-1}\int_{k/n}^{(k+1)/n}\left(f(t)-f(k/n)\right)\,\mathrm{d}t\\ &=n\sum_{k=0}^{n-1}\int_{k/n}^{(k+1)/n}\left(f'(k/n)(t-k/n)+O(1/n^2)\right)\,\mathrm{d}x\\ &=n\sum_{k=0}^{n-1}\left(f'(k/n)\frac1{2n^2}+O(1/n^3)\right)\\ &=\frac12\sum_{k=0}^{n-1}f'(k/n)\frac1n+O(1/n)\tag{1} \end{align} $$ Where the $O(1/n)$ term has constant bounded by the maximum of $\frac12|f''(t)|$ on $[0,1]$.
Since the sum in $(1)$ is the Riemann Sum for $\frac12\int_0^1f'(t)\,\mathrm{d}t$, we have $$ \begin{align} \lim_{n\to\infty}n\left(\int_0^1f(t)\,\mathrm{d}t-\frac1n\sum_{k=0}^{n-1}f(k/n)\right) &=\lim_{n\to\infty}\left(\frac12\sum_{k=0}^{n-1}f'(k/n)\frac1n+O(1/n)\right)\\ &=\frac12\int_0^1f'(t)\,\mathrm{d}t+0\\ &=\frac{f(1)-f(0)}{2}\tag{2} \end{align} $$
Solution 2:
One can check by integrating by parts that $$ f\left(\frac{k}{n}\right)-n\int\limits_{(k-1)/n}^{k/n}f(t)dt= n\int\limits_{(k-1)/n}^{k/n}f'(t)\left(t-\frac{k-1}{n}\right)dt= \int\limits_{0}^1\frac{t}{n}f'\left(\frac{t+k-1}{n}\right) $$ So using dominated convergence theorem we get $$ \lim\limits_{n\to+\infty}n\left(\int_0^1f(t)dt -\frac{1}{n}\sum_{k=0}^{n-1}f\left(\frac k n\right) \right)= \lim\limits_{n\to+\infty}\int\limits_{0}^1\frac{t}{n}\sum_{k=0}^{n-1}f'\left(\frac{t+k-1}{n}\right)= $$ $$ \int\limits_{0}^1t\lim\limits_{n\to+\infty}\frac{1}{n}\sum_{k=0}^{n-1}f'\left(\frac{t+k-1}{n}\right)= \int_{0}^{1}t\left(\int\limits_{0}^1 f'(s)ds\right)dt=\frac{f(1)-f(0)}{2} $$ Note that for this proof it is enough to require that $f\in C^1([0,1])$