Inequality of harmonic number $\left| \sum_{i=1}^{n}\frac{1}{i}-\log{n}-\gamma \right| \leq \frac{10}{n}$

calculuseuler-mascheroni-constantharmonic-numberslogarithmssequences-and-series

In my Number Theory textbook, it was quoted without proof that for all positive integers $n$,
$$\left| \sum_{i=1}^{n}\frac{1}{i}-\log{n}-\gamma \right| \leq \frac{10}{n}$$
where $\gamma = 0.577…$ is the Euler–Mascheroni constant.
From my Calculus courses, I knew that
$\displaystyle\lim_{n\to\infty}\left(\sum_{i=1}^{n}\frac{1}{i}-\log{n}\right)=\gamma$
However, I am not aware of the inequality above.
I have no ideas of how to prove it, and couldn't find sources about it.
Is it a well-known result? Is it approachable? Is there a name for it? Are there resources about it?
Alternatively, a proof is also very welcomed.
Thank you very much.

Best Answer

Let $u_n=\sum_{i=}^n \frac{1}{i}-\log n$ and $v_n=\sum_{i=1}^n\frac{1}{i}-\log(n+1)$, then $(u_n)$ is a decreasing sequence and $(v_n)$ is a nondecreasing sequence. Since they both converge towards $\gamma$, we have $v_n\leqslant\gamma\leqslant u_n$ for all $n$, which means that $$ 0\leqslant\sum_{i=1}^n\frac{1}{i}-\log n-\gamma\leqslant u_n-v_n=\log\left(1+\frac{1}{n}\right)\leqslant\frac{1}{n} $$

Related Question