Skip to main content

Section 3.4 Integrals of Rational Functions

In this section we apply techniques from previous sections to compute integrals of rational functions over the real numbers. The new ingredient is partial fraction decomposition. This method enables us to express a rational function, P/Q (P,Q co-prime polynomials) as the sum of a polynomial and rational functions whose denominators are powers of irreducible factors of Q.

Subsection 3.4.1 Partial Fraction Decomposition

We first recall a few definitions and facts about polynomials.
A non-zero polynomial is monic if its leading coefficient is 1. A non-constant polynomial is irreducible if it is not a product of two polynomials of positive degree. Two polynomials are co-prime if they do not have any positive degree factor in common.
A linear (degree 1) polynomial is clearly irreducible. A quadratic polynomial is reducible if and only if it has a linear factor. Dividing a polynomial p(x) by a linear polynomial (xa) (aR), we get
p(x)=q(x)(xa)+r
Therefore, a is a root of p(x) if and only if xa divides p(x). As a result, a quadratic polynomial ax2+bx+c is reducible over the real numbers if and only if it has a real root if and only if its discriminant, b24ac, is non-negative.

Example 3.36.

The polynomial x2+1 is irreducible over the real numbers since it has no real roots. However, it is reducible, factored as (xi)(x+i), over the complex numbers.
The polynomial x22=(x2)(x+2) is reducible over the real numbers but it is irreducible over the rational numbers, since neither of its roots (±2) is rational.
These simple examples demonstrate that irreducibility of polynomials is sensitive to the type of coefficients that are allowed.
The follow statement asserts the existence and uniqueness of partial fraction decomposition for rational functions.
The assumptions on P and Q in the theorem above can always be achieved: by dividing the leading coefficient of Q into P, we can assume Q is monic. We should point out that requiring Q to be monic only makes the statement simpler but not essential. By canceling common non-constants factors of P and Q, we can assume they are co-prime. Doing this potentially extends the domain of the rational function P/Q by finitely many points. With them taken out, the indefinite integral of P/Q and that for the reduced fraction are the same.
The page
 1 
en.wikipedia.org/wiki/Partial_fraction_decomposition
contains a sketch of proof of Theorem 3.37 and more information about partial fraction decomposition.
We illustrate how to compute partial fraction decomposition by a few examples. From the discussion above, we only need to focus on the case where the rational function F(x) is written as P(x)/Q(x) where P(x) and Q(x) are co-prime polynomials and that degP(x)<degQ(x). In this case, we call Q(x) the denominator of F(x). Note that Q(x) is determined by F(x) only up to a non-zero multiplicative constant.

Example 3.38.

Let us find the partial fraction decomposition of the rational function F(x)=x12x2x3. The denominator Q(x)=2x2x3 of F(x) is reducible since its discriminant (1)24(2)(3)=25, is positive. Indeed, Q(x) factors as (x+1)(2x3). Let us put this in the form of a table:
Table 3.39. Table for the partial fractions decomposition of F(x)
factor degree multiplicity
x+1 1 1
2x3 1 1
According to Theorem 3.37, each irreducible factor of Q(x) corresponding to a group of summands. The multiplicity of that factor is the number of summands in that group (one for each power). And the degree of that factor determines the form of the numerator in each of the summand in that group. If the degree is 1 then the corresponding numerator is simply a constant. If the degree is 2, then the corresponding numerator is of a linear form.
x12x2x3A11x+1+A212x3
We can find A11 and A21 by comparing coefficients which transfers the problem into one about solving a system of linear equations (and hence can be handled by linear algebra in general). For simplicity, we relabel the coefficients A11 and A21 as A1 and A2, respectively.
A1x+1+A22x3A1(2x3)+A2(x+1)(x+1)(2x3).
By comparing of the numerators, we get
(3.8)x1A1(2x3)+A2(x+1)(2A1+A2)x+(3A1+A2).
and so,
(3.9)2A1+A2=1and3A1+A2=1.
Solving this system of linear equations yields A1=2/5,A2=1/5, therefore the partial fractions decomposition of F(x) is
2/5x+1+1/52x3=25(x+1)+15(2x3).

Example 3.40.

