4.10.6Advanced Topics (Elite Level)

Residue theorem — computing real integrals

1,802 words8 min readdifficulty · medium3 backlinks

1. What is a residue? (build from scratch)

WHY is c1c_{-1} special? Integrate the series term-by-term around a small circle zz0=ρ|z-z_0|=\rho with z=z0+ρeiθz=z_0+\rho e^{i\theta}: (zz0)ndz=02π ⁣ρneinθiρeiθdθ=iρn+1 ⁣02π ⁣ei(n+1)θdθ.\oint (z-z_0)^n\,dz=\int_0^{2\pi}\!\rho^n e^{in\theta}\,i\rho e^{i\theta}\,d\theta=i\rho^{n+1}\!\int_0^{2\pi}\! e^{i(n+1)\theta}d\theta. The θ\theta-integral is 2π2\pi when n+1=0n+1=0 (i.e. n=1n=-1) and zero otherwise (a full sinusoid averages to 0). So fdz=2πic1=2πiResz0f.\oint f\,dz = 2\pi i\, c_{-1}=2\pi i\operatorname{Res}_{z_0}f. Only the c1c_{-1} term survives — that's why we care about it.

Computing residues without the full series


2. The semicircle machine (rational functions)

Goal: I=R(x)dx\displaystyle I=\int_{-\infty}^{\infty} R(x)\,dx where R=PQR=\frac{P}{Q} rational, degQdegP+2\deg Q\ge \deg P+2, no real poles.

Taking ρ\rho\to\infty: R(x)dx=2πipoles in UHPResR.\boxed{\int_{-\infty}^{\infty}R(x)\,dx = 2\pi i\sum_{\text{poles in UHP}}\operatorname{Res} R.}

Figure — Residue theorem — computing real integrals

