Integral $\int_0^\infty \frac{\sin{t}}{e^t-1}dt$? Is it possible to compute $I=\int_0^\infty \frac{\sin{t}}{e^t-1}dt$?
I encountered this problem while calculating sum $\sum_{n=1}^\infty \frac{1}{n^2+1}$. This integral converges $I=\int_0^\varepsilon+\int_\varepsilon^\infty$, first integral is finite since $\sin{t}/(e^t-1)\tilde{} 1$ and the second is finite since $\sin{t}/(e^t-1)<e^{-t}$.
Any help is welcome.
Thanks in advance.
 A: First method. Using Poisson summation formula
If a continuous integrable function $\varphi$ and its Fourier transform are rapidly going to zero at infinity (check its Wikipedia page for more details) then
$$ \sum_{n=-\infty}^\infty \varphi(n) = \sum_{n=-\infty}^\infty \hat \varphi(n) $$ Since the Fourier transform tends to transform rapidly decreasing (to zero) functions to slowly decreasing (to zero) functions, and vice versa,  Poisson's formula is well suited to the calculations of certain series.
You can check that for $\varphi(x) = \pi e^{-2\pi |x|}$ we have $\hat \varphi(s) = \frac{1}{1+s^2}$. Poisson tells us that
$$  \sum_{n=-\infty}^\infty \frac{1}{n^2 + 1} = \sum_{n=-\infty}^\infty \pi e^{-2\pi |n|}  $$ Use parity and geometric series to complete the computation.
Second method. Using Parseval's identity for Fourier series
Let $e_n(t) = e^{2\pi i nt}$ be the Fourier orthonormal system of $L^2[0,1]$ and recall  Parseval's identity :
$$ \forall f,g \in L^2[0,1] ~~,~~ \langle f,g\rangle  = \int_0^1 f(t)\overline{g(t)} \,\mathrm dt= \sum_{n=-\infty}^\infty \langle f,e_n\rangle \overline{\langle g,e_n\rangle}  $$
Take $s \in \mathbf C\setminus \mathbf Z$ and let $z=\overline{s}$. Compute the Fourier coefficients of $f(t) = e^{2 \pi i st}$ and $g(t)=e^{2\pi i zt}$
$$ \langle f,e_n\rangle = \frac{1}{2\pi i} \frac{e^{2\pi i s}-1}{s-n} ~~\text{ and } ~~ \overline{\langle g,e_n\rangle} = -\frac{1}{2\pi i} \frac{e^{-2\pi i s}-1}{s-n} $$ Using  Parseval's identity,  it comes, after some simplifications :
$$ \frac{\pi^2}{\sin^2(\pi s)} = \sum_{n=-\infty}^\infty  \frac{1}{(s-n)^2} \tag{1} $$ Break the sum into three pieces, and write
$$\frac{\pi^2}{\sin^2(\pi s)} = \frac{1}{s^2} + \sum_{n=1}^\infty \frac{1}{(s-n)^2} + \frac{1}{(s+n)^2} \tag{2} $$
Integrate $(2)$ both sides, then multiply by $-1$ to get the famous formula :
$$ \pi \cot(\pi s) =  \frac{1}{s} + \sum_{n=1}^\infty \frac{2s}{s^2-n^2} $$ Replacing $s$ by $is$ leads to :
$$ \pi \coth (\pi s) = \frac{1}{s} + \sum_{n=1}^\infty \frac{2s}{s^2 +n^2} $$ If you really want to avoid the use of any complex variable, replace $s$ by $is$ in $(1)$ or in $(2)$ then integrate in the « real » sense. Again, it is easy to recover the result given by WolframAlpha.
Also, using Fourier series and Dirichlet's theorem (for pointwise convergence) you may check other topics on MSE, for example. :)
ADDENDUM. We can reach our goal a bit faster. Apply Parseval's identity to $f(t)=  e^{2\pi ist}$ and $g(t) = \overline{f(t)}$ :
$$ \int_0^1 f(t)^2 \mathrm dt = \sum_{n=-\infty}^\infty \langle f,e_n\rangle \langle f,e_{-n}\rangle  $$ Substitute things...
$$ \frac{1}{2\pi i} \frac{e^{4 \pi i s}-1}{2s} = \sum_{n=-\infty}^\infty \bigg(\frac{e^{2\pi is} - 1}{2\pi i} \bigg)^2 \frac{1}{s^2-n^2} $$ Simplify some terms...
$$ 2\pi \cot(\pi s) = \sum_{n=-\infty}^\infty \frac{2s}{s^2-n^2} $$ Finally, by symmetry in $n\neq 0$
$$ \pi \cot(\pi s) = \frac{1}{s} + \sum_{n=1}^\infty \frac{2s}{s^2-n^2} $$
A: $$I=\int_{0}^{\infty} \frac{\sin t}{e^t-1}d 
t=\int_{0}^{\infty} \frac{e^{-t}\sin t}{1-e^{-t}}d 
t= \sum_{n=0}^{\infty}\int_{0}^{\infty}\sin t~ e^{-(n+1)x}dt$$
Use $\int_{0}^{\infty} e^{-at} \sin t~dt=\frac{1}{1+a^2}$
$$I=\sum_{n=1}^{\infty} \frac{1}{1+n^2}$$
See Approximate $\coth(x)$ around $x = 0$
for the proof of
$$\coth z-1/z=\sum_{n=1}^{\infty} \frac{2z}{\pi^2 n^2+ z^2}$$
Taking $z=\pi$, we prove that $$I=\frac{\pi}{2} \coth \pi-\frac{1}{2}$$
