Skip to main content
Logo image

APEX Calculus

Section 6.5 Partial Fraction Decomposition

In this section we investigate the antiderivatives of rational functions. Recall that rational functions are functions of the form \(f(x)= \frac{p(x)}{q(x)}\text{,}\) where \(p(x)\) and \(q(x)\) are polynomials and \(q(x)\neq 0\text{.}\) Such functions arise in many contexts, one of which is the solving of certain fundamental differential equations.
Figure 6.5.1. Video introduction to Section 6.5
We begin with an example that demonstrates the motivation behind this section. Consider the integral \(\ds\int \frac{1}{x^2-1}\, dx\text{.}\) We do not have a simple formula for this (if the denominator were \(x^2+1\text{,}\) we would recognize the antiderivative as being the arctangent function). It can be solved using Trigonometric Substitution, but note how the integral is easy to evaluate once we realize:
\begin{equation*} \frac{1}{x^2-1} = \frac{1/2}{x-1} - \frac{1/2}{x+1}\text{.} \end{equation*}
Thus
\begin{align*} \int\frac{1}{x^2-1}\, dx \amp = \int\frac{1/2}{x-1}\, dx - \int\frac{1/2}{x+1}\, dx\\ \amp = \frac12\ln\abs{x-1} - \frac12\ln\abs{x+1} + C\text{.} \end{align*}
This section teaches how to decompose
\begin{equation*} \frac{1}{x^2-1} \text{ into } \frac{1/2}{x-1}-\frac{1/2}{x+1}\text{.} \end{equation*}
We start with a rational function \(f(x)=\frac{p(x)}{q(x)}\text{,}\) where \(p\) and \(q\) do not have any common factors and the degree of \(p\) is less than the degree of \(q\text{.}\) It can be shown that any polynomial, and hence \(q\text{,}\) can be factored into a product of linear and irreducible quadratic terms. The following Key Idea states how to decompose a rational function into a sum of rational functions whose denominators are all of lower degree than \(q\text{.}\)

Key Idea 6.5.2. Partial Fraction Decomposition.

Let \(\ds \frac{p(x)}{q(x)}\) be a rational function, where the degree of \(p\) is less than the degree of \(q\text{.}\)
  1. Linear Terms: Let \((x-a)\) divide \(q(x)\text{,}\) where \((x-a)^n\) is the highest power of \((x-a)\) that divides \(q(x)\text{.}\) Then the decomposition of \(\frac{p(x)}{q(x)}\) will contain the sum
    \begin{equation*} \frac{A_1}{(x-a)} + \frac{A_2}{(x-a)^2} + \cdots +\frac{A_n}{(x-a)^n}\text{.} \end{equation*}
  2. Quadratic Terms: Let \(x^2+bx+c\) be an irreducible quadratic that divides \(q(x)\text{,}\) where \((x^2+bx+c)^n\) is the highest power of \(x^2+bx+c\) that divides \(q(x)\text{.}\) Then the decomposition of \(\frac{p(x)}{q(x)}\) will contain the sum
    \begin{equation*} \frac{B_1x+C_1}{x^2+bx+c}+\frac{B_2x+C_2}{(x^2+bx+c)^2}+\cdots+\frac{B_nx+C_n}{(x^2+bx+c)^n}\text{.} \end{equation*}
To find the coefficients \(A_i\text{,}\) \(B_i\) and \(C_i\text{:}\)
  1. Multiply all fractions by \(q(x)\text{,}\) clearing the denominators. Collect like terms.
  2. Equate the resulting coefficients of the powers of \(x\) and solve the resulting system of linear equations.
The following examples will demonstrate how to put this Key Idea into practice. Example 6.5.3 stresses the decomposition aspect of the Key Idea.

Example 6.5.3. Decomposing into partial fractions.

