**Decomposition of rational functions** is an algebraic trick that will allow you to re-express a complicated rational integrand as a sum of smaller rational functions. It's pretty straightforward when you know it, and easy to recognize when it's needed, but you need to practice it to learn a few tricks.

The basic idea is that any rational function with a denominator that is a product can be see to

be the result of adding two fractions in which the common denominator is that product, like this:

$$\frac{A}{x} + \frac{B}{y} = \frac{1}{xy}$$

The best way to tackle rational decomposition is by example, so we'll dive right in to a few. Afterward we'll set out some guidelines for achieving a good decomposition.

**Solution**

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

Now imagine that fraction on the left to be just the sum of two simpler fractions.

Notice that we've chosen the simpler fractions so that, in order to add the two, we'd need to multiply denominators to get the same common denominator as the original fraction.

$$\frac{1}{(x + 1)(x - 4)} = \frac{A}{x + 1} + \frac{B}{x - 4}$$

Now we can multiply both sides of the equation by **(x + 1)(x - 4)** and cancel where we can:

Cancelling single binomials after distributing the **(x+1)(x-4)** on the right gives us a "basic equation." Notice that **x** can be anything, and that we're trying to find **A** and **B**. We do that by *convenient* choice of **x**'s, like this:

Good choices are the ones that allow us to solve for **A** and **B**, so so **x = 4** and **x = -1** will do the trick:

$$ \begin{align} let \; x &= 4, \; then \; 5B = 1, \; \rightarrow \; \bf B = \frac{1}{5} \\ let \; x &= -1, \; then \; -5A = 1, \; \rightarrow \; \bf A = \frac{-1}{5} \end{align}$$

Now that we have **A** and **B**, we can rewrite our integrand in two separate but simpler rational functions.

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

The new and equivalent integrand is a difference of two rational functions, which can be integrated separately:

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

These two integrals are easily done by u-substitution or just by eye, and the solution is

$$ \begin{align} &= \frac{1}{5} [ln|x - 4| - ln|x + 1|] + C \\ \\ or \; &= \frac{1}{5} ln\left( \frac{|x - 4|}{|x + 1|} \right) + C \end{align}$$

In the last step, we employed the law of logs: **ln|x| - ln|y| = ln|x/y|**. Rational decomposition of the integrand into two simpler rational functions made that integral possible.

**Solution**

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

The decomposition of the integrand is a bit trickier. We have to realize that the denominator, **x(x + 1) ^{2}**, actually has

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

We need that extra term under **C** because the binomial (**x + 1**) is squared. Now we multiply both sides by the full denominator of the integrand ...

to get the basic equation:

$$x^2 - 5x + 6 = A(x + 1)^2 + Bx(x + 1) + Cx$$

Now in such an equation, **x** can take on any value at all; it's **A**, **B** and **C** that we're trying to determine. Choosing convenient values of **x** is the key. Choosing **x = 0** and **x = -1** will allow us to determine **A** and **C** because each leads to zeroing out of two of the other terms on the right.

$$ \begin{align} let \; x &= 0, \; then \; 2A = 6, \; \rightarrow \; \bf A = 3 \\ let \; x &= -1, \; then \; -C = 12, \; \rightarrow \; \bf C = 12 \end{align}$$

Now with **A** and **C** in hand, we can set **x** equal to *any* other value and solve for **B**, but **x = 1** is very convenient.

$$ \begin{align} let \; x = 1, \; then \; 4A + 2B - 2C &= 2 \\ 4(3) + 2B - 2(-12) &= 2 \\ B &= 7 \end{align}$$

Note that x could actually be anything in the determination of B above, but x = 1 was convenient. With **A**, **B** and **C** in hand, we can re-write the integrand in a form that's easily integrable:

$$\frac{x^2 - 5x + 6}{x(x + 1)^2} = \frac{3}{x} + \frac{7}{x + 1} - \frac{12}{(x + 1)^2}$$

Now we just need to integrate. The first two are easy log integrals; the second and last are done by u-substitution (let u = x + 1 in either case).

$$\int \frac{x^2 - 5x + 6}{x(x + 1)^2} = 3 \int \frac{dx}{x} + 7 \int \frac{dx}{x + 1} - 12 \int \frac{dx}{(x + 1)^2}$$

