A connection between integral and sums [Trapezoidal rule perhaps?]

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$.

• check EULER MACLAURIN in wikipedia – Jose Garcia May 31 '17 at 10:57
• I know that is a powerful connection between sum and integrals just now. But I saw the remainder term is again a integral in the form $\int f'(x)P_1(x)\,dx$, where $P_1$ is some linear polynomial similar to what I have above. I think I have to approximate for that, but how? – Li Chun Min May 31 '17 at 11:10

Yes, it's the trapezoidal rule in action. To get the desired convergence and not only the boundedness, note that

$$\int_{a_k}^{b_k} f'(c_k)(x-c_k)\,dx = 0.$$

Hence you can estimate

$$\Biggl\lvert \int_{a_k}^{b_k} f'(x)(x-c_k)\,dx\Biggr\rvert \leqslant \int_{a_k}^{b_k} \lvert f'(x) - f'(c_k)\rvert\cdot \lvert x - c_k\rvert\,dx \leqslant \omega_{f'}\bigl(\tfrac{1}{2n}\bigr) \int_{a_k}^{b_k} \lvert x-c_k\rvert\,dx,$$

where $\omega_{f'}$ is the modulus of continuity of $f'$,

$$\omega_{f'}(\delta) = \max \:\{\lvert f'(x) - f'(y)\rvert : \lvert x-y\rvert \leqslant \delta\}.$$

Since $f'$ is uniformly continuous, we have $\lim\limits_{\delta \to 0} \omega_{f'}(\delta) = 0$, as needed, leading to

$$\Biggl\lvert \sum_{k = 1}^n f\biggl(\frac{k}{n}\biggr) - n\int_0^1 f(x)\,dx - \frac{f(1) - f(0)}{2}\Biggr\rvert \leqslant K\cdot \omega_{f'}\biggl(\frac{1}{2n}\biggr).$$

• Thanks! that makes sense! Again I know the direction didn't know how to complete the details (sigh – Li Chun Min May 31 '17 at 12:01