Section 2.5 Partial Fraction Method for Rational Functions
¶A rational function is a fraction with polynomials in the numerator and denominator. For example,
are all rational functions of \(x\text{.}\) There is a general technique called the Partial Fraction Method that, in principle, allows us to integrate any rational function. The algebraic steps in the technique are rather cumbersome if the polynomial in the denominator has degree more than 2, and the technique requires that we factor the denominator, something that is not always possible. However, in practice one does not often run across rational functions with high degree polynomials in the denominator for which one has to find the antiderivative function. So we shall explain how to find the antiderivative of a reduced rational function only when the denominator is a quadratic polynomial \(\ds ax^2+bx+c\text{.}\)
Subsection 2.5.1 Using Substitution Rule with Rational Fractions
We should mention a special type of rational function that we already know how to integrate: If the denominator has the form \(\ds (ax+b)^n\text{,}\) the substitution \(u=ax+b\) will always work. The denominator becomes \(\ds u^n\text{,}\) and each \(x\) in the numerator is replaced by \((u-b)/a\) and \(dx=du/a\text{.}\) While it may be tedious to complete the integration if the numerator has high degree, it is merely a matter of algebra.
Example 2.36. Substitution and Splitting Up a Fraction.
Find \(\ds\int{x^3\over(3-2x)^5}\,dx\text{.}\)
Using the substitution \(u=3-2x\) we obtain
so that
We now divide through by the simple denominator to obtain powers of \(u\text{:}\)
All that is left to do is replace \(u\) with our substitution.
Subsection 2.5.2 Denominator with Distinct Linear Factors
We now proceed to the case in which the denominator is a quadratic polynomial. We can always factor out the coefficient of \(\ds x^2\) and put it outside the integral, so we can assume that the denominator has the form \(\ds x^2+bx+c\text{.}\) There are three possible cases, depending on how the quadratic factors: either \(\ds x^2+bx+c=(x-r)(x-s)\text{,}\) \(\ds x^2+bx+c=(x-r)^2\text{,}\) or the quadratic factor is irreducible, i.e. it doesn't factor. We can use the quadratic formula to decide which of these we have, and to factor the quadratic if it is possible.
If \(\ds x^2+bx+c=(x-r)^2\) then we have the special case we have already seen, that can be handled with a substitution.
If \(\ds x^2+bx+c=(x-r)(x-s)\text{,}\) we have an integral of the form
where \(p(x)\) is a polynomial. The first step is to make sure that \(p(x)\) has degree less than 2.
Example 2.37. Review of Long Division.
Compute \(\ds\frac{x^3 - 2x^2 - 4}{x-3}\text{,}\) that is, divide \(x-3\) into \(x^3-2x^2-4\text{.}\)
We first write the dividend as \(x^3 - 2x^2 + 0x - 4\) (that is, include \(0\)'s). Now, divide the first term of the dividend by the highest term of the divisor:
Next, we multiply the divisor by this result and write it below:
Subtract and write the result below:
We repeat the above steps of dividing, multiplying then subtracting:
We divide:
Then multiply and subtract:
The quotient is \(x^2+x+3\) and the remainder is \(5\text{.}\) Therefore,
This means that \((x-3)\) divides \((x^3-2x^2-4)\) a total of \((x^2+x+3)\) times with \(5\) leftover.
Now consider the following simple algebra of fractions:
That is, adding two fractions with constant numerator and denominators \((x-r)\) and \((x-s)\) produces a fraction with denominator \((x-r)(x-s)\) and a polynomial of degree less than 2 for the numerator. We want to reverse this process: Starting with a single fraction, we want to write it as a sum of two simpler fractions. An example should make it clear how to proceed.
Example 2.38. Distinct Linear Factors.
Compute \(\ds\int \frac{-1}{x^2-2x-3}\,dx\text{.}\)
We first notice that the degree of the numerator is less than the degree of the denominator. Next, we factor the denominator:
Therefore, the partial fraction decomposition of the integrand is
We now present two methods for determining the constants \(A\) and \(B\text{.}\)
Method 1: We notice that we can plug in values for \(x\) that give zero somewhere. If we take \(x=3\text{,}\) we get
and that if we take \(x=-1\text{,}\) we get
Method 2: We expand the right hand side,
and compare the polynomial coefficients: By comparing the \(x^1\) terms, we see that we require \(0 = A+B\text{,}\) and comparing the \(x^0\) terms gives \(-1 = -3A=B\text{.}\) We now solve the resulting system of equations.
Thus, the partial fraction decomposition of the integrand is
and we can now integrate:
Example 2.39. Partial Fraction Decomposition.
Given \(\ds\int {x^3\over (x-2)(x+3)}\,dx\)
Perform long division.
Evaluate the integral.
-
We rewrite the integrand so that the numerator that has degree less than 2 using polynomial long division:
\begin{equation*} {x^3\over (x-2)(x+3)}={x^3\over x^2+x-6}=x-1+{7x-6\over x^2+x-6}= x-1+{7x-6\over (x-2)(x+3)}\text{.} \end{equation*}Then
\begin{equation*} \int {x^3\over (x-2)(x+3)}\,dx=\int \left(x-1\right)\,dx +\int {7x-6\over (x-2)(x+3)}\,dx\text{.} \end{equation*} -
The first integral is easy, so only the second requires some work. We start by writing \(\ds{7x-6\over (x-2)(x+3)}\) as the sum of two fractions. We want to end up with
\begin{equation*} {7x-6\over (x-2)(x+3)}={A\over x-2}+{B\over x+3}\text{.} \end{equation*}If we go ahead and add the fractions on the right hand side, we seek a common denominator, and get:
\begin{equation*} {7x-6\over (x-2)(x+3)}={(A+B)x+3A-2B\over (x-2)(x+3)}\text{.} \end{equation*}So all we need to do is find \(A\) and \(B\) so that \(7x-6=(A+B)x+3A-2B\text{,}\) which is to say, we need
\begin{equation*} \begin{cases}7 \amp = A+ B \\ -6 \amp = 3A-2B \end{cases} \end{equation*}This is a problem you've seen before: Solve a system of two equations in two unknowns. There are many ways to proceed; here's one: If \(7=A+B\) then \(B=7-A\) and so
\begin{equation*} -6=3A-2B=3A-2(7-A)=3A-14+2A=5A-14\text{.} \end{equation*}This is easy to solve for \(A\text{:}\)
\begin{equation*} \ds A= 8/5 \implies B=7-A=7-8/5=27/5\text{.} \end{equation*}Thus
\begin{equation*} \int {7x-6\over (x-2)(x+3)}\,dx= \int \left({8\over5}{1\over x-2}+{27\over5}{1\over x+3}\right)\,dx= {8\over5}\ln |x-2|+{27\over5}\ln|x+3|+C\text{.} \end{equation*}The answer to the original problem is now
\begin{align*} \int {x^3\over (x-2)(x+3)}\,dx \amp =\amp \int \left(x-1\right)\,dx +\int {7x-6\over (x-2)(x+3)}\,dx\\ \amp =\amp {x^2\over 2}-x+{8\over5}\ln |x-2|+{27\over5}\ln|x+3|+C\text{.} \end{align*}\vskip-10pt
Example 2.40. Two Linear Factors in Disguise.
Evaluate \(\ds\int \frac{\cos x}{4-\sin^2x}\,dx\text{.}\)
We start by making the substitution
Then,
We are now in a position to use the method of partial fraction decomposition. Solving
we require
Therefore,
which is readily evaluated:
It remains to rewrite this expression in terms of \(x\text{:}\)
Subsection 2.5.3 Denominator with Irreducible Quadratic Factor
Now suppose that \(\ds x^2+bx+c\) doesn't factor. Again we can use long division to ensure that the numerator has degree less than 2, then we complete the square.
Example 2.41. Denominator Does Not Factor.
Evaluate \(\ds\int {x+1\over x^2+4x+8}\,dx\text{.}\)
The quadratic denominator does not factor. We could complete the square and use a trigonometric substitution, but it is simpler to rearrange the integrand:
The first integral is an easy substitution problem, using \(u=x^2+4x+8\text{:}\)
For the second integral we complete the square:
making the integral
Using \(\ds u={x+2\over2}\) we get
The final answer is now
Subsection 2.5.4 Summary
Many combinations of linear and quadratic factors are possible in the denominator of a rational function. However, we are not concerned with supplying the techniques needed to solve these types of rational functions. Their solution is simply a matter of algebraic skill in determining a partial fraction decomposition, which allows for the ready integration of each partial fraction. However, we want to conclude with the following emphasis and one example to give you a taste of different combinations of factors than shown in this section.
Note:
Unless we are able to factor the denominator, we are unable to use the Partial Fraction Method.
When considering the Partial Fraction Method, we must ensure that the degree of the numerator is smaller than that of the denominator. So brush up on your long division skill.
The following example alludes to the technique used for the partial fraction decomposition when there is an irreducible quadratic factor.
Example 2.42. Cubic Denominator.
Evaluate \(\ds \int\frac{x^2-2x+1}{x^3+x}\,dx\text{.}\)
We first factor the denominator,
Now, let
Matching terms gives,
From the above system of equations, we see that we need \(A = 1\text{,}\) \(C= -2\text{,}\) and \(B = 0\text{.}\) Thus,
Exercises for Section 2.5.
Exercise 2.5.1.
Evaluate the following indefinite integrals.
-
\(\ds\int {1\over 4-x^2}\,dx\)
AnswerSolution\(-\ln|x-2|/4+\ln|x+2|/4+C\)We first notice that we can factorize
\begin{equation*} \frac{1}{4-x^2} = \frac{-1}{(x-2)(x+2)}\text{.} \end{equation*}Now apply the method of Partial Fractions: Let
\begin{equation*} \frac{-1}{(x-2)(x+2)} = \frac{A}{x-2} + \frac{B}{x+2} \implies -1 = A(x+2)+B(x-2)\text{.} \end{equation*}Matching terms yields the system of equations
\begin{equation*} \begin{cases}A + B = 0 \\ 2A - 2B = -1 \end{cases} \end{equation*}Taking \(B = -A\text{,}\) the second equation then reads \(2A + 2A = 4A = -1\text{.}\) Thus, \(A=-1/4\) and \(B=1/4\text{.}\) We now integrate,
\begin{equation*} \begin{split} \int \frac{1}{4-x^2} \,dx \amp = \int \left(\frac{1}{4(x-2)} - \frac{1}{4(x+2)}\right)\,dx \\ \amp = \frac{-1}{4} \ln |x-2| + \frac{1}{4} \ln |x+2| + C. \end{split} \end{equation*} -
\(\ds\int {x^4\over 4-x^2}\,dx\)
AnswerSolution\(\ds -x^3/3-4x-4\ln|x-2|+\)\(4\ln|x+2| +C\)The degree of the numerator is larger than the degree of the denominator, so we use polynomial long division to simplify:
\begin{equation*} \frac{x^4}{4-x^2} = -x^2 -4 +\frac{16}{4-x^2}\text{.} \end{equation*}We can use our answer from (a) to integrate the last term, giving
\begin{equation*} \int \frac{x^4}{4-x^2} \,dx = -\frac{x^3}{3} - 4x -4\ln|x-2| + 4 \ln|x+2| + C\text{.} \end{equation*} -
\(\ds\int {1\over x^2+10x+25}\,dx\)
AnswerSolution\(-1/(x+5) +C\)Factorizing the denominator gives \(x^2+10x+25 = (x+5)^2\text{.}\) We now make the substitution,
\begin{equation*} u = x+5, \ du = dx\text{.} \end{equation*}Therefore,
\begin{equation*} \begin{split} \int \frac{1}{x^2+10x+25}\,dx \amp = \int \frac{1}{(x+5)^2} \, dx \\ \amp = \int \frac{1}{u^2} \, du \\ \amp = \frac{-1}{u} + C = \frac{-1}{x+5} + \hat{C}. \end{split} \end{equation*} -
\(\ds\int {x^2\over 4-x^2}\,dx\)
AnswerSolution\(-x-\ln|x-2|+\ln|x+2| +C\)First use polynomial long division:
\begin{equation*} \frac{x^2}{4-x^2} = -1 + \frac{4}{4-x^2}\text{.} \end{equation*}Using the solution to (a), we obtain
\begin{equation*} \int \frac{x^2}{4-x^2}\,dx = -x - \ln |x-2| + \ln |x+2| + C\text{.} \end{equation*} -
\(\ds\int {x^4\over 4+x^2}\,dx\)
AnswerSolution\(\ds -4x+x^3/3+8\arctan(x/2) +C\)We use polynomial long division to find:
\begin{equation*} \frac{x^4}{4+x^2} = x^2 - 4 + \frac{16}{4+x^2}\text{.} \end{equation*}So we have
\begin{equation*} \int \frac{x^4}{4+x^2} \,dx= \int \left(x^2 - 4 + \frac{16}{4+x^2}\right)\,dx = \frac{1}{3}x^3 -4x + 16\int \frac{1}{4+x^2}\,dx\text{.} \end{equation*}Now, \(4+x^2\) is not factorizeable, but we do know that
\begin{equation*} \int \frac{1}{1+x^2}\, dx = \arctan x + C\text{.} \end{equation*}So, write \(4+x^2 = 4\left(1+\frac{x^2}{4}\right)\) and let \(u = \frac{x}{2}\text{.}\) Thus,
\begin{equation*} \int \frac{1}{4+x^2}\,dx = \frac{1}{4}\int \frac{1}{1+u^2} (2\, du) = \frac{1}{2} \arctan\left(\frac{x}{2}\right) + C\text{.} \end{equation*}All together,
\begin{equation*} \int \frac{x^4}{4+x^2} \,dx= \frac{1}{3}x^3 -4x + 8 \arctan\left(\frac{x}{2}\right) + \hat{C}\text{.} \end{equation*} -
\(\ds\int {1\over x^2+10x+29}\,dx\)
AnswerSolution\((1/2)\arctan(x/2+5/2) +C\)We complete the square:
\begin{equation*} x^2+10x+29 = (x+5)^2 + 4\text{.} \end{equation*}Now write
\begin{equation*} (x+5)^2+4 = 4\left[\left(\frac{x+5}{2}\right)^2 + 1\right]\text{,} \end{equation*}and make the substitution
\begin{equation*} u = \frac{x+5}{2}, \ du = \frac{dx}{2}\text{.} \end{equation*}Thus,
\begin{equation*} \int \frac{1}{x^2+10x+29}\,dx = \int \frac{2}{4(1+u^2)} \, du = \frac{1}{2} \arctan \left(\frac{x+5}{2}\right) + C\text{.} \end{equation*} -
\(\ds\int {x^3\over 4+x^2}\,dx\)
AnswerSolution\(\ds x^2/2-2\ln(4+x^2) +C\)We again apply polynomial long division:
\begin{equation*} \frac{x^3}{4+x^2} = x - \frac{4x}{4+x^2} \implies \int \frac{x^3}{4+x^2}\,dx = \frac{1}{2}x^2 - 4 \int \frac{x}{4+x^2}\,dx\text{.} \end{equation*}Now let \(u=4+x^2\text{,}\) with \(du = 2x\,dx\text{.}\) Then,
\begin{equation*} \int \frac{x}{4+x^2}\,dx = \int \frac{1}{u} \frac{du}{2} = \frac{1}{2}\ln|u| + C = \frac{1}{2} \ln |4+x^2| + C\text{.} \end{equation*}All together, we find
\begin{equation*} \int \frac{x^3}{4+x^2} \, dx = \frac{1}{2} x^2 -2 \ln |4+x^2| + \hat{C}\text{.} \end{equation*} -
\(\ds\int {1\over x^2+10x+21}\,dx\)
AnswerSolution\((1/4)\ln|x+3|-(1/4)\ln|x+7| +C\)Factorizing the denominator gives two distinct linear factors:
\begin{equation*} \frac{1}{x^2+10x+21} = \frac{1}{(x+3)(x+7)}\text{,} \end{equation*}and so let
\begin{equation*} \frac{1}{(x+3)(x+7)} = \frac{A}{x+3} + \frac{B}{x+7}\text{.} \end{equation*}This yields the system of equations
\begin{equation*} \begin{cases}A + B =0 \\ 7A + 3B = 1 \end{cases} \implies A = \frac{1}{4}, \ B = -\frac{1}{4}\text{.} \end{equation*}Therefore,
\begin{equation*} \begin{split} \int \frac{1}{x^2+10x+21}\,dx\amp = \int \left(\frac{1}{4(x+3)} - \frac{1}{4(x+7)}\right)\, dx \\ \amp = \frac{1}{4} \ln|x+3| - \frac{1}{4} \ln|x+7| + C. \end{split} \end{equation*} -
\(\ds\int {1\over 2x^2-x-3}\,dx\)
AnswerSolution\((1/5)\ln|2x-3|-(1/5)\ln|1+x| +C\)We again find we can factorize the denominator into two distinct linear factors,
\begin{equation*} \frac{1}{2x^2-x-3} = \frac{1}{(x+1)(2x-3)}\text{.} \end{equation*}Setting
\begin{equation*} \frac{1}{(x+1)(2x-3)} = \frac{A}{x+1} + \frac{B}{2x-3}\text{,} \end{equation*}and matching terms gives
\begin{equation*} \begin{cases}2A + B =0 \\ -3A + B = 1 \end{cases} \implies A = -\frac{1}{5}, \ B=\frac{2}{5}\text{.} \end{equation*}Thus,
\begin{equation*} \begin{split} \int \frac{1}{2x^2-x-3} \amp = \frac{2}{5}\int \frac{1}{2x-3}\, dx - \frac{1}{5}\int\frac{1}{x+1} \, dx \end{split} \end{equation*}Let \(u=2x-3\text{,}\) \(du=2\,dx\) for the first integral and \(v=x+1\text{,}\) \(dv = dx\) for the second. Then,
\begin{equation*} \begin{split} \int \frac{1}{2x^2-x-3} \amp = \frac{1}{5}\int \frac{1}{u}\, du - \frac{1}{5}\int\frac{1}{v} \, dv \\ \amp = \frac{1}{5} \ln |2x-3| - \frac{1}{5} \ln |x+1|. \end{split} \end{equation*} -
\(\ds\int {1\over x^2+3x}\,dx\)
AnswerSolution\((1/3)\ln|x|-(1/3)\ln|x+3| +C\)We take
\begin{equation*} \frac{1}{x^2+3x} = \frac{1}{x(x+3)} = \frac{A}{x} + \frac{B}{x+3}\text{.} \end{equation*}This requires that \(3A = 1\) and \(A+B=0\text{.}\) Thus,
\begin{equation*} A = \frac{1}{3} \text{ and } B = -\frac{1}{3}\text{.} \end{equation*}Integrating, we find
\begin{equation*} \begin{split} \int\frac{1}{x^2+3x} \,dx \amp = \int \left(\frac{1}{3x}-\frac{1}{3(x+3)} \right)\,dx\\ \amp =\frac{1}{3}\ln |x| - \frac{1}{3} \ln|x+3| + C. \end{split} \end{equation*}