Let $\zeta$ denote the Riemann zeta function. In this answer: <https://mathoverflow.net/a/314066/133634>, @Paul Garret considers the representation


$$\frac{\zeta(s)}{s} = \int\_1^\infty (\sum\_{1 \le n \le x} 1) x^{-s-1}dx$$ for $\Re(s)>1$, and then claims (without proof) that this representation yields


$$\frac{\zeta(s)}{s}+\frac{\zeta(s)}{1-s}= \int\_0^\infty ((\sum\_{1 \le n \le x} 1-x)-x(\sum\_{1 \le n \le x} \frac1n-\log x-\gamma)) x^{-s-1}dx$$ for $\Re(s)\in(0,1)$, where $\gamma$ is the Euler constant.


But i can't see how the second representation follows from the first. Can anyone please explain ? 



On a certain representation of the Riemann zeta function
Let $0<\Re(s)<1$ unless otherwise indicated. Then
$$\int\_0^\infty (\sum\_{1 \le n \le x} 1-x) x^{-s-1}\,dx=-\int\_0^1 x^{-s}+\int\_1^\infty (\sum\_{1 \le n \le x} 1-x) x^{-s-1}\,dx.$$
On the right hand side, the first integral equals $1/(s-1)$. The second integral equals $\zeta(s)/s-1/(s-1)$ as can be seen by proving it first for $\Re(s)>1$ and then continuing it analytically to $\Re(s)>0$. Hence
$$\int\_0^\infty (\sum\_{1 \le n \le x} 1-x) x^{-s-1}\,dx=\frac{\zeta(s)}{s},\qquad 0<\Re(s)<1.\tag{1}$$
Now consider
$$S(x):=\sum\_{1 \le n \le x} \frac1n-\log x-\gamma,\qquad x>0.$$
Note that $S(x)\ll\log x$ when $x<1$, and $S(x)\ll 1/x$ when $x\geq 1$. Then, the remaining part of the integral is, by integration by parts,
$$\int\_0^\infty S(x)x^{-s}\,dx=\frac{1}{s-1}\int\_0^\infty x^{1-s}\,dS(x).$$
Now we argue for the integral on the right hand side similarly as before:
$$\int\_0^\infty x^{1-s}\,dS(x)=\int\_0^{1-} x^{1-s}\,dS(x)+\int\_{1-}^\infty x^{1-s}\,dS(x).$$
On the right hand side, the first integral equals $1/(s-1)$. The second integral equals $\zeta(s)-1/(s-1)$ as can be seen by proving it first for $\Re(s)>1$ and then continuing it analytically to $\Re(s)>0$. Hence
$$\int\_0^\infty x^{1-s}\,dS(x)=\zeta(s),\qquad 0<\Re(s)<1,$$
and therefore
$$\int\_0^\infty S(x)x^{-s}\,dx=\frac{\zeta(s)}{s-1},\qquad 0<\Re(s)<1.\tag{2}$$
Subtracting $(2)$ from $(1)$, the claimed identity follows.


