TITLE: Definite integral calculation with poles at $0$ and $\pm i\sqrt{3}$
QUESTION [17 upvotes]: $$\int_0^\infty \frac{\sin(2\pi x)}{x(x^2+3)} \, dx$$
I looked at $\frac{e^{2\pi i z}}{z^{3}+3z}$, also calculated the residues, but they don't get me the right answer. I used that $\int_{-\infty}^\infty f(z)\,dz = 2\pi i (\sum \operatorname{Res} z_r) + \pi i \operatorname{Res}_0$, but my answer turns out wrong when I check with wolframalpha.
Residue for $0$ is $1$, for $z=\sqrt{3}i$ it's $-\frac{e^{-2\pi}}{2}$ . . .
In a worse attempt I forgot $2\pi$ and used $z$ only (i.e. $\frac{e^{iz}}{z^{3}+3z}$) and the result was a little closer, but missing a factor of 2 and and $i$.
 Can anyone see the right way? Please do tell.

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}}$
\begin{align}
&\color{#00f}{\large%
\int_{0}^{\infty}{\sin\pars{2\pi x} \over x\pars{x^{2} + 3}}\,\dd x}=
\half\int_{-\infty}^{\infty}{\sin\pars{2\pi x} \over x\pars{x^{2} + 3}}\,\dd x
=\pi\int_{-\infty}^{\infty}
{1 \over x^{2} + 3}\,\pars{\half\int_{-1}^{1}\expo{2\pi\ic k x}\,\dd k}\,\dd x
\\[3mm]&={\pi \over 2}\int_{-1}^{1}\dd k
\int_{-\infty}^{\infty}{\expo{2\pi\ic kx} \over x^{2} + 3}\,\dd x
\\[3mm]&={\pi \over 2}\int_{-1}^{1}\bracks{%
\Theta\pars{-k}\pars{-2\pi\ic}\,
{\expo{2\pi\ic k\pars{-\ic\root{3}}} \over -2\ic\root{3}}
+\Theta\pars{k}\pars{2\pi\ic}\,
{\expo{2\pi\ic k\pars{\ic\root{3}}} \over 2\ic\root{3}}}\,\dd k
\\[3mm]&={\pi \over 2}\int_{-1}^{1}{\pi \over \root{3}}\,
\expo{-2\pi\root{3}\verts{k}}\,\dd k
={\root{3} \over 3}\,\pi^{2}\int_{0}^{1}\expo{-2\pi\root{3}k}\,\dd k
\\[3mm]&={\root{3} \over 3}\,\pi^{2}\,{\expo{-2\pi\root{3}} - 1 \over -2\pi\root{3}}
=\color{#00f}{\large{1 \over 6}\,\pi\pars{1 - \expo{-2\pi\root{3}}}}
\end{align}