# Integrating rational functions of sine using residues

Can anyone point me to a book that discusses integrals of the following type?

$$\int_{\mathbb{R}}^{}\frac{\cos(ax)dx}{1+x^2}$$

-
Could you explain more precisely the type of integrals you are interested in? (Those in your question all equal zero.) – Did May 24 '12 at 18:50
@Didier, sorry, I've edited. Is it clear now? – residue May 24 '12 at 18:56
Not really, but at least now the integrals are not trivially zero. My answer to the question would be: about every introductory textbook to complex analysis. – Did May 24 '12 at 19:02
You want some version of Jordan's lemma: en.wikipedia.org/wiki/Jordan's_lemma. – Micah May 24 '12 at 19:06
@Micah, thanks a lot for the answer(I will accept if you write it below). At Didier, thanks for the correction. – residue May 24 '12 at 19:13

Actually, Jordan's lemma is not needed here, at least if assuming $a$ is real. Since the degree of the denominator is two, we can just write $\cos ax = \operatorname{Re} e^{iax}$, and if $a > 0$ and $z$ is in the upper halfplane, $$|e^{iaz}| = |e^{ia(x+iy)}| = e^{-ay} < 1.$$ Hence, choosing $f(z) = \dfrac{e^{iaz}}{1+z^2}$ and a contour $\gamma = [-R,R] \cup C_R^+$, where $C_R^+$ is a semi-circle in the upper halfplane of radius $R$. By the residue theorem it follows that $$\int_{-R}^R \dfrac{e^{iaz}}{1+z^2}\,dz + \int_{C_R^+} \dfrac{e^{iaz}}{1+z^2}\,dz = 2\pi i \operatorname{Res}_{z=i}(f(z)).$$ By the estimate above, $$\left|\dfrac{e^{iaz}}{1+z^2}\right| \le \frac{1}{R^2-1}$$ on $C_R^+$, so the integral over $C_R^+$ tends to $0$ as $R\to\infty$ by the "ML-inequality". Summing up, you will see that $$\int_{-\infty}^\infty \dfrac{\cos ax}{1+x^2}\,dx = \operatorname{Re}(2\pi i \operatorname{Res}_{z=i}(f(z))).$$
If $a < 0$, you can do the same with a semicircle in the lower halfplane (or just use the fact that $\cos(ax) = \cos(-ax)$).
Similar estimates work for integrals of the type $$\int_{-\infty}^\infty \cos ax \frac{P(x)}{Q(x)}\,dx \quad\text{or}\quad \int_{-\infty}^\infty \sin ax \frac{P(x)}{Q(x)}\,dx$$ where $P$ and $Q$ are polynomials and $\deg Q \ge \deg P + 2$. If $\deg Q = \deg P + 1$ you do need some variant of Jordan's lemma, this should be covered in any textbook on complex analysis.