Contour integration to compute $\int_0^\infty \frac{\sin ax}{e^{2\pi x}-1}\,\mathrm dx$ How to show:
$$\int_{0}^{\infty}\frac{\sin ax}{e^{2\pi x}-1}dx=\frac{1}{4}\frac{e^{a}+1}{e^{a}-1}-\frac{1}{2a}$$
integrating $\dfrac{e^{aiz}}{e^{2\pi z}-1}$ round a contour formed by the rectangle whose corners are $0 ,R ,R+i,i$ (the rectangle being indented at $0$ and $i$) and making $R \rightarrow \infty$.

Besides contour integration, it can be evaluated by series expansion. In fact
\begin{eqnarray}
\int_{0}^{\infty}\frac{\sin ax}{e^{2\pi x}-1}dx&=&\int_{0}^{\infty}\frac{e^{-2\pi x}\sin ax}{1-e^{-2\pi x}}dx\\
&=&\int_{0}^{\infty}\sum_{n=0}^\infty e^{-2(n+1)\pi x}\sin axdx\\
&=&\sum_{n=0}^\infty \frac{a}{a^2+4\pi^2(n+1)^2}\\
&=&\frac{-2+a\coth(\frac{a}{2})}{4a}\\
&=&\frac{1}{4}\frac{e^{a}+1}{e^{a}-1}-\frac{1}{2a}.
\end{eqnarray}
Here we used the following result
$$ \sum_{n=0}^\infty \frac{a}{a^2+n^2}=\pi\coth(a\pi).$$