The result is

$$= 3 ln|x| + 7 ln|x + 1| + \frac{12}{|1 + x|} + C$$

**Solution****x** from both terms:

$$\frac{2x^2 - x + 3}{x^3 + 4x} = \frac{2x^2 - x + 3}{x(x^2 + 4)}$$

Now the denominator of this rational function contains a quadratic (x^{2} + 4) that can't be reduced (factored).The decomposition of the integrand this time looks like this:

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

There are two "degrees of freedom" in the denominator on the right, **x ^{2} + 4**, where

from which we get the basic equation:

$$2x^2 - x + 3 = A(x^2 + 4) + Bx^2 + Cx$$

Now choosing **x = 0** and **x = -1** will allow us to determine **A** and **C** because each leads to zeroing out of two of the other terms on the right.

$$let \; x = 0, \; then \; 3 = 4A, \; \rightarrow \; A = \frac{3}{4}$$

In this case, finding **B**, is a little more complicated, but still doable. We set **x = -1** and **x = 1** to find two separate equations to solve for both **B** and **C**:

And

$$let \; x = 2, \; then \; 9 = 6 + 5 + C, \; \rightarrow \; C = -2$$

With **A**, **B** and **C** in hand, we can re-write the integrand in a form that's easily integrable:

$$\frac{2x^2 - x + 3}{x(x^2 + 4)} = \frac{3}{4x} + \frac{\frac{5}{4} x - 2}{x^2 + 4}$$

The integral is

$$\int \frac{2x^2 - x + 3}{x(x^2 + 4)} = \frac{3}{4} \int \frac{dx}{x} + \frac{5}{4} \int \frac{x \, dx}{x^2 + 4} - 2 \int \frac{dx}{x^2 + 4}$$

Now we just need to integrate. The second can be done by making the substitution **u = x ^{2} + 4**, and the last is the derivative of

$$= \frac{3}{4} ln|x| + \frac{5}{4} ln|x^2 + 4| + tan^{-1} \left( \frac{x}{2} \right) + C$$

For each term in the factored denominator, you must include powers of simple binomial **(x + a)** factors from 1 to the highest power that is present. For example, if the factor **(x + 2) ^{3}** is present, you would need three terms in the decomposition,

**Solution**

We can now substitute a polynomial plus a much simpler rational function (the remainder) for the original integrand:

$$\frac{x^3 + 2x}{x - 1} = x^2 + x + 3 + \frac{3}{x - 1}$$

Now we have a sum of two much simpler integrals, one of a simple polynomial function, **x ^{2} + x + 3**, and one of our remainder. Both are easy integrals

$$= \int x^2 + x + 3 \, dx + \int \frac{3}{x - 1} \, dx$$

and the result is

$$= \frac{x^3}{3} + \frac{x^2}{2} + 3x + 3 ln|x - 1| + C$$

When the degree of the denominator is smaller than the degreee of the numerator, consider doing long division to reduce the integrand to a sum of simpler ones.

1. | $$\int \frac{x + 2}{x^2 - x - 6}\, dx$$ | |

2. | $$\int \frac{x + 1}{x^2 - x - 6} \, dx$$ | |

3. | $$\int \frac{x + 3}{x(x - 1)^2} \, dx$$ | |

4. | $$\int \frac{dx}{x^2 + 6x + 8} \, dx$$ | |

5. | $$\int \frac{dx}{x(2x + 1)} \, dx$$ |

6. | $$\int_0^1 \frac{x}{16 - x^2} \, dx$$ | |

7. | $$\int \frac{6}{x^2 + 11x + 28} \, dx$$ | |

8. | $$\int \frac{3x + 7}{(x - 2)^2} \, dx$$ | |

9. | $$\int \frac{x^2 + 3x - 44}{(x + 3)(x + 5)(3x - 2)} \, dx$$ | |

10. | $$\int \frac{x^2 + x + 2}{(x + 2)^2} \, dx$$ |

**xaktly.com** by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012, Jeff Cruzan. All text and images on this website not specifically attributed to another source were created by me and I reserve all rights as to their use. Any opinions expressed on this website are entirely mine, and do not necessarily reflect the views of any of my employers. Please feel free to send any questions or comments to jeff.cruzan@verizon.net.