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 the operation that consists in expressing the fraction as a sum of a polynomial (possibly zero) and one or several fractions with a simpler denominator.

In symbols, one can use partial fraction expansion to change a rational fraction in the form

where ƒ and g are polynomials, into an expression of the form

where gj (x) are polynomials that are factors of g(x), and are in general of lower degree. Thus, the partial fraction decomposition may be seen as the inverse procedure of the more elementary operation of addition of rational fractions, which produces a single rational fraction with a numerator and denominator usually of high degree. The full decomposition pushes the reduction as far as it will go: in other words, the factorization of g is used as much as possible. Thus, the outcome of a full partial fraction expansion expresses that fraction as a sum of fractions, where:

the numerator is a polynomial of smaller degree than that irreducible polynomial. To decrease the degree of the numerator directly, the Euclidean division can be used, but in fact if ƒ already has lower degree than g this isn't helpful.

Using this idea inductively we can write R(x) as a sum with denominators powers of irreducible polynomials. To take this further, if required, write:

as a sum with denominators powers of F and numerators of degree less than F, plus a possible extra polynomial. This can be done by the Euclidean algorithm, polynomial case. The result is the following theorem:

Let ƒ and g be nonzero polynomials over a field K. Write g as a product of powers of distinct irreducible polynomials :

There are (unique) polynomials b and aij with deg aij < deg pi such that

If deg ƒ < deg g, then b = 0.

Therefore, when the field K is the complex numbers, we can assume that each pi has degree 1 (by the fundamental theorem of algebra) the numerators will be constant. When K is the real numbers, some of the pi might be quadratic, so, in the partial fraction decomposition, a quotient of a linear polynomial by a power of a quadratic might occur.

In the preceding theorem, one may replace "distinct irreducible polynomials" by "pairwise coprime polynomials that are coprime with their derivative". For example, the pi may be the factors of the square-free factorization of g. When K is the field of the rational numbers, as it is typically the case in computer algebra, this allows to replace factorization by greatest common divisor to compute the partial fraction decomposition.

Let ƒ and g be nonzero polynomials over a field K. Write g as a product of powers of pairwise coprime polynomials which have no multiple root in an algebraically closed field:

There are (unique) polynomials b and cij with deg cij < deg pi such that

where denotes the derivative of

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. In fact, we have

There are various methods to compute above decomposition. The one that is the simplest to describe is probably the so-called Hermite's method. As the degree of cij is bounded by the degree of pi, and the degree of b is the difference of the degrees of f and g (if this difference is non negative; otherwise, b=0), one may write these unknowns polynomials as polynomials with unknown coefficients. Reducing the two members of above formula to the same denominator and writing that the coefficients of each power of x are the same in the two numerators, one gets a system of linear equations which can be solved to obtain the desired values for the unknowns coefficients.

If Q(x) contains factors which are irreducible over the given field, then the numerator N(x) of each partial fraction with such a factor F(x) in the denominator must be sought as a polynomial with deg N < deg F, rather than as a constant. For example, take the following decomposition over R:

Suppose Q(x) = (x − α)rS(x) and S(α) ≠ 0. Then Q(x) has a zero α of multiplicityr, and in the partial fraction decomposition, r of the partial fractions will involve the powers of (x − α). For illustration, take S(x) = 1 to get the following decomposition:

where a1,..., am, b1,..., bn, c1,..., cn are real numbers with bi2 − 4ci < 0, and j1,..., jm, k1,..., kn are positive integers. The terms (x − ai) are the linear factors of q(x) which correspond to real roots of q(x), and the terms (xi2 + bix + ci) 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 ƒ(x) is the following:

Here, P(x) is a (possibly zero) polynomial, and the Air, Bir, and Cir 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 Air, Bir, and Cir. 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).

Alternatively, instead of expanding, one can obtain other linear dependences on the coefficients computing some derivatives at x=1 and at x=i in the above polynomial identity. (To this end, recall that the derivative at x=a of (x−a)mp(x) vanishes if m > 1 and it is just p(a) if m=1.) Thus, for instance the first derivative at x=1 gives