Partial Fraction Decomposition

Partial Fraction Decomposition (PFD for short) is how we'll integrate rational functions, like 2x2+3xx36x+4.\dfrac{2x^2+3x}{x^3-6x+4}.

It isn't actually a new integration technique; it's actually an algebraic technique that we can use to rewrite a rational function in a form that we already know how to integrate (using u-substitution).

We'll see how this works in a moment, but for now, let me show you the results of this process without worrying about how it's done.

Say we want to evaluate 1x3+2x2+x dx\int \dfrac{1}{x^3+2x^2+x} \ dx

This function is equal to a sum of simpler rational functions: 1x3+2x2+x=1x1x+11(x+1)2\dfrac{1}{x^3 + 2x^2 + x} = \dfrac{1}{x} - \dfrac{1}{x+1} - \dfrac{1}{(x+1)^2}

Since we can integrate each of these functions individually, we can integrate the sum of them: 1x3+2x2+x dx=1x dx1x+1 dx1(x+1)2 dx=lnxlnx+1+1x+1+C\begin{aligned} \int \dfrac{1}{x^3+2x^2+x} \ dx &= \int \dfrac{1}{x} \ dx - \int \dfrac{1}{x+1} \ dx - \int \dfrac{1}{(x+1)^2} \ dx\ &= \ln x - \ln |x+1| + \dfrac{1}{x+1} + C \end{aligned}

I left out the u-substitution process, so if you're stuck on the integration above, you can go back and review the section on u-substitution.

Before we see how to do this decomposition process (breaking the complicated rational function into simpler ones), let's verify that the results are correct. This may be helpful when we see the decomposition process.

Start with the three rational functions and find a common denominator. The least common denominator is x(x+1)2x(x+1)^2, so we'll multiply each fraction by that on top and on the bottom and combine the fractions: 1x1x+11(x+1)2=1xx(x+1)2x(x+1)21x+1x(x+1)2x(x+1)21(x+1)2x(x+1)2x(x+1)2=(x+1)2x3+2x2+xx(x+1)x3+2x2+xxx3+2x2+x=(x+1)2x(x+1)xx3+2x2+x=1x3+2x2+x\begin{aligned} \dfrac{1}{x} - \dfrac{1}{x+1} - \dfrac{1}{(x+1)^2} &= \dfrac{1}{x} \cdot {\color{red}\dfrac{x(x+1)^2}{x(x+1)^2}} - \dfrac{1}{x+1} \cdot {\color{red}\dfrac{x(x+1)^2}{x(x+1)^2}} - \dfrac{1}{(x+1)^2} \cdot {\color{red}\dfrac{x(x+1)^2}{x(x+1)^2}}\ &= \dfrac{(x+1)^2}{x^3+2x^2+x} - \dfrac{x(x+1)}{x^3+2x^2+x} - \dfrac{x}{x^3+2x^2+x}\ &= \dfrac{(x+1)^2 - x(x+1) - x}{x^3+2x^2+x}\ &= \dfrac{1}{x^3+2x^2+x} \end{aligned}

Decomposing Rational Functions

Now for the million-dollar question: how do we break a rational function down into simpler ones? Look at what we just did when we reversed this and combined fractions. 1x1x+11(x+1)2=1x(x+1)2\dfrac{1}{x} - \dfrac{1}{x+1} - \dfrac{1}{(x+1)^2} = \dfrac{1}{x(x+1)^2}

Notice that the individual denominators are factors of the combined denominator, which leads us to our first step.

Step 1: Factor the denominator completely

In this example, to factor x3+2x2+xx^3+2x^2+x, start by factoring out the xx that's common to each term: x3+2x2+x=x(x2+2x+1)x^3+2x^2+x = x(x^2+2x+1) Then, factor x2+2x+1x^2+2x+1 by finding what numbers add up to 22 and multiply to 11: 11 and 11. x3+2x2+x=x(x2+2x+1)=x(x+1)(x+1)=x(x+1)2 \begin{aligned} x^3+2x^2+x &= x(x^2+2x+1)\ &= x(x+1)(x+1)\ &= x(x+1)^2 \end{aligned}

