maths2u
Tier
⌕ Search ⌘K
Theorem

The residue theorem

T-073Home MU-206Threads change · space
Statement

Let \(\Omega \subseteq \mathbb{C}\) be a simply connected open set, let \(a_1,\dots,a_n \in \Omega\) be distinct points, and let \(f\) be holomorphic on \(\Omega \setminus \{a_1,\dots,a_n\}\). Let \(\gamma\) be a positively oriented, simple, closed, piecewise-\(C^1\) contour in \(\Omega \setminus \{a_1,\dots,a_n\}\) whose interior \(\mathrm{int}(\gamma) \subseteq \Omega\) contains every \(a_k\) (equivalently, the winding number \(n(\gamma,a_k)=1\) for each \(k\)). Then \[ \oint_\gamma f(z)\,dz \;=\; 2\pi i \sum_{k=1}^{n} \operatorname{Res}(f,a_k), \] where \(\operatorname{Res}(f,a_k) = c_{-1}^{(k)}\) is the coefficient of \((z-a_k)^{-1}\) in the Laurent expansion of \(f\) about \(a_k\) on some punctured disc \(0 \lt |z-a_k| \lt r_k \subseteq \Omega \setminus \{a_1,\dots,a_n\}\).

Why it matters

The residue theorem converts a global object — a contour integral, which in principle depends on the entire path and the entire function along it — into a finite sum of purely local data extracted at each singular point. This is the single most important computational engine in complex analysis: it reduces integrals that are intractable by real methods (many real definite integrals, Fourier transforms, sums of series, inverse Laplace transforms) to algebraic bookkeeping around poles.

It is also the conceptual capstone of the Cauchy theory: Cauchy's theorem (the integral is zero when \(f\) is holomorphic throughout) and the Cauchy integral formula (recovering \(f\) and its derivatives from a contour integral) are both special cases, corresponding respectively to zero singularities and to a single simple-pole-like extraction of \(f(a)\).