Decompose \(\ds f(x)=\frac{1}{(x+5)(x-2)^3(x^2+x+2)(x^2+x+7)^2}\) without solving for the resulting coefficients.
Solution 1.
The denominator is already factored, as both \(x^2+x+2\) and \(x^2+x+7\) cannot be factored further. We need to decompose \(f(x)\) properly. Since \((x+5)\) is a linear term that divides the denominator, there will be a
\begin{equation*} \frac{A}{x+5} \end{equation*}
term in the decomposition.
As \((x-2)^3\) divides the denominator, we will have the following terms in the decomposition:
\begin{equation*} \frac{B}{x-2}, \frac{C}{(x-2)^2} \text{ and } \frac{D}{(x-2)^3}\text{.} \end{equation*}
The \(x^2+x+2\) term in the denominator results in a \(\ds\frac{Ex+F}{x^2+x+2}\) term.
Finally, the \((x^2+x+7)^2\) term results in the terms
\begin{equation*} \frac{Gx+H}{x^2+x+7} \text{ and } \frac{Ix+J}{(x^2+x+7)^2}\text{.} \end{equation*}
All together, we have
\begin{align*} \amp\frac{1}{(x+5)(x-2)^3(x^2+x+2)(x^2+x+7)^2}\\ \amp \quad\quad = \frac{A}{x+5} + \frac{B}{x-2}+ \frac{C}{(x-2)^2}+\frac{D}{(x-2)^3}\\ \amp \quad\quad\quad\quad + \frac{Ex+F}{x^2+x+2}+\frac{Gx+H}{x^2+x+7}+\frac{Ix+J}{(x^2+x+7)^2} \end{align*}
Solving for the coefficients \(A\text{,}\) \(B \ldots J\) would be a bit tedious but not “hard.”
Solution 2. Video solution

Example 6.5.4. Decomposing into partial fractions.

Perform the partial fraction decomposition of \(\ds \frac{1}{x^2-1}\text{.}\)
Solution 1.
The denominator factors into two linear terms: \(x^2-1 = (x-1)(x+1)\text{.}\) Thus
\begin{equation*} \frac{1}{x^2-1} = \frac{A}{x-1} + \frac{B}{x+1}\text{.} \end{equation*}
To solve for \(A\) and \(B\text{,}\) first multiply through by \(x^2-1 = (x-1)(x+1)\text{:}\)
\begin{align*} 1 \amp = \frac{A(x-1)(x+1)}{x-1}+\frac{B(x-1)(x+1)}{x+1}\\ \amp = A(x+1) + B(x-1)\\ \amp = Ax+A + Bx-B\\ \amp = (A+B)x + (A-B)\text{,} \end{align*}
by collecting like terms.
The next step is key. Note the equality we have:
\begin{equation*} 1 = (A+B)x+(A-B)\text{.} \end{equation*}
For clarity’s sake, rewrite the left hand side as
\begin{equation*} 0x+1 = (A+B)x+(A-B)\text{.} \end{equation*}
On the left, the coefficient of the \(x\) term is 0; on the right, it is \((A+B)\text{.}\) Since both sides are equal, we must have that \(0=A+B\text{.}\)
Likewise, on the left, we have a constant term of 1; on the right, the constant term is \((A-B)\text{.}\) Therefore we have \(1=A-B\text{.}\)
We have two linear equations with two unknowns. This one is easy to solve by hand, leading to
\begin{align*} A+B \amp = 0\\ A-B \amp = 1 \end{align*}
If we add these two equations, we get \(2A=1 \Rightarrow A=1/2\text{.}\) Substitution into the first equation gives \(B=-1/2\text{.}\)
Thus
\begin{equation*} \frac{1}{x^2-1} = \frac{1/2}{x-1}-\frac{1/2}{x+1}\text{.} \end{equation*}
Solution 2. Video solution
There is another method for finding the partial fraction decomposition called the “Heaviside” method, named after Oliver Heaviside. We show a variation of this process using the same example as in Example 6.5.3.

Example 6.5.5. Decomposing into partial fractions using the Heaviside method.

Perform the partial fraction decomposition of \(\ds \frac{1}{x^2-1}\text{.}\)
Solution 1.
As we saw in Example 6.5.4,
\begin{equation*} \frac{1}{x^2-1} = \frac{A}{x-1} + \frac{B}{x+1}\text{.} \end{equation*}
To solve for \(A\) and \(B\) using the Heaviside method, we will build to a common denominator:
\begin{align*} \frac{1}{x^2-1} \amp = \frac{A(x+1)}{(x-1)(x+1)}+\frac{B(x-1)}{(x+1)(x-1)}\\ \amp = \frac{A(x+1)+B(x-1)}{(x-1)(x+1)} \end{align*}
Now since the denomiators match, we will only consider the numerator equation (essentially if we multiply both sides of the equation by \((x-1)(x+1)\text{,}\) we will clear the denomiators):
\begin{equation*} 1=A(x+1)+B(x-1) \end{equation*}
Now we substitute in “convenient” values of \(x\text{.}\) When \(x=1\text{,}\) we get \(1=2A \Rightarrow A=1/2\text{.}\) When \(x=-1\text{,}\) we get \(1=-2B \Rightarrow B=-1/2\text{.}\)
You may note that \(x=1\) and \(x=-1\) were not in the domain of the original fraction. However,
\begin{equation*} \frac{1}{x^2-1}=\frac{A(x+1)+B(x-1)}{(x-1)(x+1)} \end{equation*}
is an identity, meaning it is true for all values of \(x\text{,}\) even those for which the equation is undefined. We could have chosen any values of \(x\) to substitute. Whenever possible, we choose values of \(x\) that will make one of the factors zero. In this way, we can avoid solving a system of equations.
Thus as in Example 6.5.3, we get
\begin{equation*} \frac{1}{x^2-1} = \frac{1/2}{x-1}-\frac{1/2}{x+1}\text{.} \end{equation*}
Solution 2. Video solution
For the remaining examples, we will use a combination of systems of equations and the Heaviside method to get partial fraction decompositions.

Example 6.5.6. Integrating using partial fractions.

Use partial fraction decomposition to integrate \(\ds\int\frac{1}{(x-1)(x+2)^2}\, dx\text{.}\)
Solution 1.
We decompose the integrand as follows, as described by Key Idea 6.5.2:
\begin{equation*} \frac{1}{(x-1)(x+2)^2} = \frac{A}{x-1} + \frac{B}{x+2} + \frac{C}{(x+2)^2}\text{.} \end{equation*}
To solve for \(A\text{,}\) \(B\) and \(C\text{,}\) we multiply both sides by \((x-1)(x+2)^2\text{:}\)
\begin{equation} 1 = A(x+2)^2 + B(x-1)(x+2) + C(x-1)\tag{6.5.1} \end{equation}
Now we collect like terms:
\begin{align*} 1 \amp = A(x+2)^2 + B(x-1)(x+2) + C(x-1)\\ \amp = Ax^2+4Ax+4A + Bx^2 + Bx-2B + Cx-C\\ \amp = (A+B)x^2 + (4A+B+C)x + (4A-2B-C) \end{align*}
We have
\begin{equation*} 0x^2+0x+ 1 = (A+B)x^2 + (4A+B+C)x + (4A-2B-C) \end{equation*}
leading to the equations
\begin{equation*} A+B = 0, 4A+B+C = 0 \text{ and } 4A-2B-C = 1\text{.} \end{equation*}
These three equations of three unknowns lead to a unique solution:
\begin{equation*} A = 1/9, B = -1/9 \text{ and } C = -1/3\text{.} \end{equation*}
Thus
\begin{equation*} \int\frac{1}{(x-1)(x+2)^2}\, dx = \int \frac{1/9}{x-1}\, dx + \int \frac{-1/9}{x+2}\, dx + \int \frac{-1/3}{(x+2)^2}\, dx\text{.} \end{equation*}
Each can be integrated with a simple substitution with \(u=x-1\) or \(u=x+2\) (or by directly applying Key Idea 6.1.5 as the denominators are linear functions). The end result is
\begin{equation*} \int\frac{1}{(x-1)(x+2)^2}\, dx = \frac19\ln\abs{x-1} -\frac19\ln\abs{x+2} +\frac1{3(x+2)}+C\text{.} \end{equation*}
Solution 2. Video solution
In examples like Example 6.5.6 where there are repeated roots, there is an extension of the Heaviside method using derivatives. This method is explained in Figure 6.5.7 below.
Figure 6.5.7. Alternate method for finding coefficients in Example 6.5.6

Example 6.5.8. Integrating using partial fractions.

Use partial fraction decomposition to integrate \(\ds \int \frac{x^3}{(x-5)(x+3)}\, dx\text{.}\)
Solution 1.
Key Idea 6.5.2 presumes that the degree of the numerator is less than the degree of the denominator. Since this is not the case here, we begin by using polynomial division to reduce the degree of the numerator. We omit the steps, but encourage the reader to verify that
\begin{equation*} \frac{x^3}{(x-5)(x+3)} = x+2+\frac{19x+30}{(x-5)(x+3)}\text{.} \end{equation*}
Using Key Idea 6.5.2, we can rewrite the new rational function as:
\begin{equation*} \frac{19x+30}{(x-5)(x+3)} = \frac{A}{x-5} + \frac{B}{x+3} \end{equation*}
for appropriate values of \(A\) and \(B\text{.}\) Clearing denominators, we have
\begin{align*} 19x+30 \amp = A(x+3) + B(x-5)\\ \amp = (A+B)x + (3A-5B).\\ \end{align*}
This implies that:
\begin{align*} 19\amp = A+B\\ 30\amp = 3A-5B.\\ \end{align*}
Solving this system of linear equations gives
\begin{align*} 125/8 \amp =A\\ 27/8 \amp =B\text{.} \end{align*}
We can now integrate.
\begin{align*} \int \frac{x^3}{(x-5)(x+3)}\, dx \amp = \int\left(x+2+\frac{125/8}{x-5}+\frac{27/8}{x+3}\right)\, dx\\ \amp = \frac{x^2}2 + 2x + \frac{125}{8}\ln\abs{x-5} + \frac{27}8\ln\abs{x+3} + C\text{.} \end{align*}
Solution 2. Video solution

