Partial Fraction Decomposition

Partial Fraction Decomposition

Partial Fraction Decomposition is a trick that helps us integrate [rational functions]{.underline}. Remember, a rational function is [one polynomial divided by another polynomial]{.underline}. E.g.

$$f(x) = \frac{x-13}{x^2 - x - 6} \qquad g(x) = \frac{x^3 + x^2 - 2x + 3}{x^2 + x}$$

Partial Fraction Decomposition is a way of reversing the combination of several rational functions into one rational function by finding a common denominator. Let’s start by making up an example by adding two simple rational functions.

Motivating example

Add $\frac{1}{x}$ and $\frac{3}{x+1}$:

$$ \begin{aligned} \frac1x + \frac{3}{x + 1} &= \frac1x \cdot \frac{x+1}{x+1} + \frac{3}{x + 1} \cdot \frac{x}{x} \cr &=\frac{x+1}{x^2 + x} + \frac{3x}{x^2 + x} \cr &= \frac{4x + 1}{x^2 + x} \end{aligned} $$

The question with partial fraction decomposition is this: How do we recover the original, simple rational functions?

  • First, we find the factors of the denominator: $x^2 + x = x(x+1)$. So the factors are $x$ and $x+1$.

  • Assume one term for each of these factors:$$\frac{4x + 1}{x^2 + x} = \frac{A}{x} + \frac{B}{x+1}$$

  • Combine these two terms: $$\frac{4x + 1}{x^2 + x} =\frac{A(x+1) + Bx}{x^2 + x}$$

  • Set the numerators equal - we know they have to be equal because the denominators are equal. $$4x + 1 = A(x+1) + Bx$$

  • Solve for $A$ and $B$.

    • Option 1: Multiply everything out and create a system of equations for like terms to solve. $4x + 1 = Ax + A + Bx$

      $$ \begin{cases} x\text{-terms:} &A + B = 4\cr \text{Constant terms:} &A = 1\cr \end{cases} $$ Solving, we get $A = 1$ and $B = 3$.

    • Option 2: Pick clever values for $x$.

    • $$ \begin{cases} x = 0 \Longrightarrow 1 = A\cr x = -1 \Longrightarrow -3 = -B\cr \end{cases} $$

    Either way we do it, we end up with $A = 1$ and $B = 3$, so $$\frac{4x + 1}{x^2 + x} = \frac{A}{x} + \frac{B}{x+1} = \frac{1}{x} + \frac{3}{x+1}$$

Of course, in this case we already knew the answer. But assuming we don’t start out knowing the answer, if we were trying to integrate $\int \frac{4x + 1}{x^2 + x} \ dx$, applying partial fraction decomposition makes it pretty easy:

$$\begin{aligned} \int \frac{4x + 1}{x^2 + x} \ dx &= \int \frac{1}{x} + \frac{3}{x+1} \ dx\cr &= \ln|x| + 3\ln|x+1| + C \end{aligned}$$

The Process Generalized

First, we have to make sure the degree of the denominator is greater than that of the denominator. If it’s not, use polynomial division to make it so.

For a linear term raised to a power

Given a factor of the form $(ax + b)^n$ in the denominator, our partial fraction decomposition must include the following:

$$\frac{A_1}{ax+b} + \frac{A_2}{(ax+b)^2} + \frac{A_3}{(ax+b)^3} + \cdots + \frac{A_n}{(ax+b)^n}$$

For an irreducible quadratic term raised to a power...

Given a factor of the form $(ax^2 + bx + c)^n$ in the denominator, our partial fraction decomposition must include the following:

$$\frac{A_1x + B_1}{ax^2 + bx + c} + \frac{A_2x + B_2}{(ax^2 + bx + c)^2} + \frac{A_3x + B_3}{(ax^2 + bx + c)^3} + \cdots + \frac{A_nx + B_n}{(ax^2 + bx + c)^n}$$

Remember...

We’re starting out with the worst case scenario, so many of these terms may disappear. Notice that the PFD terms are all ‘proper’ rational functions.

Examples

All linear factors

$$\frac{3x + 1}{x^2 + 5x + 6} = \frac{3x+1}{(x+2)(x+3)} = \frac{A}{x+2} + \frac{B}{x+3}$$

One linear factor and one irreducible quadratic factor

$$\frac{4}{x^3 + 4x} = \frac{4}{x(x^2 + 4)} = \frac{A}{x} + \frac{Bx + C}{x^2 + 4}$$

Repeated linear factors

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

Treating $x^n$ as a repeated linear factor

This is subtly different than the (3.2). Notice that we treat $x^2$ like a linear term raised to a power: $x^2 = (x-0)^2$.

$$\frac{4}{x^4 + 4x^2} = \frac{4}{x^2(x^2 + 4)} = \frac{A}{x} + \frac{B}{x^2} + \frac{Cx + D}{x^2 + 4}$$

One that requires division

$$\frac{2x^3 - 8x^2 + 1}{x^2 - 4x} = 2x + \frac{1}{x(x-4)} = 2x + \frac{A}{x} + \frac{B}{x-4}$$

Example

