The Residue Theorem & Real Integral Evaluation
The Residue Theorem & Real Integral Evaluation
One of the most powerful applications of complex analysis is the evaluation of real integrals via contour integration. Integrals of the form $\int_0^\pi R(\cos\theta,\sin\theta)\,d\theta$, $\int_{-\infty}^\infty f(x)\,dx$, and $\int_0^\infty x^{a-1}f(x)\,dx$ can be evaluated by choosing appropriate contours in $\mathbb{C}$, computing residues, and applying Jordan's lemma. This technique converts hard real integrals into algebraic residue computations.
Jordan's Lemma
Let $f(z)\to 0$ uniformly as $|z|\to\infty$ in the upper half-plane. Then for $\alpha>0$: $\int_{\Gamma_R}f(z)e^{i\alpha z}\,dz\to 0$ as $R\to\infty$, where $\Gamma_R$ is the semicircle $|z|=R$, $\text{Im}(z)\geq 0$. More precisely: if $\max_{|z|=R,\text{Im}(z)\geq 0}|f(z)|\to 0$, the semicircle contribution vanishes. This lets us extend contour integrals over the entire real line to closed contours, picking up residues in the upper half-plane.
Contour Integration Strategy
To evaluate $\int_{-\infty}^\infty f(x)\,dx$: (1) close the contour with a semicircle in the upper (or lower) half-plane; (2) verify the semicircle integral vanishes by Jordan's lemma or $|f(z)|\leq M/|z|^{1+\epsilon}$; (3) $\int_{-\infty}^\infty f(x)\,dx = 2\pi i \sum\text{Res}(f,z_k)$ for poles in the upper half-plane. For $\int_0^{2\pi}R(\cos\theta,\sin\theta)\,d\theta$: substitute $z=e^{i\theta}$, $d\theta=dz/(iz)$, $\cos\theta=(z+z^{-1})/2$, $\sin\theta=(z-z^{-1})/(2i)$.
Example 1
Evaluate $\int_{-\infty}^\infty\frac{1}{1+x^2}\,dx$.
Solution: Close with upper semicircle. Poles of $1/(1+z^2)=1/((z+i)(z-i))$: $z=i$ (upper), $z=-i$ (lower). $\text{Res}(f,i)=\frac{1}{z+i}\bigg|_{z=i}=\frac{1}{2i}$. By residue theorem: $\oint=2\pi i\cdot\frac{1}{2i}=\pi$. Semicircle vanishes ($|f|\sim 1/R^2$). So $\int_{-\infty}^\infty\frac{dx}{1+x^2}=\pi$. Check: $\arctan x|_{-\infty}^\infty=\pi/2-(-\pi/2)=\pi$. ✓
Example 2
Evaluate $\int_0^{2\pi}\frac{d\theta}{5+4\cos\theta}$.
Solution: Substitute $z=e^{i\theta}$: integral becomes $\oint_{|z|=1}\frac{1}{5+4(z+z^{-1})/2}\frac{dz}{iz}=\oint\frac{1}{iz(5+2z+2/z)}\,dz=\oint\frac{1}{i(5z+2z^2+2)}\,dz=\frac{1}{2i}\oint\frac{1}{z^2+(5/2)z+1}\,dz$. Roots: $z=\frac{-5/2\pm\sqrt{25/4-4}}{2}=\frac{-5/2\pm 3/2}{2}$: $z_1=-1/2$ (inside unit disk), $z_2=-2$ (outside). $\text{Res}=\frac{1}{2z_1+5/2}=\frac{1}{-1+5/2}=\frac{1}{3/2}=2/3$. Integral $=2\pi i\cdot\frac{1}{2i}\cdot\frac{2}{3}=2\pi/3$.
Practice
- Evaluate $\int_{-\infty}^\infty\frac{x^2}{(x^2+1)(x^2+4)}\,dx$ using residues.
- Show $\int_0^\infty\frac{\cos x}{1+x^2}\,dx=\frac{\pi}{2e}$ using a semicircular contour and Jordan's lemma.
- Evaluate $\int_0^\infty\frac{x^{a-1}}{1+x}\,dx=\frac{\pi}{\sin(\pi a)}$ for $0
- Compute $\int_0^\infty\frac{\sin x}{x}\,dx=\frac{\pi}{2}$ by integrating $e^{iz}/z$ around an indented semicircle.
Show Answer Key
1. Close in UHP with semicircle. Poles at $z=i$ (order 1) and $z=2i$ (order 1). Residues: at $z=i$: $\frac{-1}{2i\cdot3}=\frac{-1}{6i}$; at $z=2i$: $\frac{-4}{3\cdot4i}=\frac{-1}{3i}$. Integral $=2\pi i(-\frac{1}{6i}-\frac{1}{3i})=2\pi(\frac{1}{6}+\frac{1}{3})=\pi$.
2. Consider $\oint\frac{e^{iz}}{1+z^2}dz$ over UHP semicircle. Pole at $z=i$ with residue $e^{-1}/(2i)$. Jordan's lemma kills the arc. $\int_{-\infty}^\infty\frac{e^{ix}}{1+x^2}dx=2\pi i\cdot\frac{e^{-1}}{2i}=\frac{\pi}{e}$. Take real part: $\int\frac{\cos x}{1+x^2}dx=\frac{\pi}{e}$. Divide by 2 (even function on $[0,\infty)$): $\frac{\pi}{2e}$.
3. Keyhole contour around the branch cut $[0,\infty)$ for $z^{a-1}/(1+z)$. Above: $\int_0^\infty x^{a-1}/(1+x)dx$. Below: $e^{2\pi i(a-1)}\int_0^\infty x^{a-1}/(1+x)dx$. Residue at $z=-1$: $e^{i\pi(a-1)}$. Result: $(1-e^{2\pi i(a-1)})I=2\pi i e^{i\pi(a-1)}$, giving $I=\pi/\sin(\pi a)$.
4. Indent the contour around $z=0$ with a small semicircle of radius $\epsilon$. The large semicircle vanishes by Jordan's lemma. The small semicircle contributes $-i\pi\cdot\text{Res}_{z=0}(e^{iz}/z)=-i\pi$. Taking imaginary parts: $\int_{-\infty}^\infty\frac{\sin x}{x}dx=\pi$, so $\int_0^\infty\frac{\sin x}{x}dx=\frac{\pi}{2}$.