Example 6.5.9. Integrating using partial fractions.

Use partial fraction decomposition to evaluate \(\ds \int\frac{7x^2+31x+54}{(x+1)(x^2+6x+11)}\, dx\text{.}\)
Solution 1.
The degree of the numerator is less than the degree of the denominator so we begin by applying Key Idea 6.5.2. We have:
\begin{align*} \frac{7x^2+31x+54}{(x+1)(x^2+6x+11)} \amp = \frac{A}{x+1} + \frac{Bx+C}{x^2+6x+11}.\\ \end{align*}
Now clear the denominators.
\begin{align*} 7x^2+31x+54 \amp = A(x^2+6x+11) + (Bx+C)(x+1) \end{align*}
Now, letting \(x=-1\) we have \(30 = 6A \Rightarrow A=5\text{.}\) When \(x=0\text{,}\) \(54 = 11A+C\text{.}\) But we know that \(A=5\text{,}\) so \(54 =55+C \Rightarrow C=-1\) Finally, we choose \(x=1\) (with \(A=5, C=-1\)) we have \(92=90+(B-1)(2)\Rightarrow B=2\text{.}\)
Thus
\begin{equation*} \int\frac{7x^2+31x+54}{(x+1)(x^2+6x+11)}\, dx = \int\left(\frac{5}{x+1} + \frac{2x-1}{x^2+6x+11}\right)\, dx\text{.} \end{equation*}
The first term of this new integrand is easy to evaluate; it leads to a \(5\ln\abs{x+1}\) term. The second term is not hard, but takes several steps and uses substitution techniques.
The integrand \(\ds \frac{2x-1}{x^2+6x+11}\) has a quadratic in the denominator and a linear term in the numerator. This leads us to try substitution. Let \(u = x^2+6x+11\text{,}\) so \(du = (2x+6)\, dx\text{.}\) The numerator is \(2x-1\text{,}\) not \(2x+6\text{,}\) but we can get a \(2x+6\) term in the numerator by adding 0 in the form of “\(7-7\text{.}\)
\begin{align*} \frac{2x-1}{x^2+6x+11} \amp = \frac{2x-1+7-7}{x^2+6x+11}\\ \amp = \frac{2x+6}{x^2+6x+11} - \frac{7}{x^2+6x+11}\text{.} \end{align*}
We can now integrate the first term with substitution, leading to a \(\ln\abs{x^2+6x+11}\) term. The final term can be integrated using arctangent. (We can tell there is no further factoring for this quadratic since the denominator has no real solutions). First, complete the square in the denominator:
\begin{equation*} \frac{7}{x^2+6x+11} = \frac{7}{(x+3)^2+2}\text{.} \end{equation*}
An antiderivative of the latter term can be found using Theorem 6.1.20 and substitution:
\begin{equation*} \int \frac{7}{x^2+6x+11}\, dx = \frac{7}{\sqrt{2}}\tan^{-1}\left(\frac{x+3}{\sqrt{2}}\right)+C\text{.} \end{equation*}
Let’s start at the beginning and put all of the steps together.
\begin{align*} \amp \int\frac{7x^2+31x+54}{(x+1)(x^2+6x+11)}\, dx\\ \amp = \int\left(\frac{5}{x+1} + \frac{2x-1}{x^2+6x+11}\right)\, dx\\ \amp = \int\frac{5}{x+1}\, dx + \int\frac{2x+6}{x^2+6x+11}\, dx -\int\frac{7}{(x+3)^2+2}\, dx\\ \amp = 5\ln\abs{x+1}+ \ln\abs{x^2+6x+11} -\frac{7}{\sqrt{2}}\tan^{-1}\left(\frac{x+3}{\sqrt{2}}\right)+C\text{.} \end{align*}
As with many other problems in calculus, it is important to remember that one is not expected to “see” the final answer immediately after seeing the problem. Rather, given the initial problem, we break it down into smaller problems that are easier to solve. The final answer is a combination of the answers of the smaller problems.
Solution 2. Video solution
Partial Fraction Decomposition is an important tool when dealing with rational functions. Note that at its heart, it is a technique of algebra, not calculus, as we are rewriting a fraction in a new form. Regardless, it is very useful in the realm of calculus as it lets us evaluate a certain set of “complicated” integrals.
Section 6.6 introduces new functions, called the Hyperbolic Functions. They will allow us to make substitutions similar to those found when studying Trigonometric Substitution, allowing us to approach even more integration problems.

