Integration by partial fractions

Simplifying integrals of rational functions using partial fraction decomposition

Using the algebraic technique known as "partial fraction decomposition" we can simplify an integral of a rational function into a sum of much simpler integrals.

Integration by partial fractions

Using the algebraic technique known as "partial fraction decomposition" we can simplify an integral of a rational function into a sum of much simpler integrals, which we may be able to compute.

This technique is really an algebraic technique. If you learned "partial fractions decomposition" in the context of pre-calculus algebra, then there is nothing new here. (If you haven’t heard of this technique, then you may want to learn this in the context of pre-calculus algebra first, before you apply them to integrals.)

We start with a simple example from which we should be able to see the main point.

Compute \[\int \frac{1}{x^2 - 1} \, dx.\]

Solution. First, it is worth checking if the substitution $u = x^2 - 1$ will work. In this case, it doesn't, since $du = 2x \, dx$ doesn't appear here. So some other idea is needed.

Since $\frac{1}{x^2 - 1} = \frac{1}{(x-1)(x+1)}$, using partial fractions decomposition we can get

\[ \frac{1}{(x-1)(x+1)} = \frac{ \frac{1}{2} }{ x-1 } - \frac{ \frac{1}{2} }{ x+1 }. \]

Therefore $\displaystyle \int \frac{1}{x^2 - 1} \, dx = \int \frac{1}{(x-1)(x+1)} \, dx $ $\displaystyle = \int \frac{ \frac{1}{2} }{ x-1 } dx - \int \frac{ \frac{1}{2} }{ x+1 } dx. $

Both of these can be computed easily: \[ \int \frac{ \frac{1}{2} }{ x-1 } dx = \frac{1}{2} \ln |x-1| + C_1. \]

Similarly, \[ \int \frac{ \frac{1}{2} }{ x+1 } dx = \frac{1}{2} \ln |x+1| + C_2. \]

Therefore, \begin{align*} \int \frac{1}{x^2 - 1} \, dx &= \left( \frac{1}{2} \ln |1-x| + C_1 \right) - \left( \frac{1}{2} \ln |1+x| + C_2 \right) \\ &= \frac{ \ln |1-x| - \ln |1+x| }{2} + C. \end{align*}

The main idea

The previous example illustrate the main idea behind the technique of using partial fractions decomposition in computing integrals: we can write a complex rational function as sum of much simpler rational functions

Compute \[\int \frac{x+1}{x^3 - 1} \, dx.\]

Solution. We can factor the denominator into factors: \[ x^3 - 1 = (x-1)(x^2+x+1). \]

Through partial fractions decomposition, we get \[ \frac{x+1}{x^3-1} = \frac{x+1}{(x-1)(x^2+x+1)} = \color{red}{ \frac{ \frac{2}{3} }{ x-1 } } - \color{blue}{ \frac{ \frac{2}{3} x + \frac{1}{3} }{ x^2+x+1 } }. \]

Therefore, the original integral is equivalent to \[ \int \frac{x+1}{x^3 - 1} \, dx = \int \color{red}{ \frac{ \frac{2}{3} }{ x-1 } }- \color{blue}{ \frac{ \frac{2}{3} x + \frac{1}{3} }{ x^2+x+1 } }\, dx = \int \color{red}{ \frac{ \frac{2}{3} }{ x-1 } } \, dx - \int \color{blue}{ \frac{ \frac{2}{3} x+ \frac{1}{3} }{ x^2+x+1 } } \, dx. \]

\[ \text{For the 1st one: } \int \frac{ \frac{2}{3} }{ x-1 } \, dx = \frac{2}{3} \int \frac{ 1 }{ x-1 } \, dx = \frac{2}{3} \ln|x-1| + C_1. \]

The other can be computed through the substitution $u = x^2+x+1$ and $du = 2x + 1$: \[ \frac{1}{3} \int \frac{ 2x+ 1 }{ x^2+x+1 } \, dx = \frac{1}{3} \int \frac{ 1 }{ u } \, du = \frac{1}{3} \ln|u| + C_2 = \frac{1}{3} \ln|x^2+x+1| + C_2. \]

Therefore, the final answers is $ \frac{2}{3} \ln|x-1| - \frac{1}{3} \ln|x^2+x+1| + C. $

How to compute partial fraction decomposition?

Most likely you have already learned this algebraic technique somewhere else. If you haven't, it is best to learn this topic systematically in the purely algebraic context. Here, we will just look at a few simple examples.

Compute the partial fraction decomposition for \[ \frac{1}{(x-1)(x+1)} \]

Solution. The goal is to find real numbers $A$ and $B$ such that \[ \frac{1}{(x-1)(x+1)} = \frac{A}{x-1} + \frac{B}{x+1} \]

We'll do this by multiplying everything out.

$\displaystyle \frac{A}{x-1} + \frac{B}{x+1} $ $\displaystyle = \frac{A\color{red}{(x+1)}}{(x-1)\color{red}{(x+1)}} + \frac{B\color{blue}{(x-1)}}{\color{blue}{(x-1)}(x+1)} $ $\displaystyle = \frac{A\color{red}{(x+1)} + B\color{blue}{(x-1)}}{(x-1)\color{red}{(x+1)}} $

But we want this to be just $ \frac{1}{(x-1)(x+1)} $. Therefore, \[ A\color{red}{(x+1)} + B\color{blue}{(x-1)} = 1. \] Using this, can you figure out the value of $A$ and $B$?

Compute the partial fraction decomposition for \[ \frac{x+1}{(x-1)(x^2+x+1)} \]

Solution. The goal is to find real numbers $A, B$ and $C$ such that \[ \frac{x+1}{(x-1)(x^2+x+1)} = \frac{A}{x-1} + \frac{Bx+C}{x^2+x+1} \] Here, we need the factor $Bx+C$ because the corresponding denominator $x^2+x+1$ is an irreducible quadratic.

$\displaystyle \frac{A}{x-1} + \frac{Bx+C}{x^2+x+1} $ $\displaystyle = \frac{ A\color{red}{(x^2+x+1)} + (Bx+C)\color{blue}{ (x-1) } }{(x-1)(x^2+x+1)} $

But we want this to be just $ \frac{x+1}{(x-1)(x^2+x+1)} $. Therefore, \[ A\color{red}{(x^2+x+1)} + (Bx+C)\color{blue}{ (x-1) } = x+1. \] Using this, can you find the correct $A,B,C$?