Contour strategy
Definition. Residue computations choose a meromorphic extension, a contour, and a limiting argument. The desired real integral appears as one part of the contour integral, while the remaining parts either vanish or are explicitly controlled.
Rational integrals on the real line
Proposition. If \(R(z)\) is rational, has no real poles, and decays like \(|z|^{-2}\) or faster, then \(\int_{-\infty}^{\infty}R(x)\,\mathrm{d}x=2\pi i\) times the sum of residues of \(R\) in the upper half-plane.
Jordan lemma type estimates
Lemma. For oscillatory integrals involving \(e^{iaz}\) with \(a>0\), upper-half-plane semicircles are controlled because \(|e^{iaz}|=e^{-a\operatorname{Im}z}\). This decay can overcome rational factors on large arcs.
Trigonometric integrals
Proposition. Integrals over \([0,2\pi]\) of rational functions of \(\sin t\) and \(\cos t\) can be converted by \(z=e^{it}\), \(\mathrm{d}t=\mathrm{d}z/(iz)\), \(\cos t=(z+z^{-1})/2\), and \(\sin t=(z-z^{-1})/(2i)\).
Principal value integrals
Remark. When poles lie on the contour, one must specify indentation or Cauchy principal value. Small semicircles around real poles contribute half-residue terms depending on orientation.
Basic real-line integral
Example. For \(\int_{-\infty}^{\infty}(x^2+1)^{-1}\,\mathrm{d}x\), the upper-half-plane pole at \(i\) has residue \((2i)^{-1}\), giving \(2\pi i(2i)^{-1}=\pi\).
Real-line integrals and semicircular contours
Suppose a rational function \(R(z)\) has no real poles and decays like \(O(|z|^{-1-\varepsilon})\) in the upper half-plane. Integrating over the upper semicircle and letting its radius tend to infinity gives \[ \int_{-\infty}^{\infty}R(x)\,\mathrm{d}x =2\pi i\sum_{\operatorname{Im}a>0}\operatorname{Res}(R,a). \] The decay condition is what removes the arc; drawing a semicircle without checking it is not a proof.
Example. For \(a>0\), \[ \int_{-\infty}^{\infty}\frac{\mathrm{d}x}{x^2+a^2} =2\pi i\operatorname{Res}\left(\frac1{z^2+a^2},ia\right) =\frac{\pi}{a}. \]
Fourier-type integrals and Jordan's lemma
Lemma (Jordan, one form). If a rational \(R(z)=O(1/|z|)\) in the upper half-plane and has no real poles, then for \(t>0\), \[ \int_{\text{upper arc}}e^{itz}R(z)\,\mathrm{d}z\to0. \]
The exponential contributes \(|e^{itz}|=e^{-t\operatorname{Im}z}\), suppressing most of the arc; a careful split near the endpoints handles the weaker decay there. Consequently, \[ \int_{-\infty}^{\infty}e^{itx}R(x)\,\mathrm{d}x =2\pi i\sum_{\operatorname{Im}a>0} \operatorname{Res}(e^{itz}R(z),a). \] For \(t<0\), close in the lower half-plane and account for clockwise orientation.
Indented contours and principal values
If a simple pole lies on the real axis, bypass it with a small semicircle. An upper indentation from left to right is clockwise and contributes \[ -i\pi\operatorname{Res}(f,a). \] After moving this term to the other side, one obtains a Cauchy principal value. The sign depends on whether the indentation passes above or below and must be derived from orientation.
Keyhole contours and branch choices
For integrals containing \(x^{\alpha-1}\) or \(\log x\), choose a branch of \(\Log z\) on a slit plane and integrate around a keyhole contour. Values on the two banks differ by the branch jump. For \(0<\alpha<1\), \[ \int_0^\infty\frac{x^{\alpha-1}}{1+x}\,\mathrm{d}x =\frac{\pi}{\sin(\pi\alpha)}. \] The proof uses \(z^{\alpha-1}=e^{(\alpha-1)\Log z}\), whose lower-bank value is \(e^{2\pi i(\alpha-1)}x^{\alpha-1}\), and the residue at \(-1\).
Rectangular contours and periodic functions
Functions such as \(\pi\cot(\pi z)\) and \(\pi^2\csc^2(\pi z)\) encode sums over integers through their poles. Integrating against a decaying meromorphic factor on expanding rectangles can derive partial-fraction expansions and series identities. One must show the boundary integrals vanish or cancel using periodicity; the residue theorem alone does not justify the limit.