Decomposition of rational functions

A way to reverse-engineer rational functions to make them easier to integrate


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.


Example 1

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


Solution: Now this integrand has a factorable denominator, and that's crucial for the method of rational decomposition to work. Here's the factored integrand:

$$\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.


Example 2

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


Solution: Now this one is a little more complicated. We'll use a more complicated decomposition, which will be explained below. The denominator factors like this (note that the denominator can be factored:

$$\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 three potential factors: x, (x + 1) and (x + 1)2. Not all may be necessary (i.e. one of the two coefficients below, B or C could be zero), but we need to find out by including all of the terms frorm the start:

$$\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$$

Example 3

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


Solution: The first thing to do is to factor the denominator, if possible. In this case we can pull out a common factor of 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 (x2 + 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, x2 + 4, where x can take on two ± values and give the same result. The numerator of Bx + C provides the second and third variables needed to completely specify the original function. Now multiplying by the original denominator gives

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 = x2 + 4, and the last is the derivative of tan-1(x). The result is

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

Forming the decomposition expression (the numerators)

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, A/(x+2), B/(x+2)2, and C/(x+2)3. Here is the general form of the rule:


Example 4 – degree of numerator > degree of denominator

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


Solution: The key to an integrand like this is to recognize that the degree of the denominator is less than the degree of the numerator, so we can simplify it by long division:

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, x2 + 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.

Practice problems

Solve these integrals using decomposition of the rational integrand.

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$$


Creative Commons License   optimized for firefox
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.