Hypotheses
\(\Omega\) simply connected.If \(\Omega\) has a hole not containing any \(a_k\) — e.g. \(\Omega = \mathbb{C}\setminus\{0\}\) with the only singularity of \(f\) elsewhere but \(\gamma\) forced to wind around the missing point \(0\) — then \(\gamma\) need not be null-homotopic in \(\Omega\) once the singularities are removed, the deformation lemma used in the proof fails, and the sum-of-residues formula can be off by extra periods coming from the topology of \(\Omega\) itself, not from \(f\).
Isolated singularities only, finitely many enclosed.If \(f\) has a non-isolated singularity inside \(\gamma\) (e.g. \(f(z) = 1/\sin(1/z)\) near \(z=0\), which has poles accumulating at \(0\)) then \(0\) is not an isolated singularity, no Laurent expansion on a punctured disc around it exists, and "the residue at \(0\)" is undefined; the theorem simply does not apply to that point.
\(\gamma\) does not pass through any singularity.If \(\gamma\) passes through a pole, \(\oint_\gamma f\,dz\) is not even an ordinary Riemann/contour integral (the integrand is unbounded on the path), so the left-hand side fails to exist.
\(\gamma\) simple and positively oriented, each enclosed \(a_k\) with winding number exactly \(1\).If \(\gamma\) winds around some \(a_k\) twice (winding number \(2\)), that residue is counted with multiplicity \(2\): the correct general statement is \(\oint_\gamma f\,dz = 2\pi i\sum_k n(\gamma,a_k)\operatorname{Res}(f,a_k)\); dropping the winding-number weighting and simply asking "is \(a_k\) inside or outside" silently assumes \(n(\gamma,a_k)\in\{0,1\}\), which fails for self-intersecting or multiply-wound contours.
Each \(a_k \in \Omega\) (singularities lie inside the domain of holomorphy, not merely inside \(\gamma\)).If a "singularity" enclosed by \(\gamma\) is in fact a point where \(f\) was never defined to be holomorphic on any punctured neighbourhood inside \(\Omega\) — e.g. \(f\) is only defined on one side of a branch cut running into the interior of \(\gamma\) — there is no Laurent series there at all, and the local extraction step of the proof (a small circle argument) cannot be run.
Proof
1
For each \(k\), choose \(r_k \gt 0\) so small that the closed disc \(\overline{D}(a_k,r_k) \subseteq \mathrm{int}(\gamma)\) and the discs \(\overline{D}(a_1,r_1),\dots,\overline{D}(a_n,r_n)\) are pairwise disjoint.
Possible because the \(a_k\) are finitely many, distinct, and isolated, and \(\mathrm{int}(\gamma)\) is open with the \(a_k\) all in its interior (compactness / finiteness argument: take \(r_k\) less than half the minimum pairwise distance and less than the distance from \(a_k\) to \(\gamma\)). A
2
Let \(C_k\) be the positively oriented circle \(|z-a_k| = r_k\). Consider the region \(R = \mathrm{int}(\gamma) \setminus \bigcup_{k=1}^n D(a_k,r_k)\), a compact set on which \(f\) is holomorphic in a neighbourhood, bounded by \(\gamma\) (outer, positive) and the \(C_k\) (inner, to be traversed negatively as boundary of \(R\)).
Construction of a "slit" or "cut" multiply-connected region: standard device for reducing a domain with holes to a simply connected one by introducing finitely many auxiliary cross-cut arcs joining \(\gamma\) to each \(C_k\) and to one another, none of which pass through any \(a_j\) or intersect each other. B
3
Join \(\gamma\) to \(C_1\) by an arc \(L_1\), \(C_1\) to \(C_2\) by an arc \(L_2\), ..., \(C_{n-1}\) to \(C_n\) by an arc \(L_n\), all lying in \(R\) and pairwise non-intersecting except at their prescribed endpoints. Traversing \(\gamma\) once positively, then each \(L_j\) out and back, and each \(C_k\) once negatively, produces a single closed contour \(\Gamma\) that is the positively oriented boundary of a simply connected region \(R^\ast \subseteq R\) (each cross-cut is a "cut" preventing the region from re-encircling any hole).
Standard construction (Jordan-curve-based dissection of a multiply connected region into a simply connected one); each \(L_j\) is traversed twice in opposite directions so its contribution to any contour integral cancels. B
4
\(f\) is holomorphic on an open neighbourhood of \(\overline{R^\ast}\), and \(\Gamma = \partial R^\ast\) is a simple closed contour null-homotopic in that neighbourhood (indeed \(R^\ast\) is simply connected and \(f\) is holomorphic there), so \(\displaystyle\oint_\Gamma f(z)\,dz = 0\).
Cauchy's integral theorem (homotopy/Goursat form): the integral of a holomorphic function over a closed contour bounding a simply connected region on which the function is holomorphic vanishes. B
5
\[ 0 = \oint_\Gamma f\,dz = \oint_\gamma f\,dz + \sum_{j=1}^n \left(\int_{L_j} f\,dz + \int_{-L_j} f\,dz\right) - \sum_{k=1}^n \oint_{C_k} f\,dz = \oint_\gamma f\,dz - \sum_{k=1}^n \oint_{C_k} f\,dz. \]
The cross-cut integrals cancel in pairs because each \(L_j\) is traversed in both directions (additivity of contour integrals over concatenated paths, and \(\int_{-L} f = -\int_L f\)); the \(C_k\) appear with a minus sign because \(\Gamma\) traverses them negatively as inner boundary components of \(R^\ast\). A
6
\[ \oint_\gamma f(z)\,dz = \sum_{k=1}^n \oint_{C_k} f(z)\,dz. \]
Rearranging the identity of Step 5; this is the "generalised Cauchy theorem" reducing the integral over \(\gamma\) to a sum of integrals over small positively oriented circles around each singularity. B
7
On the punctured disc \(0 \lt |z-a_k| \lt \rho_k\) (with \(\rho_k \geq r_k\) the radius of the largest punctured disc around \(a_k\) inside \(\Omega\setminus\{a_1,\dots,a_n\}\setminus\{a_j : j\neq k\}\)), \(f\) admits a Laurent expansion \[ f(z) = \sum_{m=-\infty}^{\infty} c_m^{(k)} (z-a_k)^m, \] converging absolutely and uniformly on compact subsets of the punctured disc, in particular on \(C_k\).
Laurent's theorem: a function holomorphic on an annulus (here a punctured disc, the degenerate case of an annulus with inner radius \(0\)) has a unique Laurent series representation, convergent locally uniformly on the annulus. C
8
\[ \oint_{C_k} f(z)\,dz = \sum_{m=-\infty}^{\infty} c_m^{(k)} \oint_{C_k} (z-a_k)^m\,dz. \]
Term-by-term integration is valid because the Laurent series converges uniformly on the compact circle \(C_k\), so the (locally uniform) limit and the integral over the fixed compact contour \(C_k\) may be interchanged. C
9
Parametrising \(C_k\) by \(z = a_k + r_k e^{i\theta}\), \(\theta \in [0,2\pi]\): \[ \oint_{C_k} (z-a_k)^m\,dz = \int_0^{2\pi} r_k^{m} e^{im\theta}\, i r_k e^{i\theta}\,d\theta = i r_k^{m+1} \int_0^{2\pi} e^{i(m+1)\theta}\,d\theta = \begin{cases} 2\pi i & m = -1 \\ 0 & m \neq -1. \end{cases} \]
Direct computation: \(\int_0^{2\pi} e^{ip\theta}\,d\theta = 0\) for any nonzero integer \(p\) (antiderivative \(e^{ip\theta}/(ip)\) is periodic) and equals \(2\pi\) when \(p=0\). This is the elementary "orthogonality" integral underlying all residue calculations. A
10
\[ \oint_{C_k} f(z)\,dz = c_{-1}^{(k)} \cdot 2\pi i = 2\pi i \operatorname{Res}(f,a_k). \]
Substituting Step 9 into Step 8: every term of the series integrates to \(0\) except \(m=-1\), which contributes \(2\pi i\, c_{-1}^{(k)}\); by definition \(c_{-1}^{(k)}\) is the residue of \(f\) at \(a_k\). B
11
\[ \oint_\gamma f(z)\,dz = \sum_{k=1}^n \oint_{C_k} f(z)\,dz = \sum_{k=1}^n 2\pi i \operatorname{Res}(f,a_k) = 2\pi i \sum_{k=1}^n \operatorname{Res}(f,a_k). \]
Combining Step 6 (reduction to small circles) with Step 10 (evaluation of each small-circle integral), then factoring out the common constant \(2\pi i\). This is exactly the asserted identity. A
Result
\[ \oint_\gamma f(z)\,dz = 2\pi i \sum_{k=1}^n \operatorname{Res}(f,a_k) \]

