Partial Fraction Decomposition is a technique used to make integration simpler, by decomposing a hard to integrate function into the sum of several functions that are easier to integrate.

Often times using partial fractions is the only feasible way of computing an integral, that otherwise would be impossible to solve.

Specifically, this technique is applied when we need to integrate the quotient of two polynomials \(P(x)\) and \(Q(x)\). This is, we need to compute.

\[\large \displaystyle \int \frac{P(x)}{Q(x)} \, dx\]For example, say that \(P(x) = x^2 - 2\) and \(Q(x) = x^3 - 7x + 6\), so the integral of the quotient of these two polynomials would be:

\[\large \displaystyle \int \frac{x^2 - 2}{x^3 - 7x + 6} dx\]How the heck you solve that, you may think.....At first sight it looks intractable, and it is if you don't follow the right approach.

Fortunately, every time you are trying to integrate the quotient of two polynomials, no matter how complicated those polynomials are, there is always a way to reduce the integral to a bunch of easy to solve integral.

Only, in order to do so, we need to put out some algebraic work beforehand, but dividing two polynomials and solving a some linear system.

It is a small price to pay in order to solve and otherwise impossible to solve integral, right? Please say yes.

__EXAMPLE 1__

Let me give you a teaser. Could you go ahead and integrate this?

\[\large \displaystyle \int \frac{1}{x^3 - 7x + 6} dx\]Hummm.....could you? Well, it does not look easy, or even possible. What if I told you that

\[\large \displaystyle \frac{1}{x^3 - 7x + 6} = \frac{1}{5(x-2)} - \frac{1}{4(x-1)}+\frac{1}{20(x+3)}\]So, the fraction you want to integrate got decomposed into three *partial fractions*, and each of these partial fractions it is actually easy to integrate. Indeed, using the above decomposition leads us to

So, you can agree with me that the decomposition solved the problem, because after knowing the decomposition, the integration problem was reduced to three very simple integrals.

Now you will learn how to do such decomposition.

## How to Do A Partial Fractions Decomposition?

__Step 1__

First of all, this technique only works when you want to integrate a quotient of two polynomials. This is, you want to integrate

\[\large \displaystyle \int \frac{P(x)}{Q(x)} \, dx\]where \(P(x)\) and \(Q(x)\) are polynomials. **We can always assume that the order of \(Q(x)\) is greater than the order of \(P(x)\)**.

If that is not the case, and the order of \(P(x)\) is greater than the order of \(Q(x)\), then you can use the theorem of the division of polynomials to get

\[\large P(x) = M(x)Q(x) + R(x)\]where \(M(x)\) and \(R(x)\) are a polynomials, and the order of \(R(x)\) is lower than the order of \(R(x)\), which would mean that

\[\large \displaystyle \frac{P(x)}{Q(x)} = M(x) + \frac{R(x)}{Q(x)} \]so then the task of integrating \(\displaystyle\frac{P(x)}{Q(x)}\) gets reduced to the task of integrating a polynomial \(M(x)\) (which is trivial) and integrating a quotient of polynomials \(\displaystyle\frac{R(x)}{Q(x)}\) where the polynomial in the numerator has a lower order than the one in the denominator.

__Step 2__

You need to find the roots of the polynomial in the denominator \(Q(x)\) and conduct a decomposition in linear and quadratic terms with multiplicity, and described by the Fundamental Theorem of Algebra.

This step requires a bit of knowledge of Algebra. Assume that \(Q(x)\) is a polynomial of order \(n\). So we need to solve \(Q(x) = 0\), and according to the Fundamental Theorem of Algebra, there will be exactly \(n\) roots, maybe all real, but maybe some complex ones. Also, for each root there is a certain multiplicity (the number of times a root is repeated)

With these roots we will decompose \(Q(x)\). For each real root \(\alpha\), the corresponding factor in the decomposition is \((x-\alpha)\). If there is a multiplicity \(k\) for this root (this is, the root is repeated \(k\) times), the factor in the decomposition will be \((x-\alpha)^k\).

Now, it is bit trickier when there is a complex root \(c\). In that case there will always a conjugate complex root, \(\bar c\), and grouping those together we will end up with a quadratic expression \((x-c)(x - \bar c) = (x^2 + ax + b)\) with real coefficients.

If that complex root has a multiplicity \(k\), the factor would be \((x^2 + ax + b)^k\).

__Step 3__

Take the factors you found in Step 2. For each of the factors you will create some terms that will contribute to the sum of partial fractions.

For each factor of the form \(x + a\): Add a term \(\displaystyle \frac{A}{x+a}\)

For each factor of the form \((x + a)^k\): Add terms \(\displaystyle \frac{A_1}{x+a}+\frac{A_2}{(x+a)^2} + ... + \frac{A_1}{x+a}+\frac{A_k}{(x+a)^k}\)