Let us compute the partial fraction decomposition of
F(x)=P(x)Q(x)=2x5x4+3x3x+1(x1)(x2+1)2.
This time degP is not smaller than the degree of degQ (both are of degree 5). So, the polynomial part of the decomposition is not zero. We can find that out by dividing P by Q, say using long division. We find thatP(x)=2Q(x)+(x4x3+4x23x+3). Thus,
P(x)Q(x)=2+x4x3+4x23x+3(x1)(x2+1)2.
One checks that R(x):=x4x3+4x23x+3 and Q(x) have no irreducible factors in common. By uniqueness of partial fraction, it remains to compute the partial fraction decomposition of R/Q. Again we organize the information obtained from the factorization of Q(x) in a table:
Table 3.41. Table for the partial fractions decomposition of F(x)
factor degree multiplicity
x1 1 1
x2+1 2 2
Thus, the decomposition of R(x)/Q(x) has the form:
x4x3+4x23x+3(x1)(x2+1)2A11x1+B11x+C11x2+1+B12x+C12(x2+1)2.
By clearing the denominators, we arrive at
x4x3+4x23x+3A11(x2+1)2+(B11x+C11)(x1)(x2+1)+(B12x+C12)(x1).
The identity holds for all x so instead of comparing coefficients, one can also derive linear relations among the coefficients by setting x to various values. We aim at getting these relations as simple as possible, for instance, by setting x=1, we arrive at
11+43+3=A11(12+1)2.
That is 4=4A11 and so A11=1. Next by setting x=0, equivalently by comparing the constant terms on both sides, we get 3=A11C11C12=1C11C12. So, C11+C12=2.
We can mix these techniques: at this point by comparing the leading coefficients on both sides, we get 1=A11+B11=1+B11, so B11=0. Comparing the coefficients of the x term leads us to
3=B11+C11B12+C123=0B12+(2)
and so B12=1. At this juncture, we need one more relation among C11 and C12. We can do that by substituting another value for x. For example, we get 3=2C11+C12 by setting x=1 (checks that yourself). And so together with C11+C12=2 we conclude that C11=1=C12.
Putting all these together, the partial fraction decomposition of P/Q is
2x5x4+3x3x+1(x1)(x2+1)2=2+1x1+1x2+1+x1(x2+1)2.

Example 3.42.

Let us compute the partial fraction decomposition of
PQ=2x2+7x8x3x2+8x+10
Note that Q(x) has degree larger than 2 and so must be reducible over the real numbers. In fact, the intermediate value theorem guarantees a real root for a cubic polynomial over R and hence a linear factor. For instance, in this particular case,
Q(2)<0<Q(0)
so Q(x) must of a root between 2 and 0. Keep in mind, sketching the graph of a function often give you some insights on where are the roots located.
In general, the roots of a cubic can be expressed in terms of its coefficients by arithmetic operations and taking surds. However, we can guess the "nice" roots if there are some. Suppose we have a factorization
x3x2+8x+10=(xr)(x2+bx+c)
where r is an integer. Then rc=10 and hence r must be a factor of 10. And given we know that there is a root of Q(x) between 2 and 0, it is easy to check that r=1 is a root of Q(x). Thus, by dividing Q(x) by (x(1))=(x+1), we have
x3x2+8x+10=(x+1)(x22x+10)
Since x22x+10=(x1)2+9 has no real roots, it is irreducible. Therefore, the partial fraction decomposition of P/Q looks like
2x2+7x8x3x2+8x+10=Ax+1+Bx+C(x1)2+9
By multiplying Q(x) on both sides, we get to
2x2+7x8A((x1)2+9)+(Bx+C)(x+1).
Setting x=1 yields 13=13A, so A=1. Then by setting x=0, we get
8=(1)((1)2+9)+C=10+C.
Thus, C=2. And by comparing the coefficients of x2 on both sides, we see that 2=A+B=1+B, so B=3.
Putting all these together, we get
2x2+7x8x3x2+8x+10=1x+1+3x+2(x1)2+9
Figure 3.43.
The computations can get much messier for "random" rational functions and are best handle by computers programs.

Checkpoint 3.44.

Find the partial fraction decomposition of
x6+5x53x4+15x314x2+35x10(x2)(x2+1)2(x24).
Answer.
The decomposition has the form:
A11x+2+A21x2+A22(x2)2+B11x+C11x2+1+B12x+C12(x2+1)2.
And the partial fraction decomposition is
1x+2+1x2+3(x2)2+xx2+1+2x1(x2+1)2.

Subsection 3.4.2 The reduced cases

With partial fraction decomposition the problem of integrating rational functions over the real numbers reduces to the one of finding integrals of the form
A(xa)kdx and Bx+C(x2+bx+c)kdx(k1).
The first case is straightforward:
(3.10)A(xa)kdx={Aln|xa|+Ck=1A(k1)(xa)k1+Ck>1.
In the second case, x2+bx+c is irreducible. So by completing square and a linear change in variable, the problem boils down to finding integrals of the following two kinds
Bx(x2+a2)kdx,C(x2+a2)kdx
The first kind can be handled by the substitution u=x2+a2 and the second kind is handled by the trigonometric substitution x=atanθ. Let us illustrate these strategy by an example.

Example 3.45.

Let us find the integral x+8x2+6x+34dx. Completing square we have, x2+6x+34=(x+3)2+25. So the substitution u=x+3 turns to integral to
u+5u2+25du=uu2+25du+5duu2+25.
Using the substitution u=5tanθ, we find
5duu2+25=θ+C=arctan(u5)+C=arctan(x+35)+C.
Letting w=u2+25, we get
uu2+25du=dw2w=12ln|w|+C=12ln(u2+5)+C=ln(x2+6x+34)+C
Putting these together, we conclude that
x+8x2+6x+34dx=ln(x2+6x+34)+arctan(x+35)+C