Skip to content
RMIT University Library - Learning Lab

IN7 Integration using partial fractions

 

Examples of partial fractions

How do you integrate an expression when there is an algebraic expression in the numerator and denominator of a fraction? Integrating using partial fractions helps you to solve this problem. Read this worksheet for several worked examples.

Some times a complex function may be integrated by breaking it up into partial fractions. The idea is that each partial fraction is an easier integral than the original. For example: \[\begin{align*} \int & \frac{1}{x^{2}+5x+6}dx=\int\frac{1}{x+2}dx-\int\frac{1}{x+3}dx. \end{align*}\] The integrals on the right are much simpler than that on the left. This module explains how this can be done.

Adding Fractions

When adding fractions we rewrite the fractions with a common denominator and then add the numerators.1 The numerator is the top line of the fraction and the denominator is the bottom line. For \(\frac{2}{x+2}\), the numerator is \(2\) and the denominator is \(x+2.\)

For example: \[\begin{align*} \frac{3}{3x+4}+\frac{2}{x-5} & =\frac{3}{3x+4}\times\frac{x-5}{x-5}+\frac{2}{x-5}\times\frac{3x+4}{3x+4}\\ & =\frac{3x-15}{\left(3x+4\right)\left(x-5\right)}+\frac{6x+8}{\left(3x+4\right)\left(x-5\right)}\\ & =\frac{3x-15+6x+8}{\left(3x+4\right)\left(x-5\right)}\\ & =\frac{9x-7}{\left(3x+4\right)\left(x-5\right)}. \end{align*}\]

Finding Partial Fractions

To find partial fractions, we do the reverse of what we did when adding fractions above. In other words we want to go from \[ \underbrace{\frac{9x-7}{\left(3x+4\right)\left(x-5\right)}}_{\textrm{algebraic fraction}}\quad\textrm{to$\quad$ $\underbrace{\frac{3}{3x+4}+\frac{2}{x-5}}_{\textrm{partial fractions}}$ }. \]

The first step in finding partial fractions is to factorize the denominator. The factorization used will depend on the form of the original fraction’s s denominator. We summarize this below. Note that \(a,b,c,k,m,n,p\) and \(q\) are constants that are known and \(A,A_{i}\) \(\left(i\in\left\{ 1,2,\ldots,n\right\} \right),B\) and \(C\) are constants that you have to determine.

1.   Two distinct linear factors: \[ \frac{mx+k}{\left(x-a\right)\left(x-b\right)}\quad\textrm{factorize using$\quad\frac{A}{x-a}+\frac{B}{x-b}$ }. \]

2.   Repeated linear factors: \[ \frac{mx+k}{\left(x-a\right)^{n}}\quad\textrm{factorize using$\quad\frac{A_{1}}{x-a}+\frac{A_{2}}{\left(x-b\right)^{2}}+\ldots+\frac{A_{n-1}}{\left(x-b\right)^{n-1}}+\frac{A_{n}}{\left(x-b\right)^{n}}.$ } \]

3.   Linear factor and irreducible quadratic factor: \[ \frac{mx+k}{\left(px+q\right)\left(ax^{2}+bx+c\right)}\quad\textrm{factorize using$\quad\frac{A}{px+q}+\frac{Bx+C}{ax^{2}+bx+c}$ }. \]

To express an algebraic fraction as partial fractions:

  1. Factorize the denominator (using the guidelines above);

  2. Write the algebraic fraction in partial fraction form with unknown constants \(A,A_{i},B\) and \(C\);

  3. Add the partial fractions;

  4. Equate coefficients, or substitute values of \(x\) to determine the value of the unknown constants.

Using Partial Fractions in Integration

To integrate a function that is an algebraic fraction that is too hard to integrate directly we first convert it into partial fraction form and integrate each of the partial fractions.

Example 1: Find the integral of \(\frac{x-5}{x^{2}+2x-3}\) with respect to \(x\).

