This article explains how to estimate the coefficients of meromorphic generating functions.
Theorem due to Sedgewick[ 1] .
If
h
(
z
)
=
f
(
z
)
g
(
z
)
{\displaystyle h(z)={\frac {f(z)}{g(z)}}}
is a meromorphic function
and
a
{\displaystyle a}
is its pole closest to the origin with order
m
{\displaystyle m}
then you can estimate its
n
{\displaystyle n}
th coefficient with the formula[ 2] :
(
−
1
)
m
m
f
(
a
)
a
m
g
(
m
)
(
a
)
(
1
a
)
n
n
m
−
1
{\displaystyle {\frac {(-1)^{m}mf(a)}{a^{m}g^{(m)}(a)}}\left({\frac {1}{a}}\right)^{n}n^{m-1}}
Proof due to Sedgewick[ 3] and Wilf[ 4] .
h
(
z
)
{\displaystyle h(z)}
, being meromorphic , can be Laurent expanded around
a
{\displaystyle a}
[ 5] :
h
(
z
)
=
h
−
m
(
z
−
a
)
m
+
⋯
+
h
−
1
z
−
a
+
h
0
+
h
1
(
z
−
a
)
+
⋯
{\displaystyle h(z)={\frac {h_{-m}}{(z-a)^{m}}}+\cdots +{\frac {h_{-1}}{z-a}}+h_{0}+h_{1}(z-a)+\cdots }
h
−
m
(
z
−
a
)
m
+
⋯
+
h
−
1
z
−
a
{\displaystyle {\frac {h_{-m}}{(z-a)^{m}}}+\cdots +{\frac {h_{-1}}{z-a}}}
h
−
m
(
z
−
a
)
m
{\displaystyle {\frac {h_{-m}}{(z-a)^{m}}}}
contributes the biggest coefficient . Its
n
{\displaystyle n}
th coefficient can be computed as:
(
−
1
)
m
h
−
m
a
m
(
n
+
m
−
1
n
)
(
1
a
)
n
{\displaystyle {\frac {(-1)^{m}h_{-m}}{a^{m}}}{\binom {n+m-1}{n}}\left({\frac {1}{a}}\right)^{n}}
h
−
m
{\displaystyle h_{-m}}
can be computed as:
lim
z
→
a
(
z
−
a
)
m
h
(
z
)
=
m
!
f
(
a
)
g
(
m
)
(
a
)
{\displaystyle \lim _{z\to a}(z-a)^{m}h(z)={\frac {m!f(a)}{g^{(m)}(a)}}}
(
n
+
m
−
1
n
)
∼
n
m
−
1
(
m
−
1
)
!
{\displaystyle {\binom {n+m-1}{n}}\sim {\frac {n^{m-1}}{(m-1)!}}}
as
n
→
∞
{\displaystyle n\to \infty }
(Proof )
Therefore, putting it all together:
[
z
n
]
h
(
z
)
∼
(
−
1
)
m
h
−
m
a
m
(
n
+
m
−
1
n
)
(
1
a
)
n
∼
(
−
1
)
m
m
f
(
a
)
a
m
g
(
m
)
(
a
)
(
1
a
)
n
n
m
−
1
{\displaystyle [z^{n}]h(z)\sim {\frac {(-1)^{m}h_{-m}}{a^{m}}}{\binom {n+m-1}{n}}\left({\frac {1}{a}}\right)^{n}\sim {\frac {(-1)^{m}mf(a)}{a^{m}g^{(m)}(a)}}\left({\frac {1}{a}}\right)^{n}n^{m-1}}
as
n
→
∞
{\displaystyle n\to \infty }
.
We will make use of the asymptotic equality
f
(
z
)
∼
g
(
z
)
{\displaystyle f(z)\sim g(z)}
as
z
→
ζ
{\displaystyle z\to \zeta }
which means
lim
z
→
ζ
f
(
z
)
g
(
z
)
=
1
{\displaystyle \lim _{z\to \zeta }{\frac {f(z)}{g(z)}}=1}
This allows us to use
g
(
z
)
{\displaystyle g(z)}
as an estimate of
f
(
z
)
{\displaystyle f(z)}
as
z
{\displaystyle z}
gets closer to
ζ
{\displaystyle \zeta }
.
For example, we often present results of the form
a
n
∼
g
(
n
)
{\displaystyle a_{n}\sim g(n)}
as
n
→
∞
{\displaystyle n\to \infty }
which means, for large
n
{\displaystyle n}
,
g
(
n
)
{\displaystyle g(n)}
becomes a good estimate of
a
n
{\displaystyle a_{n}}
.
The above theorem only applies to a class of generating functions called meromorphic functions. This includes all rational functions (the ratio of two polynomials) such as
1
(
1
−
z
)
2
{\displaystyle {\frac {1}{(1-z)^{2}}}}
and
z
1
−
z
−
z
2
{\displaystyle {\frac {z}{1-z-z^{2}}}}
.
A meromorphic function is the ratio of two analytic functions. An analytic function is a function whose complex derivative exists[ 7] .
One property of meromorphic functions is that they can be represented as Laurent series expansions, a fact we will use in the proof .
It is possible to estimate the coefficients of functions which are not meromorphic (e.g.
l
n
(
z
)
{\displaystyle ln(z)}
or
e
z
{\displaystyle e^{z}}
). These will be covered in future chapters.
When we want a series expansion of a function
f
(
z
)
{\displaystyle f(z)}
around a singularity
c
{\displaystyle c}
, we cannot use the Taylor series expansion. Instead, we use the Laurent series expansion[ 8] :
⋯
+
a
−
2
(
z
−
c
)
2
+
a
−
1
z
−
c
+
a
0
+
a
1
(
z
−
c
)
+
a
2
(
z
−
c
)
2
+
⋯
{\displaystyle \cdots +{\frac {a_{-2}}{(z-c)^{2}}}+{\frac {a_{-1}}{z-c}}+a_{0}+a_{1}(z-c)+a_{2}(z-c)^{2}+\cdots }
Where
a
n
=
1
2
π
i
∫
γ
f
(
z
)
(
z
−
c
)
n
+
1
d
z
{\displaystyle a_{n}={\frac {1}{2\pi i}}\int _{\gamma }{\frac {f(z)}{(z-c)^{n+1}}}dz}
and
γ
{\displaystyle \gamma }
is a contour in the annular region in which
f
(
z
)
{\displaystyle f(z)}
is analytic, illustrated below.
A pole is a type of singularity.
A singularity of
h
(
z
)
{\displaystyle h(z)}
is a value of
z
{\displaystyle z}
for which
h
(
z
)
=
∞
{\displaystyle h(z)=\infty }
[ 9]
If
lim
z
→
a
(
z
−
a
)
m
h
(
z
)
=
L
≠
0
{\displaystyle \lim _{z\to a}(z-a)^{m}h(z)=L\neq 0}
and
L
{\displaystyle L}
is defined then
a
{\displaystyle a}
is called a pole of
h
(
z
)
{\displaystyle h(z)}
of order
m
{\displaystyle m}
[ 10] .
We will make use of this fact when we calculate
h
−
m
{\displaystyle h_{-m}}
.
For example,
1
(
1
−
2
z
)
2
{\displaystyle {\frac {1}{(1-2z)^{2}}}}
has the singularity
1
2
{\displaystyle {\frac {1}{2}}}
because
1
(
1
−
2
1
2
)
2
=
1
(
1
−
1
)
2
=
1
0
2
=
1
0
=
∞
{\displaystyle {\frac {1}{(1-2{\frac {1}{2}})^{2}}}={\frac {1}{(1-1)^{2}}}={\frac {1}{0^{2}}}={\frac {1}{0}}=\infty }
and
1
2
{\displaystyle {\frac {1}{2}}}
is a pole of order 2 because
lim
z
→
1
2
(
z
−
1
2
)
2
1
(
1
−
2
z
)
2
=
lim
z
→
1
2
(
z
−
1
2
)
2
1
(
−
2
)
2
(
z
−
1
2
)
2
=
lim
z
→
1
2
1
(
−
2
)
2
=
1
4
{\displaystyle \lim _{z\to {\frac {1}{2}}}(z-{\frac {1}{2}})^{2}{\frac {1}{(1-2z)^{2}}}=\lim _{z\to {\frac {1}{2}}}(z-{\frac {1}{2}})^{2}{\frac {1}{(-2)^{2}(z-{\frac {1}{2}})^{2}}}=\lim _{z\to {\frac {1}{2}}}{\frac {1}{(-2)^{2}}}={\frac {1}{4}}}
.
We are treating
h
(
z
)
{\displaystyle h(z)}
as a complex function where the input
z
{\displaystyle z}
is a complex number.
A complex number has two parts, a real part (Re ) and an imaginary part (Im ). Therefore, if we want to represent a complex number we do so in a two-dimensional graph.
If we want to compare the "size" of two complex numbers, we compare how far they are away from the origin in the two-dimensional plane (i.e. the length of the blue arrow in the above image). This is called the modulus , denoted
|
z
|
{\displaystyle |z|}
.
Proof due to Wilf[ 11] .
The principle part of a Laurent series expansion are the terms with a negative exponent, i.e.
h
−
m
(
z
−
a
)
m
+
⋯
+
h
−
1
z
−
a
{\displaystyle {\frac {h_{-m}}{(z-a)^{m}}}+\cdots +{\frac {h_{-1}}{z-a}}}
We will denote the principle part of
h
(
z
)
{\displaystyle h(z)}
at
a
{\displaystyle a}
by
P
P
(
h
,
a
)
{\displaystyle PP(h,a)}
.
If
a
{\displaystyle a}
is the pole closest to the origin then the radius of convergence
R
=
|
a
|
{\displaystyle R=|a|}
and as a consequence of the Cauchy-Hadamard theorem [ 12] :
(
1
|
a
|
−
ϵ
)
n
≤
[
z
n
]
h
(
z
)
≤
(
1
|
a
|
+
ϵ
)
n
{\displaystyle \left({\frac {1}{|a|}}-\epsilon \right)^{n}\leq [z^{n}]h(z)\leq \left({\frac {1}{|a|}}+\epsilon \right)^{n}}
(for some
ϵ
>
0
{\displaystyle \epsilon >0}
and for sufficiently large
n
{\displaystyle n}
).
Where
[
z
n
]
h
(
z
)
{\displaystyle [z^{n}]h(z)}
is the
n
{\displaystyle n}
th coefficient of
h
(
z
)
{\displaystyle h(z)}
.
h
(
z
)
−
P
P
(
z
)
{\displaystyle h(z)-PP(z)}
no longer has a pole at
a
{\displaystyle a}
because
(
h
−
m
(
z
−
a
)
m
+
⋯
+
h
−
1
z
−
a
+
h
0
+
h
1
(
z
−
a
)
+
⋯
)
−
(
h
−
m
(
z
−
a
)
m
+
⋯
+
h
−
1
z
−
a
)
=
h
0
+
h
1
(
z
−
a
)
+
⋯
{\displaystyle \left({\frac {h_{-m}}{(z-a)^{m}}}+\cdots +{\frac {h_{-}1}{z-a}}+h_{0}+h_{1}(z-a)+\cdots \right)-\left({\frac {h_{-m}}{(z-a)^{m}}}+\cdots +{\frac {h_{-1}}{z-a}}\right)=h_{0}+h_{1}(z-a)+\cdots }
.
If the second closest pole to the origin of
h
(
z
)
{\displaystyle h(z)}
is
a
′
{\displaystyle a'}
then
a
′
{\displaystyle a'}
is the largest pole of
h
(
z
)
−
P
P
(
z
)
{\displaystyle h(z)-PP(z)}
and, by the above theorem, the coefficients of
h
(
z
)
−
P
P
(
h
,
a
)
≤
(
1
|
a
′
|
+
ϵ
)
n
{\displaystyle h(z)-PP(h,a)\leq \left({\frac {1}{|a'|}}+\epsilon \right)^{n}}
(for sufficiently large
n
{\displaystyle n}
).
Therefore, the coefficients of
P
P
(
h
,
a
)
{\displaystyle PP(h,a)}
are at most different from the coefficient of
h
(
z
)
{\displaystyle h(z)}
by
(
1
|
a
′
|
+
ϵ
)
n
{\displaystyle \left({\frac {1}{|a'|}}+\epsilon \right)^{n}}
(for sufficiently large
n
{\displaystyle n}
).
Note that if
a
{\displaystyle a}
is the only pole, the difference is at most
ϵ
n
{\displaystyle \epsilon ^{n}}
(for sufficiently large
n
{\displaystyle n}
).
If
a
′
<
a
{\displaystyle a'<a}
, then we may stop at
P
P
(
h
,
a
)
{\displaystyle PP(h,a)}
as a good enough approximation.
However, if
a
′
=
a
{\displaystyle a'=a}
then the coefficients of
P
P
(
h
,
a
)
{\displaystyle PP(h,a)}
are different from
h
(
z
)
{\displaystyle h(z)}
by as much as
(
1
|
a
|
+
ϵ
)
n
{\displaystyle \left({\frac {1}{|a|}}+\epsilon \right)^{n}}
. This difference is as big as the coefficients of
P
P
(
h
,
a
)
{\displaystyle PP(h,a)}
. This is not a very good approximation. So, if there are other poles at the same distance to the origin it is a good idea to use all of them.
Compare:
[
z
n
]
h
−
m
(
z
−
a
)
m
=
h
−
m
a
m
(
n
+
m
−
1
n
)
(
1
a
)
n
∼
h
−
m
a
m
(
1
a
)
n
n
m
−
1
{\displaystyle [z^{n}]{\frac {h_{-m}}{(z-a)^{m}}}={\frac {h_{-m}}{a^{m}}}{\binom {n+m-1}{n}}\left({\frac {1}{a}}\right)^{n}\sim {\frac {h_{-m}}{a^{m}}}\left({\frac {1}{a}}\right)^{n}n^{m-1}}
[ 13]
with:
[
z
n
]
h
−
(
m
−
1
)
(
z
−
a
)
m
−
1
=
h
−
(
m
−
1
)
a
m
−
1
(
n
+
m
−
2
n
)
(
1
a
)
n
∼
h
−
(
m
−
1
)
a
m
−
1
(
1
a
)
n
n
m
−
2
{\displaystyle [z^{n}]{\frac {h_{-(m-1)}}{(z-a)^{m-1}}}={\frac {h_{-(m-1)}}{a^{m-1}}}{\binom {n+m-2}{n}}\left({\frac {1}{a}}\right)^{n}\sim {\frac {h_{-(m-1)}}{a^{m-1}}}\left({\frac {1}{a}}\right)^{n}n^{m-2}}
The
n
{\displaystyle n}
th coefficient of the former is only different to the latter by
O
(
n
m
−
2
a
n
)
{\displaystyle O({\frac {n^{m-2}}{a^{n}}})}
.
h
−
m
(
z
−
a
)
m
=
(
−
1
)
m
h
−
m
a
m
(
1
−
z
a
)
m
{\displaystyle {\frac {h_{-m}}{(z-a)^{m}}}={\frac {(-1)^{m}h_{-m}}{a^{m}(1-{\frac {z}{a}})^{m}}}}
by factoring out
(
−
1
a
)
m
{\displaystyle \left({\frac {-1}{a}}\right)^{m}}
.
(
−
1
)
m
h
−
m
a
m
(
1
−
z
a
)
m
=
(
−
1
)
m
h
−
m
a
m
∑
n
≥
0
(
n
+
m
−
1
n
)
(
z
a
)
n
{\displaystyle {\frac {(-1)^{m}h_{-m}}{a^{m}(1-{\frac {z}{a}})^{m}}}={\frac {(-1)^{m}h_{-m}}{a^{m}}}\sum _{n\geq 0}{\binom {n+m-1}{n}}\left({\frac {z}{a}}\right)^{n}}
by the binomial theorem for negative exponents[ 14] .
h
(
z
)
=
h
−
m
(
z
−
a
)
m
+
h
−
(
m
−
1
)
(
z
−
a
)
m
−
1
+
⋯
+
h
−
1
z
−
a
+
h
0
+
h
1
(
z
−
a
)
+
⋯
{\displaystyle h(z)={\frac {h_{-m}}{(z-a)^{m}}}+{\frac {h_{-(m-1)}}{(z-a)^{m-1}}}+\cdots +{\frac {h_{-}1}{z-a}}+h_{0}+h_{1}(z-a)+\cdots }
.
Therefore,
lim
z
→
a
(
z
−
a
)
m
h
(
z
)
=
lim
z
→
a
h
−
m
+
h
−
(
m
−
1
)
(
z
−
a
)
+
⋯
+
h
−
1
(
z
−
a
)
m
−
1
+
h
0
(
z
−
a
)
m
+
h
1
(
z
−
a
)
m
+
1
+
⋯
=
h
−
m
{\displaystyle \lim _{z\to a}(z-a)^{m}h(z)=\lim _{z\to a}h_{-m}+h_{-(m-1)}(z-a)+\cdots +h_{-}1(z-a)^{m-1}+h_{0}(z-a)^{m}+h_{1}(z-a)^{m+1}+\cdots =h_{-m}}
.
To compute
lim
z
→
a
(
z
−
a
)
m
h
(
z
)
=
lim
z
→
a
(
z
−
a
)
m
f
(
z
)
g
(
z
)
{\displaystyle \lim _{z\to a}(z-a)^{m}h(z)=\lim _{z\to a}{\frac {(z-a)^{m}f(z)}{g(z)}}}
, because the numerator and denominator are both
0
{\displaystyle 0}
at
a
{\displaystyle a}
, we need to use L'Hôpital's rule[ 15] :
lim
z
→
a
(
z
−
a
)
m
f
(
z
)
g
(
z
)
=
lim
z
→
a
(
(
z
−
a
)
m
f
(
z
)
)
′
g
′
(
z
)
{\displaystyle \lim _{z\to a}{\frac {(z-a)^{m}f(z)}{g(z)}}=\lim _{z\to a}{\frac {((z-a)^{m}f(z))'}{g'(z)}}}
Indeed, if
a
{\displaystyle a}
is a root of order
m
>
1
{\displaystyle m>1}
of
g
(
z
)
{\displaystyle g(z)}
and
(
z
−
a
)
m
f
(
z
)
{\displaystyle (z-a)^{m}f(z)}
, it is also a root of
g
′
(
z
)
{\displaystyle g'(z)}
and
(
(
z
−
a
)
m
f
(
z
)
)
′
{\displaystyle ((z-a)^{m}f(z))'}
and therefore
lim
z
→
a
(
(
z
−
a
)
m
f
(
z
)
)
′
g
′
(
z
)
{\displaystyle \lim _{z\to a}{\frac {((z-a)^{m}f(z))'}{g'(z)}}}
is also indeterminate. Therefore, we need to apply L'Hôpital's rule
m
{\displaystyle m}
times:
lim
z
→
a
(
(
z
−
a
)
m
f
(
z
)
)
(
m
)
g
(
m
)
(
z
)
=
lim
z
→
a
(
(
z
−
a
)
m
f
′
(
z
)
+
m
(
z
−
a
)
m
−
1
f
(
z
)
)
(
m
−
1
)
g
(
m
)
(
z
)
=
lim
z
→
a
(
(
z
−
a
)
m
f
″
(
z
)
+
2
m
(
z
−
a
)
m
−
1
f
′
(
z
)
+
m
(
m
−
1
)
(
z
−
a
)
m
−
2
f
(
z
)
)
(
m
−
2
)
g
(
m
)
(
z
)
=
⋯
=
m
!
f
(
a
)
g
(
m
)
(
a
)
{\displaystyle \lim _{z\to a}{\frac {((z-a)^{m}f(z))^{(m)}}{g^{(m)}(z)}}=\lim _{z\to a}{\frac {((z-a)^{m}f'(z)+m(z-a)^{m-1}f(z))^{(m-1)}}{g^{(m)}(z)}}=\lim _{z\to a}{\frac {((z-a)^{m}f''(z)+2m(z-a)^{m-1}f'(z)+m(m-1)(z-a)^{m-2}f(z))^{(m-2)}}{g^{(m)}(z)}}=\cdots ={\frac {m!f(a)}{g^{(m)}(a)}}}
(
n
+
m
−
1
n
)
=
(
n
+
m
−
1
)
!
n
!
(
m
−
1
)
!
=
(
n
+
1
)
(
n
+
2
)
⋯
(
n
+
m
−
1
)
(
m
−
1
)
!
∼
n
m
−
1
(
m
−
1
)
!
{\displaystyle {\binom {n+m-1}{n}}={\frac {(n+m-1)!}{n!(m-1)!}}={\frac {(n+1)(n+2)\cdots (n+m-1)}{(m-1)!}}\sim {\frac {n^{m-1}}{(m-1)!}}}
as
n
→
∞
{\displaystyle n\to \infty }
.
↑ Sedgewick, pp. 59.
↑ Sedgewick, (errata), pp. 8.
↑ Sedgewick, pp. 59-60.
↑ Wilf 2006, pp. 185-186.
↑ See Stroud 2003, pp. 919-923, Lang 1999, pp. 161-163, Orloff, pp. 10-13, w:Laurent_series , v:Complex_Analysis_in_plain_view#Laurent_Series_and_the_z-Transform_Example_Note .
↑ Wilf 2006, pp. 185-186.
↑ Flajolet and Sedgewick 2009, pp. 231.
↑ Stroud 2003, pp. 919-920.
↑ This is a bit of an over-simplification. For further information, see Stroud 2003, pp. 863-867, 915 and w:Mathematical_singularity .
↑ Stroud 2003, pp. 915.
↑ Wilf 2006, pp. 52, 185-186.
↑ Wilf 2006, pp. 50-52.
↑ See #Computation of coefficient of first term and #Proof of binomial asymptotics .
↑ Biggs 2002, pp. 364-366.
↑ Stroud 2001, pp. 792, v:Calculus/Limits#L'Hôpital's_Rule , w:L'Hôpital's_rule .
Biggs, Norman L. (2002). Discrete Mathematics (2nd ed.). Oxford University Press.
Flajolet, Philippe; Sedgewick, Robert (2009). Analytic Combinatorics (PDF) . Cambridge University Press.
Lang, Serge (1999). Complex Analysis (4th ed.). Springer Science+Business Media, LLC.
Orloff, Jeremy. "Topic 7 Notes: Taylor and Laurent series" (PDF) . Retrieved 3 October 2022 .
Sedgewick, Robert. "4. Complex Analysis, Rational and Meromorphic Asymptotics" (PDF) . Retrieved 16 September 2022 .
Sedgewick, Robert. "4. Complex Analysis, Rational and Meromorphic Asymptotics (Errata)" (PDF) . Retrieved 16 September 2022 .
Stroud, K. A. (2003). Advanced Engineering Mathematics (4th ed.). Palgrave Macmillan.
Stroud, K. A. (2001). Engineering Mathematics (5th ed.). Palgrave Macmillan.
Wilf, Herbert S. (2006). Generatingfunctionology (PDF) (3rd ed.). A K Peters, Ltd.