Partial Fractions Contents 1 Partial fractions

f ac ulty of sc ience
depar tment of mathem atics
MATH 895-4 Fall 2010
Course Schedule
L ECTURE 3
Partial Fractions
Partial Fractions
Week
Date
Sections
from FS2009
Part/ References
Topic/Sections
Notes/Speaker
1
Sept 7 I.1, I.2, I.3
Contents
1
Symbolic methods
Combinatorial
Structures
Unlabelled structures
Part A.1, A.2
Partial fractions FS:
Comtet74
3
II.1, II.2, II.3
Labelled structures I
#1 polynomials . . . . . .
1.121 Relevant
factsHandout
about
(self
study)
4
28
II.4, II.5, II.6
Labelled structures II
2
14
I.4, I.5, I.6
. . . . . . . .
1.2 The partial fractions theorem . . . . . . . . . . . . . . . .
1.3Oct Algorithmic
concerns
. . . . . . . . . Asst
. .#1. Due
. . . .
Combinatorial. . . . .Combinatorial
5
5
III.1, III.2
Parameters
1.4 Algorithm for parameters
coefficient
extraction
in
rational
functions
FS A.III
6
1
7
12
IV.1, IV.2
19
IV.3, IV.4
(self-study)
Analytic Methods
Partial fractions
FS: Part B: IV, V, VI
8
26
9
1.1
Nov 2
IV.5 V.1
Appendix B4
Stanley 99: Ch. 6
Handout #1
(self-study)
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
1
1
1
3
4
Multivariable GFs
Complex Analysis
Singularity Analysis
Relevant facts about polynomials
Asymptotic methods
Asst #2 Due
9
VI.1
Sophie
23
IX.3
Partial
fractions is useful whenever you want to reduce a rational function (that is one polynomial
10
12
A.3/ C
Introduction to Prob.
Mariolys
divided
by another)
to a sum of minimal
pieces. We first
need two facts about polynomials (see MATH
IX.1 For those with some field
Limit Laws
and Comb
340 for18 proofs).
theory,
fix a Marni
field and view all polynomials, factors, etc below
11
as over20 that IX.2
field.
Random Structures
Discrete Limit Laws
Sophie
and Limit
Laws
By convention we will
say
that
the
degree
of
the
constant
zero polynomial is −∞.
FS: Part C
(rotating
Proposition (Divisionpresentations)
algorithm
25
IX.4
12
Combinatorial
instances of discrete
Mariolys
Quasi-Powers and
Gaussian limit laws
Sophie
for polynomials). Let f and g be polynomials. Then there exist polynomials q and r with deg r < deg g andContinuous Limit Laws Marni
13
30
14
Dec 10
IX.5
f (x) = g(x)q(x) + r(x)
Presentations
Asst #3 Due
The proof is by long division.
Proposition (Extended Euclidean algorithm for polynomials). Let f and g be polynomials with no
common factor then there exist polynomials h and t such that
f (x)h(x) + g(x)t(x) = 1
The proof of this is too involved to summarize in a sentence, but it works the same way as the extended Euclidean algorithm for integers, and, as in that case, it yields a good algorithm. In general the
algorithm
is Department
O(n2 ) where
n is SIMON
the maximum
degree of f and g, but key parts of it, which are sufficient
Dr.
Marni MISHNA,
of Mathematics,
FRASER UNIVERSITY
Version of: 11-Dec-09
for many purposes, are faster (see http://planetmath.org/encyclopedia/HalfGCDAlgorithm.
html).
1.2
The partial fractions theorem
Now we are ready for the partial fraction decomposition, first for two factors and then in general. You
can find many presentations of this result online, this presentation is based on http://marasingha.
org/mathspages/partialfrac/html/node2.html.
Proposition. Let f1 , f2 , and g be polynomials such that f1 and g1 have no common factor and deg g <
deg f1 + deg f2 . Then we can find polynomials g1 and g2 with
g1 (x) g2 (x)
g(x)
=
+
f1 (x)f2 (x)
f1 (x) f2 (x)
and deg g1 < deg f1 , deg g2 < deg f2 .
Proof. By the extended Euclidean algorithm we can find polynomials h1 and h2 such that
1 = f1 (x)h2 (x) + f2 (x)h1 (x)
M ARNI M ISHNA , S PRING 2011; K AREN Y EATS, S PRING 2013
MATH 343: A PPLIED D ISCRETE M ATHEMATICS
PAGE 1/4
MATH 895-4 Fall 2010
Course Schedule
L ECTURE 3
f ac ulty of sc ience
depar tment of mathem atics
Week
Date
1
Sept 7
Thus
Sections
from FS2009
Part/ References
where deg(g1 ) < deg(f1 ). Let
Oct 5
III.1, III.2
6
then
12
IV.1, IV.2
7
19
IV.3, IV.4
8
26
9
Nov 2
so
10
IV.5 V.1
9
VI.1
12
A.3/ C
Notes/Speaker
g(x) = fSymbolic
1 (x)(hmethods
2 (x)g(x)) + f2 (x)(h1 (x)g(x))
I.1, I.2, I.3
Combinatorial
Structures
By2 the14division
we can
I.4, I.5,algorithm
I.6
FS: Part A.1, A.2
Comtet74
3
21
II.1, II.2, II.3
Handout #1
(self study)
4
28
II.4, II.5, II.6
5
Topic/Sections
Partial Fractions
Combinatorial
parameters
FS A.III
(self-study)
also Unlabelled
write structures
structures I
hLabelled
1 (x)g(x) = f1 (x)q(x) + g1 (x)
Labelled structures II
Combinatorial
Asst #1 Due
gParameters
2 (x) = h2 (x)g(x) + q(x)f2 (x)
Multivariable GFs
Complex Analysis
Analytic
g(x)
= fMethods
1 (x)g2 (x) − f1 (x)f2 (x)q(x) + f2 (x)f1 (x)g(x) + f2 (x)g1 (x)
FS: Part B: IV, V, VI
Appendix
= f1B4(x)g2 (x) +Singularity
f2 (x)gAnalysis
1 (x)
Stanley 99: Ch. 6
Asymptotic methods
Handout #1
(self-study)
Asst #2 Due
f2 (x)g1 (x) + Sophie
f1 (x)g2 (x)
g(x)
g1 (x) g2 (x)
+
=
=
f1 (x) f2 (x)Introduction to Prob.
f1 (x)fMariolys
(x)
f
(x)f
2
1
2 (x)
18
IX.1show that deg(g ) < deg(f
Limit Laws
and Comb
Marni
It 11remains
to
2
2 ). Towards a contradiction suppose that deg(g2 ) ≥ deg(f2 ).
Random Structures
Then 20
IX.2
Discrete Limit Laws
Sophie
and Limit Laws
deg(f
g
)
≥
deg(f
1 2
1 f2 )
FS: Part C
Combinatorial
12
but
23
IX.3
25
IX.4
(rotating
presentations)
14
Dec 10
Continuous
deg(fLimit
g Laws
)<
2 1
So13in f301 (x)g2IX.5
(x) + f2 (x)g1 (x) the
Mariolys
instances of discrete
Marni f )
deg(f
1 2
Quasi-Powers and
Sophie
f1 g2 term
dominates,
so
Gaussian
limit laws
Presentations
Asst #3 Due
deg(g) = deg(f
1 g2 + f2 g1 ) = deg(f1 g2 ) ≥ deg(f1 f2 ) = deg f1 + deg f2
which is a contradiction, completing the proof.
Theorem (partial fraction decomposition). Let f and g be polynomials and write f = f1a1 · · · frar where
fi and fj have no common factors for all i 6= j. Suppose deg g < deg f , then we can write
a
r
r
g(x) X X
gij (x)
=
r
f (x)
(f
i (x))
i=1 j=1
Dr. Marni
MISHNA,
Department of g
Mathematics,
SIMON
for
some
polynomials
gijFRASER
< degUNIVERSITY
fi .
ij with deg
Version of: 11-Dec-09
Proof. By the proposition applied r − 1 times we an write
r
g(x) X hi (x)
=
f (x)
(fi (x))ai
i=1
with deg(hi ) < deg(fiai ) = ai deg(fi ). (Just this much is enough for the application we have in mind
below).
To continue the proof consider
hi (x)
.
fi (x)ai
If ai = 1 then we’re done with this value of i. Assume ai > 1. By the division algorithm
hi (x) = q(x)fi (x) + r(x)
(1)
hi (x)
q(x)
r(x)
=
+
fi (x)ai
fi (x)ai −1
fi (x)ai
(2)
with deg r < deg fi . Therefore
Furthermore either q = 0 or q(x)fi (x) is the dominant term in (1) in which case deg hi = deg qfi =
deg q + deg fi . But deg hi < ai deg fi so deg q < (ai − 1) deg fi . Thus repeating (2) inductively we get the
desired decomposition.
i was arbitrary and so the result follows.
M ARNI M ISHNA , S PRING 2011; K AREN Y EATS, S PRING 2013
MATH 343: A PPLIED D ISCRETE M ATHEMATICS
PAGE 2/4
MATH 895-4 Fall 2010
Course Schedule
L ECTURE 3
f ac ulty of sc ience
depar tment of mathem atics
Week
Date
Sections
Part/ References
Topic/Sections
Partial Fractions
Notes/Speaker
x
from FS2009
Example. Rewrite
(x+1)(x−1)2 by partial fractions:
the7 above
theorems
we know this
canmethods
be written
1 By Sept
I.1, I.2, I.3
Symbolic
Combinatorial
2
14
I.4, I.5, I.6
3
21
II.1, II.2, II.3
Structures
FS: Part A.1, A.2
Comtet74
(x
Handout #1
(self study)
A
xUnlabelled structures
B
C
=
+
+
2
+ 1)(x
− 1)structures
x +I 1 x − 1 (x − 1)2
Labelled
4
28
II.4,
II.6 A, B, and C? WeLabelled
How
should
weII.5,find
couldstructures
followII the proof and use the Euclidean algorithm, but for
Combinatorial
Combinatorial
small
hand examples
it
is usually easier
to multiply out
5
Oct 5
III.1, III.2
Asst #1 Due
6
12
IV.1, IV.2
7
19
IV.3, IV.4
8 this
26 must be
Now
9
10
11
Nov 2
IV.5 V.1
9
VI.1
12
A.3/ C
18
IX.1
parameters
FS A.III
(self-study)
Parameters
x = A(xMultivariable
− 1)2 + B(x
GFs + 1)(x − 1) + C(x + 1)
2
= A(xComplex
− 2xAnalysis
+ 1) + B(x2 − 1) + C(x + 1)
Analytic Methods
FS: Part B: IV, V, VI
trueAppendix
for allB4x, so
Stanley 99: Ch. 6
Handout #1
(self-study)
Singularity
it must
be Analysis
true coefficient by coefficient. That is
Asst #2 Due
0 =Asymptotic
A − Bmethods
+ C coefficient of x0
1 = −2A + C
13
30
14
Dec 10
Thus
1.3
Introduction to Prob.
Mariolys
Limit Laws and Comb
Marni
0A + B
This is20a system
of linear
equations
Random
Structures
IX.2
and Limit Laws
nation
FS: Part C

23
IX.3
(rotating
12
1 −1 1
presentations)
−2 0 1
25
IX.4
1
1 0
IX.5
Presentations
Sophie
coefficient of x
coefficient of x2
which
can solve
by your favorite method, say Gaussian elimiDiscreteyou
Limit Laws
Sophie
Combinatorial




Mariolys
−1 1 0
1 −1 1 0
0instances of1discrete
 → 0Limit−2
Laws Marni
3 1 → 0 −2 3 1
1Continuous
0 and2 −1 0
0 0 2 1
0Quasi-Powers
Sophie


Gaussian limit laws
1 0 0 − 41
1 
Asst #3 Due
→ 0 1 0
4
1
0 0 1
2
x
1
1
1
=−
+
+
(x + 1)(x − 1)2
4(x + 1) 4(x − 1) 2(x − 1)2
Algorithmic concerns
What is the runtime of partial fractions? If we do it by solving the system of equations then the system
elimination this is O(n3 ).
Strassen’s algorithm lets one multiply two n × n matrices in O(n2.81 ); it also gives a matrix inverse
in the same time, and hence a system solve in the same time. There have been improvements along
similar lines and the current best matrix multiplication is O(n2.3727 ) (according to Wikipedia). However
Strassen’s algorithm is only faster than a well optimized naive approach for n > 1000 and the newer
ones are impractical for any matrix you could actually store in a current computer. Certainly no such
approach could be better than O(n2 ) since one needs to use all n2 coefficients of the matrix.
However partial fractions has more structure. The proof suggests a different algorithm, one using
the extended Euclidean algorithm. In fact partial fractions doesn’t even need the full power of the
extended Euclidean algorithm, and so with this basic approach and some additional cleverness one can
obtain O(log nM (n)) where M (n) is the runtime needed to multiply two (slightly special) polynomials
of degree n. Naively M (n) would be n2 , which already gets us better that the system solving approach,
but using fast fourier transforms one can obtain M (n) = O(n log n) and hence partial fractions can be
done in O(n(log n)2 ). The details of all of this are beyond the scope of this course. Reference for the
algorithm: Kung, H. T. and Tong, D. M., ”Fast algorithms for partial fraction decomposition” (1976).
Computer Science Department. Paper 1675. http://repository.cmu.edu/compsci/1675.
One final algorithmic concern. What if the factorization of f is not given? This is a whole different
story; fast polynomial factorization, say over the rationals, is done by looking modulo primes and then
putting it back together. The good news is that it is polynomial time. In the case we’re interested in we
want to factor down to linear factors so we actually need to factor over the complex numbers, but not
all polynomials can have their roots expressed in terms of square roots, cube roots etc, which leads in
to the very interesting world of Galois theory.
Dr.
MISHNA, Department
Mathematics,
FRASER
of Marni
equations
is n × nofwhere
n =SIMON
deg(f
). ByUNIVERSITY
Gaussian
Version of: 11-Dec-09
M ARNI M ISHNA , S PRING 2011; K AREN Y EATS, S PRING 2013
MATH 343: A PPLIED D ISCRETE M ATHEMATICS
PAGE 3/4
MATH 895-4 Fall 2010
Course Schedule
L ECTURE 3
f ac ulty of sc ience
depar tment of mathem atics
Week
1.4
Date
Sections
Part/ References
Topic/Sections
Partial Fractions
Notes/Speaker
from FS2009 for coefficient extraction in rational functions
Algorithm
1
Sept 7 I.1, I.2, I.3
Symbolic methods
1
r r+n−1
Combinatorial theorems,
for real numbers m
From
the
coefficient extraction
we can compute [z n ] (1−mz)
r = m
n
Structures
2 r.14Let us
I.4, I.5,
I.6
Unlabelled
structures extraction for rational functions to these kinds of
and
reduce
the
computation
of coefficient
FS: Part
A.1, A.2
Comtet74
terms.
3
21
II.1, II.2, II.3
Labelled structures I
Handout #1
4
28
8
26
II.4, II.5, II.6
(self study)
Labelled structures II
1. Partial fraction Decomposition Simplify the form of the rational function. This is the most comCombinatorial
Combinatorial
putationally
i,k (z) is a polynomial of degree less than k.
5
Oct 5
III.1, III.2 intensive part of the computation. Here
Asst #1 α
Due
parameters
Parameters
The
FS A.III
6
12
IV.1, IV.2
Multivariable GFs X
αi,k (z)
(self-study)
R(z) =
(1 − mi z)k
7
19
IV.3, IV.4
Complex Analysis
Analytic Methods
i,k
IV.5 V.1
2. 9Separate
Use
Nov 2
FS: Part B: IV, V, VI
Singularity Analysis
Appendix B4
sumStanley
rule99:
toCh.separate
into terms of
6
Asymptotic methods
Handout #1
(self-study)
the
form [z n ](1 − mz)k .
Asst #2 Due
9
VI.1binomial theorem Compute these values
Sophie
3. Apply
the
10
12
A.3/ C
Introduction to Prob.
Mariolys
18
IX.1
Limit Laws and Comb
Marni
4. Sum Take the sum of the resulting terms.
11
2
2 x −4 x+1
n
Example
(Simple
rational
Let R(x)
= 1−18Sophie
Randomexample).
Structures
20
IX.2
Discrete
Limit Laws
x+129 x2 −460 x3 +816 x4 −576 x5 . Compute [x ]R(x).
and Limit Laws
FS: Part C
23
IX.3compute that
1. First
we
(rotating
12
25
13
14
30
IX.4
presentations)
Combinatorial
instances of discrete
Mariolys
2 x2 − 4 x + 1 Continuous Limit Laws Marni
−16
12
2
3
=
+
+
+
3
2.
2
3
4
5
Quasi-Powers
and
1 −IX.5
18 x + 129 x − 460 x + 816 x − 576 x
(1 − 4 x) (1 − 3 x) (1 − 4 x)
(1 − 3 x)
Sophie
Gaussian limit laws
Dec 10
Presentations to do this manually,
Asst #3 Due
We
can use several techniques
or the Maple command convert(R(x),
parfrac).
2. We expand and solve.
3
−16
12
2
+
+
+
3
2
(1 − 4 x) (1 − 3 x) (1 − 4 x)
(1 − 3 x)
1
1
1
1
= −16[xn ]
+ 12[xn ]
+ 2[xn ]
+ 3[xn ]
3
1 − 4x
1 − 3x
(1 + (−4x))
(1 + (−3x))2
−3
−2
n
Dr. Marni MISHNA, Department of Mathematics, SIMON
= −16 · 4n +FRASER
12 · 3UNIVERSITY
+2
(−1)n (−4)n + 3
(−1)n (−3)n
Version of: 11-Dec-09
n
n
n
n
n n+2
n+1 n + 1
+3
= −16 · 4 + 12 · 3 + 2 · 4
2
1
n
= (−16 + (n + 1)(n + 2)) · 4 + (12 + 3(n + 1)) · 3n .
[xn ]R(x)
=
[xn ]
M ARNI M ISHNA , S PRING 2011; K AREN Y EATS, S PRING 2013
MATH 343: A PPLIED D ISCRETE M ATHEMATICS
PAGE 4/4