Solution: We first decompose the integrand into partial fractions. Since \(x^{2}+2x-3=\left(x+3\right)\left(x-1\right)\), we are dealing with the case where the denominator has two distinct linear factors. Therefore we factorize as follows: \[\begin{align*} \frac{x-5}{x^{2}+2x-3} & =\frac{x-5}{\left(x+3\right)\left(x-1\right)}\\ & =\frac{A}{x+3}+\frac{B}{x-1}. \end{align*}\] Now we have to determine the constants \(A\) and \(B.\) First add the partial fractions. We do this by finding a common denominator, in this case \(\left(x+3\right)\left(x-1\right):\) \[\begin{align*} \frac{A}{x+3}+\frac{B}{x-1} & =\frac{A}{\left(x+3\right)}\times\frac{\left(x-1\right)}{\left(x-1\right)}+\frac{B}{\left(x-1\right)}\times\frac{\left(x+3\right)}{\left(x+3\right)}\\ & =\frac{A\left(x-1\right)+B\left(x+3\right)}{\left(x+3\right)\left(x-1\right)}\\ & =\frac{Ax-A+Bx+3B}{\left(x+3\right)\left(x-1\right)}\\ & =\frac{Ax+Bx-A+3B}{x^{2}+2x-3}\\ & =\frac{\left(A+B\right)x-A+3B}{x^{2}+2x-3} \end{align*}\] That is, \[\begin{align*} \frac{x-5}{x^{2}+2x-3} & =\frac{\overbrace{\left(A+B\right)}^{x-\textrm{coefficient}}x\overbrace{-A+3B}^{\textrm{constant term}}}{x^{2}+2x-3}. \end{align*}\] The constants \(A\) and \(B\) can be found by equating the coefficients of terms on the left and right sides of the equation. On the left, the coefficient of \(x\) is \(1\) and on the right the coefficient is \(A+B\) . Similarly the constant term on the left side is \(-5\) and on the right it is \(-A+3B\). This gives us the following simultaneous equations: \[\begin{align*} A+B & =1 & \left(1\right)\\ -A+3B & =-5 & \left(2\right) \end{align*}\] These equations are easily solved by elimination. Adding the equations we get \[\begin{align*} 4B & =-4\\ B & =-1. \end{align*}\] Substituting for \(B\) in equation \(\left(1\right)\) gives \[\begin{align*} A-1 & =1\\ A & =2. \end{align*}\] Finally we have: \[\begin{align*} \frac{x-5}{x^{2}+2x-3} & =\frac{A}{x+3}+\frac{B}{x-1}\\ & =\frac{2}{x+3}+\frac{-1}{x-1}\\ & =\frac{2}{x+3}-\frac{1}{x-1}. \end{align*}\] We can now evaluate the integral \[\begin{align*} \int\frac{x-5}{x^{2}+2x-3}dx & =\int\left(\frac{2}{x+3}-\frac{1}{x-1}\right)dx\\ & =\int\frac{2}{x+3}dx-\int\frac{1}{x-1}dx\\ & =2\ln\left|x+3\right|-\ln\left|x-1\right|+c\;\ \ \ \ \ ,c\textrm{ being a constant. } \end{align*}\] Using the laws of logarithms, \(a\ln\left(x\right)=\ln\left(x^{a}\right)\) and \(\ln\left(a\right)-\ln\left(b\right)=\ln\frac{a}{b}\) , we can also write the answer as: \[\begin{align*} \int\frac{x-5}{x^{2}+2x-3}dx & =2\ln\left|x+3\right|-\ln\left|x-1\right|+c\;\ \ \ \ \ \ c\textrm{ being a constant. }\\ & =\ln\left(x+3\right)^{2}-\ln\left|x-1\right|+c\\ & =\ln\frac{\left(x+3\right)^{2}}{\left|x-1\right|}+c \end{align*}\]

Example 2: Find the integral of \(\frac{x^{2}-3x+16}{x^{3}-5x^{2}+x-5}.\)

We first factorize the denominator: \[\begin{align*} x^{3}-5x^{2}+x-5 & =x^{2}\left(x-5\right)+x-5\\ & =\left(x^{2}+1\right)\left(x-5\right). \end{align*}\] In this case we have a quadratic factor and a linear factor. Therefore we factorize as follows: \[\begin{align*} \frac{x^{2}-3x+16}{x^{3}-5x^{2}+x-5} & =\frac{Ax+B}{x^{2}+1}+\frac{C}{x+5}\\ & =\frac{\left(Ax+B\right)\left(x-5\right)}{\left(x^{2}+1\right)\left(x-5\right)}+\frac{C\left(x^{2}+1\right)}{\left(x^{2}+1\right)\left(x-5\right)}\\ & =\frac{Ax^{2}-5Ax+Bx-5B+Cx^{2}+C}{\left(x^{2}+1\right)\left(x+5\right)}\\ & =\left(A+C\right)x^{2}+\left(-5A+B\right)x-5B+C \end{align*}\] Equating coefficients of \(x^{2}\), \(x\) and the constant gives the three equations: \[\begin{align*} A+C & =1 & & \left(1\right)\\ -5A+B & =-3 & & \left(2\right)\\ -5B+C & =16. & & \left(3\right) \end{align*}\] which may be solved simultaneously as follows. Multiply \(\left(1\right)\) by \(5\): \[\begin{align*} 5A+5C & =5 & & \left(4\right) \end{align*}\] and add equation \(\left(2\right)\) to \(\left(4\right)\) to get: \[\begin{align*} B+5C & =-3+5\\ & =2\\ 5B+25C & =10\;\textrm{\;multiplying by $5$ .} & & \left(5\right) \end{align*}\] Adding equation \(\left(5\right)\) to \(\left(3\right)\) gives: \[\begin{align*} 26C & =26\\ C & =1. & & \left(6\right) \end{align*}\] Substituting \(\left(6\right)\) into \(\left(1\right)\) gives
\[\begin{align*} A+1 & =1\\ A & =0. & & \left(7\right) \end{align*}\] Finally substituting \(A=0\) in \(\left(2\right)\) gives \[\begin{align*} B & =-3. & & \left(8\right) \end{align*}\] Therefore the partial fraction decomposition is: \[\begin{align*} \frac{x^{2}-3x+16}{x^{3}-5x^{2}+x-5} & =\frac{Ax+B}{x^{2}+1}+\frac{C}{x-5}\\ & =\frac{-3}{x^{2}+1}+\frac{1}{x-5}. \end{align*}\]

