Residues & Real Integrals
Compute hard real integrals by closing a contour and summing residues.
The idea
The residue theorem evaluates many real definite integrals whose antiderivatives are unavailable or unwieldy. The method reads the real integral as one piece of a contour integral in the complex plane, evaluates that contour integral by residues, and shows the remaining pieces contribute nothing. Two templates carry most cases.
Proposition (Improper rational integrals by residues).
Let $f = p/q$ be a rational function with no poles on the real axis and $\deg q \ge \deg p + 2$. Then $\int_{-\infty}^{\infty} f(x)\,dx = 2\pi i \sum \operatorname{Res} f,$ the sum running over the poles of $f$ in the upper half-plane.
This is the first template. Integrate $f(z)$ around the closed contour made of the segment $[-R, R]$ of the real axis and the semicircular arc of radius $R$ in the upper half-plane, as in the figure. The residue theorem evaluates the loop. Because $f$ decays faster than $1/R$, the arc's contribution vanishes as $R \to \infty$, since the arc has length $\pi R$, and what remains is the integral along the real axis.
For a trigonometric integral over $[0, 2\pi]$, substitute $z = e^{i\theta}$, so that $\theta$ running from $0$ to $2\pi$ traces the unit circle once counterclockwise. Then $\cos\theta = \tfrac{1}{2}(z + z^{-1})$, $\sin\theta = \tfrac{1}{2i}(z - z^{-1})$ and $d\theta = \dfrac{dz}{iz}$, and the integral becomes a contour integral of a rational function over $|z| = 1$, to which only the poles inside the unit disk contribute.
Ways to work on it
- Walkthrough. Evaluate an improper integral by closing the real line with an upper semicircle and summing residues.
- Practice. Evaluate a rational improper integral by residues.
- Hardest. Evaluate a trigonometric integral over a full period by residues.
Not sure where to start? Take the ten-question placement test.