Step 2: Set up the sum of partial fractions

The denominators of the partial fractions will involve these factors. We'll come back to this step in a moment, because there are a few ways this can happen, but for now, take my word for it that it will look like this: 1x3+2x2+x=Ax+Bx+1+C(x+1)2\dfrac{1}{x^3+2x^2+x} = \dfrac{A}{x} + \dfrac{B}{x+1} + \dfrac{C}{(x+1)^2}

The numerators are still unknown, which is why we're using placeholders for them. Finding them is our next objective.

Step 3: Find the numerators

There are two methods for doing this, so I'll show you both. I generally prefer the second method, but once you've seen both, you can pick which you find easier, and use that on each example.

We start with 1x3+2x2+x=Ax+Bx+1+C(x+1)2\dfrac{1}{x^3+2x^2+x} = \dfrac{A}{x} + \dfrac{B}{x+1} + \dfrac{C}{(x+1)^2} Using either option, the first step is the same: clear the denominators on both sides by multiplying by left-hand side denominator: x(x+1)21x3+2x2+x=x(x+1)2Ax+x(x+1)2Bx+1+x(x+1)2C(x+1)2{\color{red}x(x+1)^2} \cdot \dfrac{1}{x^3+2x^2+x} = {\color{red}x(x+1)^2} \cdot \dfrac{A}{x} + {\color{red}x(x+1)^2} \cdot \dfrac{B}{x+1} + {\color{red}x(x+1)^2} \cdot \dfrac{C}{(x+1)^2}

On the left side, only its numerator will remain. On the right side, notice that some factors will cancel on each term. x(x+1)21x3+2x2+x=x(x+1)2Ax+x(x+1)2Bx+1+x(x+1)2C(x+1)2\cancel{\color{red}x(x+1)^2} \cdot \dfrac{1}{\cancel{x^3+2x^2+x}} = {\color{red}\cancel{x}(x+1)^2} \cdot \dfrac{A}{\cancel{x}} + {\color{red}x(x+1)^{\cancel{2}}} \cdot \dfrac{B}{\cancel{x+1}} + {\color{red}x\cancel{(x+1)^2}} \cdot \dfrac{C}{\cancel{(x+1)^2}}

Here's what's left: 1=A(x+1)2+Bx(x+1)+Cx1 = A(x+1)^2 + Bx(x+1) + Cx

Option 1: Expand and set coefficients equal to each other

Expand out the right-hand side: 1=A(x2+2x+1)+B(x2+x)+Cx1=Ax2+2Ax+A+Bx2+Bx+Cx\begin{aligned} 1 &= A(x^2+2x+1) + B(x^2+x) + Cx\ 1 &= Ax^2 + 2Ax + A + Bx^2 + Bx + Cx \end{aligned}

If these two sides are equal, that means that all of the x2x^2's on the left and the right match up, as do the xx's and the constants.

Put all of that together, and we've got a system of three equations with three unknowns: 0=A+B0=2A+B+C1=A\begin{aligned} 0 &= A + B\ 0 &= 2A + B + C\ 1 &= A \end{aligned}

It isn't that hard to solve, because the last line tells us immediately that A=1A=1, and with that, the first line tells us that B=1B=-1. Once we know those two, we can plug them into the second line and solve to find that C=1C=-1.

And with that, we're done! 1x3+2x2+x=Ax+Bx+1+C(x+1)21x3+2x2+x=1x+1x+1+1(x+1)2\begin{aligned} \dfrac{1}{x^3+2x^2+x} &= \dfrac{A}{x} + \dfrac{B}{x+1} + \dfrac{C}{(x+1)^2}\ \dfrac{1}{x^3+2x^2+x} &= \dfrac{1}{x} + \dfrac{-1}{x+1} + \dfrac{-1}{(x+1)^2} \end{aligned}

Option 2: Plug in test values for xx

This is the method that I prefer. Go back to this line: 1=A(x+1)2+Bx(x+1)+Cx1 = A(x+1)^2 + Bx(x+1) + Cx

If those two sides are equal, that means that if we plug any xx value into both sides, the answers will be equal. If we're clever about picking what values to plug in, we can find the coefficients.

Specifically, if we plug in 00, the factor of xx will disappear; the last two terms on the right side will go away, leaving only an AA to solve for. Then, if we plug in 1-1, the x+1x+1 factor will disappear.

We now know AA and CC. To find BB, we need to plug in a third test value. There aren't any other factors that will disappear with carefully chosen values, so we just need to pick any value at all, say 11. We can then plug in what we know and find the unknown BB.

We found the same values as we did with Option 1, so again, you can pick whichever method you prefer.

Back to Step 2: setting up the partial fractions

The last missing piece of this process is how to set up the initial form of the partial fractions.

In other words, after factoring x3+2x2+xx^3+2x^2+x into x(x+1)2x(x+1)^2, how did that lead directly to Ax+Bx+1+C(x+1)2?\dfrac{A}{x} + \dfrac{B}{x+1} + \dfrac{C}{(x+1)^2}?

It all depends on the factored form of the denominator.

Case 1: all linear factors (of the form ax+bax+b) with no repetition

In this case, each factor will get its own fraction. For example: 3x+5(x+1)(x+2)(x+6)=Ax+1+Bx+2+Cx+6\dfrac{3x+5}{(x+1)(x+2)(x+6)} = \dfrac{A}{x+1} + \dfrac{B}{x+2} + \dfrac{C}{x+6}

Case 2: all linear factors with some repetition

In this case, for each repeated factor, include several fractions, one for each power up to the number of times it's repeated. This is easier to show than to explain. For example: 1(x4)(x+5)4=Ax4+Bx+5+C(x+5)2+D(x+5)3+E(x+5)4\dfrac{1}{(x-4)(x+5)^4} = \dfrac{A}{x-4} + \dfrac{B}{x+5} + \dfrac{C}{(x+5)^2} + \dfrac{D}{(x+5)^3} + \dfrac{E}{(x+5)^4}

Here's another example: 1x2(x1)=Ax+Bx2+Cx1\dfrac{1}{x^2(x-1)} = \dfrac{A}{x} + \dfrac{B}{x^2} + \dfrac{C}{x-1}

Case 3: quadratic factors

Here the numerator will look different. Like the linear factors had a constant numerator, quadratic factors will have a linear numerator. For example: 1x2(x+6)(x2+4x9)=Ax+Bx2+Cx+6+Dx+Ex2+4x9\dfrac{1}{x^2(x+6)(x^2+4x-9)} = \dfrac{A}{x} + \dfrac{B}{x^2} + \dfrac{C}{x+6} + \dfrac{Dx+E}{x^2+4x-9}

Sidenote

There are a couple of other considerations we could go into, but this explanation is long enough already, and we need to get to some more examples, so the only one I'll mention is this: the method outlined here only works if the order of the numerator is lower than that of the denominator. In all the examples we'll do here, this will be true, but if you run across one where that isn't true, you can do polynomial long division, after which the remainder will fit that description. That's beyond our scope here, so I'll just leave it at that.

Okay, now on to some examples.

Examples

Decomposing a Rational Function

Use partial fraction decomposition to write x2+2x12x3+3x22x\dfrac{x^2+2x-1}{2x^3+3x^2-2x} as the sum of simpler rational functions.

Solution

Start by factoring the denominator: x2+2x12x3+3x22x=x2+2x1x(2x2+3x2)=x2+2x1x(2x1)(x+2)\dfrac{x^2+2x-1}{2x^3+3x^2-2x} = \dfrac{x^2+2x-1}{x(2x^2+3x-2)} = \dfrac{x^2+2x-1}{x(2x-1)(x+2)}

Now set up the partial fraction form. All the factors are linear, and there's no repetition: x2+2x1x(2x1)(x+2)=Ax+B2x1+Cx+2\dfrac{x^2+2x-1}{x(2x-1)(x+2)} = \dfrac{A}{x} + \dfrac{B}{2x-1} + \dfrac{C}{x+2}

Multiply both sides by the left-hand denominator: x2+2x1=A(2x1)(x+2)+Bx(x+2)+Cx(2x1)x^2+2x-1 = A(2x-1)(x+2) + Bx(x+2) + Cx(2x-1)

To find the coefficients, pick values to plug in that will make parts of the expression on the right disappear: use 00, 2-2, and 12\dfrac{1}{2}.

Therefore, x2+2x1x(2x1)(x+2)=1/2x+1/52x1+1/10x+2\dfrac{x^2+2x-1}{x(2x-1)(x+2)} = \ans{\dfrac{1/2}{x} + \dfrac{1/5}{2x-1} + \dfrac{-1/10}{x+2}}

Evaluate xx2+x2 dx\displaystyle\int \dfrac{x}{x^2+x-2}\ dx.

Solution

Factor the denominator: x2+x2=(x+2)(x1)x^2+x-2 = (x+2)(x-1)

Since there are two linear factors, with no repetition, there will be two partial fractions: xx2+x2=Ax+2+Bx1\dfrac{x}{x^2+x-2} = \dfrac{A}{x+2} + \dfrac{B}{x-1}

Multiply both sides by (x+2)(x1)(x+2)(x-1): x=A(x1)+B(x+2)x = A(x-1) + B(x+2)

To solve for AA and BB, plug in 11 and 2-2 for xx:

Now, rewrite the integral using these partial fractions: xx2+x2 dx=2/3x+2+1/3x1 dx\int \dfrac{x}{x^2+x-2}\ dx = \int \dfrac{2/3}{x+2} + \dfrac{-1/3}{x-1}\ dx