We can now do the integral: \[\begin{align*} \int\left(\frac{x^{2}-3x+16}{x^{3}-5x^{2}+x-5}\right)dx & =\int\left(\frac{-3}{x^{2}+1}+\frac{1}{x-5}\right)dx\;\;\textrm{using partial fractions}\\ & =\int\frac{1}{x-5}dx-3\int\frac{1}{x^{2}+1}dx\\ & =\ln\left|x-5\right|-3\tan^{-1}\left(x\right)+c,\ \ \;c\textrm{ being a constant.} \end{align*}\]

Important Note

The process of finding partial fractions can only be performed on fractions where the degree of the denominator of the algebraic fraction is greater than that of the numerator. If necessary, divide the denominator into the numerator then express the remaining fractional part as partial fractions.

For example, the numerator and denominator of \[\begin{align*} \frac{x^{2}+7x+7}{\left(x+1\right)\left(x+2\right)} \end{align*}\] are of degree \(2\). So before finding partial fractions we would divide the numerator by the denominator to get: \[\begin{align*} \frac{x^{2}+7x+7}{\left(x+1\right)\left(x+2\right)} & =1+\frac{4x+5}{\left(x+1\right)\left(x+2\right)}. \end{align*}\] The fraction at right can then be changed into partial fractions to get \[\begin{align*} \frac{x^{2}+7x+7}{\left(x+1\right)\left(x+2\right)} & =1+\frac{1}{x+1}+\frac{3}{x+2}. \end{align*}\]

Exercises

  1. Rewrite each of the following in the appropriate generalized partial fractions form. Do not calculate the constants. For example \(\frac{x}{x^{2}-1}=\frac{x}{\left(x-1\right)\left(x+1\right)}=\frac{A}{x-1}+\frac{B}{x+1}\).

\[\begin{array}{llll} a) \frac{x+6}{x^{2}-5x+6} & b) \frac{3}{\left(x^{2}+3\right)\left(x+1\right)} & c) \frac{2x}{x^{2}+8x+16} & d) \frac{x^{2}}{\left(x-1\right)\left(x+1\right)}\\ \end{array}\]

  1. Express the following as partial fractions:

\[\begin{array}{llll} a) \frac{x+2}{2x^{2}+5x-12} & b) \frac{3}{x^{2}-2x+1} & c) \frac{x^{2}-2x+2}{x^{3}+x^{2}+x} & d) \frac{x^{2}}{x^{2}-4}\\ \end{array}\]

  1. Perform the following integrations:

\[\begin{array}{lll} a) \int\frac{4x+9}{x^{2}+x-12}dx & b) \int\frac{21-8x}{x^{2}-x-6}dx & c) \int\frac{5x^{2}-5x+2}{\left(x+1\right)\left(x-1\right)^{2}}\\ \end{array}\]

\[\begin{array}{llll} 1a)\ \ \;\frac{A}{2x-3}+\frac{B}{x+x} & b)\;\ \ \frac{Ax+B}{x^{2}+3}+\frac{C}{x+1} & c)\;\ \ \frac{A}{x+4}+\frac{B}{\left(x+4\right)^{2}} & d)\;\ \ \frac{A}{x+1}+\frac{B}{x-1}\\ \\ 2a)\ \ \;\frac{5}{x-3}-\frac{4}{x-2} & b)\;\ \ \frac{3}{\left(x-1\right)^{2}} & c)\;\ \ \frac{2}{x}-\frac{x+4}{x^{2}+x+1} & d)\;\ \ 1-\frac{1}{x+2}+\frac{1}{x-1}\\ \\ \end{array}\]

\[\begin{array}{l} 3a)\;\ln\left(3-x\right)^{3}\left(x+4\right)+c\\ b)\;-\frac{3}{5}\ln\left|3-x\right|-\frac{37}{5}\ln\left|x+2\right|+c\\ c)\;\frac{1}{1-x}+\ln\left(\left(1-x\right)^{2}\left|x+1\right|^{3}+c\right)\\ \\ \end{array}\]

Download this page, IN7 Integration Using Partial Fractions (PDF 238 KB)

What's next... IN8 Integration by parts

Keywords: