Calculating $\text{PV}\int_{-\infty}^{+\infty}\frac{e^{\alpha x}}{e^{2x}-1}\mathrm d x$ I am trying to show that for $0 < \alpha < 2$:
$$
{\rm P.V.}\int_{-\infty}^{\infty}\frac{{\rm e}^{\alpha x}}
{{\rm e}^{2x} - 1}\,{\rm d}x
=
-\frac{\pi}{2}\,\cot\left(\frac{\alpha\pi}{2}\right )
\tag{$\star$}
$$
to gain some familiarity with the concept of Principal Value.

My attempts

*

*First of all I started by expanding the integral. Let $R>0$ be a positive real number. Then
$$
\begin{align}
\int_{-R}^R\frac{e^{\alpha x}}{e^{2x}-1}\mathrm dx &=  
\int_{-R}^R e^{\alpha x}\left (\sum_{n\ge 1}e^{-2nx}\right )\mathrm dx=\sum_{n\ge 1}\int_{-R}^R e^{(\alpha-2n)x}\mathrm d x
\\[5mm]
& =
\sum_{n\ge 1}\left .\frac{e^{(\alpha-2n)x}}{\alpha-2n} \right |^{x=R}_{x=-R}=\sum_{n\ge 1}\frac{1}{\alpha-2n}\left ( e^{(\alpha-2n)R} -e^{-(\alpha-2n)R}\right)
\end{align}
$$
but I don't know how to continue from here. I tried evaluating the series through complex analytic methods but I was not successful.


*I tried substituting $e^{2x}=u$. The integral becomes
$$\int_{-R}^R\frac{e^{2x\frac{\alpha}{2}}}{e^{2x}-1}\mathrm dx=\frac{1}{2}\int_{e^{-2R}}^{e^{2R}}\frac{u^{\frac{\alpha}{2}-1}}{u-1}\mathrm du$$
but this doesn't look very promising. I was unable to manipulate this expression to evaluate the integral.


Question: How can I evaluate the principal value $(\star)$?


Note that
$$\eqalign{\int_{|x|>\epsilon}\frac{e^{ax}}{e^{2x}-1}dx&=
\int_{\epsilon}^\infty\frac{e^{ax}}{e^{2x}-1
}dx+\int_{-\infty}^{-\epsilon}\frac{e^{ax}}{e^{2x}-1}dx\cr
&=\int_{\epsilon}^\infty\frac{e^{ax}}{e^{2x}-1
}dx+\int_\epsilon^{\infty}\frac{e^{-ax}}{e^{-2x}-1}dx\cr
&=\int_{\epsilon}^\infty\frac{e^{ax}-e^{(2-a)x}}{e^{2x}-1
}dx
}$$
The integrand on the right can be extended by continuity at $x=0$ so
$$V.P \int_{-\infty}^{\infty}\frac{e^{ax}}{e^{2x}-1}dx=\lim_{\epsilon\to0}\int_{|x|>\epsilon}\frac{e^{ax}}{e^{2x}-1}dx=\int_{0}^\infty\frac{e^{ax}-e^{(2-a)x}}{e^{2x}-1
}dx$$
Now, the last integral can be evaluated as follows:
$$\eqalign{\int_{0}^\infty\frac{e^{ax}-e^{(2-a)x}}{e^{2x}-1
}dx&=\int_{0}^\infty(e^{ax}-e^{(2-a)x})\left(\sum_{n=1}^\infty e^{-2n x}\right)dx\cr
&=\sum_{n=1}^\infty\left(\frac{1}{2n-a}-\frac{1}{2n+a-2}\right)\cr
&=-\frac1a-\sum_{n=1}^\infty\frac{a}{a^2-4n^2}=-\frac{\pi}{2}\cot\frac{\pi a}{2}
}$$
