I took the final of my first analysis course and I saw the following problem:
Let $f: [0,1] \rightarrow \Bbb{R}$ be a continuously differentiable function. Show that $$ \lim_{n\rightarrow \infty} \bigg[ \sum_{k = 1}^n f\bigg(\frac{k}{n}\bigg) -n\int_0^1 f(x)\, dx \bigg] = \frac{f(1)-f(0)}{2}$$
Attempt
I was totally clueless. I tried putting $f(x) = x$ and see if that helps me to come up with a proof. Sitting over there for an hour or so, I suspect the formula is somehow related to the trapezoidal rule. But I still left that question blank. Now I continue doing this exam problem:
For each $n \in \Bbb{N}^+$, let $$T_n = \frac{f(0)+f(\frac{1}{n})}{2n} + \frac{f(\frac{1}{n})+f(\frac{2}{n})}{2n}+\cdots +\frac{f(\frac{n-1}{n})+f(1)}{2n} = \frac{f(0)-f(1)}{2n} +\frac{1}{n}\sum_{k=1}^n f\bigg(\frac{k}{n}\bigg)$$
Then we are acutally proving that
$$n\bigg( \underbrace{T_n -\int_0^1f(x)\,dx }_{E_n} \bigg) \rightarrow 0$$
I have looked at some documents about the error term in trapezoidal rule, we can rewrite $E_n$ using integration by parts. Let's write $a_k = \frac{k-1}{n}$ and $b_k = \frac{k}{n}$ and $c_k = \frac{a_k + b_k}{2}$
$$E_n = \sum_{k =1 }^n \bigg(\frac{f(\frac{k-1}{n})+f(\frac{k}{n})}{2}-\int_{\frac{k-1}{n}}^{\frac{k}{n}} f(x)\,dx \bigg)=\sum_{k=1}^n \bigg[ \int_{a_k}^{b_k} f'(x)(x-c_k)\,dx \bigg]$$
But we could not apply integration by parts again since we just assumed $f \in C^1[0,1]$ only, not $C^2$...I can just do the following now. For $f'$ is continuous on $[0,1]$, $|f|$ is bounded above by some number $M$. Then
$$ \begin{align}|E_n| & \leq \sum_{k=1}^n \bigg| \int_{a_k}^{b_k} f'(x)(x-c_k)\,dx \bigg|\leq \sum_{k=1}^n \bigg(\int_{a_k}^{b_k} |f'(x)||x-c_k|\,dx\bigg) \\ &\leq \sum_{k=1}^n \bigg( M\int_{a_k}^{b_k}|x-c_k|\,dx \bigg)= n \cdot \frac{M}{4n^2} =\frac{M}{4n} \end{align} $$
From this, we can only conclude that $|nE_n| = n|E_n| \leq M/4$ for each $n$, which is not what we want.
I believe that proposition is true since it holds for some functions in $C^1$ but not $C^2$, such as $x^{3/2}$ and $|x|^{2.1}\sin(1/|x|)$. So that the $C^1$ assumption should be sufficient.
Perhaps we shall use the continuity of $f'$ more fully in order to prove the proposition. For example, in the $\epsilon$-$\delta$ definition, I can take $N$ so big such that $1/N < \delta$, but don't know how to prove $|NE_N| <\epsilon'$ for this big $N$.