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.
Integrate $\int \frac{dx}{x^2 - 3x - 4}$
$$\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:
$$1=A(x-4)+B(x+1)$$
"Basic equation," good for all $x$
Good choices are the ones that allow us to solve for $A$ and $B$, so $x = 4$ and $x = -1$ will do the trick:
$$ \begin{align} \text{let } \; x &= 4, \text{ then } \; 5B = 1\rightarrow B = \frac{1}{5} \\[5pt] \text{let } \; x &= -1, \text{ then } -5A = 1\rightarrow 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:
$$ \begin{align} \int \frac{dx}{x^2 - 3x - 4} &= \frac{1}{5} \int \frac{1}{x - 4} \\[5pt] &- \frac{1}{x + 1} dx \end{align}$$
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 \\[5pt] or \; &= \frac{1}{5} ln\left( \frac{|x - 4|}{|x + 1|} \right) + C \end{align}$$
In the last step, we employed this law of logs: $ln|x| - ln|y| = ln|x/y|$. Rational decomposition of the integrand into two simpler rational functions made that integral possible.
Integrate $\int \frac{x^2 - 5x + 6}{x^3 + 2x^2 + x}$
$$\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, \text{ then } 2A = 6, \; \rightarrow \; \bf A = 3 \\[5pt] let \; x &= -1, \text{ 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, \text{ then } 4A + 2B - 2C &= 2 \\[5pt] 4(3) + 2B - 2(-12) &= 2 \\[5pt] 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$$
Integrate $\int \frac{2x^2 - x + 3}{x^3 + 4x} \, dx$
$$\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 $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, \text{ 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, \text{ 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 $\text{tan}^{-1}(x)$. The result is
$$= \frac{3}{4} ln|x| + \frac{5}{4} ln|x^2 + 4| + \text{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, $A/(x+2)$, $B/(x+2)^2$, and $C/(x+2)^3$. Here is the general form of the rule:
$$\frac{f(x)}{x^m(x+a)^n}=\frac{A}{x}+\frac{B}{x^2}+ \dots + \frac{C}{x^m}+\frac{D}{x+a} + \frac{E}{(x+a)^2}+ \dots + \frac{F}{(x+a)^n}$$
Integrate $\int \frac{x^3 + 2x}{x - 1} \, dx$
$$ \require{enclose} \require{cancel} \begin{array}{rll} x^2+x-3\phantom{0} \\[-3pt] x-1 \enclose{longdiv}{\cancel{x^3}+2x \phantom{0000}}\kern-.2ex \\[-3pt] \underline{{-(\cancel{x^3}-x^2)} \phantom{000}} \\[-3pt] -(\cancel{x^2}+2x) \phantom{000} \\[-3pt] \underline{{-(\cancel{x^2}-\; x)} \phantom{000}} \\[-3pt] \cancel{3x} \phantom{0000} \\[-3pt] \underline{{-(\cancel{3x}-3)}} \\[-3pt] 3 \;\; \end{array}$$
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.
Solve these integrals using decomposition of the rational integrand.
$$\int \frac{x + 2}{x^2 - x - 6}\, dx$$
$$\int \frac{x + 2}{x^2 - x - 6}\, dx = \int \frac{x + 2}{(x - 3)(x + 2)} \, dx$$
This function has a hole at x = -2. We can remove it by canceling the (x + 2) binomials and integrating the result:
$$\int \frac{dx}{x - 3} = ln|x - 3| + C$$
This integral didn't require any decomposition of the rational function!
$$\int \frac{x + 1}{x^2 - x - 6} \, dx$$
$$\int \frac{x + 1}{x^2 - x - 6} \, dx$$
$$\frac{x + 1}{x^2 - x - 6} = \frac{x + 1}{(x - 3)(x + 2)}$$
$$\frac{x + 1}{(x - 3)(x + 2)} = \frac{A}{x - 3} + \frac{B}{x + 2}$$
$$ \begin{align} x + 1 &= A(x + 2) + B(x - 3) \\[5pt] let \; x = -2, \; then \; -1 &= -5B \; \longrightarrow \; B = \frac{1}{5} \\[5pt] let \; x = 3, \; then \; 4 &= 5A \; \longrightarrow \; A = \frac{4}{5} \end{align}$$
$$ \begin{align} \int \frac{x + 1}{x^2 - x - 6} \, dx &= \frac{4}{5} \int \frac{dx}{x - 3} \, dx + \frac{1}{5} \int \frac{dx}{x + 2} \, dx \\[5pt] &= \bf \frac{4}{5} ln|x - 3| + \frac{1}{5} ln|x + 2| + C \end{align}$$
$$\int \frac{x + 3}{x(x - 1)^2} \, dx$$
$$\int \frac{x + 3}{x(x - 1)^2} \, dx$$
Write the decomposition equation. (x - 1)2 is a repeated factor, so it must be represented twice, as shown
$$\frac{x + 3}{x(x - 1)^2} = \frac{A}{x} + \frac{B}{x - 1} + \frac{C}{(x - 1)^2}$$
Write the basic equation and solve. Do the easiest stuff first.
$$ \begin{align} x + 3 &= A(x - 1)^2 + Bx(x - 1) + Cx \\[5pt] let \; x &= 1, \; then \; C = 4 \\[5pt] let \; x &= 0, \; then \; A = 3 \\[5pt] let \; x &= -1, \; then \; 2 = 4A + 2B - C \\[5pt] B = \frac{2 - 4A - C}{2} &= \frac{2 - 4(3) - 4}{2} = -7 \end{align}$$
Now set up the integrals and solve.
$$ \begin{align} \frac{x + 3}{x(x - 1)^2} \, dx &= 3 \int \frac{dx}{x} - 7\int \frac{dx}{x - 1} + 4\int \frac{dx}{(x - 1)^2} \\[5pt] &= \bf 3 ln|x| - 7ln|x - 1| - \frac{4}{x - 1} + C \end{align}$$
The last integral is done by u-substitution, u = x - 1, ...
$$\int \frac{dx}{x^2 + 6x + 8} \, dx$$
$$\int \frac{dx}{x^2 + 6x + 8} \, dx$$
The denominator can be factored, always a good first step:
$$\frac{1}{x^2 + 6x + 8} = \frac{1}{(x - 2)(x - 4)} = \frac{A}{x - 2} + \frac{B}{x - 4}$$
Now write the basic equation and solve by picking strategic values of x:
$$ \begin{align} A(x - 2) + B(x - 4) &= 1 \\[5pt] let \; x = 4, \; then \; B &= \frac{1}{2} \\[5pt] let \; x = 2, \; then \; A &= \frac{-1}{2} \\[5pt] \end{align}$$
Now re-write the integral and solve:
$$ \begin{align} \int \frac{dx}{x^2 + 6x + 8} \, dx &= \frac{1}{2}\int \frac{dx}{x - 4} - \frac{1}{2} \int \frac{dx}{x - 2}\\[5pt] &= ln|x - 4| - ln|x - 2| \\[5pt] &= ln \left| \frac{x - 4}{x - 2} \right| + C \end{align}$$
$$\int \frac{dx}{x(2x + 1)} \, dx$$
$$\int \frac{dx}{x(2x + 1)} \, dx$$
The denominator of the integrand is nicely factored in linear factors, so we can rewrite the rational function like this:
$$\frac{x}{2x + 1} = \frac{A}{x} + \frac{B}{2x + 1}$$
Now write the basic equation and solve by picking strategic values of x:
$$ \begin{align} A(2x + 1) + Bx &= 1 \\[5pt] let \; x = -\frac{1}{2}, \; then \; B &= -2 \\[5pt] let \; x = 0, \; then \; A &= 1 \\[5pt] \end{align}$$
Now re-write the integral and solve:
$$ \begin{align} \int \frac{dx}{x(2x + 1)} \, dx &= \int \frac{dx}{x} - 2\int \frac{dx}{2x + 1}\\[5pt] &= ln|x| - 2 \frac{1}{2}ln|2x + 1| \\[5pt] &= ln \left| \frac{x}{2x + 1} \right| + C \end{align}$$
The second integral was done by u-substitution; that's where the factor of ½ came from.
$$\int_0^1 \frac{x}{16 - x^2} \, dx$$
$$\int_0^1 \frac{x}{16 - x^2} \, dx
The denominator is a difference of perfect squares, so it has two linear factors:
$$\frac{x}{16 - x^2} = \frac{x}{(4 - x)(4 + x)} = \frac{A}{4 - x} + \frac{B}{4 + x}$$
Now write the basic equation and solve by picking strategic values of x:
$$ \begin{align} A(4 + x) + B(4 - x) &= x \\[5pt] let \; x = -4, \; then \; B &= -\frac{1}{2} \\[5pt] let \; x = 4, \; then \; A &= \frac{1}{2} \end{align}$$
Now re-write the integral and solve. Don't forget to evaluate the limits.
$$ \begin{align} \int_0^1 \frac{x}{16 - x^2} \, dx &= \frac{1}{2}\int \frac{dx}{4 - x} - \frac{1}{2}\int \frac{dx}{4 + x} \\[5pt] &= \frac{1}{2}[ln|4 - x| - ln|4 + x|] \bigg|_0^1 \\[5pt] &= \frac{1}{2} ln \left| \frac{4 - x}{4 + x} \right|_0^1 \\[5pt] &= \frac{1}{2} \left[ ln(1) - ln\left( \frac{3}{5} \right) \right] \\[5pt] &= -\frac{1}{2} ln \left( \frac{3}{5} \right) \approx 1.022 \end{align}$$
$$\int \frac{6}{x^2 + 11x + 28} \, dx$$
$$\int \frac{6}{x^2 + 11x + 28} \, dx$$
The denominator can be factored, so we can make a nice linear-factor decomposition:
$$\frac{6}{x^2 + 11x + 28} = \frac{6}{(x + 7)(x + 4)} = \frac{A}{x + 7} + \frac{B}{x + 4}$$
Now write the basic equation and solve by picking strategic values of x:
$$ \begin{align} A(x + 4) + B(x + 7) &= 6 \\[5pt] let \; x = -4, \; then \; B &= 2 \\[5pt] let \; x = -7, \; then \; A &= -2 \end{align}$$
Now re-write the integral and solve.
$$ \begin{align} \frac{6}{x^2 + 11x + 28} \, dx &= 2\int \frac{dx}{x + 4} - 2\int \frac{dx}{x + 7} \\[5pt] &= 2[ln|x + 4| - ln|x + 7|] \\[5pt] &= 2 ln \left| \frac{x + 4}{x + 7} \right| + C \end{align}$$
$$\int \frac{3x + 7}{(x - 2)^2} \, dx$$
$$\int \frac{3x + 7}{(x - 2)^2} \, dx$$
The best decomposition of a fraction with a denominator like this is:
$$\frac{3x + 7}{(x - 2)^2} = \frac{A}{x - 2} + \frac{B}{(x - 2)^2}$$
Now write the basic equation and solve by picking strategic values of x:
$$ \begin{align} A(x - 2) + B &= 3x + 7 \\[5pt] let \; x = 2, \; then \; \bf B &= 13 \\[5pt] let \; x = 0, \; then \; -2A + B &= 7 \\[5pt] \text{Using B = 13, we get} \; \bf A &= 3 \end{align}$$
Now re-write the integral and solve.
$$ \begin{align} \int \frac{3x + 7}{(x - 2)^2} \, dx &= 3\int \frac{dx}{x - 2} + 13\int \frac{dx}{(x - 2)^2} \\[5pt] &= 3ln|x - 2| - \frac{13}{x - 2} + C \\[5pt] \end{align}$$
Notice that the second integral is not a log integral!
$$\int \frac{x^2 + 3x - 44}{(x + 3)(x + 5)(3x - 2)} dx$$
$$\int \frac{x^2 + 3x - 44}{(x + 3)(x + 5)(3x - 2)} \, dx$$
The decomposition of a fraction with a denominator that is only a product of linear factors is:
$$\frac{x^2 + 3x - 44}{(x + 3)(x + 5)(3x - 2)} = \frac{A}{x + 3} + \frac{B}{(x + 5)^2} + \frac{C}{3x - 2)}$$
Now write the basic equation and solve by picking strategic values of x:
$$ \begin{align} A(x + 5)(3x - 2) &+ B(x + 3)(3x - 2)\\[5pt] + C(x + 3)(x + 5) &= x^2 + 3x - 44 \\[5pt] let \; x = -5, \; then \; \bf B &= -1 \\[5pt] let \; x = -3, \; then \; \bf A &= 2 \\[5pt] \text{Using A = 2 and B = -1 , we get} \; \bf C &= 2 \end{align}$$
Now re-write the integral and solve.
$$ \begin{align} \int &\frac{x^2 + 3x - 44}{(x + 3)(x + 5)(3x - 2)} \, dx \\[5pt] &= 2\int \frac{dx}{x + 3} - \int \frac{dx}{(x + 5)^2} + 2 \int \frac{dx}{3x - 2} \\[5pt] &= 2 ln|x + 3| - ln|x + 5| + 2 ln|3x - 2| \\[5pt] &= ln \left| \frac{(x + 3)^2(3x - 2)^2}{x + 5} \right| + C \end{align}$$
$$\int \frac{x^2 + x + 2}{(x + 2)^2} \, dx$$
$$\int \frac{x^2 + x + 2}{(x + 2)^2} \, dx$$
A nice way to simplify an integrand like this is to do a polynomial long division – not as difficult as it sounds:

So our integrand is
$$\frac{x^2 + x + 2}{(x + 2)^2} = 1 + \frac{-3x - 2}{(x + 2)^2}$$
Now the rational decomposition of the fraction is
$$\frac{-3x - 2}{(x + 2)^2} = \frac{A}{x + 2} + \frac{B}{(x + 2)^2}$$
Now write the basic equation and solve by picking strategic values of x:
$$ \begin{align} A(x + 2) + B &= -3x - 2 \\[5pt] let \; x = -2, \; then \; \bf B &= 4 \\[5pt] let \; x = 0, \; then \; \bf A &= -3 \end{align}$$
Now re-write the integral and solve–don't forget the 1 we left behind above:
$$ \begin{align} \int \frac{x^2 + x + 2}{(x + 2)^2} \, dx &= \int dx - 3 \int \frac{dx}{x + 2} + 4 \int \frac{dx}{(x + 2)^2} \\[5pt] &= x - 3ln|x + 2| -\frac{4}{x + 2} + C\\[5pt] \end{align}$$
![]()
xaktly.com by Dr. Jeff Cruzan is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. © 2012-2025, 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.