Home / Learn / Exam prep / GATE Physics / Lesson 1.4
All lessons

Module 1: Mathematical physics · Lesson 1.4 · about 60 min

The residue theorem and real integrals

Computing residues at simple, multiple and essential singularities, the residue theorem, trigonometric integrals on the unit circle, rational and Fourier-type integrals with Jordan's lemma, poles on the real axis and principal values, keyhole, wedge and rectangular contours, branch points, and summing series with π cot πz.

Key points, meanings and formulas on one page: choose "Save as PDF" in the print box.

Module 1 · about 60 minutes. By the end you will be able to compute residues quickly at any kind of pole, turn a real integral into a contour integral and choose the right contour for it, justify dropping the big arc (including with Jordan’s lemma), handle poles on the axis with principal values, use keyhole, wedge and rectangular contours, and recognise branch points where residues cannot be used. It builds directly on lesson 1.3, analytic functions and Cauchy’s theorem.

A contour integral sees only the singular points it encloses, each through one number, its residue. Real integrals that are hard on the real line become a sum of residues once you close the path in the complex plane.

1. The residue theorem and how to compute residues

The residue of f at an isolated singularity a is the coefficient c−1 of (z−a)−1 in its Laurent series. It is the only term that survives a loop, so for a closed curve C traversed anticlockwise:

∮Cf(z)dz=2πi∑poles inside CResf

Fast ways to get residues:

  • Simple pole: Resaf=limz→a⁡(z−a)f(z). If f=p/q with q(a)=0≠q′(a): Res=p(a)/q′(a). So cot⁡z has residue 1 at every nπ, and at a root of z4=−1, 14z3=−z4.
  • Pole of order m:
Resaf=1(m−1)!limz→a⁡dm−1dzm−1[(z−a)mf(z)]
  • Essential singularity or awkward cases: expand. zcos⁡(1/z)=z−12z+⋯ has residue −12; 1z2sin⁡z=1z3(1+z26+⋯) has residue 16.
  • Residue at infinity: Res∞f=−c−1 of the expansion in powers of 1/z for large |z|. All residues, including the one at infinity, add to zero. So if f∼c/z at large |z|, the finite residues add to c; if f falls like 1/z2 or faster, they add to 0.

Worked example. ∮|z|=23z+1z(z−1)dz: Res0=1−1=−1, Res1=41=4. The integral is 2πi(3)=6πi. Check with infinity: f≈3/z for large z, and indeed −1+4=3.

Res f at a
the coefficient of 1/(z − a): the only part of f that a loop round a can detect
2πi
the integral of 1/(z − a) once round a; every residue is weighted by it
Closing the contour
adding a path (usually a big arc) whose contribution is known, mostly zero
Principal value
the symmetric limit that cancels the two infinite halves on either side of a pole on the path
Physical meaning
Residues are how physicists evaluate Fourier integrals of response functions and propagators: the poles of a response are its resonances, and their positions decide causality and decay.

2. Integrals over a full period: the unit circle

For ∫02πR(cos⁡θ,sin⁡θ)dθ, put z=eiθ:

cos⁡θ=z+z−12,sin⁡θ=z−z−12i,dθ=dziz

and the integral becomes a contour integral round |z|=1. Only poles inside the unit circle count.

Worked example. ∫02πdθ2+cos⁡θ=∮2dzi(z2+4z+1). The roots −2±3 multiply to 1, so exactly one, z+=−2+3, is inside. Its residue is 2i(z+−z−)=13i, and the integral is 2π/3. In general ∫02πdθa+bcos⁡θ=2πa2−b2 for a>|b|.

For cos⁡nθ in the numerator, write it as Rezn rather than (zn+z−n)/2: the second form adds a pole of order n at the origin. So ∫02πcos⁡2θ5−4cos⁡θdθ=Re∮−z2dzi(2z−1)(z−2)=π6 (only z=12 is inside).

3. Rational functions on the real line

For ∫−∞∞P(x)Q(x)dx with deg⁡Q≥deg⁡P+2 and no real zeros of Q, close with a large semicircle in the upper half-plane. On the arc |f|≲C/R2 and the length is πR, so the arc contributes at most πC/R→0:

∫−∞∞P(x)Q(x)dx=2πi∑Ima>0ResaPQ

Worked example. ∫dxx4+1: the upper poles are eiπ/4 and e3iπ/4, with residues −z4. Sum −14(eiπ/4+e3iπ/4)=−i24, times 2πi: π2. Double poles need the derivative formula: ∫0∞dx(x2+a2)2=π4a3 (half the full-line value, as the integrand is even).

4. Fourier-type integrals and Jordan’s lemma

For ∫−∞∞f(x)eikxdx, use eikz on the contour (never cos⁡kz or sin⁡kz, which grow in both half-planes) and take real or imaginary parts at the end. The sign of k picks the half-plane, because |eikz|=e−kImz:

  • k>0: close above; the result is +2πi∑Res (upper half-plane).
  • k<0: close below; the contour runs clockwise, so the result is −2πi∑Res (lower half-plane).

Here the decay of f alone can be too slow: xx2+4 falls only like 1/x. The exponential rescues it:

On the upper arc z = Re^(iθ), |e^(ikz)| = e^(−kR sin θ). The arc length element is R dθ.
So |arc integral| ≤ max|f| × R ∫₀^π e^(−kR sin θ) dθ = 2 max|f| × R ∫₀^(π/2) e^(−kR sin θ) dθ.
On 0 ≤ θ ≤ π/2, sin θ ≥ 2θ/π (the sine curve lies above its chord). So the integral is at most ∫₀^(π/2) e^(−2kRθ/π) dθ < π/(2kR).
Hence |arc integral| < (π/k) × max|f| on the arc. If f → 0 as R → ∞, even as slowly as 1/R, the arc vanishes. That is Jordan's lemma.

The figure integrates each piece numerically. Compare the three integrands: without an exponential, z/(z2+1) leaves an arc contribution of πi that never dies; with eiz it does.

The closed contour (real segment plus upper arc) and a graph of |arc integral| against R. Segment plus arc always equals 2πi times the residue at i; the real integral follows only when the arc tends to zero.

Worked example. ∫−∞∞xsin⁡xx2+4dx=Im∫xeixx2+4dx. Close above (Jordan). Residue at 2i: 2ie−24i=e−22. So the complex integral is iπe−2 and the answer is πe−2≈0.425. Similarly ∫cos⁡kxx2+a2dx=πae−|k|a, even in k because each sign closes on its own side.

5. Poles on the axis: principal values

If f has a simple pole at a real point x0, the ordinary integral diverges, but the Cauchy principal value

PV∫−∞∞fdx=limε→0⁡(∫−∞x0−ε+∫x0+ε∞)fdx

can be finite. Indent the contour with a small semicircle of radius ε round x0. On a small arc round a simple pole, ∫fdz→iΔθRes, where Δθ is the angle swept: −π for an arc passing above the pole (clockwise), +π below. Either way, the final rule is

PV∫−∞∞fdx=2πi∑upper half-planeRes+πi∑real axisRes

(for contours closed above, with the arc vanishing).

Worked example. PV∫dx(x−1)(x2+1). Res1=12; Resi=1(i−1)2i=−1−i4. PV =2πi(−1−i4)+πi⋅12=−π2. The imaginary parts cancel, as they must for a real integrand: a leftover imaginary part means a pole was given the wrong weight.

The classic case: PV∫eixxdx=iπ, whose imaginary part gives ∫−∞∞sin⁡axxdx=π for every a>0, and whose real part gives PV∫cos⁡xxdx=0. The same idea gives ∫0∞sin2⁡xx2dx=π2.

“A pole on the real axis counts like any other pole inside the contour.” It sits on the contour, so it is neither inside nor outside. For a principal value it contributes πiRes, half the usual weight, because the small semicircle sweeps half a turn. Giving it 2πiRes (or 0) leaves an imaginary part in the answer to a real integral, which is the quickest check that something went wrong.

6. Other contours: keyhole, wedge, rectangle