3. Oscillatory integrals (Jordan's Lemma)

For R(x)cos(ax)dx\int R(x)\cos(ax)\,dx or R(x)sin(ax)dx\int R(x)\sin(ax)\,dx (a>0a>0), use eiaze^{iaz} and take real/imaginary parts.


4. Trig integrals over [0,2π][0,2\pi]

Using z=eiθz=e^{i\theta}: cosθ=z+z12\cos\theta=\frac{z+z^{-1}}{2}, sinθ=zz12i\sin\theta=\frac{z-z^{-1}}{2i}, and dz=ieiθdθdθ=dzizdz=ie^{i\theta}d\theta\Rightarrow d\theta=\frac{dz}{iz}.


5. Common mistakes (Steel-manned)


Recall Feynman: explain to a 12-year-old

Imagine a real number line — a long straight road where your integral runs. Now lift the road up into a 2-D map (the complex plane) and bend it into a giant loop, like catching a string and pulling both ends together. Inside the loop there might be a few "magic spikes" (poles). There's a rule: the loop's total only depends on how strong those spikes are — a number called the residue of each spike. The far-away part of the loop (the big arc) is so weak it adds nothing. So the whole hard road-integral equals just 2π2\pi times ii times the sum of the spike strengths inside. We turned an infinite road trip into "count the spikes and add their strengths."


Connections

  • Cauchy's Integral Theorem & Formula (residue theorem is their generalization)
  • Laurent Series & Classification of Singularities (defines c1c_{-1})
  • Jordan's Lemma (controls oscillatory arcs)
  • Contour Integration & Branch Cuts (keyhole contours for 0xs1/(1+x)dx\int_0^\infty x^{s-1}/(1+x)\,dx)
  • Principal Value Integrals (indented contours around real poles)
  • Argument Principle & Rouché's Theorem (counting zeros via residues)

Flashcards

What is the residue of ff at z0z_0 in terms of its Laurent series?
The coefficient c1c_{-1} of (zz0)1(z-z_0)^{-1}.
Why does only c1c_{-1} survive when integrating a Laurent series around z0z_0?
(zz0)ndz=2πi\oint(z-z_0)^n dz=2\pi i only for n=1n=-1; all other powers integrate to 00 over a full circle.
State the residue theorem.
Cfdz=2πienclosed polesResf\oint_C f\,dz = 2\pi i\sum_{\text{enclosed poles}}\operatorname{Res} f for CC positively oriented.
Residue formula for a simple pole of g/hg/h where h(z0)=0h(z_0)=0.
Resz0=g(z0)/h(z0)\operatorname{Res}_{z_0}=g(z_0)/h'(z_0).
Residue formula for a pole of order mm.
1(m1)!limzz0dm1dzm1[(zz0)mf]\frac{1}{(m-1)!}\lim_{z\to z_0}\frac{d^{m-1}}{dz^{m-1}}[(z-z_0)^m f].
Condition for the semicircular arc to vanish for a rational integrand.
deg(denominator)deg(numerator)+2\deg(\text{denominator})\ge \deg(\text{numerator})+2.
Why use eiaze^{iaz} instead of cos(az)\cos(az) for oscillatory integrals?
eiaz=eaImz|e^{iaz}|=e^{-a\,\mathrm{Im}\,z} decays in the UHP; cosz\cos z grows there. Take Re/Im at the end.
What does Jordan's lemma let you weaken compared to the rational case?
The arc vanishes needing only R(z)0R(z)\to0 (degree gap 1\ge1), because the exponential supplies decay.
Substitution to convert 02πF(cosθ,sinθ)dθ\int_0^{2\pi}F(\cos\theta,\sin\theta)d\theta to a contour integral.
z=eiθz=e^{i\theta}, cosθ=z+z12\cos\theta=\frac{z+z^{-1}}{2}, sinθ=zz12i\sin\theta=\frac{z-z^{-1}}{2i}, dθ=dzizd\theta=\frac{dz}{iz}, over z=1|z|=1.
Value of dx1+x2\int_{-\infty}^\infty \frac{dx}{1+x^2} by residues.
2πi12i=π2\pi i\cdot\frac{1}{2i}=\pi (pole at z=iz=i).
Value of cosxx2+1dx\int_{-\infty}^\infty \frac{\cos x}{x^2+1}dx.
π/e\pi/e.
Which poles do you sum when closing in the upper half-plane?
Only those with positive imaginary part (inside the contour).

Concept Map

restriction of

close loop in

split into

coefficient c minus 1

integrate term by term

gives

loop integral equals 2 pi i sum res

formula g over h prime

derivative formula

degree gap >= 2 kills it

leaves

applied to rational R

Real integral on real line

Complex function f of z

Contour in complex plane

Real segment plus arc

Laurent series

Residue at z0

Only c minus 1 survives

Residue theorem

Simple pole g over h

Order m pole

Semicircle arc in UHP

Arc vanishes as rho to infinity

Integral equals 2 pi i sum UHP residues

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, idea bahut simple hai. Tumhe ek real integral solve karna hai jaise dx1+x2\int_{-\infty}^{\infty}\frac{dx}{1+x^2}. Yeh real line par chal raha hai, par hum function ko complex plane mein le jaate hain (xx ki jagah zz). Ab real line ko ek bada semicircle laga ke loop bana dete hain upper half-plane mein. Complex analysis ka jaadu yeh hai: aise band loop ka integral sirf andar trapped poles ke "residue" pe depend karta hai — 2πi×(sum of residues)2\pi i \times (\text{sum of residues}). Bas spikes ki strength gino aur add karo.

Trick ka second part: jo bada arc (semicircle ka curved hissa) hai, woh radius bada karne par zero ho jaata hai — provided denominator ki degree numerator se kam se kam 2 zyada ho. Toh jab ρ\rho\to\infty, sirf real-line integral aur residue-sum bachte hain, dono equal. Isi se answer π\pi aata hai (pole z=iz=i par residue 12i\frac{1}{2i}, into 2πi2\pi i).

Oscillatory waale, jaise cosxx2+1\frac{\cos x}{x^2+1}, mein hum cosz\cos z nahi, balki eize^{iz} use karte hain — kyunki eize^{iz} ka magnitude eImze^{-\mathrm{Im}\,z} upper half mein decay karta hai (Jordan's lemma), jabki cosz\cos z to phat jaata hai. Last mein real ya imaginary part le lo. Aur 00 se 2π2\pi waale trig integrals mein z=eiθz=e^{i\theta} substitute karke unit circle ka contour ban jaata hai, dθ=dzizd\theta=\frac{dz}{iz} mat bhoolna.

Sabse important sawaal exam mein: kaunse pole count karne hain? Sirf woh jo tumhare loop ke andar hain. UHP semicircle ho to sirf positive imaginary part waale poles. Bas yeh discipline rakho — half choose karo, arc decay check karo, trapped residues add karo — aur tough-looking integrals 2 line mein khatam.

Go deeper — visual, from zero

Test yourself — Advanced Topics (Elite Level)

Connections