$$\int \frac{x-13}{x^2 - x - 6} \ dx$$

We start by doing partial fraction decomposition:

$$\begin{aligned} \frac{x-13}{x^2 - x - 6} &= \frac{x-13}{(x-3)(x+2)}\cr &= \frac{A}{x-3} + \frac{B}{x+2}\cr A(x+2) + B(x-3) &= x-13 \end{aligned}$$

Letting $x = 3$ we get $5A = -10 \Longrightarrow A = -2$.

Letting $x = -2$ we get $-5B = -15 \Longrightarrow B = 3$.

$$\begin{aligned} \int \frac{x-13}{x^2 - x - 6} \ dx &= \int \frac{-2}{x-3} + \frac{3}{x+2} \ dx\cr &= \boxed{-2\ln|x-3| + 3\ln|x+2| + C} \end{aligned}$$

Exercise

$$\int \frac{6x^2 - 2x - 2}{x^3 - x^2 - 2x}$$

Solution

$$\begin{aligned} \frac{6x^2 - 2x - 2}{x^3 - x^2 - 2x} &= \frac{6x^2 - 2x - 2}{x(x-2)(x+1)}\cr &= \frac{A}{x} + \frac{B}{x-2} + \frac{C}{x+1}\cr A(x-2)(x+1) + Bx(x+1) + Cx(x-2) &= 6x^2 - 2x - 2 \end{aligned}$$

Letting $x = 0$ we get $-2A = -2 \Longrightarrow A = 1$.

Letting $x = 2$ we get $6B = 18 \Longrightarrow B = 3$.

Letting $x = -1$ we get $3C = 6 \Longrightarrow C = 2$.

$$\begin{aligned} \int \frac{6x^2 - 2x - 2}{x^3 - x^2 - 2x} &= \int \frac{1}{x} + \frac{3}{x-2} + \frac{2}{x+1} \ dx\cr &= \boxed{\ln|x| + 3\ln|x-2| + 2\ln|x+1| + C} \end{aligned}$$

Example

$$\int \frac{x^4 - x^2 + 4x + 2}{x^2 - 1} \ dx$$

This problem requires that we perform long division first. Alternatively, we might notice the following:

$$\begin{aligned} \frac{x^4 - x^2 + 4x + 2}{x^2 - 1} &= \frac{x^4 - x^2}{x^2 - 1} + \frac{4x + 2}{x^2 - 1}\cr &= \frac{x^2(x^2 - 1)}{x^2 - 1} + \frac{4x + 2}{x^2 - 1}\cr &= x^2 + \frac{4x + 2}{x^2 - 1} \end{aligned}$$

Now we just need to perform PFD on $\frac{4x + 2}{x^2 - 1}$.

$$\begin{aligned} \frac{4x + 2}{x^2 - 1} &= \frac{4x + 2}{(x+1)(x-1)}\cr &= \frac{A}{x+1} + \frac{B}{x-1}\cr A(x-1) + B(x+1) &= 4x + 2 \end{aligned}$$

Letting $x = 1$, we get $2B = 10 \Longrightarrow B = 5$.

Letting $x = -1$, we get $-2A = -6 \Longrightarrow A = 3$.

$$\begin{aligned} \int \frac{x^4 - x^2 + 4x + 2}{x^2 - 1} \ dx &= \int x^2 + \frac{3}{x+1} + \frac{5}{x-1} \ dx\cr &= \boxed{\frac{x^3}{3} + 3\ln|x+1| + 5\ln|x-1| + C} \end{aligned}$$

Exercise

Solution

$$\int\frac{ 5x^3 - x^2 + 4x + 2 }{ x^4 + x^2 } \ dx$$

$$\begin{aligned} \frac{ 5x^3 - x^2 + 4x + 2 }{ x^4 + x^2 } &= \frac{ 5x^3 - x^2 + 4x + 2 }{x^2(x^2 + 1)}\cr &= \frac{A}{x} + \frac{B}{x^2} + \frac{Cx+D}{x^2 + 1}\cr Ax(x^2 + 1) + B(x^2 + 1) + (Cx + D)x^2 &= 5x^3 - x^2 + 4x + 2\cr Ax^3 + Ax + Bx^2 + B + Cx^3 + Dx^2 &= 5x^3 - x^2 + 4x + 2 \end{aligned}$$

$$\begin{cases} A + C &= 5\cr B + D &= -1\cr A &= 4\cr B &= 2 \end{cases}$$

Plugging back in, we get $(4) + C = 5 \Longrightarrow C = 1$ and $(2) + D = -1 \Longrightarrow D = -3$.

$$\begin{aligned} \int\frac{ 5x^3 - x^2 + 4x + 2 }{ x^4 + x^2 } \ dx &= \int \frac{4}{x} + \frac{2}{x^2} + \frac{x - 3}{x^2 + 1} \ dx\cr &= \int \frac{4}{x} + \frac{2}{x^2} + \frac{x}{x^2 + 1} - \frac{3}{x^2 + 1}\ dx\cr &= \boxed{4\ln|x| - \frac2x + \frac12\ln|x^2 + 1| - 3\arctan{x} + C} \end{aligned}$$