We can then integrate using u-substitution (I'll leave out some of the details, but you can fill them in if necessary): xx2+x2 dx=2/3x+2+1/3x1 dx=23lnx+213lnx1+C\begin{aligned} \int \dfrac{x}{x^2+x-2}\ dx &= \int \dfrac{2/3}{x+2} + \dfrac{-1/3}{x-1}\ dx\ &= \ans{\dfrac{2}{3}\ln |x+2| - \dfrac{1}{3}\ln |x-1| + C} \end{aligned}

Note: don't get too careless with the integration

For the sake of brevity, I often skip the last step of these problems, going from something like 2/3x+2 dx\displaystyle\int \dfrac{2/3}{x+2}\ dx to 23lnx+2\dfrac{2}{3}\ln |x+2|. Once you're comfortable with these, this integration step can be quick, but just be careful not to make one of the following common mistakes:

Evaluate x41x54x3 dx\displaystyle\int \dfrac{x^4-1}{x^5-4x^3}\ dx.

Solution

Start factoring the denominator by pulling out the x3x^3 common factor, and then factoring the remaining quadratic: x54x3=x3(x24)=x3(x+2)(x2)x^5 - 4x^3 = x^3(x^2-4) = x^3(x+2)(x-2)

Notice that the x3x^3 is a single factor repeated three times: x41x54x3=Ax+Bx2+Cx3+Dx+2+Ex2\dfrac{x^4-1}{x^5-4x^3} = \dfrac{A}{x} + \dfrac{B}{x^2} + \dfrac{C}{x^3} + \dfrac{D}{x+2} + \dfrac{E}{x-2}

After multiplying both sides by x3(x+2)(x2)x^3(x+2)(x-2), we get x41=Ax2(x+2)(x2)+Bx(x+2)(x2)+C(x+2)(x2)+Dx3(x2)+Ex3(x+2)x^4-1 = Ax^2(x+2)(x-2) + Bx(x+2)(x-2) + C(x+2)(x-2) + Dx^3(x-2) + Ex^3(x+2)

It makes sense to plug in 00, 22, and 2-2. We have five unknowns, though, so we need to plug in five numbers. Let's pick 11 and 1-1 for the remaining two:

Putting those last two together: 316=3A3B316=3A+3B\begin{aligned} -\dfrac{3}{16} &= -3A - 3B\ -\dfrac{3}{16} &= -3A + 3B \end{aligned}

Add them together: 616=6AA=116-\dfrac{6}{16} = -6A \longrightarrow A = \dfrac{1}{16}

Finally, B=0B=0.

Now we're ready to rewrite the integral and integrate: x41x54x3 dx=1/16x+1/4x3+15/32x+2+15/32x2 dx=116lnx18x2+1532lnx+2+1532lnx2+C\begin{aligned} \int \dfrac{x^4-1}{x^5-4x^3}\ dx &= \int \dfrac{1/16}{x} + \dfrac{1/4}{x^3} + \dfrac{15/32}{x+2} + \dfrac{15/32}{x-2}\ dx\ &= \ans{\dfrac{1}{16} \ln x - \dfrac{1}{8x^2} + \dfrac{15}{32} \ln |x+2| + \dfrac{15}{32} \ln |x-2| + C} \end{aligned}

  1. x9(x+5)(x2) dx\displaystyle\int \dfrac{x-9}{(x+5)(x-2)}\ dx

  2. 2x+51x2 dx=2lnx+5lnx2+C\displaystyle\int \dfrac{2}{x+5}-\dfrac{1}{x-2}\ dx = 2 \ln |x+5| - \ln |x-2| + C

  3. 3x+11x2x6 dx\displaystyle\int \dfrac{3x+11}{x^2-x-6}\ dx

  4. 4x31x+2 dx=4lnx3lnx+2+C\displaystyle\int \dfrac{4}{x-3}-\dfrac{1}{x+2}\ dx = 4 \ln |x-3| - \ln |x+2| + C

  5. x2+2x1x3x dx\displaystyle\int \dfrac{x^2+2x-1}{x^3-x}\ dx

  6. 1x1x+1+1x1 dx=lnxlnx+1+lnx1+C\displaystyle\int \dfrac{1}{x}-\dfrac{1}{x+1} + \dfrac{1}{x-1}\ dx = \ln x - \ln |x+1| + \ln |x-1| + C

  7. 5x2+3x2x3+2x2 dx\displaystyle\int \dfrac{5x^2+3x-2}{x^3+2x^2}\ dx

  8. 2x1x2+3x+2 dx=2lnx+1x+3lnx+2+C\displaystyle\int \dfrac{2}{x}-\dfrac{1}{x^2}+\dfrac{3}{x+2}\ dx = 2 \ln x + \dfrac{1}{x} + 3 \ln |x+2| + C

  9. x25x+16(2x+1)(x2)2 dx\displaystyle\int \dfrac{x^2-5x+16}{(2x+1)(x-2)^2}\ dx

  10. 3/22x+11x2+2(x2)2 dx=32ln2x+1lnx22x2+C\displaystyle\int \dfrac{3/2}{2x+1}-\dfrac{1}{x-2} + \dfrac{2}{(x-2)^2}\ dx = \dfrac{3}{2}\ln |2x+1| - \ln |x-2| - \dfrac{2}{x-2} + C

  11. 32x2(x9)(x+3)2 dx\displaystyle\int \dfrac{32x^2}{(x-9)(x+3)^2}\ dx

  12. 18x9+14x+324(x+3)2 dx=18lnx9+14lnx+3+24x+3+C\displaystyle\int \dfrac{18}{x-9}+\dfrac{14}{x+3} - \dfrac{24}{(x+3)^2}\ dx = 18\ln |x-9| + 14 \ln |x+3| + \dfrac{24}{x+3} + C