Skip to main content

Residue Theorem and its Application

· 8 min read
Xinyu Ma
Research Scientist @ Meta

This post makes notes on residue theorem and its application, since most non-mathematicians only need to remember this after learning complex analysis. Some definitions may be not defined very rigorously from a complex analysis view.

Isolated Singularity

There are 3 kinds of isolated singularities for a single-valued function f(z)f(z),

  • removable singularities: The limit limzcf(z)\lim_{z\to c}f(z) exists.
    • The function becomes analytic at cc if we define f(c)f(c) to be this limit.
    • The Laurent expansion about cc does not contain negative terms (terms with negative degree).
  • poles: The limit limzcf(z)=\lim_{z\to c}f(z) = \infty.
    • The Laurent expansion about cc contains finitely many negative terms (i.e. finite principal part)
    • The order of pole cc is the integer nn s.t. (zc)nf(z)(z-c)^nf(z) is analytic and non-zero at zz.
  • essential singularities: limzcf(z)\lim_{z\to c}f(z) diverges.
    • The Laurent expansion about cc contains infinitely many negative terms.

Liouville's theorem implies that any non-constant analytic function must have at least one pole or essential singularity.

Residue Theorem

The residue is the coefficient of 1-1 term of the Laurent expansion (cc\neq\infty):

resf(c)=a1if  f(z)=n=+an(zc)n\operatorname{res} f(c) = a_{-1} \quad\text{if}\ \ f(z) = \sum_{n=-\infty}^{+\infty}{a_n(z-c)^n}

Let UU be a simply connected open set, ff be analytic in U{c1,,cm}U\setminus\{c_1,\ldots,c_m\} and continuous in Uˉ\bar{U}, CC be the boundary of UU which is a closed rectifiable curve. Then,

Cf(z)dz=2πik=1mresf(ck)\oint_{C} f(z)\mathrm{d}z = 2\pi\mathrm{i}\sum_{k=1}^{m}{\operatorname{res} f(c_k)}

If cc is a pole of order mm, then the residue at cc is

resf(c)=limzc1(m1)!dm1dzm1(zc)mf(z)\operatorname{res} f(c) = \lim_{z\to c}\frac{1}{(m-1)!}\frac{\mathrm{d}^{m-1}}{\mathrm{d}z^{m-1}}(z-c)^{m}f(z)

Especially, when m=1m=1:

resf(c)=limzc(zc)f(z)\operatorname{res} f(c) = \lim_{z\to c}(z-c)f(z)

Proof (sketch): Break CC into multiple loops that enclose a pole each. By the coefficient of Laurent expansion:

an=12πiCf(z)(zc)n+1dza_n = \frac{1}{2\pi\mathrm{i}}\oint_{C}{\frac{f(z)}{(z-c)^{n+1}}\mathrm{d}z}

Another way to look at this is that 1zn\frac{1}{z^n} is single-valued and goes to 0 along a loop. But lnz\ln z increases by 2πi2\pi\mathrm{i}.

Sum of Infinite Series

Suppose the target series to calculate is n=f(n)\sum_{n=-\infty}^{\infty}{f(n)}, with f(n)=O(1n)f(n) = O(\frac{1}{n}). Let G(z)=πcotπzG(z) = \pi\cot{\pi z}. Note that GG is analytic in CZ\mathbb{C}\setminus\mathbb{Z} and resG(n)=1\operatorname{res}G(n) = 1 for all nZn\in \mathbb{Z}. Take curve CNC_N be the square [N12,N+12]×[(N12)i,(N+12)i][-N-\frac{1}{2}, N+\frac{1}{2}]\times[(-N-\frac{1}{2})\mathrm{i}, (N+\frac{1}{2})\mathrm{i}].

Theorem: If f(z)f(z) has finitely many poles in C\mathbb{C} and analytic in the rest of the complex plane, then

limNCNG(z)f(z)dz=0\lim_{N\to\infty}\oint_{C_N} G(z)f(z)\mathrm{d}z = 0

Proof: πcotπz2π|\pi\cot{\pi z}| \leq 2\pi on the curve CNC_N.

Theorem: If f(z)f(z) satisfies all conditions above and all poles {c1,,cm}\{c_1, \ldots, c_m\} are non-integer, then

