Show that $$\int_{0}^{+\infty} \frac{\text{sin} ax}{e^x-1} dx = \sum_{n=1}^{\infty} \frac{a}{n^2+a^2}$$
My classmate asked me this problem and I don't know how to prove it. I guess that it can be proved by a clever use of Fubini's Theorem, but I'm just not clever enough. Can anyone help?
First, \begin{equation} \begin{aligned} \int_{0}^{+\infty} \frac{\sin ax}{e^x - 1} dx &= \int_{0}^{+\infty} \sin ax \frac{e^{-x}}{1-e^{-x}} dx \\ &= \int_{0}^{+\infty} \sin ax \sum_{n=1}^{+\infty} e^{-nx} dx \\ &= \sum_{n=1}^{+\infty} \int_{0}^{+\infty} \sin ax \cdot e^{-nx} dx \end{aligned} \end{equation}
Let \begin{equation} M_n = \int_{0}^{+\infty} \sin ax \cdot e^{-nx} dx, \end{equation} and next we try to compute $M_n$. Obviously, \begin{equation} \begin{aligned} M_n &= -\frac{1}{n} \int_{0}^{+\infty} \sin ax \, de^{-nx} \\ &= -\frac{1}{n} (- \int_{0}^{+\infty} a \cos ax \cdot e^{-nx} dx) \\ &= -\frac{a}{n^2} (\int_{0}^{+\infty} a \cos ax \, de^{-nx}) \\ &= -\frac{a}{n^2} (-1 + a M_n). \end{aligned} \end{equation} Thus \begin{equation} M_n = \frac{a}{n^2 + a^2}. \end{equation}