Cauchy Residue Theorem: Formula, Intuition, and Step‑by‑Step Examples

Keywords:

cauchy residue theorem residue theorem examples cauchy remainder calculate residue of complex function cauchy residue theorem calculator

What is the Cauchy Residue Theorem?

The Cauchy Residue Theorem is a cornerstone of complex analysis. It states that if \(f\) is meromorphic inside and on a positively oriented, simple, closed contour \(C\), then

\[ \oint_C f(z)\,dz \;=\; 2\pi i \sum_{k} \operatorname{Res}\big(f; a_k\big)\,, \] where \(\operatorname{Res}(f; a_k)\) is the residue of \(f\) at the isolated singularity \(a_k\) inside \(C\).

Intuitively, the integral around a closed loop depends only on the "weight" (residue) of the function's singularities inside the loop. This makes it a powerful tool for evaluating otherwise difficult integrals, including many real integrals.

When should you use it?

  • You face a real integral that looks rational or trigonometric and suggests a complex substitution.
  • The integrand extends to a meromorphic function with a handful of isolated poles.
  • The contour integral over the "far arc" vanishes (Jordan's lemma / decay at infinity).
  • You want a quick way to calculate the residue of a complex function at its poles and sum them.

Tip: For rational functions \(p(z)/q(z)\) with simple poles, residues are especially easy.

How to calculate residues

1) Simple poles

If \(a\) is a simple pole of \(f(z)=\dfrac{p(z)}{q(z)}\) with \(q(a)=0\) and \(q'(a)\neq 0\), then

\[ \operatorname{Res}(f;a) \;=\; \frac{p(a)}{q'(a)}. \]

2) Higher‑order poles

If \(a\) is a pole of order \(m\), use the derivative formula:

\[ \operatorname{Res}(f;a) \;=\; \frac{1}{(m-1)!}\lim_{z\to a}\frac{d^{\,m-1}}{dz^{\,m-1}}\Big[(z-a)^m f(z)\Big]. \]

3) Laurent series

Expand around \(a\): \(f(z)=\cdots + \dfrac{c_{-1}}{z-a} + c_0 + c_1(z-a)+\cdots\). The residue is the coefficient \(c_{-1}\).

4) Removable/essential singularities

If the singularity is removable, the residue is 0. For essential singularities, compute via series or limits.

Residue theorem examples (step‑by‑step)

Example 1. \(\displaystyle \int_{-\infty}^{\infty}\frac{dx}{x^2+1}\)

Extend to \(f(z)=\dfrac{1}{z^2+1}\). The poles are at \(z=\pm i\). On the upper‑half semicircle, only \(z=i\) lies inside.

Residue at \(z=i\): for simple poles of \(\dfrac{p}{q}\), \(\operatorname{Res}=\dfrac{p(i)}{q'(i)}=\dfrac{1}{2i}\).

Then \(\displaystyle \int_{-\infty}^{\infty}\frac{dx}{x^2+1} = 2\pi i \cdot \frac{1}{2i} = \pi.\)

Example 2. \(\displaystyle \int_{-\infty}^{\infty}\frac{x^2\,dx}{(x^2+1)(x^2+4)}\)

Use \(f(z)=\dfrac{z^2}{(z^2+1)(z^2+4)}\). Poles in the upper half‑plane are \(z=i\) and \(z=2i\).

Compute residues by partial fractions or simple‑pole formula:
For \(z=i\), let \(q(z)=(z^2+1)(z^2+4)\). Then \(q'(z)=2z(z^2+4)+2z(z^2+1)=2z(2z^2+5)\). \(\ \Rightarrow\ q'(i)=2i(2(-1)+5)=6i\). So \(\operatorname{Res}(f;i)=\dfrac{i^2}{6i}=\dfrac{-1}{6i}=\dfrac{i}{6}\cdot(-1/i^2)=\frac{-1}{6i}\).

Do similarly for \(z=2i\): \(q'(2i)=2(2i)\big(2(2i)^2+5\big)=4i(2(-4)+5)=4i(-8+5)=-12i\). Thus \(\operatorname{Res}(f;2i)=\dfrac{(2i)^2}{-12i}=\dfrac{-4}{-12i}=\dfrac{1}{3i}\).

Sum of residues in the UHP: \(-\dfrac{1}{6i}+\dfrac{1}{3i}=\dfrac{1}{6i}\). Hence the real integral equals \(2\pi i\cdot \dfrac{1}{6i}=\dfrac{\pi}{3}\).

Example 3. Residue at a double pole

Find \(\operatorname{Res}\Big(\dfrac{1}{(z-1)^2(z+2)}; z=1\Big)\). Here \(z=1\) is a pole of order \(m=2\).

\[ \operatorname{Res}(f;1)=\lim_{z\to 1}\frac{d}{dz}\left[(z-1)^2 \frac{1}{(z-1)^2(z+2)}\right]=\lim_{z\to 1} \frac{d}{dz}\left(\frac{1}{z+2}\right)=\lim_{z\to 1} \left(-\frac{1}{(z+2)^2}\right)=-\frac{1}{9}. \]

Example 4. Trigonometric integral via substitution

Evaluate \(\displaystyle \int_{0}^{2\pi}\frac{d\theta}{5-4\cos\theta}\).

Use \(z=e^{i\theta}\), \(d\theta=\dfrac{dz}{iz}\), and \(\cos\theta=\dfrac{1}{2}\left(z+\frac{1}{z}\right)\). The integral becomes the contour integral over \(|z|=1\) of a rational function in \(z\). After simplification one finds a simple pole inside the unit circle; its residue gives the value \( \displaystyle \frac{2\pi}{3}.\)

Exercise: carry out the algebra and confirm the residue.

"Cauchy remainder" vs "Cauchy residue"

The phrase "Cauchy remainder" usually refers to the remainder term in Taylor's theorem written in Cauchy form for real analysis. It estimates the truncation error after a finite Taylor expansion. By contrast, a residue in complex analysis is a coefficient \(c_{-1}\) in the Laurent expansion that determines contour integrals via the residue theorem.

Cauchy remainder (real analysis)

\[ R_n(x)=\frac{f^{(n+1)}(\xi)}{n!}\,(x-a)^n(x-\xi), \quad \xi \in (a,x). \]

Used for error bounds in Taylor approximations.

Cauchy residue (complex analysis)

\[ \operatorname{Res}(f;a)=c_{-1} \text{ in } f(z)=\sum_{k=-\infty}^{\infty} c_k (z-a)^k. \]

Used to evaluate contour (and many real) integrals.

Cauchy residue theorem calculator (simple‑pole, rational case)

For a rational function \(f(z)=\dfrac{p(z)}{q(z)}\) with a simple pole at \(z=a\), the residue is \( \operatorname{Res}(f;a)=\dfrac{p(a)}{q'(a)}\). Enter polynomial coefficients (highest degree first). Complex input uses a+bi format.

Result will appear here.

Example: for \(f(z)=1/(z^2+1)\) at \(a=i\), the residue should be \(1/(2i)\).

FAQ

Is the residue theorem only for rational functions?

No. It works for any meromorphic function (isolated poles). Rational functions are just the most common classroom cases.

What if the pole is not simple?

Use the higher‑order formula with derivatives, or compute a Laurent series. The built‑in calculator above is for simple poles only.

Can I use it for real integrals?

Yes—many real integrals can be evaluated by embedding them in the complex plane, choosing a contour, and summing residues of the enclosed poles.