In this lecture, we study improper integrals of the form $\int_{-\infty}^\infty f(x)\sin axdx$ or $\int_{-\infty}^\infty f(x)\cos axdx$, where $a$ denotes a positive constant. These integrals appear in Fourier analysis. Assume that $f(x)=\frac{p(x)}{q(x)}$, where $p(x)$ and $q(x)$ are polynomials with real coefficients and no factors in common. Also, $q(z)$ has no real zeros. We discuss how to evaluate improper integrals of the above type through the following example.

*Example*. Evaluate $\int_{-\infty}^\infty\frac{\cos 3x}{(x^2+1)^2}dx$.

*Solution*. Let $f(z)=\frac{1}{(z^2+1)^2}$. Then $f(z)e^{3iz}$ is analytic everywhere on and above the real axis except at $z=i$. Let $C_R$ be the upper semi-circle centered at the origin with radius $R>1$. Then by Cauchy’s Residue Theorem,

$$\int_{-R}^R\frac{e^{i3x}}{(x^2+1)^2}dx=2\pi i B_1-\int_{C_R}f(z)e^{i3z}dz,$$

where $B_1=\mathrm{Res}_{z=i}[f(z)e^{i3z}]$. $f(z)e^{i3z}$ can be written as

$$f(z)e^{i3z}=\frac{\phi(z)}{(z-i)^2},$$

where $\phi(z)=\frac{e^{i3z}}{(z+i)^2}$. Since $z=i$ is a pole of order $2$ of $f(z)$,

$$B_1=\phi’(i)=\frac{1}{ie^3}.$$

On $C_R$, $|z|=R$ and so by triangle inequality we obtain

$$|(z+i)^2|\geq (R^2-1)^2$$

and thereby

$$|f(z)|\leq\frac{1}{(R^2-1)^2}.$$

$|e^{i3z}|=e^{-3y}\leq 1$ for all $y\geq 0$. Hence, we find that

$$\left|\mathrm{Re}\int_{C_R}f(z)e^{i3z}dz\right|\leq\left|\int_{C_R}f(z)e^{i3z}dz\right|\leq\frac{\pi R}{(R^2-1)^2}\to 0$$

as $R\to\infty$. Therefore,

$$\int_{-\infty}^\infty\frac{e^{i3x}}{(x^2+1)^2}dx=\frac{2\pi}{e^3}.$$