Recipe
Evaluate a real improper integral using a semicircular contour
Use when: you need \int_{-\infty}^\infty f(x)\,dx for a real rational function f=p/q with real coefficients, no pole on the real axis, and \deg q\ge\deg p+2
Goal: the improper integral's exact value, built entirely from the poles in the upper half-plane, with no antiderivative required
Taught in Real improper integrals via semicircular contours
Quick recipe
-
1
Check that f has real coefficients, no pole sitting on the real axis itself, and a degree gap of at least 2 between denominator and numerator.
Example
For f(z)=\dfrac1{z^4+1}: real coefficients, no real pole since x^4+1>0 for every real x, and degree gap 4-0=4\ge2.
- the degree gap is at least 2 — the semicircular arc vanishes as R\to\infty; continue to Step 2.
- the degree gap is less than 2 — the arc does not vanish, and this method does not apply as it stands.
Why: the degree gap is exactly what forces the arc's own contribution to shrink to zero, and skipping this check risks trusting a method whose hypothesis silently failed.
-
2
Solve q(z)=0 for all of f's poles, and keep only the ones with positive imaginary part.
Example
z^4=-1 has four roots spaced 90° apart; the two with \operatorname{Im}(z)>0 are z=e^{i\pi/4} and z=e^{i3\pi/4}.
Why: once R grows past every pole's modulus, the semicircle encloses these poles and only these, so the sum stops changing beyond that point.
-
3
Use the derivative shortcut formula, or the p(z_0)/q'(z_0) quotient form for a simple pole, at each pole found in Step 2.
Example
With q(z)=z^4+1, q'(z)=4z^3: at z_0=e^{i\pi/4} and z_0=e^{i3\pi/4}, the two residues work out to \dfrac{\sqrt2}{8}(1-i) and -\dfrac{\sqrt2}{8}(1+i).
Why: these are ordinary simple-pole residues, computed the exact way the residue chapter already established, with nothing new about the technique itself.
-
4
Add every residue from Step 3 and multiply the total by 2\pi i to get the value of the real integral.
Example
\dfrac{\sqrt2}{8}(1-i)-\dfrac{\sqrt2}{8}(1+i)=-\dfrac{\sqrt2}{4}i, so \displaystyle\int_{-\infty}^\infty\frac{dx}{x^4+1}=2\pi i\left(-\dfrac{\sqrt2}{4}i\right)=\dfrac{\pi\sqrt2}{2}.
Why: this is precisely the residue theorem's own conclusion for this contour, with the vanished arc leaving only the real-line piece behind.
Common mistakes
- Skipping the degree-gap check and applying the method to an integral where the arc secretly does not vanish.
- Including a pole from the lower half-plane, which the upper semicircle never actually encloses.
- Forgetting the factor of 2\pi i, or using \pi i instead by confusing this with a different contour.
- Growing R only partway and missing a pole that lies farther out than the radius checked.