Table of Contents

Integration with Partial Fractions
Before you read this section on Integration by Partial Fractions, please consult the page on Long Division of Improper Rational Functions.
Suppose that we have a function in the form of $f(x) = \frac{P(x)}{Q(x)}$ where $P$ and $Q$ are both polynomials. Hence, $f$ is said to be a rational function. Functions in this form can be integrated with a technique known as integration by partial fractions. We will now demonstrate this.
Suppose that we have the following function, $f(x) = \frac{x}{x+2} + \frac{1 + x}{x + 3}$. If we were to simplify this function and write it all under a common denominator, then we would obtain:
(1)Now suppose that instead, we were given that $f(x) = \frac{2x^2 + 6x + 2}{x^2 + 5x + 6}$ without knowing its partial fraction decomposition, and suppose we wanted to find $\int \frac{2x^2 + 6x + 2}{x^2 + 5x + 6} \: dx$. It turns out that knowing the partial fraction decomposition and integrating that instead is generally much easier as:
(2)Finding the Partial Fractions of a Rational Function
Recall the page on Long Division of Improper Rational Functions. We will be able to apply the technique of integration with partial fractions only when the rational function is proper. If the rational function is improper, then we must first use long division. Let's first look at an example.
Example 1
For $f(x) = \frac{x^3 + x^2 + x + 1}{x  1}$, determine $\int \frac{x^3 + x^2 + x + 1}{x  1} \: dx$.
We can use integration by partial fractions for this example. First let's note that the degree of the denominator is greater than the degree of the denominator, so we can use long division of polynomials to find the partial fraction decomposition of rational function. When we divide the numerator by the denominator, we get that $S(x) = x^2 + 2x + 3$ and that the remainder is $R(x) = 4$. Hence our partial fraction decomposition is:
(3)Integrating $f$ is much easier now:
(4)Partial Fraction Decomposition of Proper Rational Functions
If we get that $\frac{R(x)}{Q(x)}$ into a proper rational function form, then we can now decompose $\frac{R(x)}{Q(x)}$. In such case, the polynomial Q can be factored as a product of linear factors $ax + b$ or irreducible quadratic factors $ax^2 + bx + c$ which we precisely define as follows:
Definition: A factor $m$ of a function $f$ is a Linear Factor if $m = ax + b$. Furthermore, $m$ is an Irreducible Quadratic Factor if $m = ax^2 + bx + c$ cannot be reduced further into linear factors, that is $b^2  4ac < 0$ (the descriminant of $m$ is negative). 
We will now look at all of the possible cases in factoring $Q(x)$ and subsequently take a look at some examples of integration by partial fractions.
Case 1: Q(x) is a product of distinct linear factors.
Suppose that $Q(x)$ has a product of $n$ distinct linear factors, that is $Q(x) = (a_1x + b_1)(a_2x + b_2)...(a_nx + b_n)...$, where none of these factors are repeated and none of these factors are a constant multiple of one another, that is for a constant C, $(a_ix + b_i) ≠ C(a_jx + b_j)$ for all factors. Hence, the partial fraction decomposition of $\frac{R(x)}{Q(x)}$ will be:
(5)Example 1
Integrate $f(x) = \frac{2x}{x^2  x  2}$.
By factoring the denominator of $f$, we get two distinct linear factors, namely $(x  2)$ and $(x + 1)$. We hence know that for some $A$ and $B$:
(6)Hence it follows that $2x = A(x + 1) + B(x  2)$. Hence, we can now choose any $x$ and solve for $A$ and $B$. When $x = 2$, then we get that $4 = 3A$, or more appropriately $A = \frac{4}{3}$. When $x = 1$, we get that $2 = 3B$, or rather $B = \frac{2}{3}$. Hence it follows that our partial fraction decomposition is:
(7)Now we can integrate this function:
(8)Case 2: Q(x) is a product of distinct linear factors, some of which are repeated.
Suppose that $Q(x)$ has a linear factor $(a_0x + b_0)$ that is repeated $r$times. Then the partial fraction decomposition of $\frac{R(x)}{Q(x)}$ is:
(9)Case 3: Q(x) contains an irreducible quadratic factor that isn't repeated.
Suppose that $Q(x)$ has an irreducible quadratic factor $ax^2 + bx + c$ that is not repeated. Then the partial fraction decomposition of $\frac{R(x)}{Q(x)}$ is:
(10)Case 4: Q(x) contains an irreducible quadratic factor that is repeated.
Suppose that $Q(x)$ has an irreducible quadratic factor $a_0x^2 + b_0x + c_0$ that is repeated $r$times. Then the partial fraction decomposition of $\frac{R(x)}{Q(x)}$ is:
(11)We will look at more examples of integration by partial fractions on the Integration with Partial Fractions Examples 1 and Integration with Partial Fractions Examples 2 pages.