About the integral $\int_{0}^{+\infty}\frac{\sin(ax)\,dx}{x(x^2+1)}$ I need to prove the following identity:
$$\forall a>0,\qquad\int \limits_{-\infty}^{+\infty}\frac{\sin(ax)\,dx}{x(x^2+1)}=\pi(1-e^{-a}).$$
I think it can be proven using Laurent series.
I tried to take $x=z$ and give z these values: $\{0 ,i\}$.
I tried many times but I couldn't do it.
 A: If you put
$$f(a) = \int_{\mathbb{R}}\frac{\sin(ax)\,dx}{x(x^2+1)}$$
by the dominated convergence theorem you get:
$$ f'(a) = \int_{\mathbb{R}}\frac{\cos(ax)\,dx}{x^2+1}=2\int_{0}^{+\infty}\frac{\cos(ax)\,dx}{x^2+1}.$$
Since 
$$\int_{0}^{+\infty}\frac{\sin(x y)}{x}e^{-y}\,dy = \frac{1}{1+x^2},$$
you have:
$$f'(a) = 2\int_{0}^{+\infty}\int_{0}^{+\infty}\frac{\cos(ax)\sin(xy)}{x}e^{-y}dy\,dx.$$
Since
$$\int_{0}^{+\infty}\frac{\sin(kx)}{x}\,dx = \frac{\pi}{2}\operatorname{sign}(k),$$
$$f'(a)=\frac{\pi}{2}\int_{0}^{+\infty}\left(\operatorname{sign}(y+a)+\operatorname{sign}(y-a)\right)e^{-y}\,dy = \pi\int_{a}^{+\infty}e^{-y}\,dy = \pi e^{-a}.$$
Since $f(0)=0$,
$$ f(a) = \pi(1-e^{-a})$$
as claimed.
A: Note that
$$
\begin{align}
\int_{-\infty}^\infty\frac{\sin(ax)}{x(1+x^2)}\,\mathrm{d}x
&=\color{#C00000}{\frac1{2i}\int_{\gamma_+}\frac{e^{iaz}}{z(1+z^2)}\,\mathrm{d}z}
-\color{#00A000}{\frac1{2i}\int_{\gamma_-}\frac{e^{-iaz}}{z(1+z^2)}\,\mathrm{d}z}\\
\end{align}
$$
where $\gamma_+=R[-1,1]-i\epsilon\cup Re^{i\pi[0,1]}-i\epsilon$ and $\gamma_-=R[-1,1]-i\epsilon\cup Re^{i\pi[0,-1]}-i\epsilon$
The residue of the integrand at $0$ is $1$. The residue at $i$ is $-e^{-a}/2$. The residue at $-i$ is also $-e^{-a}/2$. Since $\gamma_-$ is counterclockwise, we get the integral to be
$$
\frac{2\pi i}{2i}\left(\color{#C00000}{1-\frac{e^{-a}}{2}}-\color{#00A000}{\frac{e^{-a}}{2}}\right)=\pi\left(1-e^{-a}\right)
$$
