Skip to content

Applications of Contour Integration

9.1 Evaluation of Real Integrals

Contour integration is a powerful tool for evaluating definite integrals.

9.2 Integrals of Rational Functions over the Real Line

Theorem 9.1. If f(x)=P(x)/Q(x)f(x) = P(x)/Q(x) where deg(Q)deg(P)+2\deg(Q) \geq \deg(P) + 2 and QQ has no real roots, Then

f(x)dx=2πiIm(zk)>0Res(f,zk)\int_{-\infty}^{\infty} f(x)\, dx = 2\pi i \sum_{\mathrm{Im}(z_k) > 0} \mathrm{Res}(f, z_k)

Where the sum is over poles in the upper half-plane.

Proof. Integrate f(z)f(z) over the semicircular contour γR\gamma_R consisting of [R,R][-R, R] on the Real axis and the semicircle z=R|z| = R in the upper half-plane. As RR \to \inftyThe integral over The semicircle vanishes (since f(z)M/R2|f(z)| \leq M/R^2 and the length is πR\pi R). \blacksquare

9.3 Worked Example

Problem. Evaluate dxx2+1\int_{-\infty}^{\infty} \frac{dx}{x^2 + 1}.

Solution. f(z)=1z2+1f(z) = \frac{1}{z^2 + 1} has simple poles at z=±iz = \pm i.

Only z=iz = i is in the upper half-plane.

Res(1z2+1,i)=12zz=i=12i\mathrm{Res}\left(\frac{1}{z^2 + 1}, i\right) = \frac{1}{2z}\Big|_{z = i} = \frac{1}{2i}.

dxx2+1=2πi12i=π\int_{-\infty}^{\infty} \frac{dx}{x^2 + 1} = 2\pi i \cdot \frac{1}{2i} = \pi. \blacksquare

9.4 Integrals Involving Trigonometric Functions

For integrals of the form 02πR(cosθ,sinθ)dθ\int_0^{2\pi} R(\cos\theta, \sin\theta)\, d\thetaSubstitute z=eiθz = e^{i\theta}So dz=izdθdz = iz\, d\theta, cosθ=z+z12\cos\theta = \frac{z + z^{-1}}{2} sinθ=zz12i\sin\theta = \frac{z - z^{-1}}{2i}.

The integral becomes z=1f(z)dz\int_{|z|=1} f(z)\, dz where f(z)f(z) is a rational function.

9.5 Worked Example

Problem. Evaluate 02πdθ2+cosθ\int_0^{2\pi} \frac{d\theta}{2 + \cos\theta}.

Solution. Substitute z=eiθz = e^{i\theta}: dθ=dzizd\theta = \frac{dz}{iz} cosθ=z+1/z2\cos\theta = \frac{z + 1/z}{2}.

z=1dziz(2+z+1/z2)=z=12dzi(z2+4z+1)\int_{|z|=1} \frac{dz}{iz\left(2 + \frac{z + 1/z}{2}\right)} = \int_{|z|=1} \frac{2\, dz}{i(z^2 + 4z + 1)}

Poles: z2+4z+1=0z=2±3z^2 + 4z + 1 = 0 \Rightarrow z = -2 \pm \sqrt{3}.

z1=2+3=23<1|z_1| = |-2 + \sqrt{3}| = 2 - \sqrt{3} \lt 1 (inside). z2=23=2+3>1|z_2| = |-2 - \sqrt{3}| = 2 + \sqrt{3} \gt 1 (outside).

Res(1z2+4z+1,z1)=123\mathrm{Res}\left(\frac{1}{z^2 + 4z + 1}, z_1\right) = \frac{1}{2\sqrt{3}}.

02πdθ2+cosθ=2i2πi123=2π3\int_0^{2\pi} \frac{d\theta}{2 + \cos\theta} = \frac{2}{i} \cdot 2\pi i \cdot \frac{1}{2\sqrt{3}} = \frac{2\pi}{\sqrt{3}}. \blacksquare

9.6 Jordan”s Lemma

Theorem 9.2 (Jordan’s Lemma). If f(z)0f(z) \to 0 uniformly as z|z| \to \infty in the upper Half-plane and a>0a \gt 0Then

limRCReiazf(z)dz=0\lim_{R \to \infty} \int_{C_R} e^{iaz}f(z)\, dz = 0

Where CRC_R is the upper semicircle z=R|z| = R, Im(z)0\mathrm{Im}(z) \geq 0.

This allows evaluation of integrals of the form f(x)cos(ax)dx\int_{-\infty}^{\infty} f(x)\cos(ax)\, dx and f(x)sin(ax)dx\int_{-\infty}^{\infty} f(x)\sin(ax)\, dx.

9.7 Fourier-Type Integrals

Solution

Problem. Evaluate cosxx2+1dx\int_{-\infty}^{\infty} \frac{\cos x}{x^2 + 1}\, dx.

Consider eixx2+1dx=2πiRes ⁣(eizz2+1,i)\int_{-\infty}^{\infty} \frac{e^{ix}}{x^2 + 1}\, dx = 2\pi i \cdot \mathrm{Res}\!\left(\frac{e^{iz}}{z^2+1}, i\right).