Reading. To integrate a function around a closed loop, you never need to know its global behaviour along the whole path — only the "singular fingerprint" (the residue, a single complex number) left at each isolated singularity trapped inside the loop. Add up those fingerprints and multiply by \(2\pi i\).

Scope. Applies to any \(f\) holomorphic except at finitely many isolated singularities inside a simply connected domain \(\Omega\), for any positively oriented simple closed contour in \(\Omega\) enclosing them with winding number \(1\) and passing through none of them. It extends verbatim (with residues weighted by winding number) to non-simple contours, and to domains that are not simply connected provided \(\gamma\) is null-homologous in \(\Omega\) after removing the singular set.

Corollaries & converses
  • Cauchy's theorem is the case \(n=0\): no singularities enclosed forces \(\oint_\gamma f\,dz = 0\).
  • The Cauchy integral formula \(f(a) = \frac{1}{2\pi i}\oint_\gamma \frac{f(z)}{z-a}\,dz\) is the case \(n=1\) applied to \(g(z) = f(z)/(z-a)\), which has a single simple pole at \(a\) with residue \(f(a)\).
  • The argument principle (counting zeros minus poles of \(f\) inside \(\gamma\) via \(\frac{1}{2\pi i}\oint_\gamma \frac{f'}{f}\,dz\)) follows by applying the theorem to \(f'/f\), whose residue at a zero or pole of order \(m\) is \(\pm m\).
  • Converse: the statement is not an "if and only if" in a useful sense — the identity \(\oint_\gamma f\,dz = 2\pi i \sum \operatorname{Res}(f,a_k)\) can hold accidentally for functions or contours violating the hypotheses (e.g. residues summing to a value that happens to match a genuinely different left-hand side), so no meaningful converse is asserted or true in general.
  • A practical corollary: real integrals of the form \(\int_{-\infty}^{\infty} R(x)\,dx\) or \(\int_0^{2\pi} R(\cos\theta,\sin\theta)\,d\theta\) can be evaluated by choosing an auxiliary contour (semicircle, unit circle, keyhole) and applying the theorem, converting a real-analysis problem into pole-hunting.
Fails without
  • Drop "isolated singularities": take \(f(z) = 1/\sin(1/z)\) on a punctured neighbourhood of \(0\); \(f\) has poles at \(z = 1/(n\pi)\) accumulating at \(0\), so \(0\) is a non-isolated ("essential-cluster") singularity. There is no Laurent series on any punctured disc \(0 \lt |z| \lt \varepsilon\) (poles of \(f\) lie inside every such disc), so "\(\operatorname{Res}(f,0)\)" is not even defined, and no contour integral formula in terms of a finite residue sum at \(0\) can hold.
  • Drop simple connectivity of \(\Omega\) (or null-homology of \(\gamma\)): let \(\Omega = \mathbb{C}\setminus\{0\}\) and \(f(z) = 1/z^2\), which is holomorphic on all of \(\Omega\) (no singularities of \(f\) inside \(\Omega\) at all, so the "sum of enclosed residues" is vacuously \(0\)). Take \(\gamma\) the unit circle, winding once around the missing point \(0\). Direct computation gives \(\oint_\gamma z^{-2}\,dz = 0\) here (consistent, since \(1/z^2\) has an antiderivative \(-1/z\) single-valued on \(\Omega\)) — but replace \(f\) by \(g(z)=1/z\): now \(g\) is holomorphic throughout \(\Omega\) (its only singularity, \(z=0\), is not a point of \(\Omega\), so there are zero singularities to sum), yet \(\oint_\gamma g\,dz = 2\pi i \neq 0 = 2\pi i \cdot 0\). The deformation-to-small-circles argument (Steps 1-6) breaks because \(\gamma\) cannot be contracted to a point or dissected away from the "hole" at \(0\) without leaving \(\Omega\); the naïve formula fails exactly because the hole itself, not a singularity of \(f\), contributes to the integral.
  • Drop "\(\gamma\) does not pass through a singularity": take \(f(z)=1/z\) and let \(\gamma\) be any contour passing through \(z=0\). The integrand is unbounded at a point of the path, \(\oint_\gamma f\,dz\) fails to exist as an ordinary contour integral, and the theorem's conclusion is meaningless before it even starts.
Common errors
  • Forgetting the factor of \(2\pi i\), or writing \(\sum \operatorname{Res}\) as the final answer instead of \(2\pi i \sum \operatorname{Res}\).
  • Including residues of poles that lie outside \(\gamma\), or omitting one that lies inside — especially with poles close to the contour, where a sketch of the region is skipped and inclusion/exclusion is guessed rather than checked via the winding number or an explicit inequality.
  • Using the simple-pole shortcut \(\operatorname{Res}(f,a) = \lim_{z\to a}(z-a)f(z)\) at a pole of order \(\geq 2\), where it silently gives the wrong (often zero) answer; the correct formula needs a derivative: \(\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]\) for a pole of order \(m\).
  • Applying the theorem when \(\gamma\) is not closed, or is closed but traversed with net winding number \(0\) around some enclosed point (a figure-eight or a contour that doubles back), without adjusting for winding number weighting.
  • Confusing "singularity of \(f\)" with "zero of the denominator after cancellation" — e.g. treating \(f(z) = \frac{\sin z}{z}\) as having a pole at \(0\) (it has a removable singularity, residue \(0\), because the zero of \(\sin z\) at \(0\) cancels the zero of the denominator).
  • On real-integral applications: forgetting to verify the arc estimate (that the integral over the auxiliary semicircular/large-radius arc vanishes as \(R\to\infty\), typically via Jordan's lemma or an ML-estimate) before asserting the real integral equals \(2\pi i \sum \operatorname{Res}\).
Discussion

The residue theorem is the natural terminus of the sequence Cauchy–Goursat theorem \(\to\) Cauchy integral formula \(\to\) Taylor/Laurent expansions \(\to\) residue calculus: each earlier result is subsumed as a special case with zero or one singularity. Historically, Cauchy developed the core integral theorem in the 1820s, but it was Cauchy himself (and later Riemann and others systematising the Laurent-series viewpoint in the 1840s-50s) who isolated the residue as the invariant quantity governing the integral, giving the theory its modern computational form.

Conceptually the proof is a topology-analysis handshake: the "cut" construction (Steps 1-6) is pure topology — it says an integral over a contour depends only on the homotopy/homology class of the contour in the punctured domain, and that class is captured entirely by how many times it winds around each puncture. The "small circle" computation (Steps 7-10) is pure local analysis — a single explicit integral of \(e^{ip\theta}\) that acts as a delta-function detector, picking out exactly the \(m=-1\) Laurent coefficient and annihilating every other power. The residue theorem is where these two independent facts multiply together.

More structurally, the residue at \(a\) can be characterised without reference to any contour at all: it is the unique linear functional on germs of meromorphic functions at \(a\) that is translation- and scale-covariant and agrees with \(2\pi i\)-normalised contour integration on a small loop — equivalently, it is (up to the \(2\pi i\)) the pairing of \(f\,dz\) against the generator of \(H^1\) of a punctured disc in de Rham cohomology. This is the seed of the more general machinery of residues in several complex variables and in algebraic geometry (Grothendieck residues), where the "sum of residues is a global invariant" phenomenon reappears in far more abstract settings.

Common misconception: that the theorem requires \(f\) to have only poles (not essential singularities) inside \(\gamma\). It does not — the residue is defined identically as the \(c_{-1}\) Laurent coefficient regardless of whether the singularity is removable, a pole, or essential (e.g. \(e^{1/z}\) at \(0\) has residue \(1\)), and the proof above never used the order or type of the singularity, only that each is isolated.

Worked examples
1
Evaluate \(\displaystyle\oint_{|z|=2} \frac{e^{z}}{z(z-1)^2}\,dz\), contour positively oriented.
Identify all singularities of the integrand inside \(|z|=2\): \(z=0\) (simple pole) and \(z=1\) (pole of order \(2\)), both satisfy \(|z|\lt 2\). A
2
\[ \operatorname{Res}\left(\frac{e^z}{z(z-1)^2}, 0\right) = \lim_{z\to 0} z\cdot\frac{e^z}{z(z-1)^2} = \frac{e^0}{(0-1)^2} = 1. \]
Simple-pole residue formula \(\operatorname{Res}(f,a)=\lim_{z\to a}(z-a)f(z)\), valid since \(z=0\) is a simple zero of the denominator not shared by the numerator. A
3
\[ \operatorname{Res}\left(\frac{e^z}{z(z-1)^2}, 1\right) = \lim_{z\to 1} \frac{d}{dz}\left[(z-1)^2 \cdot \frac{e^z}{z(z-1)^2}\right] = \lim_{z\to 1} \frac{d}{dz}\left[\frac{e^z}{z}\right] = \lim_{z\to 1} \frac{e^z z - e^z}{z^2} = \frac{e - e}{1} = 0. \]
Order-2 pole residue formula \(\operatorname{Res}(f,a) = \lim_{z\to a}\frac{d}{dz}[(z-a)^2 f(z)]\) (the \((m-1)!=1! \) case), applying the quotient rule for the derivative. B
4
By the residue theorem, \[ \oint_{|z|=2} \frac{e^z}{z(z-1)^2}\,dz = 2\pi i\big(\operatorname{Res}(f,0)+\operatorname{Res}(f,1)\big) = 2\pi i (1+0) = 2\pi i. \]
Direct substitution of Steps 2-3 into the theorem, both singularities lying inside the contour with winding number \(1\). A
\[ \oint_{|z|=2} \frac{e^{z}}{z(z-1)^2}\,dz = 2\pi i \]

Reading. Only the pole at \(z=0\) contributes; the order-2 pole at \(z=1\) happens to have residue zero, so it is enclosed but invisible to the integral.

Scope. Any rational-times-entire integrand with finitely many poles inside a simple closed contour is handled the same way.

1
Evaluate the real integral \(\displaystyle I = \int_{-\infty}^{\infty} \frac{1}{x^2+1}\,dx\) using contour integration.
Extend to \(f(z) = \frac{1}{z^2+1}\) and integrate over \(\gamma_R = [-R,R] \cup C_R^+\), where \(C_R^+\) is the semicircular arc \(|z|=R\), \(\operatorname{Im} z \geq 0\), positively oriented (counterclockwise) as a closed contour for large \(R \gt 1\). B
2
Inside \(\gamma_R\) (for \(R\gt1\)) the only singularity of \(f\) is the simple pole \(z=i\) (since \(z^2+1=(z-i)(z+i)\), and \(-i\) lies in the lower half-plane, excluded). \[ \operatorname{Res}(f,i) = \lim_{z\to i}(z-i)\frac{1}{(z-i)(z+i)} = \frac{1}{2i}. \]
Simple-pole residue formula, factoring the denominator explicitly. A
3
By the residue theorem, \[ \oint_{\gamma_R} f(z)\,dz = 2\pi i \cdot \frac{1}{2i} = \pi, \quad\text{i.e.}\quad \int_{-R}^{R} \frac{dx}{x^2+1} + \int_{C_R^+} \frac{dz}{z^2+1} = \pi \text{ for every } R\gt1. \]
Applying the theorem to \(\gamma_R\), splitting the closed contour into its straight and curved pieces. A
4
\[ \left|\int_{C_R^+} \frac{dz}{z^2+1}\right| \leq \pi R \cdot \sup_{|z|=R}\frac{1}{|z^2+1|} \leq \pi R \cdot \frac{1}{R^2-1} \xrightarrow[R\to\infty]{} 0. \]
The ML-estimate: length of \(C_R^+\) is \(\pi R\), and \(|z^2+1|\geq R^2-1\) by the reverse triangle inequality on \(|z|=R\); the bound tends to \(0\) since it is \(O(1/R)\). C
5
Letting \(R\to\infty\) in Step 3 and using Step 4: \[ \int_{-\infty}^{\infty} \frac{dx}{x^2+1} = \pi. \]
Passing to the limit in an identity valid for all \(R\gt1\), using that the arc contribution vanishes and the straight-line integral converges to the improper integral by definition. B
\[ \int_{-\infty}^{\infty} \frac{dx}{x^2+1} = \pi \]

Reading. A real integral with no elementary antiderivative shortcut(other than the known \(\arctan\)) is recovered purely from the residue at the single pole \(z=i\) trapped in the upper half-plane.

Scope. The same semicircular-contour technique works for any \(\int_{-\infty}^\infty P(x)/Q(x)\,dx\) with \(\deg Q \geq \deg P + 2\) and \(Q\) having no real zeros.

Problems
  1. Compute \(\displaystyle\oint_{|z|=1} \frac{1}{z^3}\,dz\) directly from the definition of the Laurent coefficient (do not merely quote the answer).
    Solution

    Here \(f(z) = z^{-3}\) is already its own Laurent series about \(0\), with \(c_{-1}=0\) (the only nonzero coefficient is \(c_{-3}=1\)). By the residue theorem, \(\oint_{|z|=1} z^{-3}\,dz = 2\pi i \cdot \operatorname{Res}(f,0) = 2\pi i \cdot 0 = 0\). Directly: parametrising \(z=e^{i\theta}\), \(\oint z^{-3}dz = \int_0^{2\pi} e^{-3i\theta}\cdot ie^{i\theta}\,d\theta = i\int_0^{2\pi} e^{-2i\theta}\,d\theta = 0\) by Step 9 of the proof with \(m=-3\neq -1\), confirming the result.

  2. Evaluate \(\displaystyle\oint_{|z|=3} \frac{z^2+1}{(z-1)(z-2i)}\,dz\), positively oriented.
    Solution

    Both \(z=1\) and \(z=2i\) satisfy \(|z|\lt 3\), so both are enclosed simple poles. \(\operatorname{Res}(f,1) = \dfrac{1^2+1}{1-2i} = \dfrac{2}{1-2i} = \dfrac{2(1+2i)}{5} = \dfrac{2+4i}{5}\). \(\operatorname{Res}(f,2i) = \dfrac{(2i)^2+1}{2i-1} = \dfrac{-4+1}{2i-1} = \dfrac{-3}{2i-1} = \dfrac{-3(-1-2i)}{5} = \dfrac{3+6i}{5}\). Sum: \(\dfrac{2+4i+3+6i}{5} = \dfrac{5+10i}{5} = 1+2i\). Hence the integral is \(2\pi i(1+2i) = 2\pi i - 4\pi = -4\pi + 2\pi i\).

  3. Explain, using the theorem, why \(\displaystyle\oint_\gamma \frac{1}{z^2+1}\,dz\) takes only three possible values as \(\gamma\) ranges over all positively oriented simple closed contours in \(\mathbb{C}\setminus\{i,-i\}\) avoiding \(i,-i\), and state them.
    Solution

    The only singularities of \(f(z)=1/(z^2+1)\) are the simple poles \(z=i\) (residue \(1/2i\)) and \(z=-i\) (residue \(-1/2i\), by the same computation with sign flipped). A simple closed \(\gamma\) either encloses neither pole, only \(i\), only \(-i\), or both. By the residue theorem the integral equals \(2\pi i\) times the sum of enclosed residues: enclosing neither gives \(0\); enclosing only \(i\) gives \(2\pi i\cdot\frac1{2i}=\pi\); enclosing only \(-i\) gives \(2\pi i\cdot\left(-\frac1{2i}\right)=-\pi\); enclosing both gives \(2\pi i\left(\frac1{2i}-\frac1{2i}\right)=0\). So the integral takes only the values \(\{-\pi,0,\pi\}\), regardless of the shape or size of \(\gamma\) beyond which poles it traps.

  4. A student computes \(\operatorname{Res}\!\left(\dfrac{1}{z^2(z-1)},0\right)\) as \(\lim_{z\to0} z\cdot\dfrac{1}{z^2(z-1)}\) and gets an undefined (infinite) limit, then concludes the residue theorem cannot be applied. Diagnose the error and compute the correct residue.
    Solution

    The error is applying the simple-pole shortcut to a pole of order \(2\): \(z=0\) is a double zero of the denominator \(z^2(z-1)\), not simple, so \(\lim_{z\to0}z\cdot f(z)\) is not the residue formula for this case — that limit diverges precisely because one extra factor of \(z\) is needed. The correct formula for a pole of order \(m=2\) is \(\operatorname{Res}(f,0) = \lim_{z\to0}\frac{d}{dz}\big[z^2 f(z)\big] = \lim_{z\to0}\frac{d}{dz}\left[\frac{1}{z-1}\right] = \lim_{z\to0} \frac{-1}{(z-1)^2} = -1\). So the theorem applies perfectly well; only the shortcut formula was misused. (Consequently \(\oint_{|z|=1/2}f\,dz\) would be \(2\pi i\cdot(-1) = -2\pi i\), enclosing only \(z=0\).)

  5. Use the residue theorem to evaluate \(\displaystyle\int_0^{2\pi} \frac{d\theta}{2+\cos\theta}\) by converting it to a contour integral over \(|z|=1\).
    Solution

    Substitute \(z=e^{i\theta}\), so \(\cos\theta = \frac{1}{2}(z+z^{-1})\) and \(d\theta = dz/(iz)\), giving \[\int_0^{2\pi}\frac{d\theta}{2+\cos\theta} = \oint_{|z|=1} \frac{1}{2+\frac12(z+z^{-1})}\cdot\frac{dz}{iz} = \oint_{|z|=1} \frac{2\,dz}{i(z^2+4z+1)}.\] The denominator \(z^2+4z+1=0\) has roots \(z=-2\pm\sqrt3\). Since \(-2+\sqrt3\approx-0.27\) lies inside \(|z|=1\) and \(-2-\sqrt3\approx-3.73\) lies outside, only \(z_0=-2+\sqrt3\) is enclosed. This is a simple pole with \(\operatorname{Res}\left(\frac{2}{i(z^2+4z+1)},z_0\right) = \frac{2}{i(2z_0+4)} = \frac{2}{i\cdot 2\sqrt3} = \frac{1}{i\sqrt3}\) (using \(2z_0+4 = 2(-2+\sqrt3)+4 = 2\sqrt3\)). By the residue theorem the contour integral is \(2\pi i \cdot \frac{1}{i\sqrt3} = \frac{2\pi}{\sqrt3}\). Hence \(\displaystyle\int_0^{2\pi}\frac{d\theta}{2+\cos\theta} = \frac{2\pi}{\sqrt3} = \frac{2\pi\sqrt3}{3}\).