Proving an integral equivalence involving floor and ceiling functions During the course of looking at the Euler–Mascheroni constant I have run across the following result:
$$\gamma 
= \int \limits_1^\infty \Bigg( \frac{1}{\lfloor x \rfloor} - \frac{1}{x} \Bigg) \ dx
= \int \limits_1^\infty \Bigg( \frac{\lceil x \rceil}{x^2} - \frac{1}{x} \Bigg) \ dx.$$
Representation of this constant using the first integral is a well-known result.  What is the simplest way to prove the equivalence of the two integrals?
 A: This is actually easier than it seems, since for any positive integer $k$,
\begin{align*}
\int_k^{k+1} \bigg( \frac{\lceil x \rceil}{x^2} - \frac{1}{x} \bigg) \, dx
&= \int_k^{k+1} \bigg( \frac{k+1}{x^2} - \frac{1}{x} \bigg) \, dx = \frac1k - \log\bigg( 1+\frac1k \bigg) \\
\int_k^{k+1} \bigg( \frac{1}{\lfloor x \rfloor} - \frac{1}{x} \bigg) \, dx &= \int_k^{k+1} \bigg( \frac{1}{k} - \frac{1}{x} \bigg) \, dx = \frac1k - \log\bigg( 1+\frac1k \bigg).
\end{align*}
Then one can sum both sides over all positive integers $k$ (yielding the Euler–Mascheroni constant as it turns out).
A: Applying the suggestion (in comments) from Paramanand Singh we get:
$$\begin{align}
\int \limits_1^\infty \Bigg( \frac{\lceil x \rceil}{x^2} - \frac{1}{\lfloor x \rfloor} \Bigg) \ dx
&= \sum_{n=1}^\infty \int \limits_n^{n+1} \Bigg( \frac{\lceil x \rceil}{x^2} - \frac{1}{\lfloor x \rfloor} \Bigg) \ dx \\[6pt]
&= \sum_{n=1}^\infty \int \limits_n^{n+1} \Bigg( \frac{n+1}{x^2} - \frac{1}{n} \Bigg) \ dx ​\\[6pt]
&= \sum_{n=1}^\infty \Bigg[ - \frac{n+1}{x} - \frac{x}{n} \Bigg]_{x=n}^{x=n+1} ​\\[6pt]
&= \sum_{n=1}^\infty \Bigg[ \Bigg( - \frac{n+1}{n+1} - \frac{n+1}{n} \Bigg) - \Bigg( - \frac{n+1}{n} - \frac{n}{n} \Bigg) \Bigg] ​\\[6pt]
&= \sum_{n=1}^\infty \Bigg[ \Bigg( - 2 - \frac{1}{n} \Bigg) - \Bigg( - 2 - \frac{1}{n} \Bigg) \Bigg] ​\\[6pt]
&= \sum_{n=1}^\infty 0 = 0. ​\\[6pt]
\end{align}$$
The equivalence of the two integrals in question follows simply from here, which establishes the latter representation of the Euler-Mascheroni constant.