Res ⁣(eizz2+1,i)=eii2i=e12i\mathrm{Res}\!\left(\frac{e^{iz}}{z^2+1}, i\right) = \frac{e^{i \cdot i}}{2i} = \frac{e^{-1}}{2i}.

eixx2+1dx=2πie12i=πe\int_{-\infty}^{\infty} \frac{e^{ix}}{x^2 + 1}\, dx = 2\pi i \cdot \frac{e^{-1}}{2i} = \frac{\pi}{e}.

Taking real parts: cosxx2+1dx=πe\int_{-\infty}^{\infty} \frac{\cos x}{x^2 + 1}\, dx = \frac{\pi}{e}.

Problem. Evaluate xsinxx2+a2dx\int_{-\infty}^{\infty} \frac{x \sin x}{x^2 + a^2}\, dx for a>0a \gt 0.

Consider zeizz2+a2dz\int_{-\infty}^{\infty} \frac{z\, e^{iz}}{z^2 + a^2}\, dz. Only z=iaz = ia is in the upper half-plane.

Res ⁣(zeizz2+a2,ia)=iaeiia2ia=ea2\mathrm{Res}\!\left(\frac{ze^{iz}}{z^2 + a^2}, ia\right) = \frac{ia \cdot e^{i \cdot ia}}{2ia} = \frac{e^{-a}}{2}.

xeixx2+a2dx=2πiea2=πiea\int_{-\infty}^{\infty} \frac{x\, e^{ix}}{x^2 + a^2}\, dx = 2\pi i \cdot \frac{e^{-a}}{2} = \pi i\, e^{-a}.

Taking imaginary parts: xsinxx2+a2dx=πea\int_{-\infty}^{\infty} \frac{x \sin x}{x^2 + a^2}\, dx = \pi\, e^{-a}.

Problem. Evaluate 02πcos2θ5+4cosθdθ\int_0^{2\pi} \frac{\cos 2\theta}{5 + 4\cos\theta}\, d\theta.

Substitute z=eiθz = e^{i\theta}: cosθ=(z+z1)/2\cos\theta = (z + z^{-1})/2, cos2θ=(z2+z2)/2\cos 2\theta = (z^2 + z^{-2})/2.

I=12iz=1z4+1z2(2z+1)(z+2)dzI = \frac{1}{2i}\int_{|z|=1} \frac{z^4 + 1}{z^2(2z + 1)(z + 2)}\, dz.

Poles inside z=1|z| = 1: z=0z = 0 (order 22) and z=1/2z = -1/2 (simple).

At z=0z = 0: Res=ddz[z4+1(2z+1)(z+2)]z=0=54\mathrm{Res} = \frac{d}{dz}\left[\frac{z^4 + 1}{(2z+1)(z+2)}\right]_{z=0} = -\frac{5}{4}.

At z=1/2z = -1/2: Res=17/163/4=1712\mathrm{Res} = \frac{17/16}{3/4} = \frac{17}{12}.

I=12i2πi(54+1712)=π6I = \frac{1}{2i} \cdot 2\pi i \left(-\frac{5}{4} + \frac{17}{12}\right) = \frac{\pi}{6}.

9.8 Improper Integrals and Principal Value

For integrals where the integrand has poles on the real axis, we use the Cauchy principal value:

PV ⁣f(x)dx=limε0+(aεf(x)dx+a+εf(x)dx)\mathrm{PV}\!\int_{-\infty}^{\infty} f(x)\, dx = \lim_{\varepsilon \to 0^+} \left(\int_{-\infty}^{a-\varepsilon} f(x)\, dx + \int_{a+\varepsilon}^{\infty} f(x)\, dx\right)

Solution

Problem. Evaluate PV ⁣sinxxdx\mathrm{PV}\!\int_{-\infty}^{\infty} \frac{\sin x}{x}\, dx.

Consider γeizzdz\oint_\gamma \frac{e^{iz}}{z}\, dz where γ\gamma consists of [R,ε][-R, -\varepsilon] [ε,R][\varepsilon, R] on the real axis, small upper semicircle CεC_\varepsilon around 00And large Upper semicircle CRC_R.

No poles inside the contour, so the integral is 00.

On CRC_R: vanishes as RR \to \infty by Jordan’s lemma. On CεC_\varepsilon (indenting above): Cεeizzdziπ\int_{C_\varepsilon} \frac{e^{iz}}{z}\, dz \to -i\pi as ε0\varepsilon \to 0 (half residue contribution).

0=PV ⁣eixxdx+(iπ)0 = \mathrm{PV}\!\int_{-\infty}^{\infty} \frac{e^{ix}}{x}\, dx + (-i\pi).

PV ⁣eixxdx=iπ\mathrm{PV}\!\int_{-\infty}^{\infty} \frac{e^{ix}}{x}\, dx = i\pi.

Taking imaginary parts: PV ⁣sinxxdx=π\mathrm{PV}\!\int_{-\infty}^{\infty} \frac{\sin x}{x}\, dx = \pi.