n=+f(n)=i=1mres{πcotπzf(z),z=ci}\sum_{n=-\infty}^{+\infty}f(n) = - \sum_{i=1}^{m}{\operatorname{res} \{\pi\cot{\pi z}f(z), z=c_i\} }

Proof: Take NN\to\infty. For any nZn\in\mathbb{Z},

res{πcotπzf(z),z=n}=limzn(zn)πcotπzf(z)=limznπcosπz(sinπz)f(z)=f(n)\begin{darray}{rcl} \operatorname{res} \{\pi\cot{\pi z}f(z), z=n\} &=& \lim_{z\to n}(z-n)\pi\cot{\pi z}f(z) \\ &=& \lim_{z\to n}\frac{\pi\cos {\pi z}}{(\sin {\pi z})'}f(z) \\ &=& f(n) \end{darray}

Apply the theorem above.

Example:

n=11n2=π26\sum_{n=1}^{\infty} {\frac{1}{n^2}} = \frac{\pi^2}{6}

Proof: We cannot use the theorem directly, but we have

res{πcotπzz2,z=0}=[z1](πcotπz)\operatorname{res} \{\frac{\pi\cot{\pi z}}{z^2}, z=0\} = [z^1 ] (\pi\cot{\pi z})

Suppose the Laurent expansion of cotz\cot z at z=0z=0 is

cotz=n=1+b2n+1z2n+1\cot z = \sum_{n=-1}^{+\infty} {b_{2n+1} z^{2n+1}}

Then,

p=0()p(2p)!z2p=cosz=sinzn=1+b2n+1z2n+1=q=0()q(2q+1)!z2qn=0+b2n1z2n1\sum_{p=0}^{\infty}{\frac{(-)^p}{(2p)!}z^{2p}} = \cos z = \sin z\sum_{n=-1}^{+\infty} {b_{2n+1} z^{2n+1}} = \sum_{q=0}^{\infty}{\frac{(-)^q}{(2q+1)!}z^{2q}} \sum_{n=0}^{+\infty} {b_{2n-1} z^{2n-1}}

Thus,

n=0p()n(2p2n+1)!b2n1=1(2p)!\sum_{n=0}^{p}{\frac{(-)^n}{(2p-2n+1)!} b_{2n-1}} = \frac{1}{(2p)!}

Solve it and get

cotz=1z13z145z32945z5\cot z = \frac{1}{z} - \frac{1}{3}z - \frac{1}{45}z^3 - \frac{2}{945}z^5 - \cdots

Substitute 13π2- \frac{1}{3} \pi^2 into the first equation for [z1](πcotπz)[z^1 ] (\pi\cot{\pi z}).

Asymptotics of Generating Functions

Principles of Coefficient Asymptotics: For [zn]F(z)=Anθ(n)[ z^n]F(z) = A^n\theta(n)

  • The location of a function’s singularities dictates the exponential growth (AnA^n) of its coefficients.
  • The nature of a function’s singularities determines the associate subexponential factor (θ(n)\theta(n)).

Exponential Growth

Def: {an}\{a_n\} is of exponential order KnK^n if for any ϵ>0\epsilon>0, an|a_n| exceeds (Kϵ)n(K-\epsilon)^n infinitely often and is dominated by (K+ϵ)n(K+\epsilon)^n cofinitely.

anKnifflimsupan1/n=Ka_n \bowtie K^n \qquad \text{iff} \qquad \lim \sup |a_n|^{1/n} = K

This can be rephrased as an=Knθ(n)a_n = K^n\theta(n) where limsupθ(n)1/n=1\lim\sup \|\theta(n)\|^{1/n} = 1.

Exponential Growth Formula: If the radius of convergence of the series fn=[zn]f(z)f_n = [z^n ]f(z) at 0 is Rconv(f;0)=R\mathrm{R_{conv}}(f; 0) = R, then

fn(1R)nf_n \bowtie \left( \frac{1}{R} \right)^n

Proof:

  • By the definition of radius of convergence, fn(Rϵ)n0 \| f_n \|(R-\epsilon)^n\to 0.
  • If fn(R+ϵ)n \| f_n \|(R+\epsilon)^n were bounded, then fn(R+12ϵ)n \| f_n \|(R+\frac{1}{2}\epsilon)^n would converge. So fn(R+ϵ)n \| f_n \|(R+\epsilon)^n is unbounded.

Note: for a complex series f(z)f(z), RR is the modulus of a singularity nearest to the origin.

Example: The EGF of the number of surjections (surjections from [n][ n] to [m][ m] for some mm), and the EGF of the number of chains in Boolean lattice BnB_n, are

R(z)=12ezR(z) = \frac{1}{2 - e^z}

By the proposition, we have rnn!1(ln2)n\frac{r_n}{n!} \bowtie \frac{1}{(\ln 2)^{n}}.

Saddle-point bound: Let M(f;r):=supz=rf(z)M(f; r) := \sup_{|z| = r}|f(z)| (the maximum modulus on a ring) for r<Rr< R. Then, for any r(0,R)r\in (0,R), the family of saddle point bounds

[zn]f(z)M(f;r)rnimplying[zn]f(z)infr(0,R)M(f;r)rn[z^n ]f(z) \leq \frac{M(f; r)}{r^n} \qquad \text{implying} \qquad [z^n ]f(z) \leq \inf_{r\in(0,R)}\frac{M(f; r)}{r^n}

If in addition f(z)f(z) has non-negative coefficients, then

[zn]f(z)f(r)rnimplying[zn]f(z)infr(0,R)f(r)rn[z^n ]f(z) \leq \frac{f(r)}{r^n} \qquad \text{implying} \qquad [z^n ]f(z) \leq \inf_{r\in(0,R)}\frac{f(r)}{r^n}

The best rr can be obtained by the zero derivative:

rf(r)f(r)=nr\frac{f'(r)}{f(r)} = n

Proof:

By the coeffcients of Laurent expansion:

[zn]f(z)=12πiz=rf(z)dzzn+1[z^n ]f(z) = \frac{1}{2\pi \mathrm{i}}\oint_{|z|=r} f(z)\frac{\mathrm{d}z}{z^{n+1}}

Example: Apply this to [zn]ez[ z^n]e^z we have

1n!ennn\frac{1}{n!} \leq \frac{e^n}{n^n}

Subexponential Factor

One can show that if singularities of f(z)f(z) are polar, then θ(n)\theta(n) is a polynomial.

Def: If f(z)=N(z)D(z)f(z) = \frac{N(z)}{D(z)} with N,DN, D being polynomials, f(z)f(z) is a rational function.

Coefficients of rational functions satisfy linear recurrence relations with constant coefficients:

[zn]f(z)D(z)=j=0mdjfnj=0for all n>deg(N)[z^n ]f(z)D(z) = \sum_{j=0}^{m}d_j f_{n-j} = 0 \qquad \text{for all}\ n>\mathrm{deg}(N)

Rational Function Case: If f(z)=N(z)D(z)f(z) = \frac{N(z)}{D(z)} is a rational function that is analytic at 0 and has poles at a1,,ama_1, \ldots, a_m, then its coefficients are a sum of exponential–polynomials. That is, for nn larger than n0:=deg(N)deg(D)n_0:= \mathrm{deg}(N) - \mathrm{deg}(D):

fn:=[zn]f(z)=j=1mPj(n)ajnf_n := [z^n ]f(z) = \sum_{j=1}^{m}P_j(n)a_j^{-n}

Furthermore, the degree of PjP_j is equal to the order of the pole of ff at aja_j minus one.

Proof: Apply the partial fraction expansion:

f(z)=Q(z)+j=1mcj(zaj)rjf(z) = Q(z) + \sum_{j=1}^{m}\frac{c_j}{(z-a_j)^{r_j}}

where QQ is of degree n0n_0. Since

[zn]1(za)r=()rar[zn]1(1za)r=()rar(n+r1r1)an[z^n ]\frac{1}{(z-a)^r} = \frac{(-)^r}{a^r}[z^n ]\frac{1}{(1-\frac{z}{a})^r} = \frac{(-)^r}{a^r} {n+r-1 \choose r-1} a^{-n}

The binomial coefficient is a polynomial of degree r1r − 1 in nn. Collect all terms.

Cor: If f(z)=N(z)(za)rf(z) = \frac{N(z)}{(z-a)^r} that has a single dominant pole aa with order rr, then

fn=()rC(r1)!arannr1(1+O(1n))withC=limza(za)rf(z)f_n = (-)^r\frac{C}{(r-1)!}a^{-r}a^{-n}n^{r-1}\left( 1+O\left(\frac{1}{n}\right) \right) \quad \text{with} \quad C = \lim_{z\to a}(z-a)^r f(z)

This is a direct result of the theorem. (The book has a typo) For r=1r=1, one can verifies:

cxa=ca1xa=caanxn\frac{c}{x-a} = - \frac{\frac{c}{a}}{1 - \frac{x}{a}} = -\frac{c}{a}a^{-n}x^{n}

Example: Fibonacci numbers have OGF F(z)=z1zz2F(z) = \frac{z}{1 - z - z^2}. The poles are a1=φ=5+12a_1 = - \varphi = -\frac{\sqrt{5}+1}{2} and a2=ψ=512a_2 = \psi = \frac{\sqrt{5} - 1}{2}. resF(ψ)=5510\operatorname{res} F(\psi) = \frac{\sqrt{5} - 5}{10}, resF(φ)=5510\operatorname{res} F(-\varphi) = \frac{-\sqrt{5} - 5}{10}. Thus,

fn15ψn(1+O(1/n))=15φn(1+O(1/n))f_n \sim \frac{1}{\sqrt{5}}\psi^{-n}(1 + O(1/n)) = \frac{1}{\sqrt{5}}\varphi^{n}(1 + O(1/n))

Actually,

fn=15(φn(φ)n)f_n = \frac{1}{\sqrt{5}} (\varphi^n - (-\varphi)^{-n})

Analytic Function Case: If f(z)f(z) is analytic at zR\|z\| \leq R except for poles a1,,ama_1, \ldots, a_m. Then, there exist mm polynomials PjP_j s.t.

fn:=[zn]f(z)=j=1mPj(n)ajn+O(Rn)f_n := [z^n ]f(z) = \sum_{j=1}^{m}P_j(n)a_j^{-n} + O(R^{-n})

Furthermore, the degree of PjP_j is equal to the order of the pole of ff at aja_j minus one.

Proof: (The 1st one by the book) Take the Laurant expansion of f(z)f(z) at aa:

f(z)=krca,k(za)k=Sa(z)+Ha(z)f(z) = \sum_{k\geq r} c_{a,k}(z-a)^k = S_a(z) + H_a(z)

where SaS_a is the principal part and HaH_a is the regular part. Note that SaS_a is polynomial. Let S=jSajS = \sum_{j}S_{a_j}. Observe that and fSf-S is analytic for zR\|z\| \leq R. Then.

fn:=[zn]f(z)=[zn]S(z)+[zn](fS)(z)f_n := [z^n ]f(z) = [z^n ]S(z) + [z^n ] (f-S)(z)

The coefficient of SS is obtained by the polynomial theorem. And, by saddle-point bound at z=Rz=R,

[zn](fS)(z)=12πz=R(f(z)S(z))dzzn+112πO(1)Rn+12πR|[z^n ] (f-S)(z)| = \frac{1}{2\pi}\left| \oint_{|z|=R} (f(z) - S(z))\frac{\mathrm{d}z}{z^{n+1}} \right| \leq \frac{1}{2\pi} \frac{O(1)}{R^{n+1}} 2\pi R

example: The EGF of the number of surjections R(z)=12ezR(z) = \frac{1}{2 - e^z} has a dominant pole a=ln2a = \ln 2 of order 11. resR(a)=12\operatorname{res} R(a) = -\frac{1}{2}. Thus,

rnn!12ln2(ln2)n(1+O(1/n))\frac{r_n}{n!} \sim \frac{1}{2\ln 2}(\ln 2)^{-n} (1 + O(1/n))

References

  • Wu Chongshi, Methods of Mathematical Physics, Peking University Press, 2003.
  • Ph. Flajolet and R. Sedgewick, Analytic Combinatorics, Cambridge University Press, 2009.