Residue theorem and real integrals
Some real definite integrals resist every trick of ordinary calculus — no substitution, no integration by parts, no partial fractions will crack cleanly. Complex analysis supplies a shortcut that feels almost like a magic trick: wrap the real interval into a closed loop in the complex plane, evaluate the loop integral by reading off residues at a handful of singular points, and the answer to the real problem falls out. The Residue Theorem is the engine. It says a contour integral equals times the sum of residues enclosed — full stop, no further integration needed. This capstone topic of Unit 5 turns that single algebraic fact into two standard recipes: rational functions of over a full period, and rational functions integrated over the whole real line. Both recipes are drilled below with numbers that check against elementary answers.
Converting a hard real integral into a closed contour integral lets the Residue Theorem replace calculus with algebra: sum times the residues at the poles that lie inside the chosen contour.
The core idea
Residue Theorem. Let be analytic inside and on a simple closed contour , except for finitely many isolated singularities enclosed by . Then
where: is the coefficient of in the Laurent expansion of about . The proof is a one-line deformation: shrink down onto tiny disjoint circles, one around each ; each tiny circle contributes exactly by the definition of the residue, and summing the pieces reconstructs the whole. Nothing about the shape of matters — only which singularities it happens to enclose. The trick for turning a real integral into a contour integral is choosing so that part of it is the real-axis segment you actually want, and the rest is an auxiliary piece that either vanishes or closes the loop conveniently. Two standard choices cover the syllabus.
Type 1 — trigonometric integrals over a full period. For with rational, the substitution
turns running once around into running once around the unit circle . So becomes for a rational , and the Residue Theorem needs only the poles strictly inside the unit circle.
Type 2 — improper integrals over the whole real line. For rational, with and no poles on the real axis, close the real segment with a large semicircular arc in the upper half-plane. As the arc's contribution vanishes (the ML-inequality: arc length times a bound on the arc gives ), leaving
Why the arc vanishes: proving the Type 2 formula
The claim that letting collapses a closed-contour identity into the real-axis integral we actually want deserves its own justification, since dropping the arc term without proof is exactly the kind of shortcut an exam expects you to defend.
Step 1. Write the closed contour as two pieces: the real segment and the semicircular arc of radius in the upper half-plane, so . For large enough to enclose every upper-half-plane pole of , the Residue Theorem gives , a fixed right-hand side independent of once is large enough.
Step 2. Bound the arc term using the ML-inequality, , where is the arc length and . Since with , for large the ratio behaves like for some constant , so on .
Step 3. Combine the bounds: as . The degree gap of at least is exactly what forces the decay; a gap of only would leave a bounded, non-vanishing arc contribution.
Step 4. Take the limit in Step 1's identity. Since the arc term vanishes and the right-hand side is already independent of , , which is exactly the Type 2 formula. The same ML-inequality argument, applied on a shrinking or growing arc rather than a straight segment, is the standard tool whenever a contour piece needs to be shown negligible.
Worked example
Problem. Evaluate .
Step 1. Substitute , so and . Multiplying through by turns the denominator into , so the integral becomes .
Step 2. Find the poles: gives . Only lies inside ; is outside and contributes nothing.
Step 3. Compute the residue at the simple pole . With and , .
Step 4. Apply the Residue Theorem: . Final answer: .
Competitive stretch
Problem. Evaluate by residues, as a Type 2 check.
Step 1. Here has degree gap , satisfying the arc-vanishing condition, and its poles are off the real axis, so the semicircular method applies. Only lies in the upper half-plane.
Step 2. Since , the residue at the simple pole is .
Step 3. By the Type 2 formula proved above, . Final answer: , matching the elementary check exactly, which confirms the residue machinery is sound. Both recipes share the same discipline: first decide which contour to close, then find every singularity of the integrand, then discard whichever ones fall outside the chosen region, and only then sum the residues that remain. Skipping the sorting step — summing every pole instead of only the enclosed ones — is the fastest way to get a plausible-looking but wrong number, since the arithmetic of finding residues gives no warning that a pole was on the wrong side.
Common traps
- Counting poles on the wrong side. For Type 1, only poles strictly inside count; for Type 2, only poles in the upper half-plane count when the arc closes upward — a pole on the wrong side is the single most common slip.
- Skipping the degree check for Type 2. The vanishing-arc argument needs ; applying the method where the gap is only gives a wrong, often divergent, answer because the arc term does not decay.
- Algebra slips in the substitution. Dropping the factor, or mis-substituting or , is a frequent Type 1 error — always confirm the substituted integrand is genuinely rational in before hunting poles.
- Ignoring poles exactly on the real axis. The basic semicircular method assumes no real poles; such cases need an indented contour, a refinement beyond this topic's scope.
Ask the tutor: If picking the right contour type or tracking which poles fall inside it still feels shaky, ask the AI tutor to run through two or three more integrals of each type with you, step by step.
Why does only the upper half plane matter in Type 2, could I close downward instead
You can close downward with a lower semicircle, but then you must sum residues at poles in the lower half-plane instead, and the orientation of that contour is clockwise, which flips the sign to . Closing upward with a counterclockwise arc is simply the conventional, tidier choice when the integrand decays fast enough on either side; the physics of the answer does not depend on which half you pick, as long as you match poles, orientation and sign consistently.
What if the degree gap is exactly 1 instead of 2, does Type 2 just fail
The basic ML bound used here needs the gap of to force the arc contribution to ; with a gap of only the arc's contribution stays bounded and generally nonzero, so the naive formula breaks. Such integrals still often converge and can be evaluated with a more careful choice of contour or an added trick (for example symmetry arguments), but that machinery is beyond this topic's scope — recognize the gap-of-1 case and flag it rather than blindly applying the formula.
How do I know which poles fall inside the unit circle without solving a nasty quadratic every time
For a quadratic arising from the substitution, the two roots always multiply to the constant term by Vieta's formulas, ; check whether tells you the roots straddle (product of magnitudes equals ), then just test each root numerically against . In the worked example, and one root is small () while the other is large (), a pattern typical of this construction — one root inside, one outside, product equal to .