Calculate: $\int_{0}^{\infty}\frac{\sin x}{x^{3}+x}\mathrm{d}x$ ;find the mistake

complex-analysiscontour-integrationintegrationresidue-calculus

Calculate: $$\int_{0}^{\infty}\frac{\sin x}{x^{3}+x}\mathrm{d}x$$
My try:

Let's split to a pacman style path, with little circle around the singularity and 2 rays from $0$ to $\infty$:

$\displaystyle \int_{0}^{\infty}\frac{\sin x}{x^{3}+x}\mathrm{d}x=\Im\int_{|z|=\varepsilon}\frac{\varepsilon e^{\theta i}}{(\varepsilon e^{\theta i})^{3}+\varepsilon e^{\theta i}}\mathrm{d}\theta+\Im\int_{0}^{\infty}\frac{re^{\delta i}}{(re^{\delta i})^{3}+re^{\delta i}}\mathrm{d}r+\Im\int_{0}^{\infty}\frac{re^{-\delta i}}{(re^{-\delta i})^{3}+re^{\delta i}}\mathrm{d}r$

where $\varepsilon \to 0$, and then the integral is $1$ therefore it's imaginary part is $0$.

$\delta$ is again an angle as small as we want (as it need not contain the pole at $\pm i$. According to the residue theorem the domain contains no poles therefore their sum must be zero, therefore the whole integral must be $0$, but this is not the correct answer. What claim I make is wrong?

Best Answer

You're missing the outer circle to close the loop, which diverges. Furthermore, the rays around the positive real line will cancel out, so the given integral does not simply equal the integrals you wrote.

A better integral to use would be a semicircle contour avoiding the origin. Note also that the integrand is symmetric:

$$\int_0^\infty\frac{\sin(x)}{x^3+x}~\mathrm dx=\frac12\int_{-\infty}^\infty\frac{\sin(x)}{x^3+x}~\mathrm dx$$

The inner (clockwise semi-) circle will converge to $-\pi i$ while the outer circle will vanish, leaving us with

$$-\pi i+\int_{-\infty}^\infty\frac{e^{iz}}{z^3+z}~\mathrm dz=\oint_C\frac{e^{iz}}{z^3+z}~\mathrm dz=2\pi i\underset{z=i}{\operatorname{Res}}\frac{e^{iz}}{z^3+z}$$

and you should be able to take it from here.