Choose the contour so that the extra sides either vanish or reproduce the original integral times a known factor.

  • Keyhole for ∫0∞xa−1R(x)dx (non-integer power). Cut along the positive axis; below the cut za−1 carries an extra factor e2πi(a−1). Result for 0<a<1: ∫0∞xa−11+xdx=πsin⁡πa. With a=23, ∫0∞dxx1/3(1+x)=2π3.
  • Wedge for integrands with rotational symmetry. On the ray arg⁡z=2π/n, zn is real again, so ∫0∞dx1+xn=π/nsin⁡(π/n) (one pole inside, at eiπ/n). On the ray arg⁡z=π/4, eiz2=e−r2: the Fresnel integrals ∫0∞sin⁡x2dx=∫0∞cos⁡x2dx=π/8.
  • Rectangle for periodic pieces such as ex: shifting by 2πi leaves 1+ez unchanged, giving ∫−∞∞eax1+exdx=πsin⁡πa for 0<a<1.

Warning: branch points. A branch point (of z, za, ln⁡z) is not an isolated singularity: the function has no Laurent series there and no residue. Never draw a closed contour that winds round a branch point without a cut; the integrand would not come back to its starting value. On the keyhole, track the branch carefully: with the cut on the positive axis, 0<arg⁡z<2π, so −i=e3iπ/4, not the principal value e−iπ/4. With that branch, ∫0∞xx2+1dx=π2, and the two sides of the cut add rather than cancel.

7. Summing series with residues

πcot⁡(πz) has a simple pole with residue 1 at every integer. For f falling at least like 1/z2, the integral of πcot⁡(πz)f(z) round large squares vanishes, so

∑n=−∞∞f(n)=−∑poles of fRes[πcot⁡(πz)f(z)]

For f=1z2+a2: ∑n1n2+a2=πacoth⁡πa (use cot⁡(ix)=−icoth⁡x). With f=1/z4 the pole at 0 is of order 5 and gives ∑n≥1n−4=π4/90.

  • ∮fdz=2πi∑Res inside. Simple pole: p(a)/q′(a). Order m: (m−1)th derivative of (z−a)mf over (m−1)!. Essential: expand. All residues including infinity add to 0.
  • Period integrals: z=eiθ, only poles inside |z|=1; ∫02πdθa+bcos⁡θ=2πa2−b2. Use Rezn for cos⁡nθ.
  • Rational integrands with degree gap at least 2: close in either half-plane, the arc vanishes.
  • eikx: close above for k>0, below (with −2πi) for k<0. Jordan’s lemma needs only f→0. Never put cos⁡kz on a big arc.
  • Poles on the axis: principal value, πiRes each. ∫sin⁡axxdx=π for a>0.
  • Keyhole for xa−1 and ln⁡x, wedge for 1/(1+xn) and Fresnel, rectangle for eax/(1+ex). Branch points have no residue: cut, and track the branch.
  • ∑f(n)=−∑Res[πcot⁡(πz)f] at the poles of f.

Practise: exam questions on this lesson

From warm-up to top-rank level, with full solutions. More on the residues practice page.

Before this: lesson 1.3, analytic functions and Cauchy’s theorem. Next: lesson 1.5, Fourier and Laplace transforms, where residues invert transforms. Back to the GATE Physics course home.

Check yourself

1To evaluate the integral of e^(−3ix)/(x² + 1) over the real line, where should you close the contour?
2A simple pole lies on the real axis, and you take the principal value. How does it contribute?
3Why can you not take a residue at z = 0 for √z/(z² + 1)?

Sources

  • R. V. Churchill and J. W. Brown, Complex Variables and Applications, 9th ed. (2013), chapters 6 and 7
  • G. B. Arfken, H. J. Weber and F. E. Harris, Mathematical Methods for Physicists, 7th ed. (2013), chapter 11
  • M. J. Ablowitz and A. S. Fokas, Complex Variables: Introduction and Applications, 2nd ed. (2003), chapter 4
  • M. L. Boas, Mathematical Methods in the Physical Sciences, 3rd ed. (2006), chapter 14
  • GATE Physics (PH) syllabus, Mathematical Physics section, published by the organising institute each year

Your ticks stay in this browser. Save them as a file on the course home.

Updated 2026-11-22. Not affiliated with the IITs, IISc or the GATE organising institute. The general aptitude part of GATE is not covered here. Check the official GATE website for the current pattern. All questions are original.