<s>[INST] Convergence of $\int_0^n f(x)\, dx - [\frac{1}{2} f(0) + f(1) +\dots + f(n-1) + \frac{1}{2} f(n)]$ If $f(x)$ is increasing, strictly concave, and twice continuously differentiable for $x > 0$, does the difference
$$
d_n = \int_0^n f(x)\, dx - [\tfrac{1}{2} f(0) + f(1) + f(2) +\dots + f(n-1) + \tfrac{1}{2} f(n)]
$$
converge to a finite positive limit when $n\to +\infty$?
The error form provided by the trapezoidal rule is not helpful since it just asserts that $d_n = -n f''(\xi_n)/12\geqslant 0$, for some $0 < \xi_n < n$, or that
$$
d_n\leqslant -\tfrac{1}{12}[f''(\xi_1) + f''(\xi_2) +\dots + f''(\xi_n)]
$$
with  $k-1 < \xi_k < k$. Since $f(x)$ is increasing and concave, then $f''(x)$ is negative, bounded, and increasing for $x > 0$, but then again, how to assure the converge of $\sum_{k=1}^n f''(\xi_n)$ when $n\to +\infty$?
 [/INST] Consider
$$
f(x)=-\frac{1}{(x+1)(x+2)}.
$$
Clearly $f$ is increasing and concave in $[0,\infty)$.
Then
$$
\frac{1}{2}f(0)+f(1)+\cdots+f(n-1)+\frac{1}{2}f(n)=\cdots=-\frac{3}{4}+\frac{1}{n+1}-\frac{1}{2(n+1)(n+2)}\\=-\frac{3}{4}+\frac{1}{n}+{\mathcal O}(n^{-2})
$$
while
$$
\int_0^n f(x)\,dx=\int_0^n \frac{dx}{x+2}-\int_0^n\frac{dx}{x+1}=\log(n+2)-\log 2-\log(n+1)\\=-\log 2-\log\Big(1+\frac{1}{n+1}\Big)\\=-\log 2-\frac{1}{n}+{\mathcal O}(n^{-2})
$$
Thus
$$
d_n\to -\frac{1}{2}+\log 2>0.
$$
</s>