# Using residue theorem to integrate from $-\infty$ to $\infty$

I'm trying to integrate
$$\int_{-\infty}^{\infty} {x^2 \over {(x^2 + 1)}^2(x^2 + 2x + 2)}$$ given that the function
$$f(z) = {z^2 \over {(z^2 + 1)}^2(z^2+2z+2)}$$ has residues
$${9i - 12 \over 100},{3 - 4i \over 25}$$ at the poles $i$ and $-1+i$ respectively. From my understanding of this I have added the two residues (by the residue theorem, and because their respective poles lie in the upper half plane) and multiplied by $2\pi i$ and got an answer of $14\pi \over 100$

Have I done this right?

• Something a little strange is going on: For such an integral usually one (roughly speaking) draws a contour around the upper half-plane or lower half-plane, but you've computed one residue in each. Commented Apr 21, 2016 at 18:03
• I added into my question: don't both poles lie in the upper half plane? Commented Apr 21, 2016 at 18:05
• Well, like I said, $-i$ doesn't lie in the upper half-plane. The only poles are at $\pm i$ and $-1 \pm i$, so you need to add the residues at $i$ and $-1 + i$. Commented Apr 21, 2016 at 18:06
• Yes, this is kosher. Check that you are correct. Commented Apr 21, 2016 at 18:07
• sorry, again I made a mistake (not used to MathJax). The pole was meant to be $i$ not $-i$. Is my method correct? Commented Apr 21, 2016 at 18:13

$$\oint_{\gamma_R} f(z) \, dz := \int_{-R}^R f(x) \, dx + \int_{C_R} f(z) \, dz$$
where $C_R$ is the curve $Re^{it}$ from $t = 0$ to $t = \pi$, oriented counter clockwise using the residue theorem and then take the limit $R \to \infty$. Since your function behaves like $\frac{1}{z^4}$ where $|z| \to \infty$, you will have
$$\left| \int_{C_R} f(z) \, dz \right| \leq \int_{C_R} |f(z)| \, |dz| \approx \frac{\pi R}{R^4} \xrightarrow[R \to \infty]{} 0.$$