Evaluate the Integral \(\int \frac{x}{e^{x}-1} \mathrm{d}x \)

How to evaluate
\begin{equation}
\int \frac{x}{e^{x}-1} \mathrm{d}x
\tag{1}
\label{eq:161007-1}
\end{equation}
was a question posed at Mathematics Stack Exchange.

Here is my solution.

Begin with
\begin{equation}
I_{1} = \int \frac{1}{e^{x}-1} \mathrm{d}x = \int \frac{e^{-x}}{1-e^{-x}} \mathrm{d}x = \ln(1-e^{-x})
\tag{2}
\label{eq:161007-2}
\end{equation}

and rewrite our result as
\begin{align}
\ln(1-e^{-x}) &= \ln[-e^{-x}(-e^{-x}+1)] \\
&= \ln(-1) + \ln(e^{-x}) + \ln(1-e^{x}) \\
&= i\pi \,- x + \ln(1-e^{x})
\end{align}
and thus
\begin{equation}
I_{1} = i\pi \,- x + \ln(1-e^{x})
\end{equation}

Now we evaluate equation \eqref{eq:161007-1}, our original integral, via integration by parts. For \(\int a\mathrm{d}b = ab – \,\int b\mathrm{d}a\) we have \(a = x\), \(\mathrm{d}b = (e^{x}-1)^{-1}\), and \(b = I_{1}\)
\begin{equation}
\int \frac{x}{e^{x}-1} \mathrm{d}x = x I_{1} \,- \int I_{1} \mathrm{d}x
\end{equation}

\begin{equation}
\int I_{1} \mathrm{d}x = \int [i\pi \,- x + \ln(1-e^{x})] \mathrm{d}x = i\pi x \,- \frac{1}{2}x^{2} + \int \ln(1-e^{x}) \mathrm{d}x
\end{equation}
For the integral on the right hand side, we make the substitution \(y = e^{x}\),
\begin{equation}
\int \ln(1-e^{x}) \mathrm{d}x = \int \frac{\ln(1-y)}{y} \mathrm{d}y = -\mathrm{Li}_{2}(y) = -\mathrm{Li}_{2}(e^{x})
\end{equation}

Putting all of the pieces together, we have
\begin{align}
\int \frac{x}{e^{x}-1} \mathrm{d}x &= i\pi x \,- x^{2} + x\ln(1-e^{x}) – \left(i\pi x \,- \frac{1}{2}x^{2} -\mathrm{Li}_{2}(e^{x}) \right) \\
&= \mathrm{Li}_{2}(e^{x}) + x\ln(1-e^{x}) \,- \frac{1}{2}x^{2} + \mathrm{const}
\end{align}

Leave a Reply

Your email address will not be published. Required fields are marked *