For each factor of the form \(x^2 + ax + b\): Add a term \(\displaystyle \frac{A + B x}{x^2+ax+b}\)

For each factor of the form \((x^2 + ax + b)^k\): Add terms \(\displaystyle \frac{A_1 + B_1 x}{x^2+ax+b} + \frac{A_2 + B_2 x}{(x^2+ax+b)^2} + ...+ \frac{A_k + B_k x}{(x^2 + ax + b)^k} \)

__Step 4__

Add these partial fractions together, and equate it to the quotient \(\displaystyle \frac{P(x)}{Q(x)}\), and use that to find all the unknown constants \(A_i\) and \(B_i\) that were created in Step 3.

__Step 5__

After you found the constants in Step 4, you have decomposed the quotient \(\displaystyle \frac{P(x)}{Q(x)}\), into several terms that can be integrated via logarithm, or you need to do a simple change of variables.

And you have traded solving an impossible to solve integral for a possibly large number of smaller, partial fractions that are much easier to integrate, after a long algebraic exercise of endurance.

__EXAMPLE 2__

Integrate the following using partial fractions

\[\large \displaystyle \int \frac{x}{x^2 + 2x - 3} dx\]### ANSWER:

Patiently, we need to go through all the steps.

__Step 1__

In this case \(P(x) = x\) and \(Q(x) = x^2 + 2x - 3\), so the order of \(P(x)\) is 1, and the order of \(Q(x)\) is 2. Therefore, the condition is met, since the order of \(P(x)\) is less than the order of \(Q(x)\).

__Step 2__

Let us find the roots of \(Q(x) = x^2 + 2x - 3\), so we need to solve

