= Solution
Factor the denominator as $(z^2+1)(z^2+4)$ and integrate
$$
F(z)=\frac{e^{iz}}{(z^2+1)(z^2+4)}
$$
over $[-R,R]$ followed by the upper semicircle, for $R>2$. The enclosed <simple poles> are $i$ and $2i$. The local quotient formula from part (a) gives
$$
\operatorname{Res}_i F=\frac{e^{-1}}{(2i)(3)}=\frac{e^{-1}}{6i},\qquad
\operatorname{Res}_{2i}F=\frac{e^{-2}}{(-3)(4i)}=-\frac{e^{-2}}{12i}.
$$
On this arc, $|e^{iz}|=e^{-\operatorname{Im}z}\leq1$ and $|z^2+1|\geq R^2-1$, $|z^2+4|\geq R^2-4$. Thus the <estimation lemma> gives
$$
\left|\int_{\mathrm{arc}}F(z)\,dz\right|\leq\frac{\pi R}{(R^2-1)(R^2-4)}\longrightarrow0.
$$
On the <real line>, $|F(x)|\leq1/[(x^2+1)(x^2+4)]$, so the <improper integral> is absolutely convergent. Hence the <residue theorem> yields
$$
\int_{-\infty}^{\infty}\frac{e^{ix}}{x^4+5x^2+4}\,dx
=2\pi i\left(\frac{e^{-1}}{6i}-\frac{e^{-2}}{12i}\right).
$$
Taking real parts is justified by absolute convergence. Therefore
$$
\boxed{\int_{-\infty}^{\infty}\frac{\cos x}{x^4+5x^2+4}\,dx=\frac\pi{3e}-\frac\pi{6e^2}}.
$$
The imaginary part vanishes as a further check, since the sine integrand is odd.
Back to article page