# Convergence of integral of log and sum the mean of the logs

How can I show that the following limit converges and $L \in (0, +\infty)$?

$\lim\limits_{n \to +\infty}\left( S_n - T_n\right)$, where $S_n = \int\limits_1^n \log x\, dx$, and $T_n = \sum_{k = 1}^{n-1}\frac{\log(k)+\log(k+1)}{2}$

I already tried using Riemann's sum, some converge tests, transforming into a telescope sum but I got nowhere. Anyone here got an idea on how to prove it?

## 2 Answers

You could just evaluate it:

$$S_n=\int_1^n \ln x\;dx=n\ln n-n+1$$

$$T_n=\frac{1}{2}\sum_{k=1}^{n-1}\left(\ln k+\ln (k+1)\right)=\frac{1}{2}\left(\ln n!+\ln (n-1)!\right)=\ln \frac{n!}{\sqrt{n}}$$

Using Stirling's formula for $n!:$

\begin{align*}\ln \frac{n!}{\sqrt{n}}&=\ln\left[\frac{ \sqrt{2\pi n}}{\sqrt{n}}\left(\frac{n}{e}\right)^n\left(1+O\left(\frac{1}{n}\right)\right)\right]\\&=\ln \sqrt{2\pi}+n\ln \frac{n}{e}+\ln \left(1+O\left(\frac{1}{n}\right)\right)\\&=\ln \sqrt{2\pi}+n\ln n-n+\ln \left(1+O\left(\frac{1}{n}\right)\right)\end{align*}

Hence

$$S_n-T_n=1-\ln \sqrt{2\pi}-\ln \left(1+O\left(\frac{1}{n}\right)\right)$$

$$\lim_{n\to\infty} S_n-T_n=1-\ln \sqrt{2\pi}$$

Since $\sqrt{2\pi}<e$ the limit is positive.

We have \begin{align}S_n&=\sum_{k=1}^{n-1}\int_k^{k+1}\log x dx=\sum_{k=1}^{n-1}\left[ x\log x -x\right]_k^{k+1}\\ &= \sum_{k=1}^{n-1}(k+1)\log(k+1)-k\log k-1, \end{align} then we find after simplification \begin{align} S_n-T_n=\sum_{k=1}^{n-1}\frac{(2k+1)\log(k+1)-(2k+1)\log k-2}{2}=\frac{1}{2}\sum_{k=1}^{n-1}u_k. \end{align} Now we prove that the serie $\sum u_n$ is convergent and positive. We have $$u_k=(2k+1)\log(1+\frac{1}{k})-2=(2k+1)(\frac{1}{k}-\frac{1}{2k^2}+\frac{1}{3k^3}+o(\frac{1}{k^3}))-2=\frac{1}{6k^2}+o(\frac{1}{k^2})$$ and by comparaison with Riemann sum we conclude.