\[\large x^2 + 2x - 3 = 0 \] \[\large \displaystyle \Rightarrow x = \frac{-2 \pm \sqrt{(-2)^2 - 4(1)(-3)}}{2(1)} \] \[\large \displaystyle \Rightarrow x = \frac{-2 \pm \sqrt{(4 +12}}{2} \] \[\large \displaystyle \Rightarrow x = \frac{-2 \pm \sqrt{16}}{2} \] \[\large \displaystyle \Rightarrow x = \frac{-2 \pm 4}{2} \]So then, the roots are \(x_1 = 1\) and \(x_2 = -3\). The factors then are \((x-1)\) and \((x+3)\). Observe that \(Q(x) = x^2 + 2x - 3 = (x-1)(x+3)\)

__Step 3__

For the factor \((x-1)\) we add the partial fraction \(\displaystyle \frac{A}{x-1}\) and for the factor \((x+3)\) we add the partial fraction \(\displaystyle \frac{B}{x+3}\).

__Step 4__

Now we add all the partial fractions and equate them with the original quotient of polynomials, in order to solve for the constants \(A\) and \(B\):

\[\large \displaystyle \frac{x}{x^2 + 2x - 3} = \frac{A}{x-1} + \frac{B}{x+3}\] \[\large \Rightarrow \displaystyle \frac{x}{x^2 + 2x - 3} = \frac{A(x+3) + B(x-1)}{(x-1)(x+3)} \] \[\large \Rightarrow \displaystyle \frac{x}{x^2 + 2x - 3} = \frac{A(x+3) + B(x-1)}{x^2 + 2x - 3} \] \[\large \Rightarrow x = A(x+3) + B(x-1) \] \[\large \Rightarrow x = Ax + 3A + Bx - B \] \[\large \Rightarrow x = (A+B)x + (3A - B) \]Observe that the last equality indicates that the polynomial on the left is the same as the polynomial on the right, for all \(x\). So then, their coefficients must be equal.

This means that \(A+B = 1\) and \(3A - B = 0\). From this last one, \(B = 3A\), so then \(A + 3A = 1\), which means \(4A = 1\) so \(A = 1/4\), and \(B = 3/4\).

So we have arrived to our partial fractions expansion:

\[\large \displaystyle \frac{x}{x^2 + 2x - 3} = \frac{1/4}{x-1} + \frac{3/4}{x+3} = \frac{1}{4(x-1)} + \frac{3}{4(x+3)} \]__Step 5__

Now you can enjoy integrating with ease:

\[\large \displaystyle \int \frac{x}{x^2 + 2x - 3} \, dx= \int \frac{1}{4(x-1)} \, dx + \int\frac{3}{4(x+3)} \, dx \] =\[\large \displaystyle \frac{1}{4} \ln|x-1| + \frac{3}{4} \ln|x+3| + C\]__EXAMPLE 3__

Integrate the following term using partial fractions decomposition

\[\large \displaystyle \int \frac{1}{x^3 -x^2 + x - 1} dx\]### ANSWER:

Again, we need to go through all the steps.

__Step 1__

In this case \(P(x) = 1\) and \(Q(x) = x^3 -x^2 + x - 1\), so the order of \(P(x)\) is 0, and the order of \(Q(x)\) is 3. Therefore, the condition is met, since the order of \(P(x)\) is less than the order of \(Q(x)\).

__Step 2__

Let us find the roots of \(Q(x) = x^3 -x^2 + x - 1\), so we need to solve

\[\large x^3 -x^2 + x - 1 = 0 \]This one is trickier, because there is not an easy formula for general cubic roots (there is a formula, but it is not easy). We need to do a trick:

\[\large x^3 -x^2 + x - 1 = x^2(x - 1) + (x-1) = (x^2+1)(x-1) = 0 \]So we have that \(x^2 + 1=0\) or \(x-1 = 0\). Therefore, the roots are \(x_1 = 1\), \(x_2 = i\), \(x_3 = -i\). Then, \(x_1\) is real, \(x_2\) and \(x_3\) are complex conjugate roots.

The root \(x_1 = 1\) has a factor \((x-1\), and the complex conjugate roots \(x_2 = i\), \(x_3 = -i\) have a factor \((x-i)(x+i) = (x^2+1)\).

__Step 3__

For the factor \((x-1)\) we add the partial fraction \(\displaystyle \frac{A}{x-1}\) and for the factor \((x^2+1))\) we add the partial fraction \(\displaystyle \frac{Bx + C}{x^2+1}\).

__Step 4__

Now we add all the partial fractions and equate them with the original quotient of polynomials, in order to solve for the constants \(A\) and \(B\):

\[\large \displaystyle \frac{1}{x^3 -x^2 + x - 1} = \frac{A}{x-1} + \frac{Bx + C}{x^2 + 1}\] \[\large \Rightarrow \displaystyle\frac{1}{x^3 -x^2 + x - 1} = \frac{A(x^2+1) + (Bx+C)(x-1)}{(x-1)(x^2+1)} \] \[\large \Rightarrow \displaystyle \frac{1}{x^3 -x^2 + x - 1} = \frac{A(x^2+1) + (Bx+C)(x-1)}{x^3 -x^2 + x - 1} \] \[\large \Rightarrow \displaystyle 1 = A(x^2+1) + (Bx+C)(x-1) \] \[\large \Rightarrow \displaystyle 1 = Ax^2 + A + Bx^2 - Bx + Cx - C \] \[\large \Rightarrow \displaystyle 1 = (A+B)x^2 + (C- B)x + (A - C) \]Observe that the last equality indicates that the polynomial on the left is the same as the polynomial on the right, for all \(x\). So then, their coefficients must be equal.

This means that \(A+B = 0\), \(C - B = 1\) and \(A - C = 0\). From this last one, \(A = C\), ans also \(A = -B), so we get that \(A = 1/2\), \(B = -1/2\) and \(C = -1/2\).

So we have arrived to our partial fractions expansion:

\[\large \displaystyle \frac{1}{x^3 -x^2 + x - 1} = \frac{1}{2(x-1)} - \frac{(x + 1)}{2(x^2 + 1)}\]__Step 5__

Now you can enjoy integrating with ease:

\[\large \displaystyle \int \frac{1}{x^3 -x^2 + x - 1} \, dx = \int \frac{1}{2(x-1)} \, dx - \int \frac{(x + 1)}{2(x^2 + 1)} \, dx\] \[\large \displaystyle = \frac{1}{2} \ln|x-1| - \int \frac{x}{2(x^2 + 1)} \, dx - \int \frac{1}{2(x^2 + 1)} \, dx\] \[\large \displaystyle = \frac{1}{2} \ln|x-1| - \frac{1}{4}\ln(1+x^2) - \frac{1}{2} \arctan x + C\]## More About the Partial Fraction Decomposition

The technique of using partial fractions is a blessing, because they serve you really well making possible an integration that would not be possible otherwise.

BUT, when you see it in a homework or test, you know that you have lots of work ahead of you to make partial fractions work for you. So my advice is to go slow and don't rush it when you are doing all the grunt work.

### The Mechanics

Conducting a partial fractions decomposition will demand several algebraic skills for you to pull out of your hat, namely: divide polynomials, find roots of polynomials and solve systems, on top of being able to express the proper decomposition structure, handling correctly the different cases (different roots, repeated roots). So you need to be in tip-top shape with your algebraic acumen.

In the end, it is very mechanical and almost tedious to do. Ultimately, you could use a CAS like Maple or Mathematica to get the partial fraction expansion done for you, but if you have a test is likely that your instructor will want you to do it with any aids, so you better prepare for it.

In case you have any suggestion, or if you would like to report a broken solver/calculator, please do not hesitate to **contact us**.