Jiang Guosheng兄,我现在给出另一种证明.事实上,这道题的背景是数值积分中的梯形法则.
设$f\in C^1[0,1]$,则 \begin{equation} \lim_{n\to\infty}n\left[\int_{0}^{1}f(x)dx-\frac{1}{n}\sum_{k=0}^{n-1}f\left(\frac{k}{n}\right)\right]=\frac{f(1)-f(0)}{2}. \end{equation}
我们对区间$[0,1]$进行等分,各个等分点按照从小到大排列依次是
\begin{align*} x_0=0,x_1=\frac{1}{n},\cdots,x_{n-1}=\frac{n-1}{n},x_n=1\end{align*}其中$\forall 0\leq i\leq n$,$$x_i=\frac{i}{n}$$根据梯形法则,我们知道$\forall 0\leq i\leq n-1$,\begin{align*} \int_{\frac{i}{n}}^{\frac{i+1}{n}}f(x)dx\approx \frac{1}{2n}[f(\frac{i}{n})+f(\frac{i+1}{n})]\end{align*}下面我们证明 \begin{align*} \int_{\frac{i}{n}}^{\frac{i+1}{n}}f(x)dx-\frac{1}{2n}[f(\frac{i}{n})+f(\frac{i+1}{n})]=o(\frac{1}{n^2})\end{align*}我们只用证明\begin{align*} \int_{a\delta}^{a\delta+\delta}f(x)dx-\frac{1}{2}\delta[f(a\delta)+f(a\delta+\delta)]=o(\delta^2)\end{align*}我们只用证明\begin{align*} \lim_{\delta\to 0}\frac{\int_{a\delta}^{a\delta+\delta}f(x)dx-\frac{1}{2}\delta [f(a\delta)+f(a\delta+\delta)]}{\delta^2}=0\end{align*}我们只用证明\begin{align*} \lim_{\delta\to 0}\frac{\int_0^{a\delta+\delta}f(x)dx-\int_0^{a\delta}f(x)dx-\frac{1}{2}\delta[f(a\delta)+f(a\delta+\delta)]}{\delta^2}=0\end{align*}根据洛必达法则,只用证明\begin{align*}
\lim_{\delta\to 0}\frac{(a+1)f(a\delta+\delta)-af(a\delta)-\frac{1}{2}[f(a\delta)+f(a\delta+\delta)]-\frac{1}{2}\delta[af'(a\delta)+(a+1)f'(a\delta+\delta)]}{\delta}=0\end{align*}根据微分中值定理,即\begin{align*} \lim_{\delta\to 0}af'(\xi_1)+\frac{1}{2}f'(\xi_1)-\frac{1}{2}[af'(a\delta)+(a+1)f'(a\delta+\delta)]\to 0\end{align*}根据$f'$在$[0,1]$的连续性,我们只用证明\begin{align*} af'(0)+\frac{1}{2}f'(0)-\frac{1}{2}[af'(0)+(a+1)f'(0)]=0\end{align*}这是容易的.因此\begin{align*}
\int_{\frac{i}{n}}^{i+1}\frac{i+1}{n}f(x)dx=\frac{1}{2n}[f(\frac{i}{n})+f(\frac{i+1}{n})]+o_{i}(\frac{1}{n^2})\end{align*}累加可得\begin{align*} \int_0^1f(x)dx=\frac{1}{n}[\frac{1}{2}f(0)+f(\frac{1}{n})+\cdots+f(\frac{n-1}{n})+\frac{1}{2}f(1)]+\sum_{i=0}^{n-1}o_i(\frac{1}{n^2})\end{align*}所以\begin{align*} n[\int_0^1f(x)dx-\frac{1}{n}[f(0)+f(\frac{1}{n})+\cdots+f(\frac{n-1}{n})]]= [\frac{1}{2}f(1)-\frac{1}{2}f(0)]+n\sum_{i=0}^{n-1}o_i(\frac{1}{n^2})\end{align*}所以 \begin{equation} \lim_{n\to\infty}n\left[\int_{0}^{1}f(x)dx-\frac{1}{n}\sum_{k=0}^{n-1}f\left(\frac{k}{n}\right)\right]=\frac{f(1)-f(0)}{2}. \end{equation}注:在核心步骤里,一位Stackexchange上的老外给出了