Exercises Exercises

Terms and Concepts

1.
Partial Fraction Decomposition is a method of rewriting functions.
2.
  • True
  • False
It is sometimes necessary to use polynomial division before using Partial Fraction Decomposition.
Exercise Group.
Decompose without solving for the coefficients, as done in Example 6.5.3.
3.
\(\ds {\frac{1}{x^{2}+8x}}\)
4.
\(\ds {\frac{8-2x}{x^{2}-1}}\)
5.
\(\ds {\frac{x-8}{x^{2}-3}}\)
6.
\(\ds {\frac{7x+6}{x^{3}+4x}}\)

Problems

Exercise Group.
Evaluate the indefinite integral.
7.
\(\ds \int {\frac{7x+19}{x^{2}+5x+6}} \, dx\)
8.
\(\ds \int {-\frac{5x+63}{x^{2}+9x}} \, dx\)
9.
\(\ds \int {\frac{-72}{4x^{2}-64}} \, dx\)
10.
\(\ds \int {\frac{17-8x}{17x-4x^{2}-4}} \, dx\)
11.
\(\ds \int {\frac{9x-47}{\left(x-6\right)^{2}}} \, dx\)
12.
\(\ds \int {\frac{6x-46}{\left(x-8\right)^{2}}} \, dx\)
13.
\(\ds \int {\frac{10x^{2}+96x+192}{x\mathopen{}\left(x+8\right)^{2}}} \, dx\)
14.
\(\ds \int {\frac{28x^{2}+74x+1780}{\left(x+7\right)\mathopen{}\left(x-8\right)\mathopen{}\left(2-8x\right)}} \, dx\)
15.
\(\ds \int {\frac{31x^{2}+427x}{\left(5x-60\right)\mathopen{}\left(4x+3\right)\mathopen{}\left(7x+10\right)}} \, dx\)
16.
\(\ds \int {\frac{x^{2}+14x+42}{x^{2}+9x+18}} \, dx\)
17.
\(\ds \int {\frac{x^{3}}{x^{2}-7x-8}} \, dx\)
18.
\(\ds \int {\frac{4x^{2}-8x+16}{x^{2}-2x+4}} \, dx\)
19.
\(\ds \int {\frac{1}{x^{3}-4x^{2}+6x}} \, dx\)
20.
\(\ds \int {\frac{x^{2}-4x+21}{x^{2}-6x+15}} \, dx\)
21.
\(\ds \int {\frac{27x^{2}-20x+10}{\left(x-1\right)\mathopen{}\left(9x^{2}-x+9\right)}} \, dx\)
22.
\(\ds \int {\frac{9x^{2}+91x+226}{\left(x+7\right)\mathopen{}\left(x^{2}+8x+17\right)}} \, dx\)
23.
\(\ds \int {\frac{\left(8\right)x^{2}+\left(9\right)x+\left(1\right)}{\left(x-6\right)\mathopen{}\left(x^{2}+4\right)}} \, dx\)
24.
\(\ds \int {\frac{x^{2}+\left(3\right)x+\left(40\right)}{\left(x+5\right)\mathopen{}\left(x^{2}+4x+20\right)}} \, dx\)
25.
\(\ds \int {\frac{x^{2}-x-25}{\left(x-3\right)\mathopen{}\left(x^{2}+2x+4\right)}} \, dx\)
26.
\(\ds \int {\frac{\left(290\right)-\left(\left(1\right)x^{2}+\left(49\right)x\right)}{\left(x+7\right)\mathopen{}\left(x^{2}-10x+27\right)}} \, dx\)
Exercise Group.
Evaluate the definite integral.
27.
\(\ds \int_{1}^{2} {\frac{14x+12}{\left(x+3\right)\mathopen{}\left(x-3\right)}}\, dx\)
28.
\(\ds \int_{0}^{7} {\frac{4x-6}{\left(5x+3\right)\mathopen{}\left(x+9\right)}}\, dx\)
29.
\(\ds \int_{-1}^{1} {\frac{x^{2}-5x+5}{\left(x-5\right)\mathopen{}\left(x^{2}-6x+10\right)}}\, dx\)
30.
\(\ds \int_{0}^1 \frac{x}{(x+1)(x^2+2x+1)}\, dx\)