<s>[INST] Can one show that $\sum_{n=1}^N\frac{1}{n} -\log N - \gamma \leqslant \frac{1}{2N}$ without using the Euler-Maclaurin formula? I would like to prove that
$$
\sum_{n=1}^N\frac{1}{n} -\log N - \gamma \leqslant \frac{1}{2N}
$$
without using the Euler-Maclaurin summation formula. The motivation for this is that I have come very close to doing so (see the answer provided below) but annoyingly have not actually proved the above.
Some may ask why I don't just use the formula. I'm writing a set of analytic number theory notes for my own use and it seems an unwieldy result to introduce and prove, given that the above inequality is all I need, and given that I have gotten so close without using Euler-Maclaurin!
 [/INST] One can check that $S(N):=\sum_{n=1}^N\frac{1}{n} -\log N - \gamma = \int_N^\infty \frac{x-[x]}{x^2} \: dx$, where $[x]$ is the integer part of $x$. Moreover
$$
\int_n^{n+1} \frac{x-[x]}{x^2}\: dx = \log\Big(\frac{n+1}{n}\Big) - \frac{1}{n+1} < \frac{1}{n} - \frac{1}{n+1} -\frac{1}{2n^2} +\frac{1}{3n^3}, \qquad (1)
$$
by the Taylor series for $\log(1+x)$. But we have that
$$
n(n+1)(3n-1) = 3n^3 + 2n^2 -n > 3n^3
$$
so
$$
\frac{1}{n(n+1)} < \frac{3n-1}{3n^3} = \frac{1}{n^2} - \frac{1}{3n^3}.
$$
Therefore, from equation $(1)$ we find
$$
S(N) < \sum_{n=N}^\infty \frac{1}{n(n+1)} -\frac{1}{2n^2} +\frac{1}{3n^3} < \sum_{n=N}^\infty \frac{1}{n^2} - \frac{1}{3n^3} -\frac{1}{2n^2} +\frac{1}{3n^3},
$$
and so finally,
$$
S(N) < \frac{1}{2}\sum_{n=N}^\infty \frac{1}{n^2} < \frac{1}{2(N-1)},
$$
for all $N \in \mathbb{N}$, by a standard approximation for $\sum \frac{1}{n^2}$.
</s>