This topic of integration by partial fractions is one that requires practice to be carried out satisfactorily. Partial fractions has more to do with algebra than calculus, but they always go together since there are equations that you can’t integrate until you do an arrangement in algebra. If you do not remember the cases of partial fractions very well, here is a reminder.

## How to Integrate by Partial Fractions

The integrals by partial fractions are the ones that we will see with the form:

\displaystyle \int \cfrac{P(x)}{Q(x)}

Where Q(x) can have the form of x, (mx+n)^{u}, or (ax^{2}+bx+c)^{v} where ax^{2}+bx+c cannot be reduced, it cannot be factored further. We need to remember our notable products well.

- For each factor x is decomposed as follows:

\cfrac{A_{1}}{x} + \cfrac{A_{2}}{x^{2}} + \dots + \cfrac{A_{u}}{x^{u}}

- For each factor (mx+n)^{u} decomposes exactly the same as the one above. It remains as follows:

\cfrac{A_{1}}{mx+n} + \cfrac{A_{2}}{(mx+2)^{2}} + \dots + \cfrac{A_{u}}{(mx+n)^{u}}

- For each factor (ax^{2} + bx + c)^{v} decomposes as follows:

\cfrac{B_{1}x + C_{1}}{ax^{2} + bx + c} + \cfrac{B_{2}x + C_{2}}{(ax^{2} + bx + c)^{2}} + \dots + \cfrac{B_{v}x + C_{v}}{(ax^{2} + bx + c)^{v}}

Now that we have the forms of decomposition of the factors, we can move on to the integrals, let’s see few examples.

## Examples of Integration by Partial Fractions

* Example 1*.

*By integration by partial fractions, solve the following:*

\displaystyle \int \cfrac{x-1}{x^{3}-x^{2}-2x}

First we have to take care of decompose the denominator into all its factors. For that we observe that the term x can be factored from the whole expression, obtaining the following:

\displaystyle \int \cfrac{x-1}{x(x^{2} - x - 1)}

The next thing that can be observed is that we have a notable product, we are going to decompose it to obtain:

\displaystyle \int \cfrac{x-1}{x(x-2)(x+1)}

We already have the complicated part done, really. Now comes the part where you have to write a lot, for that we represent our fraction as follows:

\displaystyle \int \cfrac{(x-1)}{x(x-2)(x+1)} = \int \cfrac{A}{x} + \int \cfrac{B}{(x-2)} + \int \cfrac{C}{(x+1)}

*Note: Can use* *A_{1}, A_{2} or A, B. As you like, we will use A, B and C for this and next examples.*

Ok, now we’ll ignore that we have to do the integral and move the entire denominator of our expression from left to right. Canceling terms that can be cancelled:

x-1 = \cfrac{A\cancel{(x)}(x-2)(x+1)}{\cancel{x}} + \cfrac{B(x)(x+1)\cancel{(x-2)}}{\cancel{(x-2)}} + \cfrac{C(x)\cancel{(x+1)}(x-2)}{\cancel{(x+1)}}

x-1 = A(x-2)(x+1) + B(x)(x+1) + C(x)(x-2)

Multiply certain numbers to eliminate expression by expression and find the value of A, B and C. What do I mean? In the first expression of A(x-2)(x+1) I need to know what number to replace x so that the result can cancel me to A and to C, we are going to replace it with 2. See what happens, we replace the x with 2.

2-1 = A(2-2)(2+1)+B(2)(2+1)+C(2)(2-2)

1 = A(0)(3) + B(2)(3)+C(2)(0) = 6B

Perfect, did you realize what was done? Since we have the B alone we can find its value:

1 = 6B \rightarrow B = \cfrac{1}{6}

We already have the value of our first letter, we are going to find the other two letters. Now let’s give x the value of -1:

-1-1 = A(-1-2)(-1+1) + B(-1)(-1+1) + C(-1)(-1-2)

\rightarrow A(-3)(0)+B(1)(0)+C(-1)(-3)

-2 = 3C \rightarrow C = -\cfrac{2}{3}

Excellent, we now have the value of C. Now let’s find the value of A, let’s give x the value of zero:

0-1 = A(0-2)(0+1) + B(0)(0+1) + C(0)(0-2)

\rightarrow -1 = A(-2)(1)\rightarrow A = \cfrac{1}{2}

**We already have the value of all our denominators!** Now we just go back to our initial equations and substitute those values:

\cfrac{A}{x} + \cfrac{B}{(x-2)} + \cfrac{C}{(x+1)}\rightarrow \cfrac{1}{2}\cfrac{1}{x} + \cfrac{1}{6}\cfrac{1}{x-2}+\cfrac{-2}{3}\cfrac{1}{x+1}

We apply the integral and we have almost solved the exercise:

\displaystyle \cfrac{1}{2}\int\cfrac{dx}{x}+\cfrac{1}{6}\int\cfrac{dx}{x-2}-\cfrac{2}{3}\int\cfrac{dx}{x+1}

We take to x-2 as u and to x+1 as v:

u = x-2 \rightarrow du = dx\qquad v=x+1 \rightarrow dv=dx

And we substitute in our integrals:

\displaystyle \cfrac{1}{2}\int\cfrac{dx}{x} + \cfrac{1}{6}\int\cfrac{du}{u} - \cfrac{2}{3}\int\cfrac{dv}{v}

This is a simple integral of dx over x and we get our almost result:

\cfrac{1}{2}\ln |x| + \cfrac{1}{6}\ln |u| - \cfrac{2}{3} \ln |v|

We substitute and finally we have our result!

\cfrac{1}{2}\ln |x| + \cfrac{1}{6} \ln |x-2| - \cfrac{2}{3} \ln |x +1| +\text{C}

* Example 2*.

*By integration by partial fractions, solve the following:*

\displaystyle \int \cfrac{x^{2} - 2x - 3}{(x-1)(x^{2} + 2x + 2)}

Analyzing the denominator of the equation, the set of (x^{2} + 2x + 2) cannot be reduced, so our equation to solve is as follows:

\cfrac{x^{2} - 2x - 3}{(x-1)(x^{2} + 2x + 2)} = \cfrac{A}{(x-1)} + \cfrac{Bx+C}{x^{2} + 2x + 2}

Eliminate the denominators:

x^{2} - 2x - 3 = \cfrac{A(x^{2} + 2x + 2)\cancel{(x-1)}}{\cancel{(x-1)}} + \cfrac{(Bx + C)(x - 1)\cancel{(x^{2} +2x + 2)}}{\cancel{(x^{2} +2x + 2)}}

x^{2} - 2x - 3 = A(x^{2} + 2x + 2) + (Bx + C)(x - 1)

Let’s give x the value of 1 to get our system of equations and find the values of A, B and C.

1-2-3=A(1+2+2)+(B+C)(1-1)=5A

-4=5A\quad \rightarrow \quad A = -\cfrac{4}{5}

Perfect, we already have the value of A but to find the other values we have to equate quadratic terms with quadratics, linear terms with linear terms, and constants with constants, so let’s order our equation.

x^{2} - 2x - 3 = Ax^{2} + 2Ax + 2A + Bx^{2} - Bx + Cx - C

= (A+B)x^{2} + (2A-B+C)x+(2A-C)

Match:

1=A+B

-2=2A-B+C

-3=2A-C

We can easily find the B with the first equation, we simply substitute the value of A and we will have the result:

1 = -\cfrac{4}{5} + B \rightarrow B = \cfrac{9}{5}

Let’s take the third equation and substitute the value of A.

-3 = 2\left(-\cfrac{4}{5}\right) - C\rightarrow C = \cfrac{7}{5}

Now that we have all the values, we will simply substitute them into our partial fractions:

\displaystyle \int\cfrac{-4/5}{(x-1)}dx + \int \cfrac{(9/5)x+7/5}{x^{2} + 2x + 2}

We will proceed to divide the integral where there is a sum into a sum of integrals, in this case a subtraction of integrals and also the constants can be taken from the integral:

\displaystyle -\cfrac{4}{5}\int\cfrac{dx}{(x-2)} + \cfrac{9}{5} \int \frac{x}{x^{2} + 2x + 2}dx + \cfrac{7}{5}\int \cfrac{dx}{x^{2} + 2x + 2}

