Partial fraction decomposition

In algebra, the partial fraction decomposition or partial fraction expansion of a rational fraction (that is, a fraction such that the numerator and the denominator are both polynomials) is an operation that consists of expressing the fraction as a sum of a polynomial (possibly zero) and one or several fractions with a simpler denominator.
The importance of the partial fraction decomposition lies in the fact that it provides algorithms for various computations with rational functions, including the explicit computation of antiderivatives, Taylor series expansions, inverse Z-transforms, and inverse Laplace transforms. The concept was discovered independently in 1702 by both Johann Bernoulli and Gottfried Leibniz.
In symbols, the "partial fraction decomposition" of a rational fraction of the form formula_1 where and are polynomials, is its expression as
formula_2
where
 is a polynomial, and, for each ,
the denominator is a power of an irreducible polynomial (that is not factorable into polynomials of positive degrees), and
the numerator is a polynomial of a smaller degree than the degree of this irreducible polynomial.
When explicit computation is involved, a coarser decomposition is often preferred, which consists of replacing "irreducible polynomial" by "square-free polynomial" in the description of the outcome. This allows replacing polynomial factorization by the much easier-to-compute square-free factorization. This is sufficient for most applications, and avoids introducing irrational coefficients when the coefficients of the input polynomials are integers or rational numbers.
Basic principles.
Let 
formula_3 
be a rational fraction, where and are univariate polynomials in the indeterminate over a field. The existence of the partial fraction can be proved by applying inductively the following reduction steps.
Polynomial part.
There exist two polynomials and such that 
formula_4
and
formula_5
where formula_6 denotes the degree of the polynomial .
This results immediately from the Euclidean division of by , which asserts the existence of and such that formula_7 and formula_8
This allows supposing in the next steps that formula_9
Factors of the denominator.
If formula_10 and 
formula_11
where and are coprime polynomials, then there exist polynomials formula_12 and formula_13 such that
formula_14
and
formula_15
This can be proved as follows. Bézout's identity asserts the existence of polynomials and such that 
formula_16
(by hypothesis, is a greatest common divisor of and ).
Let formula_17 with formula_18 be the Euclidean division of by formula_19 Setting formula_20 one gets
formula_21
It remains to show that formula_22 By reducing the last sum of fractions to a common denominator, one gets
formula_23
and thus
formula_24
Powers in the denominator.
Using the preceding decomposition inductively one gets fractions of the form formula_25 with formula_26 where is an irreducible polynomial. If , one can decompose further, by using that an irreducible polynomial is a square-free polynomial, that is, formula_27 is a greatest common divisor of the polynomial and its derivative. If formula_28 is the derivative of , Bézout's identity provides polynomials and such that formula_29 and thus formula_30 Euclidean division of formula_31 by formula_32 gives polynomials formula_33 and formula_34 such that formula_35 and formula_36 Setting formula_37 one gets
formula_38
with formula_39
Iterating this process with formula_40 in place of formula_41 leads eventually to the following theorem.
Statement.
The uniqueness can be proved as follows. Let . All together, and the have coefficients. The shape of the decomposition defines a linear map from coefficient vectors to polynomials of degree less than . The existence proof means that this map is surjective. As the two vector spaces have the same dimension, the map is also injective, which means uniqueness of the decomposition. By the way, this proof induces an algorithm for computing the decomposition through linear algebra.
If is field of complex numbers, the fundamental theorem of algebra implies that all have degree one, and all numerators formula_42 are constants. When is the field of real numbers, some of the may be quadratic, so, in the partial fraction decomposition, quotients of linear polynomials by powers of quadratic polynomials may also occur.
In the preceding theorem, one may replace "distinct irreducible polynomials" by "pairwise coprime polynomials that are coprime with their derivative". For example, the may be the factors of the square-free factorization of . When is the field of rational numbers, as it is typically the case in computer algebra, this allows to replace factorization by greatest common divisor computation for computing a partial fraction decomposition.
Application to symbolic integration.
For the purpose of symbolic integration, the preceding result may be refined into
This reduces the computation of the antiderivative of a rational function to the integration of the last sum, which is called the "logarithmic part", because its antiderivative is a linear combination of logarithms. 
There are various methods to compute decomposition in the Theorem. One simple way is called Hermite's method. First, "b" is immediately computed by Euclidean division of "f" by "g", reducing to the case where deg("f") &lt; deg("g"). Next, one knows deg("c""ij") &lt; deg("p""i"), so one may write each "cij" as a polynomial with unknown coefficients. Reducing the sum of fractions in the Theorem to a common denominator, and equating the coefficients of each power of "x" in the two numerators, one gets a system of linear equations which can be solved to obtain the desired (unique) values for the unknown coefficients.
Procedure.
Given two polynomials formula_45 and formula_46, where the "α""i" are distinct constants and , explicit expressions for partial fractions can be obtained by supposing that
formula_47
and solving for the "c""i" constants, by substitution, by equating the coefficients of terms involving the powers of "x", or otherwise. (This is a variant of the method of undetermined coefficients. After both sides of the equation are multiplied by Q(x), one side of the equation is a specific polynomial, and the other side is a polynomial with undetermined coefficients. The equality is possible only when the coefficients of like powers of "x" are equal. This yields n equations in n unknowns, the ck.)
A more direct computation, which is strongly related to Lagrange interpolation, consists of writing
formula_48
where formula_49 is the derivative of the polynomial formula_34. The coefficients of formula_51 are called the residues of "f/g".
This approach does not account for several other cases, but can be modified accordingly:
Illustration.
In an example application of this procedure, can be decomposed in the form
formula_56
Clearing denominators shows that . Expanding and equating the coefficients of powers of gives
Solving this system of linear equations for and yields . Hence,
formula_57
Residue method.
Over the complex numbers, suppose "f"("x") is a rational proper fraction, and can be decomposed into
formula_58
Let
formula_59
then according to the uniqueness of Laurent series, "a""ij" is the coefficient of the term in the Laurent expansion of "g""ij"("x") about the point "x""i", i.e., its residue
formula_60
This is given directly by the formula
formula_61
or in the special case when "x""i" is a simple root,
formula_62
when
formula_63
Over the reals.
Partial fractions are used in real-variable integral calculus to find real-valued antiderivatives of rational functions. Partial fraction decomposition of real rational functions is also used to find their Inverse Laplace transforms. For applications of partial fraction decomposition over the reals, see
General result.
Let "f"("x") be any rational function over the real numbers. In other words, suppose there exist real polynomials functions "p"("x") and "q"("x") ≠ 0, such that
formula_64
By dividing both the numerator and the denominator by the leading coefficient of "q"("x"), we may assume without loss of generality that "q"("x") is monic. By the fundamental theorem of algebra, we can write
formula_65
where "a"1..., "a""m", "b"1..., "b""n", "c"1..., "c""n" are real numbers with "b""i"2 − 4"c""i" &lt; 0, and "j"1..., "j""m", "k"1..., "k""n" are positive integers. The terms ("x" − "a""i") are the "linear factors" of "q"("x") which correspond to real roots of "q"("x"), and the terms ("x""i"2 + "b""i""x" + "c""i") are the "irreducible quadratic factors" of "q"("x") which correspond to pairs of complex conjugate roots of "q"("x").
Then the partial fraction decomposition of "f"("x") is the following:
formula_66
Here, "P"("x") is a (possibly zero) polynomial, and the "A""ir", "B""ir", and "C""ir" are real constants. There are a number of ways the constants can be found.
The most straightforward method is to multiply through by the common denominator "q"("x"). We then obtain an equation of polynomials whose left-hand side is simply "p"("x") and whose right-hand side has coefficients which are linear expressions of the constants "A""ir", "B""ir", and "C""ir". Since two polynomials are equal if and only if their corresponding coefficients are equal, we can equate the coefficients of like terms. In this way, a system of linear equations is obtained which "always" has a unique solution. This solution can be found using any of the standard methods of linear algebra. It can also be found with limits (see Example 5).
Examples.
Example 1.
formula_67
Here, the denominator splits into two distinct linear factors:
formula_68
so we have the partial fraction decomposition
formula_69
Multiplying through by the denominator on the left-hand side gives us the polynomial identity
formula_70
Substituting "x" = −3 into this equation gives "A" = −1/4, and substituting "x" = 1 gives "B" = 1/4, so that
formula_71
Example 2.
formula_72
After long division, we have
formula_73
The factor "x"2 − 4"x" + 8 is irreducible over the reals, as its discriminant is negative. Thus the partial fraction decomposition over the reals has the shape
formula_74
Multiplying through by "x"3 − 4"x"2 + 8"x", we have the polynomial identity
formula_75
Taking "x" = 0, we see that 16 = 8"A", so "A" = 2. Comparing the "x"2 coefficients, we see that 4 = "A" + "B" = 2 + "B", so "B" = 2. Comparing linear coefficients, we see that −8 = −4"A" + "C" = −8 + "C", so "C" = 0. Altogether,
formula_76
The fraction can be completely decomposed using complex numbers. According to the fundamental theorem of algebra every complex polynomial of degree "n" has "n" (complex) roots (some of which can be repeated). The second fraction can be decomposed to:
formula_77
Multiplying through by the denominator gives:
formula_78
Equating the coefficients of and the constant (with respect to ) coefficients of both sides of this equation, one gets a system of two linear equations in and , whose solution is
formula_79
Thus we have a complete decomposition:
formula_80
One may also compute directly and with the residue method (see also example 4 below).
Example 3.
This example illustrates almost all the "tricks" we might need to use, short of consulting a computer algebra system.
formula_81
After long division and factoring the denominator, we have
formula_82
The partial fraction decomposition takes the form
formula_83
Multiplying through by the denominator on the left-hand side we have the polynomial identity
formula_84
Now we use different values of "x" to compute the coefficients:
formula_85
Solving this we have:
formula_86
Using these values we can write:
formula_87
We compare the coefficients of "x"6 and "x"5 on both side and we have:
formula_88
Therefore:
formula_89
which gives us "B" = 0. Thus the partial fraction decomposition is given by:
formula_90
Alternatively, instead of expanding, one can obtain other linear dependences on the coefficients computing some derivatives at formula_91 in the above polynomial identity. (To this end, recall that the derivative at "x" = "a" of ("x" − "a")"m""p"("x") vanishes if "m" &gt; 1 and is just "p"("a") for "m" = 1.) For instance the first derivative at "x" = 1 gives
formula_92
that is 8 = 4"B" + 8 so "B" = 0.
Example 4 (residue method).
formula_93
Thus, "f"("z") can be decomposed into rational functions whose denominators are "z"+1, "z"−1, "z"+i, "z"−i. Since each term is of power one, −1, 1, −"i" and "i" are simple poles.
Hence, the residues associated with each pole, given by
formula_94
are 
formula_95
respectively, and
formula_96
Example 5 (limit method).
Limits can be used to find a partial fraction decomposition. Consider the following example:
formula_97
First, factor the denominator which determines the decomposition:
formula_98
Multiplying everything by formula_99, and taking the limit when formula_100, we get
formula_101
On the other hand,
formula_102
and thus:
formula_103
Multiplying by and taking the limit when formula_104, we have
formula_105
and
formula_106
This implies and so formula_107.
For , we get formula_108 and thus formula_109.
Putting everything together, we get the decomposition
formula_110
Example 6 (integral).
Suppose we have the indefinite integral:
formula_111
Before performing decomposition, it is obvious we must perform polynomial long division and factor the denominator. Doing this would result in:
formula_112
Upon this, we may now perform partial fraction decomposition.
formula_113
so:
formula_114.
Upon substituting our values, in this case, where x=1 to solve for B and x=-2 to solve for A, we will result in:
formula_115
Plugging all of this back into our integral allows us to find the answer:
formula_116
The role of the Taylor polynomial.
The partial fraction decomposition of a rational function can be related to Taylor's theorem as follows. Let
formula_117
be real or complex polynomials 
assume that
formula_118
satisfies
formula_119
Also define
formula_120
Then we have
formula_121
if, and only if, each polynomial formula_122 is the Taylor polynomial of formula_123 of order formula_124 at the point formula_125:
formula_126
Taylor's theorem (in the real or complex case) then provides a proof of the existence and uniqueness of the partial fraction decomposition, and a characterization of the coefficients.
Sketch of the proof.
The above partial fraction decomposition implies, for each 1 ≤ "i" ≤ "r", a polynomial expansion
formula_127
so formula_128 is the Taylor polynomial of formula_123, because of the unicity of the polynomial expansion of order formula_124, and by assumption formula_131.
Conversely, if the formula_128 are the Taylor polynomials, the above expansions at each formula_125 hold, therefore we also have
formula_134
which implies that the polynomial formula_135 is divisible by formula_136
For formula_137 is also divisible by formula_138, so
formula_139
is divisible by formula_34. Since
formula_141
we then have
formula_142
and we find the partial fraction decomposition dividing by formula_143.
Fractions of integers.
The idea of partial fractions can be generalized to other integral domains, say the ring of integers where prime numbers take the role of irreducible denominators. For example:
formula_144