TITLE: How to show $\int^{\infty}_{-\infty}\frac{\sin(ax)}{x(x^2+1)}dx=\pi(1-e^{-a})$? ($a\ge0$)
QUESTION [12 upvotes]: $$\int^{\infty}_{-\infty}\frac{\sin(ax)}{x(x^2+1)}dx=\pi(1-e^{-a}), \ a\ge0$$

I tried to solve but came up with $\pi(2-e^{-a}) $. Could you tell me where did I do the mistake? 
if $x=z$ then $dz=dx$
$$\int_\gamma \frac{e^{iaz}}{z(z^2+1)}\quad and\quad z(z+i)(z-i)=0\quad \rightarrow z=0,z=\pm i$$ 
for $ z=0$ $$Res(f,0)=\lim_{z\to 0}\frac{z.e^{iaz}}{z(z^2+1)}=1$$
for $z=1$
$$Res(f,i)=\lim_{z\to i}\frac{(z-i).e^{iaz}}{z(z+i)(z-i)}=\lim_{z\to i}\frac{e^{iaz}}{z(z+i)}=\frac{e^{-a}}{-2}$$
$$\int_\gamma \frac{e^{iaz}}{z(z^2+1)}=\int_{-R}^{R}\frac{e^{iax}}{x(x^2+1)}dx+\int_\gamma \frac{e^{iaz}}{z(z^2+1)}=\pi i(1-\frac{e^{-a}}{-2})$$
$$\int_{-R}^{R}\frac{e^{iax}}{x(x^2+1)}=\int^{R}_{-R}\frac{\cos(ax)}{x(x^2+1)}dx+i\int_{-R}^R \frac{\sin(ax)}{x(x^2+1)}=i(2\pi - 2\pi \frac{e^{-a}}{2})$$
$$\rightarrow \int_{-R}^R\frac{\sin(ax)}{x(x^2+1)}=2\pi -2\pi \frac{e^{-a}}{2}=\pi(2-e^{-a}) $$

REPLY [5 votes]: $\newcommand{\+}{^{\dagger}}
 \newcommand{\angles}[1]{\left\langle\, #1 \,\right\rangle}
 \newcommand{\braces}[1]{\left\lbrace\, #1 \,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\, #1 \,\right\rbrack}
 \newcommand{\ceil}[1]{\,\left\lceil\, #1 \,\right\rceil\,}
 \newcommand{\dd}{{\rm d}}
 \newcommand{\down}{\downarrow}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,{\rm e}^{#1}\,}
 \newcommand{\fermi}{\,{\rm f}}
 \newcommand{\floor}[1]{\,\left\lfloor #1 \right\rfloor\,}
 \newcommand{\half}{{1 \over 2}}
 \newcommand{\ic}{{\rm i}}
 \newcommand{\iff}{\Longleftrightarrow}
 \newcommand{\imp}{\Longrightarrow}
 \newcommand{\isdiv}{\,\left.\right\vert\,}
 \newcommand{\ket}[1]{\left\vert #1\right\rangle}
 \newcommand{\ol}[1]{\overline{#1}}
 \newcommand{\pars}[1]{\left(\, #1 \,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\pp}{{\cal P}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\vphantom{\large A}\,#2\,}\,}
 \newcommand{\sech}{\,{\rm sech}}
 \newcommand{\sgn}{\,{\rm sgn}}
 \newcommand{\totald}[3][]{\frac{{\rm d}^{#1} #2}{{\rm d} #3^{#1}}}
 \newcommand{\ul}[1]{\underline{#1}}
 \newcommand{\verts}[1]{\left\vert\, #1 \,\right\vert}
 \newcommand{\wt}[1]{\widetilde{#1}}$
$\ds{\int_{-\infty}^{\infty}{\sin\pars{ax} \over x\pars{x^{2} + 1}}\,\dd x
     =\pi\sgn\pars{a}\pars{1 - \expo{-\verts{a}}}:\ {\large ?}.\qquad a \in {\mathbb R}}$

\begin{align}
&\bbox[#ffd,5mm]{\int_{-\infty}^{\infty}{\sin\pars{ax} \over x\pars{x^{2} + 1}}\,\dd x}
= a\int_{-\infty}^{\infty}{1 \over x^{2} + 1}\,
{\sin\pars{ax} \over ax}\,\dd x
\\[5mm] = &\
a\int_{-\infty}^{\infty}{1 \over x^{2} + 1}\,
\pars{\half\int_{-1}^{1}\expo{\ic kax}\,\dd k}\,\dd x
\\[5mm] = &\
\half\,a\int_{-1}^{1}\pars{%
\int_{-\infty}^{\infty}{\expo{\ic\verts{ka}x} \over
x^{2} + 1}\,\dd x}\,\dd k
\\[5mm] = &\
\half\,a\int_{-1}^{1}\pars{%
2\pi\ic\,{\expo{\ic\verts{ka}\ic} \over 2\ic}}\,\dd k
\\[5mm] = &\
\half\,\pi a\int_{-1}^{1}\expo{-\verts{ka}}\,\dd k
=
\pi a\int_{0}^{1}\expo{-\verts{a}k}\,\dd k =
\pi a\,{\expo{-\verts{a}} - 1 \over -\verts{a}}
\\[5mm] = &\
\bbox[15px,border:1px groove navy]{\pi\sgn\pars{a}
\pars{1 - \expo{-\verts{a}}}} \\ &
\end{align}