TITLE: Integral Representation of the Zeta Function: $\zeta(s)=\frac1{\Gamma(s)}\int_{0}^\infty \frac{x^{s-1}}{e^x-1}dx$
QUESTION [5 upvotes]: How does one get from this
$$\zeta(s)=\sum_{k=1}^{\infty}\frac1{k^s}$$
to the integral representation
$$\zeta(s)=\frac1{\Gamma(s)}\int_{0}^\infty \frac{x^{s-1}}{e^x-1}dx$$
of the Riemann Zeta function?
I can see that it can be rewritten as
$$\Gamma(s)\zeta(s)=\int_{0}^\infty \frac{x^{s-1}}{e^x-1}dx$$
and the Gamma function as an integral yields
$$\zeta(s)\int_{0}^\infty \frac{x^{s-1}}{e^x}dx=\int_{0}^\infty \frac{x^{s-1}}{e^x-1}dx$$
But this approach does not work as the right integral does not converge.  So how does one go from the summation to the integral representation?

REPLY [2 votes]: $\newcommand{\dd}{\mathrm{d}}$
The Mellin transform of a function $f$ is given by
\begin{align}
    \left\{\mathscr{M}f\right\}(s)=\phi(s)=\int_0^{\infty}x^{s-1}f(x)\dd x
\end{align}
For the function
\begin{align}
f(x)=\frac{1}{e^x - 1}
\end{align}
we have
\begin{align}
\phi(s)&=\int_0^{\infty}\frac{x^{s-1}}{e^x - 1}\dd x \\
       &=\sum_{n \geq1}\int_{0}^{\infty}x^{s-1}e^{-nx}\dd x
\end{align}
Making the substitution $u=nx$ gives
\begin{align}
    \phi(s)&=\sum_{n \geq1}\frac{1}{n^s}\int_{0}^{\infty}u^{s-1}e^{-u}\dd u \\
           &=\zeta(s)\Gamma(s)
\end{align}
Equating this to the above integral gives the desired result:
\begin{align}
    \zeta(s)\Gamma(s)&=\int_{0}^{\infty}\frac{x^{s-1}}{e^x - 1}\dd x \\
                     \zeta(s)&=\frac{1}{\Gamma(s)}\int_{0}^{\infty}\frac{x^{s-1}}{e^x - 1}\dd x
\end{align}