# 8.4 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)}$, where $p(x)$ and $q(x)$ are polynomials and $q(x)\neq 0$. Such functions arise in many contexts, one of which is the solving of certain fundamental differential equations.

We begin with an example that demonstrates the motivation behind this section. Consider the integral $\displaystyle\int\frac{1}{x^{2}-1}\operatorname{d}\!x$. We do not have a simple formula for this (if the denominator were $x^{2}+1$, 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:

 $\frac{1}{x^{2}-1}=\frac{1/2}{x-1}-\frac{1/2}{x+1}.$

Thus

 $\displaystyle\int\frac{1}{x^{2}-1}\operatorname{d}\!x$ $\displaystyle=\int\frac{1/2}{x-1}\operatorname{d}\!x-\int\frac{1/2}{x+1}% \operatorname{d}\!x$ $\displaystyle=\frac{1}{2}\ln\left\lvert x-1\right\rvert-\frac{1}{2}\ln\left% \lvert x+1\right\rvert+C.$

This section teaches how to decompose

 $\frac{1}{x^{2}-1}\quad\text{into}\quad\frac{1/2}{x-1}-\frac{1/2}{x+1}.$

We start with a rational function $f(x)=\dfrac{p(x)}{q(x)}$, where $p$ and $q$ do not have any common factors. We first consider the degree of $p$ and $q$.

• If the $\deg(p)\geq\deg(q)$ then we use polynomial long division to divide $q$ into $p$ to determine a remainder $r(x)$ where $\deg(r)<\deg(q)$. We then write $f(x)=s(x)+\dfrac{r(x)}{q(x)}$ and apply partial fraction decomposition to $\dfrac{r(x)}{q(x)}$.

• If the $\deg(p)<\deg(q)$ we can apply partial fraction decomposition to $\dfrac{p(x)}{q(x)}$ without additional work.

Partial fraction decomposition is based on an algebraic theorem that guarantees that any polynomial, and hence $q$, can use real numbers to factor into the product of linear and irreducible quadratic factors. margin: An irreducible quadratic is one that cannot factor into linear terms with real coefficients. Λ 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$.

###### Key Idea 8.4.1 Partial Fraction Decomposition

Let $\dfrac{p(x)}{q(x)}$ be a rational function, where $\deg(p)<\deg(q)$.

1. (a)

Factor $\mathbf{q(x):}$ Write $q(x)$ as the product of its linear and irreducible quadratic factors of the form $(ax+b)^{m}$ and $(ax^{2}+bx+c)^{n}$ where $m$ and $n$ are the highest powers of each factor that divide $q$.

• Linear Terms: For each linear factor of $q(x)$ the decomposition of $\dfrac{p(x)}{q(x)}$ will contain the following terms:

 $\frac{A_{1}}{(ax+b)}+\frac{A_{2}}{(ax+b)^{2}}+\dotsb\frac{A_{m}}{(ax+b)^{m}}$
• Irreducible Quadratic Terms: For each irreducible quadratic factor of $q(x)$ the decomposition of $\dfrac{p(x)}{q(x)}$ will contain the following terms:

 $\dfrac{B_{1}x+C_{1}}{(ax^{2}+bx+c)}+\frac{B_{2}x+C_{2}}{(ax^{2}+bx+c)^{2}}+% \dotsb\frac{B_{n}x+C_{n}}{(ax^{2}+bx+c)^{n}}$
2. (b)

Finding the Coefficients $\mathbf{A_{i}}$, $\mathbf{B_{i}}$, and $\mathbf{C_{i}}$:

• Set $\dfrac{p(x)}{q(x)}$ equal to the sum of its linear and irreducible quadratic terms.

 $\frac{p(x)}{q(x)}=\frac{A_{1}}{(ax+b)}+\dotsb\frac{A_{m}}{(ax+b)^{m}}+\frac{B_% {1}x+C_{1}}{(ax^{2}+bx+c)}+\dotsb\frac{B_{n}x+C_{n}}{(ax^{2}+bx+c)^{n}}$
• Multiply this equation by the factored form of $q(x)$ and simplify to clear the denominators.

• Solve for the coefficients $A_{i},B_{i},$ and $C_{i}$ by

1. (a)

multiplying out the remaining terms and collecting like powers of $x$, equating the resulting coefficients and solving the resulting system of linear equations, or

2. (b)

substituting in values for $x$ that eliminate terms so the simplified equation can be solved for a coefficient.

The following examples will demonstrate how to put this Key Idea into practice. In Example 8.4.1, we focus on the setting up the decomposition of a rational function.

###### Example 8.4.1 Decomposing into partial fractions

Decompose $\displaystyle f(x)=\frac{1}{(x+5)(x-2)^{3}(x^{2}+x+2)(x^{2}+x+7)^{2}}$ without solving for the resulting coefficients.

SolutionThe denominator is already factored, as both $x^{2}+x+2$ and $x^{2}+x+7$ are irreducible quadratics. We need to decompose $f(x)$ properly. Since $(x+5)$ is a linear factor that divides the denominator, there will be a

 $\frac{A}{x+5}$

term in the decomposition.

As $(x-2)^{3}$ divides the denominator, we will have the following terms in the decomposition:

 $\frac{B}{x-2},\quad\frac{C}{(x-2)^{2}}\quad\text{and}\quad\frac{D}{(x-2)^{3}}.$

The $x^{2}+x+2$ term in the denominator results in a $\displaystyle\frac{Ex+F}{x^{2}+x+2}$ term.

Finally, the $(x^{2}+x+7)^{2}$ term results in the terms

 $\frac{Gx+H}{x^{2}+x+7}\quad\text{and}\quad\frac{Ix+J}{(x^{2}+x+7)^{2}}.$

All together, we have

 $\frac{1}{(x+5)(x-2)^{3}(x^{2}+x+2)(x^{2}+x+7)^{2}}=\\ \frac{A}{x+5}+\frac{B}{x-2}+\frac{C}{(x-2)^{2}}+\frac{D}{(x-2)^{3}}+\\ \frac{Ex+F}{x^{2}+x+2}+\frac{Gx+H}{x^{2}+x+7}+\frac{Ix+J}{(x^{2}+x+7)^{2}}$

Solving for the coefficients $A$, $B$, …, $J$ would be a bit tedious but not “hard.” In the next example we demonstrate solving for the coefficients using both methods given in Key Idea 8.4.1.

###### Example 8.4.2 Decomposing into partial fractions

Perform the partial fraction decomposition of $\displaystyle\frac{1}{x^{2}-1}$.

SolutionThe denominator can be written as the product of two linear factors: $x^{2}-1=(x-1)(x+1)$. Thus

 $\frac{1}{x^{2}-1}=\frac{A}{x-1}+\frac{B}{x+1}.$ (8.4.1)

Using the method described in Key Idea 8.4.1 2(a) to solve for $A$ and $B$, first multiply through by $x^{2}-1=(x-1)(x+1)$:

 $\displaystyle 1$ $\displaystyle=\frac{A(x-1)(x+1)}{x-1}+\frac{B(x-1)(x+1)}{x+1}$ $\displaystyle=A(x+1)+B(x-1)$ (8.4.2) $\displaystyle=Ax+A+Bx-B$ $\displaystyle=(A+B)x+(A-B)\qquad\text{collect like terms.}$

The next step is key. For clarity’s sake, rewrite the equality we have as

 $0x+1=(A+B)x+(A-B).$

On the left, the coefficient of the $x$ term is 0; on the right, it is $(A+B)$. Since both sides are equal for all values of $x$, we must have that $0=A+B$. Likewise, on the left, we have a constant term of 1; on the right, the constant term is $(A-B)$. Therefore we have $1=A-B$.

We have two linear equations with two unknowns. This one is easy to solve by hand, leading to

 \begin{aligned} A+B&=0\\ A-B&=1\end{aligned}\qquad\Rightarrow\qquad\begin{aligned} A&=1/2\\ B&=-1/2.\end{aligned}

Thus

 $\frac{1}{x^{2}-1}=\frac{1/2}{x-1}-\frac{1/2}{x+1}.$

Before solving for $A$ and $B$ using the method described in Key Idea 8.4.1 2(b), we note that Equations (8.4.1) and (8.4.2) are not equivalent. Only the second equation holds for all values of $x$, including $x=-1$ and $x=1$, by continuity of polynomials. Thus, we can choose values for $x$ that eliminate terms in the polynomial to solve for $A$ and $B$.

 $1=A(x+1)+B(x-1).$

If we choose $x=-1$,

 $\displaystyle 1$ $\displaystyle=A(0)+B(-2)$ $\displaystyle B$ $\displaystyle=-\frac{1}{2}.$

Next choose $x=1$:

 $\displaystyle 1$ $\displaystyle=A(2)+B(0)$ $\displaystyle A$ $\displaystyle=\frac{1}{2}.$

Resulting in the same decomposition as above.

In Example 8.4.3, we solve for the decomposition coefficients using the system of linear equations (method 2a). The margin note explains how to solve using substitution (method 2b).

###### Example 8.4.3 Integrating using partial fractions

Use partial fraction decomposition to integrate $\displaystyle\int\frac{1}{(x-1)(x+2)^{2}}\operatorname{d}\!x$.

SolutionWe decompose the integrand as follows, as described by Key Idea 8.4.1:

 $\frac{1}{(x-1)(x+2)^{2}}=\frac{A}{x-1}+\frac{B}{x+2}+\frac{C}{(x+2)^{2}}.$ (8.4.3)

To solve for $A$, $B$ and $C$, we multiply both sides by $(x-1)(x+2)^{2}$ and collect like terms: margin: Note: Equations (8.4.3) and (8.4.4) are not equivalent for $x=1$ and $x=-2$. However, due to the continuity of polynomials we can let $x=1$ to simplify the right hand side to $A(1+2)^{2}=9A$. Since the left hand side is still $1$, we have $1=9A$, so that $A=1/9$. Likewise,when $x=-2$; this leads to the equation $1=-3C$. Thus $C=-1/3$. Knowing $A$ and $C$, we can find the value of $B$ by choosing yet another value of $x$, such as $x=0$, and solving for $B$. Λ

 $\displaystyle 1$ $\displaystyle=A(x+2)^{2}+B(x-1)(x+2)+C(x-1)$ (8.4.4) $\displaystyle=Ax^{2}+4Ax+4A+Bx^{2}+Bx-2B+Cx-C$ $\displaystyle=(A+B)x^{2}+(4A+B+C)x+(4A-2B-C)$

We have

 $0x^{2}+0x+1=(A+B)x^{2}+(4A+B+C)x+(4A-2B-C)$

 $A+B=0,\quad 4A+B+C=0\quad\text{and}\quad 4A-2B-C=1.$

These three equations of three unknowns lead to a unique solution:

 $A=1/9,\quad B=-1/9\quad\text{and}\quad C=-1/3.$

Thus

 $\int\frac{1}{(x-1)(x+2)^{2}}\operatorname{d}\!x=\int\frac{1/9}{x-1}% \operatorname{d}\!x+\int\frac{-1/9}{x+2}\operatorname{d}\!x+\int\frac{-1/3}{(x% +2)^{2}}\operatorname{d}\!x.$

Each can be integrated with a simple substitution with $u=x-1$ or $u=x+2$. The end result is

 $\int\frac{1}{(x-1)(x+2)^{2}}\operatorname{d}\!x=\frac{1}{9}\ln\left\lvert x-1% \right\rvert-\frac{1}{9}\ln\left\lvert x+2\right\rvert+\frac{1}{3(x+2)}+C.$
###### Example 8.4.4 Integrating using partial fractions

Use partial fraction decomposition to integrate $\displaystyle\int\frac{x^{3}}{(x-5)(x+3)}\operatorname{d}\!x$.

SolutionKey Idea 8.4.1 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

 $\frac{x^{3}}{(x-5)(x+3)}=x+2+\frac{19x+30}{(x-5)(x+3)}.$

Using Key Idea 8.4.1, we can rewrite the new rational function as:

 $\frac{19x+30}{(x-5)(x+3)}=\frac{A}{x-5}+\frac{B}{x+3}$

for appropriate values of $A$ and $B$. Clearing denominators, we have

 $19x+30=A(x+3)+B(x-5).$

As in the previous examples we choose values of $x$ to eliminate terms in the polynomial. If we choose $x=-3$,

 $\displaystyle 19(-3)+30$ $\displaystyle=A(0)+B(-8)$ $\displaystyle B$ $\displaystyle=\frac{27}{8}.$

Next choose $x=5$:

 $\displaystyle 19(5)+30$ $\displaystyle=A(8)+B(0)$ $\displaystyle A$ $\displaystyle=\frac{125}{8}.$

We can now integrate:

 $\displaystyle\int\frac{x^{3}}{(x-5)(x+3)}\operatorname{d}\!x$ $\displaystyle=\int\left(x+2+\frac{125/8}{x-5}+\frac{27/8}{x+3}\right)% \operatorname{d}\!x$ $\displaystyle=\frac{x^{2}}{2}+2x+\frac{125}{8}\ln\left\lvert x-5\right\rvert+% \frac{27}{8}\ln\left\lvert x+3\right\rvert+C.$

Before the next example we remind the reader of a rational integrand evaluated by trigonometric substitution:

 $\int\frac{1}{x^{2}+a^{2}}\operatorname{d}\!x=\frac{1}{a}\tan^{-1}\left(\frac{x% }{a}\right)+C.$
###### Example 8.4.5 Integrating using partial fractions

Use partial fraction decomposition to evaluate $\displaystyle\int\frac{7x^{2}+31x+54}{(x+1)(x^{2}+6x+11)}\operatorname{d}\!x$.

SolutionThe degree of the numerator is less than the degree of the denominator so we begin by applying Key Idea 8.4.1. We have:

 $\displaystyle\frac{7x^{2}+31x+54}{(x+1)(x^{2}+6x+11)}$ $\displaystyle=\frac{A}{x+1}+\frac{Bx+C}{x^{2}+6x+11}.$ Now clear the denominators. $\displaystyle 7x^{2}+31x+54$ $\displaystyle=A(x^{2}+6x+11)+(Bx+C)(x+1).$

Again, we choose values of $x$ to eliminate terms in the polynomial. If we choose $x=-1$,

 $\displaystyle 30$ $\displaystyle=6A+(-B+C)(0)$ $\displaystyle A$ $\displaystyle=5.$

Although none of the other terms can be zeroed out, we continue by letting $A=5$ and substituting helpful values of $x$. Choosing $x=0$, we notice

 $\displaystyle 54$ $\displaystyle=55+C$ $\displaystyle C$ $\displaystyle=-1.$

Finally, choose $x=1$ (any value other than $-1$ and $0$ can be used, $1$ is easy to work with)

 $\displaystyle 92$ $\displaystyle=90+(B-1)(2)$ $\displaystyle B$ $\displaystyle=2.$

Thus

 $\int\frac{7x^{2}+31x+54}{(x+1)(x^{2}+6x+11)}\operatorname{d}\!x=\int\left(% \frac{5}{x+1}+\frac{2x-1}{x^{2}+6x+11}\right)\operatorname{d}\!x.$

The first term of this new integrand is easy to evaluate; it leads to a $5\ln\left\lvert x+1\right\rvert$ term. The second term is not hard, but takes several steps and uses substitution techniques.

The integrand $\dfrac{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$, so $du=(2x+6)\operatorname{d}\!x$. The numerator is $2x-1$, not $2x+6$, but we can get a $2x+6$ term in the numerator by adding 0 in the form of “$7-7$.”

 $\displaystyle\frac{2x-1}{x^{2}+6x+11}$ $\displaystyle=\frac{2x-1+7-7}{x^{2}+6x+11}$ $\displaystyle=\frac{2x+6}{x^{2}+6x+11}-\frac{7}{x^{2}+6x+11}.$

We can now integrate the first term with substitution, yielding $\ln\left\lvert x^{2}+6x+11\right\rvert$. The final term can be integrated using arctangent. First, complete the square in the denominator:

 $\frac{7}{x^{2}+6x+11}=\frac{7}{(x+3)^{2}+2}.$

An antiderivative of the latter term can be found using Key Idea 8.3.1 and substitution:

 $\int\frac{7}{x^{2}+6x+11}\operatorname{d}\!x=\frac{7}{\sqrt{2}}\tan^{-1}\left(% \frac{x+3}{\sqrt{2}}\right)+C.$

Let’s start at the beginning and put all of the steps together.

 $\displaystyle\int$ $\displaystyle\frac{7x^{2}+31x+54}{(x+1)(x^{2}+6x+11)}\operatorname{d}\!x$ $\displaystyle=\int\left(\frac{5}{x+1}+\frac{2x-1}{x^{2}+6x+11}\right)% \operatorname{d}\!x$ $\displaystyle=\int\frac{5}{x+1}\operatorname{d}\!x+\int\frac{2x+6}{x^{2}+6x+11% }\operatorname{d}\!x-\int\frac{7}{x^{2}+6x+11}\operatorname{d}\!x$ $\displaystyle=5\ln\left\lvert x+1\right\rvert+\ln\left\lvert x^{2}+6x+11\right% \rvert-\frac{7}{\sqrt{2}}\tan^{-1}\left(\frac{x+3}{\sqrt{2}}\right)+C.$

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.

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. The next section will require the reader to determine an appropriate method for evaluating a variety of integrals.

## Exercises 8.4

### Terms and Concepts

1. 1.

Fill in the blank: Partial Fraction Decomposition is a method of rewriting              functions.

2. 2.

T/F: It is sometimes necessary to use polynomial division before using Partial Fraction Decomposition.

3. 3.

Decompose $\displaystyle\frac{1}{x^{2}-3x}$ without solving for the coefficients, as done in Example 8.4.1.

4. 4.

Decompose $\displaystyle\frac{7-x}{x^{2}-9}$ without solving for the coefficients, as done in Example 8.4.1.

5. 5.

Decompose $\displaystyle\frac{x-3}{x^{2}-7}$ without solving for the coefficients, as done in Example 8.4.1.

6. 6.

Decompose $\displaystyle\frac{2x+5}{x^{3}+7x}$ without solving for the coefficients, as done in Example 8.4.1.

### Problems

In Exercises 7–34., evaluate the indefinite integral.

1. 7.

$\displaystyle\int\frac{7x+7}{x^{2}+3x-10}\operatorname{d}\!x$

2. 8.

$\displaystyle\int\frac{7x-2}{x^{2}+x}\operatorname{d}\!x$

3. 9.

$\displaystyle\int\frac{-4}{3x^{2}-12}\operatorname{d}\!x$

4. 10.

$\displaystyle\int\frac{x+7}{(x+5)^{2}}\operatorname{d}\!x$

5. 11.

$\displaystyle\int\frac{-3x-20}{(x+8)^{2}}\operatorname{d}\!x$

6. 12.

$\displaystyle\int\frac{9x^{2}+11x+7}{x(x+1)^{2}}\operatorname{d}\!x$

7. 13.

$\displaystyle\int\frac{-12x^{2}-x+33}{(x-1)(x+3)(3-2x)}\operatorname{d}\!x$

8. 14.

$\displaystyle\int\frac{94x^{2}-10x}{(7x+3)(5x-1)(3x-1)}\operatorname{d}\!x$

9. 15.

$\displaystyle\int\frac{x^{2}+x+1}{x^{2}+x-2}\operatorname{d}\!x$

10. 16.

$\displaystyle\int\frac{x^{3}}{x^{2}-x-20}\operatorname{d}\!x$

11. 17.

$\displaystyle\int\frac{2x^{2}-4x+6}{x^{2}-2x+3}\operatorname{d}\!x$

12. 18.

$\displaystyle\int\frac{1}{x^{3}+2x^{2}+3x}\operatorname{d}\!x$

13. 19.

$\displaystyle\int\frac{\operatorname{d}\!x}{x^{4}-x^{2}}$

14. 20.

$\displaystyle\int\frac{x^{2}+x+5}{x^{2}+4x+10}\operatorname{d}\!x$

15. 21.

$\displaystyle\int\frac{12x^{2}+21x+3}{(x+1)(3x^{2}+5x-1)}\operatorname{d}\!x$

16. 22.

$\displaystyle\int\frac{6x^{2}+8x-4}{(x-3)(x^{2}+6x+10)}\operatorname{d}\!x$

17. 23.

$\displaystyle\int\frac{1-x+2x^{2}-x^{3}}{x(x^{2}+1)^{2}}\operatorname{d}\!x$

18. 24.

$\displaystyle\int\frac{2x^{2}+x+1}{(x+1)(x^{2}+9)}\operatorname{d}\!x$

19. 25.

$\displaystyle\int\frac{x^{2}-20x-69}{(x-7)(x^{2}+2x+17)}\operatorname{d}\!x$

20. 26.

$\displaystyle\int\frac{x^{3}+x^{2}+2x+1}{(x^{2}+1)(x^{2}+2)}\operatorname{d}\!x$

21. 27.

$\displaystyle\int\frac{x}{x^{4}+4x^{2}+3}\operatorname{d}\!x$

22. 28.

$\displaystyle\int\frac{x-3}{(x^{2}+2x+4)^{2}}\operatorname{d}\!x$

23. 29.

$\displaystyle\int\frac{9x^{2}-60x+33}{(x-9)(x^{2}-2x+11)}\operatorname{d}\!x$

24. 30.

$\displaystyle\int\frac{6x^{2}+45x+121}{(x+2)(x^{2}+10x+27)}\operatorname{d}\!x$

25. 31.

$\displaystyle\int\frac{1}{x^{4}-16}\operatorname{d}\!x$

26. 32.

$\displaystyle\int\frac{1}{x^{2}+x}\operatorname{d}\!x$

27. 33.

$\displaystyle\int\frac{1}{x(x^{2}+1)^{2}}\operatorname{d}\!x$

28. 34.

$\displaystyle\int\frac{2x^{2}}{(x^{2}+1)^{2}}\operatorname{d}\!x$

In Exercises 35–38., evaluate the definite integral.

1. 35.

$\displaystyle\int_{1}^{2}\frac{8x+21}{(x+2)(x+3)}\operatorname{d}\!x$

2. 36.

$\displaystyle\int_{0}^{5}\frac{14x+6}{(3x+2)(x+4)}\operatorname{d}\!x$

3. 37.

$\displaystyle\int_{-1}^{1}\frac{x^{2}+5x-5}{(x-10)(x^{2}+4x+5)}\operatorname{d% }\!x$

4. 38.

$\displaystyle\int_{0}^{1}\frac{x}{(x+1)(x^{2}+2x+1)}\operatorname{d}\!x$

1. 39.
Recall that $\frac{\operatorname{d}\!}{\operatorname{d}\!x}\sinh^{-1}x=\frac{1}{\sqrt{x^{2}% +1}}$ Now use a trigonometric substitution to evaluate the indefinite integral $\int\frac{1}{\sqrt{x^{2}+1}}\operatorname{d}\!x$ and show that $\sinh^{-1}x=\ln(x+\sqrt{x^{2}+1}).$