Evaluating the integral $\int_0^{\infty} \frac{\sin(x)}{\sinh(x)}\,dx$ I was trying to evaluate the following integral,
 $$I=\int_\limits {-\infty}^{\infty} \dfrac{\sin(x)}{\sinh(x)}\,dx$$  but had no success. I first expanded the the hyperbolic sine:
$$I=2\int_\limits {-\infty}^{\infty} \dfrac{\sin(x)}{e^{x}-e^{-x}}\,dx=2\Im \int_\limits {-\infty}^{\infty} \dfrac{e^{ix}}{e^{x}-e^{-x}}\,dx$$
I then substituted $u=e^x$,
$$I=2\Im\int_\limits {0}^{\infty} \dfrac{u^i}{u^2-1}\,du$$
Now, I'm not really sure what to do. Also, after exchanging the $\Im$ with the integral seemed to create a non-integrable singularity at $u=1$. When can you not do that?

$\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
\begin{align}
&\bbox[10px,#ffd]{%
2\int_{0}^{\infty}{\sin\pars{x} \over \sinh\pars{x}}\,\dd x} =
2\,\Im\int_{0}^{\infty}{\expo{\ic x} - 1 \over \pars{\expo{x} - \expo{-x}}/2}\,\dd x
\\[5mm] = &\
4\,\Im\int_{0}^{\infty}{\expo{-\pars{1 - \ic}x} - \expo{-x} \over 1 - \expo{-2x}}\,\dd x
\,\,\,\stackrel{\large\expo{-2x}\ =\ t}{\large =}\,\,\,
4\,\Im\int_{1}^{0}{t^{1/2 - \ic/2} - t^{1/2} \over 1 - t}\,
\pars{-\,{\dd t \over 2t}}
\\[5mm] = &\
2\,\Im\bracks{\int_{0}^{1}{1 - t^{-1/2} \over 1 - t}\,\dd t -
\int_{0}^{1}{1 - t^{-1/2 - \ic/2} \over 1 - t}\,\dd t}
\\[5mm] = &\
2\,\Im\bracks{\Psi\pars{1 \over 2} - \Psi\pars{{1 \over 2} - {\ic \over 2}}} =
-2\,\Im\Psi\pars{{1 \over 2} - {\ic \over 2}}
\\[5mm] = &\
-2\,{\Psi\pars{1/2 - \ic/2} - \Psi\pars{1/2 + \ic/2} \over 2\ic}
=
\ic\braces{\pi\cot\pars{\pi\bracks{{1 \over 2} + {\ic \over 2}}}}
\\[5mm] = &\
-\ic\pi\tan\pars{\pi\ic \over 2} =
\bbx{\pi\tanh\pars{\pi \over 2}}
\end{align}