**Pay attention.** Here comes an algebra trick on integrals, what we will do is **add a plus and minus one to the numerator** of the integral that has \frac{9}{5}.

\displaystyle -\cfrac{4}{5}\int\cfrac{dx}{(x-2)} + \cfrac{9}{5} \int \frac{x + 1 - 1}{x^{2} + 2x + 2}dx + \cfrac{7}{5}\int \cfrac{dx}{x^{2} + 2x + 2}

We separate in a subtraction of integrals:

\displaystyle -\cfrac{4}{5}\int\cfrac{dx}{(x-1)} + \cfrac{9}{5} \int \cfrac{x+1}{x^{2} + 2x + 2}dx - \cfrac{9}{5} \int \cfrac{1}{x^{2} + 2x + 2}dx + \cfrac{7}{5}\int \cfrac{dx}{x^{2} + 2x + 2}

We do the following equality and derive it:

v = x^{2} + 2x + 2\quad \rightarrow \quad dv = (2x+2)dx

We factor the 2 and pass it by dividing:

\cfrac{dv}{2} = (x+1)dx

Now we have that our integral is:

\displaystyle \cfrac{9}{10}\int\cfrac{dv}{v}

Which gives us the following for the moment:

\displaystyle -\cfrac{4}{5}\int\cfrac{dx}{(x-1)} + \cfrac{9}{10} \int \cfrac{dv}{v} - \cfrac{9}{5} \int \cfrac{dx}{x^{2} + 2x + 2} + \cfrac{7}{5}\int \cfrac{dx}{x^{2} + 2x + 2}

We are going to integrate the first integral once and for all to clear the table, let’s take u as x-1 in order to have du=dx and have the integral:

\displaystyle -\cfrac{4}{5}\int\cfrac{du}{u}

Thus we already have two integrals solved:

\displaystyle -\cfrac{4}{5}\ln|u| + \cfrac{9}{10}\ln |v| - \cfrac{9}{5} \int \cfrac{dx}{x^{2} + 2x + 2} + \cfrac{7}{5}\int \cfrac{dx}{x^{2} + 2x + 2}

We sum the integrals to obtain:

\displaystyle -\cfrac{4}{5}\ln|u| + \cfrac{9}{10}\ln |v| - \cfrac{2}{5} \int \cfrac{dx}{x^{2} + 2x + 2}

We are going to do another little trick of the integrals, we will divide the denominator of the integral that we have left like this:

\displaystyle -\cfrac{4}{5}\ln|u| + \cfrac{9}{10}\ln |v| - \cfrac{2}{5} \int \cfrac{dx}{x^{2} + 2x + 1 +1}

With that we can do the following:

\displaystyle -\cfrac{4}{5}\ln|u| + \cfrac{9}{10}\ln |v| - \cfrac{2}{5} \int \cfrac{dx}{(x^{2} + 2x + 1) +1}

And applying our notable products of binomial to the perfect square we have the following:

\displaystyle -\cfrac{4}{5}\ln|u| + \cfrac{9}{10}\ln |v| - \cfrac{2}{5} \int \cfrac{dx}{(x + 1)^{2} +1}

We substitute x+1 for w in order to obtain that dw = dx and substitute it in the integral:

\displaystyle -\cfrac{4}{5}\ln|u| + \cfrac{9}{10}\ln |v| - \cfrac{2}{5} \int \cfrac{dw}{w^{2} +1}

**And now one what would wonder?** With that, you can do another little trick and see that the 1 itself always gives the same result even if we square it. So we can represent it as follows:

\displaystyle -\cfrac{2}{5}\int\cfrac{dw}{w^{2} + (1)^{2}}

Which tells us that we can apply the integral formula giving us the following as a result:

-\cfrac{4}{5}\ln|u| + \cfrac{9}{10}\ln |v| - \cfrac{2}{5} \arctan(w)

And now we substitute all the letters to obtain our final result:

-\cfrac{4}{5}\ln|x-1| + \cfrac{9}{10}\ln|x^{2} + 2x + 2| - \cfrac{2}{5}\arctan(x+1)+\text{C}

**Thank you for being in this moment with us : )**