Skip to main content

CLP-2 Integral Calculus

Section 1.10 Partial Fractions

Partial fractions is the name given to a technique of integration that may be used to integrate any rational function
 1 
Recall that a rational function is the ratio of two polynomials.
. We already know how to integrate some simple rational functions
\begin{align*} \int \frac{1}{x}\dee{x} &= \log|x|+C & \int \frac{1}{1+x^2} \dee{x} &= \arctan(x) +C \end{align*}
Combining these with the substitution rule, we can integrate similar but more complicated rational functions:
\begin{align*} \int \frac{1}{2x+3}\dee{x} &= \frac{1}{2} \log|2x+3| +C & \int \frac{1}{3+4x^2}\dee{x} &= \frac{1}{2\sqrt{3}} \arctan\left( \frac{2x}{\sqrt{3}} \right) +C \end{align*}
By summing such terms together we can integrate yet more complicated forms
\begin{align*} \int \left[ x + \frac{1}{x+1} + \frac{1}{x-1} \right]\dee{x} &= \frac{x^2}{2} + \log|x+1| + \log|x-1| +C \end{align*}
However we are not (typically) presented with a rational function nicely decomposed into neat little pieces. It is far more likely that the rational function will be written as the ratio of two polynomials. For example:
\begin{gather*} \int \frac{x^3+x}{x^2-1}\dee{x} \end{gather*}
In this specific example it is not hard to confirm that
\begin{align*} x+\frac{1}{x+1} +\frac{1}{x-1} &=\frac{x(x+1)(x-1) +(x-1) +(x+1)}{(x+1)(x-1)} =\frac{x^3+x}{x^2-1} \end{align*}
and hence
\begin{align*} \int \frac{x^3+x}{x^2-1}\dee{x} &= \int \left[ x + \frac{1}{x+1} + \frac{1}{x-1} \right]\dee{x}\\ &= \frac{x^2}{2} + \log|x+1| + \log|x-1| +C \end{align*}
Of course going in this direction (from a sum of terms to a single rational function) is straightforward. To be useful we need to understand how to do this in reverse: decompose a given rational function into a sum of simpler pieces that we can integrate.
Suppose that \(N(x)\) and \(D(x)\) are polynomials. The basic strategy is to write \(\frac{N(x)}{D(x)}\) as a sum of very simple, easy to integrate rational functions, namely
  1. polynomials — we shall see below that these are needed when the degree
     2 
    The degree of a polynomial is the largest power of \(x\text{.}\) For example, the degree of \(2x^3+4x^2+6x+8\) is three.
    of \(N(x)\) is equal to or strictly bigger than the degree of \(D(x)\text{,}\) and
  2. rational functions of the particularly simple form \(\frac{A}{(ax+b)^n}\) and
  3. rational functions of the form \(\frac{Ax+B}{(ax^2+bx+c)^m}\text{.}\)
We already know how to integrate the first two forms, and we’ll see how to integrate the third form in the near future.
To begin to explore this method of decomposition, let us go back to the example we just saw
\begin{align*} x+\frac{1}{x+1} +\frac{1}{x-1} &=\frac{x(x+1)(x-1) +(x-1) +(x+1)}{(x+1)(x-1)} =\frac{x^3+x}{x^2-1} \end{align*}
The technique that we will use is based on two observations:
  1. The denominators on the left-hand side are the factors of the denominator \(x^2-1=(x-1)(x+1)\) on the right-hand side.
  2. Use \(P(x)\) to denote the polynomial on the left hand side, and then use \(N(x)\) and \(D(x)\) to denote the numerator and denominator of the right hand side. That is
    \begin{align*} P(x)&=x & N(x)&= x^3+x & D(x)&= x^2-1. \end{align*}
    Then the degree of \(N(x)\) is the sum of the degrees of \(P(x)\) and \(D(x)\text{.}\) This is because the highest degree term in \(N(x)\) is \(x^3\text{,}\) which comes from multiplying \(P(x)\) by \(D(x)\text{,}\) as we see in
    \begin{align*} x + \frac{1}{x+1} + \frac{1}{x-1} &=\frac{ \overbrace{x}^{P(x)} \overbrace{(x+1)(x-1)}^{D(x)} + (x-1) + (x+1) } {(x+1)(x-1)} =\frac{x^3+x}{x^2-1} \end{align*}
    More generally, the presence of a polynomial on the left hand side is signalled on the right hand side by the fact that the degree of the numerator is at least as large as the degree of the denominator.

Subsection 1.10.1 Partial fraction decomposition examples

Rather than writing up the technique — known as the partial fraction decomposition — in full generality, we will instead illustrate it through a sequence of examples.

Example 1.10.1. \(\int\frac{x-3}{x^2-3x+2}\dee{x}\).

In this example, we integrate \(\frac{N(x)}{D(x)}=\frac{x-3}{x^2-3x+2}\text{.}\)
Solution:
  • Step 1. We first check to see if a polynomial \(P(x)\) is needed. To do so, we check to see if the degree of the numerator, \(N(x)\text{,}\) is strictly smaller than the degree of the denominator \(D(x)\text{.}\) In this example, the numerator, \(x-3\text{,}\) has degree one and that is indeed strictly smaller than the degree of the denominator, \(x^2-3x+2\text{,}\) which is two. In this case
     3 
    We will soon get to an example (Example 1.10.2 in fact) in which the numerator degree is at least as large as the denominator degree — in that situation we have to extract a polynomial \(P(x)\) before we can move on to step 2.
    we do not need to extract a polynomial \(P(x)\) and we move on to step 2.
  • Step 2. The second step is to factor the denominator
    \begin{align*} x^2-3x+2&=(x-1)(x-2) \end{align*}
    In this example it is quite easy, but in future examples (and quite possibly in your homework, quizzes and exam) you will have to work harder to factor the denominator. In Appendix A.16 we have written up some simple tricks for factoring polynomials. We will illustrate them in Example 1.10.3 below.
  • Step 3. The third step is to write \(\frac{x-3}{x^2-3x+2}\) in the form
    \begin{gather*} \frac{x-3}{x^2-3x+2} =\frac{A}{x-1}+\frac{B}{x-2} \end{gather*}
    for some constants \(A\) and \(B\text{.}\) More generally, if the denominator consists of \(n\) different linear factors, then we decompose the ratio as
    \begin{align*} \text{rational function} &= \frac{A_1}{\text{linear factor 1}} + \frac{A_2}{\text{linear factor 2}} + \cdots + \frac{A_n}{\text{linear factor n}} \end{align*}
    To proceed we need to determine the values of the constants \(A,\ B\) and there are several different methods to do so. Here are two methods
  • Step 3 — Algebra Method. This approach has the benefit of being conceptually clearer and easier, but the downside is that it is more tedious.
    To determine the values of the constants \(A,\ B\text{,}\) we put
     4 
    That is, we take the decomposed form and sum it back together.
    the right-hand side back over the common denominator \((x-1)(x-2)\text{.}\)
    \begin{gather*} \frac{x-3}{x^2-3x+2} =\frac{A}{x-1}+\frac{B}{x-2} =\frac{A(x-2)+B(x-1)}{(x-1)(x-2)} \end{gather*}
    The fraction on the far left is the same as the fraction on the far right if and only if their numerators are the same.
    \begin{align*} x-3&=A(x-2)+B(x-1)\\ \end{align*}

    Write the right hand side as a polynomial in standard form (i.e. collect up all \(x\) terms and all constant terms)

    \begin{align*} x-3&=(A+B)x +(-2A-B) \end{align*}
    For these two polynomials to be the same, the coefficient of \(x\) on the left hand side and the coefficient of \(x\) on the right hand side must be the same. Similarly the coefficients of \(x^0\) (i.e. the constant terms) must match. This gives us a system of two equations.
    \begin{align*} A+B&=1 & -2A-B&=-3 \end{align*}
    in the two unknowns \(A,B\text{.}\) We can solve this system by
    • using the first equation, namely \(A+B=1\text{,}\) to determine \(A\) in terms of \(B\text{:}\)
      \begin{gather*} A=1-B \end{gather*}
    • Substituting this into the remaining equation eliminates the \(A\) from second equation, leaving one equation in the one unknown \(B\text{,}\) which can then be solved for \(B\text{:}\)
      \begin{align*} -2A-B&=-3 & \text{substitute $A=1-B$}\\ -2(1-B)-B&=-3 & \text{clean up}\\ -2+B &=-3 & \text{so $B=-1$} \end{align*}
    • Once we know \(B\text{,}\) we can substitute it back into \(A=1-B\) to get \(A\text{.}\)
      \begin{gather*} A=1-B=1-(-1)=2 \end{gather*}
    Hence
    \begin{gather*} \frac{x-3}{x^2-3x+2} =\frac{2}{x-1}-\frac{1}{x-2} \end{gather*}
  • Step 3 — Sneaky Method. This takes a little more work to understand, but it is more efficient than the algebra method.
    We wish to find \(A\) and \(B\) for which
    \begin{gather*} \frac{x-3}{(x-1)(x-2)} =\frac{A}{x-1}+\frac{B}{x-2} \end{gather*}
    Note that the denominator on the left hand side has been written in factored form.
    • To determine \(A\text{,}\) we multiply both sides of the equation by \(A\)’s denominator, which is \(x-1\text{,}\)
      \begin{gather*} \frac{x-3}{x-2} =A+\frac{(x-1)B}{x-2} \end{gather*}
      and then we completely eliminate \(B\) from the equation by evaluating at \(x=1\text{.}\) This value of \(x\) is chosen to make \(x-1=0\text{.}\)
      \begin{gather*} \frac{x-3}{x-2}\bigg|_{x=1} =A+\frac{(x-1)B}{x-2}\bigg|_{x=1} \implies A = \frac{1-3}{1-2} = 2 \end{gather*}
    • To determine \(B\text{,}\) we multiply both sides of the equation by \(B\)’s denominator, which is \(x-2\text{,}\)
      \begin{gather*} \frac{x-3}{x-1} =\frac{(x-2)A}{x-1} + B \end{gather*}
      and then we completely eliminate \(A\) from the equation by evaluating at \(x=2\text{.}\) This value of \(x\) is chosen to make \(x-2=0\text{.}\)
      \begin{gather*} \frac{x-3}{x-1}\bigg|_{x=2} =\frac{(x-2)A}{x-1}\bigg|_{x=2} +B \implies B = \frac{2-3}{2-1} = -1 \end{gather*}
    Hence we have (the thankfully consistent answer)
    \begin{gather*} \frac{x-3}{x^2-3x+2} =\frac{2}{x-1}-\frac{1}{x-2} \end{gather*}
    Notice that no matter which method we use to find the constants we can easily check our answer by summing the terms back together:
    \begin{align*} \frac{2}{x-1}-\frac{1}{x-2} &= \frac{2(x-2)-(x-1)}{(x-2)(x-1)}\\ & = \frac{2x-4-x+1}{x^2-3x+2} = \frac{x-3}{x^2-3x+2} \checkmark \end{align*}
  • Step 4. The final step is to integrate.
    \begin{align*} \int\frac{x-3}{x^2-3x+2}\dee{x} & =\int \frac{2}{x-1}\dee{x} +\int \frac{-1}{x-2}\dee{x}\\ & =2\log|x-1|-\log|x-2|+C \end{align*}
Perhaps the first thing that you notice is that this process takes quite a few steps
 5 
Though, in fairness, we did step 3 twice — and that is the most tedious bit… Actually — sometimes factoring the denominator can be quite challenging. We’ll consider this issue in more detail shortly.
. However no single step is all that complicated; it only takes practice. With that said, let’s do another, slightly more complicated, one.

Example 1.10.2. \(\int\frac{3x^3-8x^2+4x-1}{x^2-3x+2}\dee{x}\).

In this example, we integrate \(\frac{N(x)}{D(x)} =\frac{3x^3-8x^2+4x-1}{x^2-3x+2}\text{.}\)
Solution:
  • Step 1. We first check to see if the degree of the numerator \(N(x)\) is strictly smaller than the degree of the denominator \(D(x)\text{.}\) In this example, the numerator, \(3x^3-8x^2+4x-1\text{,}\) has degree three and the denominator, \(x^2-3x+2\text{,}\) has degree two. As \(3\ge 2\text{,}\) we have to implement the first step.
    The goal of the first step is to write \(\frac{N(x)}{D(x)}\) in the form
    \begin{gather*} \frac{N(x)}{D(x)}=P(x)+\frac{R(x)}{D(x)} \end{gather*}
    with \(P(x)\) being a polynomial and \(R(x)\) being a polynomial of degree strictly smaller than the degree of \(D(x)\text{.}\) The right hand side is \(\frac{P(x)D(x)+R(x)}{D(x)}\text{,}\) so we have to express the numerator in the form \(N(x)=P(x)D(x)+R(x)\text{,}\) with \(P(x)\) and \(R(x)\) being polynomials and with the degree of \(R\) being strictly smaller than the degree of \(D\text{.}\) \(P(x)D(x)\) is a sum of expressions of the form \(ax^n D(x)\text{.}\) We want to pull as many expressions of this form as possible out of the numerator \(N(x)\text{,}\) leaving only a low degree remainder \(R(x)\text{.}\)
    We do this using long division — the same long division you learned in school, but with the base 10 replaced by \(x\text{.}\)
    • We start by observing that to get from the highest degree term in the denominator (\(x^2\)) to the highest degree term in the numerator (\(3x^3\)), we have to multiply it by \(3x\text{.}\) So we write,
      In the above expression, the denominator is on the left, the numerator is on the right and \(3x\) is written above the highest order term of the numerator. Always put lower powers of \(x\) to the right of higher powers of \(x\) — this mirrors how you do long division with numbers; lower powers of ten sit to the right of higher powers of ten.
    • Now we subtract \(3x\) times the denominator, \(x^2-3x+2\text{,}\) which is \(3x^3-9x^2+6x\text{,}\) from the numerator.
    • This has left a remainder of \(x^2-2x-1\text{.}\) To get from the highest degree term in the denominator (\(x^2\)) to the highest degree term in the remainder (\(x^2\)), we have to multiply by \(1\text{.}\) So we write,
    • Now we subtract \(1\) times the denominator, \(x^2-3x+2\text{,}\) which is \(x^2-3x+2\text{,}\) from the remainder.
    • This leaves a remainder of \(x-3\text{.}\) Because the remainder has degree \(1\text{,}\) which is smaller than the degree of the denominator (being degree 2), we stop.
    • In this example, when we subtracted \(3x(x^2-3x+2)\) and \(1(x^2-3x+2)\) from \(3x^3-8x^2+4x-1\) we ended up with \(x-3\text{.}\) That is,
      \begin{align*} &3x^3-8x^2+4x-1 \ -\ 3x(x^2-3x+2) \ -\ 1(x^2-3x+2)\\ &\hskip2.5in= x-3 \end{align*}
      or, collecting the two terms proportional to \((x^2-3x+2)\)
      \begin{gather*} 3x^3-8x^2+4x-1 \ -\ (3x+1)(x^2-3x+2) \ =\ x-3 \end{gather*}
      Moving the \((3x+1)(x^2-3x+2)\) to the right hand side and dividing the whole equation by \(x^2-3x+2\) gives
      \begin{gather*} \frac{3x^3-8x^2+4x-1}{x^2-3x+2} \ =\ 3x+1\ +\ \frac{x-3}{x^2-3x+2} \end{gather*}
      And we can easily check this expression just by summing the two terms on the right-hand side.
    We have written the integrand in the form \(\frac{N(x)}{D(x)}=P(x)+\frac{R(x)}{D(x)},\) with the degree of \(R(x)\) strictly smaller than the degree of \(D(x)\text{,}\) which is what we wanted. Observe that \(R(x)\) is the final remainder of the long division procedure and \(P(x)\) is at the top of the long division computation. This is the end of Step 1. Oof! You should definitely practice this step.
  • Step 2. The second step is to factor the denominator
    \begin{gather*} x^2-3x+2=(x-1)(x-2) \end{gather*}
    We already did this in Example 1.10.1.
  • Step 3. The third step is to write \(\frac{x-3}{x^2-3x+2}\) in the form
    \begin{gather*} \frac{x-3}{x^2-3x+2} =\frac{A}{x-1}+\frac{B}{x-2} \end{gather*}
    for some constants \(A\) and \(B\text{.}\) We already did this in Example 1.10.1. We found \(A=2\) and \(B=-1\text{.}\)
  • Step 4. The final step is to integrate.
    \begin{align*} &\int\frac{3x^3-8x^2+4x-1}{x^2-3x+2}\dee{x}\\ &\hskip0.5in=\int\big[3x+1\big]\dee{x} + \int \frac{2}{x-1}\dee{x} +\int \frac{-1}{x-2}\dee{x}\\ &\hskip0.5in=\frac{3}{2}x^2+x+ 2\log|x-1|-\log|x-2|+C \end{align*}
You can see that the integration step is quite quick — almost all the work is in preparing the integrand.
Here is a very solid example. It is quite long and the steps are involved. However please persist. No single step is too difficult.

Example 1.10.3. \(\int\frac{x^4+5x^3+16x^2+26x+22}{x^3+3x^2+7x+5}\dee{x}\).

In this example, we integrate \(\frac{N(x)}{D(x)}= \frac{x^4+5x^3+16x^2+26x+22}{x^3+3x^2+7x+5}\text{.}\)
Solution:
  • Step 1. Again, we start by comparing the degrees of the numerator and denominator. In this example, the numerator, \(x^4+5x^3+16x^2+26x+22\text{,}\) has degree four and the denominator, \(x^3+3x^2+7x+5\text{,}\) has degree three. As \(4\ge 3\text{,}\) we must execute the first step, which is to write \(\frac{N(x)}{D(x)}\) in the form
    \begin{gather*} \frac{N(x)}{D(x)}=P(x)+\frac{R(x)}{D(x)} \end{gather*}
    with \(P(x)\) being a polynomial and \(R(x)\) being a polynomial of degree strictly smaller than the degree of \(D(x)\text{.}\) This step is accomplished by long division, just as we did in Example 1.10.2. We’ll go through the whole process in detail again.
    Actually — before you read on ahead, please have a go at the long division. It is good practice.
    • We start by observing that to get from the highest degree term in the denominator (\(x^3\)) to the highest degree term in the numerator (\(x^4\)), we have to multiply by \(x\text{.}\) So we write,
    • Now we subtract \(x\) times the denominator \(x^3+3x^2+7x+5\text{,}\) which is \(x^4+3x^3+7x^2+5x\text{,}\) from the numerator.
    • The remainder was \(2x^3+9x^2+21x+22\text{.}\) To get from the highest degree term in the denominator (\(x^3\)) to the highest degree term in the remainder (\(2x^3\)), we have to multiply by \(2\text{.}\) So we write,
    • Now we subtract \(2\) times the denominator \(x^3+3x^2+7x+5\text{,}\) which is \(2x^3+6x^2+14x+10\text{,}\) from the remainder.
    • This leaves a remainder of \(3x^2+7x+12\text{.}\) Because the remainder has degree \(2\text{,}\) which is smaller than the degree of the denominator, which is \(3\text{,}\) we stop.
    • In this example, when we subtracted \(x(x^3+3x^2+7x+5)\) and \(2(x^3+3x^2+7x+5)\) from \(x^4+5x^3+16x^2+26x+22\) we ended up with \(3x^2+7x+12\text{.}\) That is,
      \begin{align*} &x^4+5x^3+16x^2+26x+22 \ -\ x(x^3+3x^2+7x+5)\\ &\hskip2in\ -\ 2(x^3+3x^2+7x+5)\\ &\hskip0.5in =3x^2+7x+12 \end{align*}
      or, collecting the two terms proportional to \((x^3+3x^2+7x+5)\) we get
      \begin{align*} &x^4+5x^3+16x^2+26x+22 \ -\ (x+2)(x^3+3x^2+7x+5)\\ &\hskip0.5in=\ 3x^2+7x+12 \end{align*}
      Moving the \((x+2)(x^3+3x^2+7x+5)\) to the right hand side and dividing the whole equation by \(x^3+3x^2+7x+5\) gives
      \begin{gather*} \frac{x^4+5x^3+16x^2+26x+22}{x^3+3x^2+7x+5} =x+2+\frac{3x^2+7x+12}{x^3+3x^2+7x+5} \end{gather*}
    This is of the form \(\frac{N(x)}{D(x)}=P(x)+\frac{R(x)}{D(x)},\) with the degree of \(R(x)\) strictly smaller than the degree of \(D(x)\text{,}\) which is what we wanted. Observe, once again, that \(R(x)\) is the final remainder of the long division procedure and \(P(x)\) is at the top of the long division computation.
  • Step 2. The second step is to factor the denominator \(D(x)=x^3+3x^2+7x+5\text{.}\) In the “real world” factorisation of polynomials is often very hard. Fortunately
     6 
    One does not typically think of mathematics assignments or exams as nice kind places… The polynomials that appear in the “real world” are not so forgiving. Nature, red in tooth and claw — to quote Tennyson inappropriately (especially when this author doesn’t know any other words from the poem).
    , this is not the “real world” and there is a trick available to help us find this factorisation. The reader should take some time to look at Appendix A.16 before proceeding.
    • The trick exploits the fact that most polynomials that appear in homework assignments and on tests have integer coefficients and some integer roots. Any integer root of a polynomial that has integer coefficients, like \(D(x)=x^3+3x^2+7x+5\text{,}\) must divide the constant term of the polynomial exactly. Why this is true is explained
       7 
      Appendix A.16 contains several simple tricks for factoring polynomials. We recommend that you have a look at them.
      in Appendix A.16.
    • So any integer root of \(x^3+3x^2+7x+5\) must divide \(5\) exactly. Thus the only integers which can be roots of \(D(x)\) are \(\pm 1\) and \(\pm 5\text{.}\) Of course, not all of these give roots of the polynomial — in fact there is no guarantee that any of them will be. We have to test each one.
    • To test if \(+1\) is a root, we sub \(x=1\) into \(D(x)\text{:}\)
      \begin{gather*} D(1)=1^3+3(1)^2+7(1)+5=16 \end{gather*}
      As \(D(1)\ne 0\text{,}\) \(1\) is not a root of \(D(x)\text{.}\)
    • To test if \(-1\) is a root, we sub it into \(D(x)\text{:}\)
      \begin{gather*} D(-1)=(-1)^3+3(-1)^2+7(-1)+5=-1+3-7+5=0 \end{gather*}
      As \(D(-1)= 0\text{,}\) \(-1\) is a root of \(D(x)\text{.}\) As \(-1\) is a root of \(D(x)\text{,}\) \(\big(x-(-1)\big)=(x+1)\) must factor \(D(x)\) exactly. We can factor the \((x+1)\) out of \(D(x)=x^3+3x^2+7x+5\) by long division once again.
    • Dividing \(D(x)\) by \((x+1)\) gives:
      This time, when we subtracted \(x^2(x+1)\) and \(2x(x+1)\) and \(5(x+1)\) from \(x^3+3x^2+7x+5\) we ended up with \(0\) — as we knew would happen, because we knew that \(x+1\) divides \(x^3+3x^2+7x+5\) exactly. Hence
      \begin{gather*} x^3+3x^2+7x+5\ -\ x^2(x+1)\ -\ 2x(x+1)\ -\ 5(x+1)\ =\ 0 \end{gather*}
      or
      \begin{gather*} x^3+3x^2+7x+5\ =\ x^2(x+1)\ +\ 2x(x+1)\ +\ 5(x+1) \end{gather*}
      or
      \begin{gather*} x^3+3x^2+7x+5=(x^2+2x+5)(x+1) \end{gather*}
    • It isn’t quite time to stop yet; we should attempt to factor the quadratic factor, \(x^2+2x+5\text{.}\) We can use the quadratic formula
       8 
      To be precise, the quadratic equation \(ax^2+bx+c=0\) has solutions \(x = \frac{-b\pm\sqrt{b^2-4ac}}{2a}.\) The term \(b^2-4ac\) is called the discriminant and it tells us about the number of solutions. If the discriminant is positive then there are two real solutions. When it is zero, there is a single solution. And if it is negative, there is no real solutions (you need complex numbers to say more than this).
      to find the roots of \(x^2+2x+5\text{:}\)
      \begin{gather*} \frac{-b\pm\sqrt{b^2-4ac}}{2a}=\frac{-2\pm\sqrt{4-20}}{2} =\frac{-2\pm\sqrt{-16}}{2} \end{gather*}
      Since this expression contains the square root of a negative number the equation \(x^2+2x+5=0\) has no real solutions; without the use of complex numbers, \(x^2+2x+5\) cannot be factored.
    We have reached the end of step 2. At this point we have
    \begin{gather*} \frac{x^4+5x^3+16x^2+26x+22}{x^3+3x^2+7x+5} =x+2+\frac{3x^2+7x+12}{(x+1)(x^2+2x+5)} \end{gather*}
  • Step 3. The third step is to write \(\frac{3x^2+7x+12}{(x+1)(x^2+2x+5)}\) in the form
    \begin{gather*} \frac{3x^2+7x+12}{(x+1)(x^2+2x+5)} =\frac{A}{x+1}+\frac{Bx+C}{x^2+2x+5} \end{gather*}
    for some constants \(A\text{,}\) \(B\) and \(C\text{.}\)
    Note that the numerator, \(Bx+C\) of the second term on the right hand side is not just a constant. It is of degree one, which is exactly one smaller than the degree of the denominator, \(x^2+2x+5\text{.}\) More generally, if the denominator consists of \(n\) different linear factors and \(m\) different quadratic factors, then we decompose the ratio as
    \begin{align*} \text{rational function} &= \frac{A_1}{ \text{linear factor 1} } +\frac{A_2}{ \text{linear factor 2} } +\cdots +\frac{A_n}{ \text{linear factor n} }\\ &\phantom{=} + \frac{B_1x+C_1}{ \text{quadratic factor 1} } +\frac{B_2x+C_2}{ \text{quadratic factor 2} } +\cdots\\ &\hskip2in+\frac{B_mx+C_m}{ \text{quadratic factor m} } \end{align*}
    To determine the values of the constants \(A,\ B,\ C\text{,}\) we put the right hand side back over the common denominator \((x+1)(x^2+2x+5)\text{.}\)
    \begin{align*} \frac{3x^2+7x+12}{(x+1)(x^2+2x+5)} & =\frac{A}{x+1}+\frac{Bx+C}{x^2+2x+5}\\ & =\frac{A(x^2+2x+5)+(Bx+C)(x+1)}{(x+1)(x^2+2x+5)} \end{align*}
    The fraction on the far left is the same as the fraction on the far right if and only if their numerators are the same.
    \begin{gather*} 3x^2+7x+12=A(x^2+2x+5)+(Bx+C)(x+1) \end{gather*}
    Again, as in Example 1.10.1, there are a couple of different ways to determine the values of \(A\text{,}\) \(B\) and \(C\) from this equation.
  • Step 3 — Algebra Method. The conceptually clearest procedure is to write the right hand side as a polynomial in standard form (i.e. collect up all \(x^2\) terms, all \(x\) terms and all constant terms)
    \begin{gather*} 3x^2+7x+12=(A+B)x^2+(2A+B+C)x+(5A+C) \end{gather*}
    For these two polynomials to be the same, the coefficient of \(x^2\) on the left hand side and the coefficient of \(x^2\) on the right hand side must be the same. Similarly the coefficients of \(x^1\) must match and the coefficients of \(x^0\) must match.
    This gives us a system of three equations
    \begin{align*} A+B=3 && 2A+B+C=7 && 5A+C=12 \end{align*}
    in the three unknowns \(A,B,C\text{.}\) We can solve this system by
    • using the first equation, namely \(A+B=3\text{,}\) to determine \(A\) in terms of \(B\text{:}\) \(\ \ A=3-B\text{.}\)
    • Substituting \(A=3-B\) into the remaining two equations eliminates the \(A\)’s from these two equations, leaving two equations in the two unknowns \(B\) and \(C\text{.}\)
      \begin{align*} & & A=3-B\qquad 2A+B+C&=7\quad & 5A+C&=12\\ &\Rightarrow & 2(3-B)+B+C&=7 &\!\!\!\!\!\! 5(3-B)+C&=12\\ &\Rightarrow & -B+C&=1 & -5B+C&=-3 \end{align*}
    • Now we can use the equation \(-B+C=1\text{,}\) to determine \(B\) in terms of \(C\text{:}\) \(B=C-1\text{.}\)
    • Substituting this into the remaining equation eliminates the \(B\)’s leaving an equation in the one unknown \(C\text{,}\) which is easy to solve.
      \begin{align*} & & B&=C-1\qquad & -5B+C&=-3\\ &\Rightarrow\qquad & & & -5(C-1)+C&=-3\\ &\Rightarrow & & & -4C&=-8 \end{align*}
    • So \(C=2\text{,}\) and then \(B=C-1=1\text{,}\) and then \(A=3-B=2\text{.}\) Hence
      \begin{gather*} \frac{3x^2+7x+12}{(x+1)(x^2+2x+5)} =\frac{2}{x+1}+\frac{x+2}{x^2+2x+5} \end{gather*}
  • Step 3 — Sneaky Method. While the above method is transparent, it is rather tedious. It is arguably better to use the second, sneakier and more efficient, procedure. In order for
    \begin{gather*} 3x^2+7x+12=A(x^2+2x+5)+(Bx+C)(x+1) \end{gather*}
    the equation must hold for all values of \(x\text{.}\)
    • In particular, it must be true for \(x=-1\text{.}\) When \(x=-1\text{,}\) the factor \((x+1)\) multiplying \(Bx+C\) is exactly zero. So \(B\) and \(C\) disappear from the equation, leaving us with an easy equation to solve for \(A\text{:}\)
      \begin{align*} 3x^2+7x+12\Big|_{x=-1}& =\Big[A(x^2+2x+5)+(Bx+C)(x+1)\Big]_{x=-1}\\ & \Longrightarrow 8=4A\Longrightarrow A=2 \end{align*}
    • Sub this value of \(A\) back in and simplify.
      \begin{align*} 3x^2+7x+12&=2(x^2+2x+5)+(Bx+C)(x+1)\\ x^2+3x+2&=(Bx+C)(x+1) \end{align*}
      Since \((x+1)\) is a factor on the right hand side, it must also be a factor on the left hand side.
      \begin{gather*} (x+2)(x+1)=(Bx+C)(x+1)\\ \quad\Rightarrow\quad (x+2)=(Bx+C) \quad\Rightarrow\quad B=1,\ C=2 \end{gather*}
    So again we find that
    \begin{gather*} \frac{3x^2+7x+12}{(x+1)(x^2+2x+5)} =\frac{2}{x+1}+\frac{x+2}{x^2+2x+5} \checkmark \end{gather*}
    Thus our integrand can be written as
    \begin{gather*} \frac{x^4+5x^3+16x^2+26x+22}{x^3+3x^2+7x+5} =x+2+\frac{2}{x+1}+\frac{x+2}{x^2+2x+5}. \end{gather*}
  • Step 4. Now we can finally integrate! The first two pieces are easy.
    \begin{gather*} \int (x+2)\dee{x} = \half x^2+2x \qquad \int \frac{2}{x+1}\dee{x} = 2\log|x+1| \end{gather*}
    (We’re leaving the arbitrary constant to the end of the computation.)
    The final piece is a little harder. The idea is to complete the square
     9 
    This same idea arose in Section 1.9. Given a quadratic written as \(Q(x)= ax^2+bx+c\) rewrite it as \(Q(x) = a(x+d)^2+e\text{.}\) We can determine \(d\) and \(e\) by expanding and comparing coefficients of \(x\text{:}\) \(ax^2+bx+c = a(x^2+2dx+d^2)+e = ax^2 + 2dax + (e+ad^2) \text{.}\) Hence \(d=b/2a\) and \(e=c-ad^2\text{.}\)
    in the denominator
    \begin{gather*} \frac{x+2}{x^2+2x+5}= \frac{x+2}{(x+1)^2+4} \end{gather*}
    and then make a change of variables to make the fraction look like \(\frac{ay+b}{y^2+1}\text{.}\) In this case
    \begin{gather*} \frac{x+2}{(x+1)^2+4}=\frac{1}{4}\frac{x+2}{(\frac{x+1}{2})^2+1} \end{gather*}
    so we make the change of variables \(y=\frac{x+1}{2},\dee{y}=\frac{\dee{x}}{2},\ x=2y-1,\dee{x}=2\,\dee{y}\)
    \begin{align*} \int \frac{x+2}{(x+1)^2+4}\dee{x} &=\frac{1}{4}\int \frac{x+2}{{(\frac{x+1}{2})}^2+1}\dee{x}\\ &=\frac{1}{4}\int \frac{(2y-1)+2}{y^2+1}\,2\,\dee{y} \ =\ \frac{1}{2}\int \frac{2y+1}{y^2+1}\,\dee{y}\\ &=\int \frac{y}{y^2+1}\,\dee{y} + \frac{1}{2}\int \frac{1}{y^2+1}\,\dee{y} \end{align*}
    Both integrals are easily evaluated, using the substitution \(u=y^2+1\text{,}\) \(\dee{u}=2y\,\dee{y}\) for the first.
    \begin{align*} \int \frac{y}{y^2+1}\,\dee{y} &\ =\ \int \frac{1}{u}\frac{\dee{u}}{2} \ =\ \frac{1}{2}\log|u|=\frac{1}{2}\log(y^2+1)\\ & =\ \frac{1}{2}\log\Big[\Big(\frac{x+1}{2}\Big)^2+1\Big]\\ \frac{1}{2}\int \frac{1}{y^2+1}\,\dee{y} &\ =\ \frac{1}{2}\arctan y \ =\ \frac{1}{2}\arctan\Big(\frac{x+1}{2}\Big) \end{align*}
    That’s finally it. Putting all of the pieces together
    \begin{gather*} \int\frac{x^4\!+\!5x^3\!+\!16x^2\!+\!26x+22}{x^3+3x^2+7x+5}\dee{x} =\frac{1}{2} x^2\!+2x+2\log|x+1|\\ +\frac{1}{2}\log\Big[\Big(\frac{x\!+\!1}{2}\Big)^2+1\Big] +\frac{1}{2}\arctan\Big(\frac{x\!+\!1}{2}\Big)+C \end{gather*}
The best thing after working through a few a nice long examples is to do another nice long example — it is excellent practice
 10 
At the risk of quoting Nietzsche, “That which does not kill us makes us stronger.” Though this author always preferred the logically equivalent contrapositive — “That which does not make us stronger will kill us.” However no one is likely to be injured by practicing partial fractions or looking up quotes on Wikipedia. Its also a good excuse to remind yourself of what a contrapositive is — though we will likely look at them again when we get to sequences and series.
. We recommend that the reader attempt the problem before reading through our solution.

Example 1.10.4. \(\int\frac{4x^3+23x^2+45x+27}{x^3+5x^2+8x+4}\dee{x}\).

In this example, we integrate \(\frac{N(x)}{D(x)}= \frac{4x^3+23x^2+45x+27}{x^3+5x^2+8x+4}\text{.}\)
  • Step 1. The degree of the numerator \(N(x)\) is equal to the degree of the denominator \(D(x)\text{,}\) so the first step to write \(\frac{N(x)}{D(x)}\) in the form
    \begin{gather*} \frac{N(x)}{D(x)}=P(x)+\frac{R(x)}{D(x)} \end{gather*}
    with \(P(x)\) being a polynomial (which should be of degree \(0\text{,}\) i.e. just a constant) and \(R(x)\) being a polynomial of degree strictly smaller than the degree of \(D(x)\text{.}\) By long division
    so
    \begin{gather*} \frac{4x^3+23x^2+45x+27}{x^3+5x^2+8x+4} =4+\frac{3x^2+13x+11}{x^3+5x^2+8x+4} \end{gather*}
  • Step 2. The second step is to factorise \(D(x)=x^3+5x^2+8x+4\text{.}\)
    • To start, we’ll try and guess an integer root. Any integer root of \(D(x)\) must divide the constant term, \(4\text{,}\) exactly. Only \(\pm 1,\ \pm2,\ \pm4\) can be integer roots of \(x^3+5x^2+8x+4\text{.}\)
    • We test to see if \(\pm 1\) are roots.
      \begin{align*} D(1)&=(1)^3+5(1)^2+8(1)+4\ne 0&&\Rightarrow\ \text{$x=1$ is not a root}\\ D(-1)&=(-1)^3\!+\!5(-1)^2\!+\!8(-1)\!+\!4= 0\!\!\!\!&&\Rightarrow \ \text{$x=-1$ is a root} \end{align*}
      So \((x+1)\) must divide \(x^3+5x^2+8x+4\) exactly.
    • By long division
      so
      \begin{align*} x^3+5x^2+8x+4&=(x+1)(x^2+4x+4)\\ &=(x+1)(x+2)(x+2) \end{align*}
    • Notice that we could have instead checked whether or not \(\pm 2\) are roots
      \begin{align*} D(2)&=(2)^3+5(2)^2+8(2)+4\ne 0&&\Rightarrow\ \text{$x=2$ is not a root}\\ D(-2)&=(-2)^3\!+\!5(-2)^2\!+\!8(-2)\!+\!4= 0\!\!\!\!&&\Rightarrow \ \text{$x=-2$ is a root} \end{align*}
      We now know that both \(-1\) and \(-2\) are roots of \(x^3 + 5x^2 + 8x + 4\) and hence both \((x+1)\) and \((x+2)\) are factors of \(x^3 + 5x^2 + 8x + 4\text{.}\) Because \(x^3 + 5x^2 + 8x + 4\) is of degree three and the coefficient of \(x^3\) is \(1\text{,}\) we must have \(x^3 + 5x^2 + 8x + 4 = (x+1)(x+2)(x+a)\) for some constant \(a\text{.}\) Multiplying out the right hand side shows that the constant term is \(2a\text{.}\) So \(2a=4\) and \(a=2\text{.}\)
    This is the end of step 2. We now know that
    \begin{gather*} \frac{4x^3+23x^2+45x+27}{x^3+5x^2+8x+4} \ =\ 4+\frac{3x^2+13x+11}{(x+1)(x+2)^2} \end{gather*}
  • Step 3. The third step is to write \(\frac{3x^2+13x+11}{(x+1)(x+2)^2}\) in the form
    \begin{align*} \frac{3x^2+13x+11}{(x+1)(x+2)^2} &= \frac{A}{x+1}+\frac{B}{x+2}+\frac{C}{(x+2)^2} \end{align*}
    for some constants \(A\text{,}\) \(B\) and \(C\text{.}\)
    Note that there are two terms on the right hand arising from the factor \((x+2)^2\text{.}\) One has denominator \((x+2)\) and one has denominator \((x+2)^2\text{.}\) More generally, for each factor \((x+a)^n\) in the denominator of the rational function on the left hand side, we include
    \begin{gather*} \frac{A_1}{x+a} + \frac{A_2}{(x+a)^2} +\cdots + \frac{A_n}{(x+a)^n} \end{gather*}
    in the partial fraction decomposition on the right hand side
     11 
    This is justified in the (optional) subsection “Justification of the Partial Fraction Decompositions” below.
    .
    To determine the values of the constants \(A,\ B,\ C\text{,}\) we put the right hand side back over the common denominator \((x+1)(x+2)^2\text{.}\)
    \begin{align*} \frac{3x^2+13x+11}{(x+1)(x+2)^2} &=\frac{A}{x+1}+\frac{B}{x+2}+\frac{C}{(x+2)^2}\\ &=\frac{A(x+2)^2+B(x+1)(x+2)+C(x+1)}{(x+1)(x+2)^2} \end{align*}
    The fraction on the far left is the same as the fraction on the far right if and only if their numerators are the same.
    \begin{gather*} 3x^2+13x+11=A(x+2)^2+B(x+1)(x+2)+C(x+1) \end{gather*}
    As in the previous examples, there are a couple of different ways to determine the values of \(A\text{,}\) \(B\) and \(C\) from this equation.
  • Step 3 — Algebra Method. The conceptually clearest procedure is to write the right hand side as a polynomial in standard form (i.e. collect up all \(x^2\) terms, all \(x\) terms and all constant terms)
    \begin{gather*} 3x^2+13x+11=(A+B)x^2 + (4A+3B+C)x +(4A+2B+C) \end{gather*}
    For these two polynomials to be the same, the coefficient of \(x^2\) on the left hand side and the coefficient of \(x^2\) on the right hand side must be the same. Similarly the coefficients of \(x^1\) and the coefficients of \(x^0\) (i.e. the constant terms) must match. This gives us a system of three equations,
    \begin{gather*} A+B=3\qquad 4A+3B+C=13\qquad 4A+2B+C=11 \end{gather*}
    in the three unknowns \(A,B,C\text{.}\) We can solve this system by
    • using the first equation, namely \(A+B=3\text{,}\) to determine \(A\) in terms of \(B\text{:}\) \(\ \ A=3-B\text{.}\)
    • Substituting this into the remaining equations eliminates the \(A\text{,}\) leaving two equations in the two unknown \(B,C\text{.}\)
      \begin{gather*} 4(3-B)+3B+C=13\qquad 4(3-B)+2B+C=11 \end{gather*}
      or
      \begin{gather*} -B+C=1\qquad -2B+C=-1 \end{gather*}
    • We can now solve the first of these equations, namely \(-B+C=1\text{,}\) for \(B\) in terms of \(C\text{,}\) giving \(B=C-1\text{.}\)
    • Substituting this into the last equation, namely \(-2B+C=-1\text{,}\) gives \(-2(C-1)+C=-1\) which is easily solved to give
    • \(C=3\text{,}\) and then \(B=C-1=2\) and then \(A=3-B=1\text{.}\)
    Hence
    \begin{align*} \frac{4x^3+23x^2+45x+27}{x^3+5x^2+8x+4} &= 4+ \frac{3x^2+13x+11}{(x+1)(x+2)^2}\\ & = 4+\frac{1}{x+1}+\frac{2}{x+2}+\frac{3}{(x+2)^2} \end{align*}
  • Step 3 — Sneaky Method. The second, sneakier, method for finding \(A\text{,}\) \(B\) and \(C\) exploits the fact that \(3x^2 + 13x + 11 = A(x+2)^2 + B(x+1)(x+2) + C(x+1)\) must be true for all values of \(x\text{.}\) In particular, it must be true for \(x=-1\text{.}\) When \(x=-1\text{,}\) the factor \((x+1)\) multiplying \(B\) and \(C\) is exactly zero. So \(B\) and \(C\) disappear from the equation, leaving us with an easy equation to solve for \(A\text{:}\)
    \begin{align*} 3x^2+13x+11\Big|_{x=-1} &=\Big[A(x\!+\!2)^2+B(x\!+\!1)(x\!+\!2) +C(x\!+\!1)\Big]_{x=-1}\\ \Longrightarrow 1&=A \end{align*}
    Sub this value of \(A\) back in and simplify.
    \begin{align*} 3x^2+13x+11&=(1)(x+2)^2+B(x+1)(x+2)+C(x+1)\\ 2x^2+9x+7&=B(x+1)(x+2)+C(x+1)\\ &=(xB+2B+C)(x+1) \end{align*}
    Since \((x+1)\) is a factor on the right hand side, it must also be a factor on the left hand side.
    \begin{align*} &(2x+7)(x+1)=(xB+2B+C)(x+1)\\ &\hskip2in\Rightarrow\quad (2x+7)=(xB+2B+C) \end{align*}
    For the coefficients of \(x\) to match, \(B\) must be \(2\text{.}\) For the constant terms to match, \(2B+C\) must be \(7\text{,}\) so \(C\) must be \(3\text{.}\) Hence we again have
    \begin{align*} \frac{4x^3+23x^2+45x+27}{x^3+5x^2+8x+4} &= 4+ \frac{3x^2+13x+11}{(x+1)(x+2)^2}\\ & = 4+\frac{1}{x+1}+\frac{2}{x+2}+\frac{3}{(x+2)^2} \end{align*}
  • Step 4. The final step is to integrate
    \begin{align*} &\int\frac{4x^3+23x^2+45x+27}{x^3+5x^2+8x+4}\dee{x}\\ &=\int 4\dee{x}+\int\frac{1}{x+1}\dee{x}+\int\frac{2}{x+2}\dee{x}+ \int\frac{3}{(x+2)^2}\dee{x}\\ &= 4x+\log|x+1|+2\log|x+2|-\frac{3}{x+2}+C \end{align*}
The method of partial fractions is not just confined to the problem of integrating rational functions. There are other integrals — such as \(\int\sec x\dee{x}\) and \(\int \sec^3 x\dee{x}\) — that can be transformed (via substitutions) into integrals of rational functions. We encountered both of these integrals in Sections 1.8 and 1.9 on trigonometric integrals and substitutions.

Example 1.10.5. \(\int\sec x\dee{x}\).

Solution: In this example, we integrate \(\sec x\text{.}\) It is not yet clear what this integral has to do with partial fractions. To get to a partial fractions computation, we first make one of our old substitutions.
\begin{align*} \int \sec x\dee{x} &= \int\frac{1}{\cos x}\dee{x} & \text{massage the expression a little}\\ &= \int\frac{\cos x}{\cos^2 x}\dee{x} & \text{substitute $u=\sin x$, $\dee{u} = \cos x\dee{x}$}\\ &= -\int \frac{\dee{u}}{u^2-1} & \text{and use $\cos^2x=1-\sin^2x=1-u^2$} \end{align*}
So we now have to integrate \(\frac{1}{u^2-1}\text{,}\) which is a rational function of \(u\text{,}\) and so is perfect for partial fractions.
  • Step 1. The degree of the numerator, \(1\text{,}\) is zero, which is strictly smaller than the degree of the denominator, \(u^2-1\text{,}\) which is two. So the first step is skipped.
  • Step 2. The second step is to factor the denominator:
    \begin{gather*} u^2-1=(u-1)(u+1) \end{gather*}
  • Step 3. The third step is to write \(\frac{1}{u^2-1}\) in the form
    \begin{gather*} \frac{1}{u^2-1} =\frac{1}{(u-1)(u+1)} =\frac{A}{u-1}+\frac{B}{u+1} \end{gather*}
    for some constants \(A\) and \(B\text{.}\)
  • Step 3 — Sneaky Method.
    • Multiply through by the denominator to get
      \begin{align*} 1 &= A(u+1) + B(u-1) \end{align*}
      This equation must be true for all \(u\text{.}\)
    • If we now set \(u=1\) then we eliminate \(B\) from the equation leaving us with
      \begin{align*} 1 &= 2A &\text{ so $A=\frac12$.} \end{align*}
    • Similarly, if we set \(u=-1\) then we eliminate \(A\text{,}\) leaving
      \begin{align*} 1 &= -2B & \text{which implies $B=-\frac{1}{2}$.} \end{align*}
    We have now found that \(A=\frac{1}{2}, B=-\frac{1}{2}\text{,}\) so
    \begin{gather*} \frac{1}{u^2-1} =\frac{1}{2}\Big[\frac{1}{u-1}-\frac{1}{u+1}\Big]. \end{gather*}
  • It is always a good idea to check our work.
    \begin{align*} \frac{\frac{1}{2}}{u-1}+\frac{-\frac{1}{2}}{u+1} &=\frac{\frac{1}{2}(u+1)-\frac{1}{2}(u-1)}{(u-1)(u+1)} =\frac{1}{(u-1)(u+1)} \checkmark \end{align*}
  • Step 4. The final step is to integrate.
    \begin{align*} &\int \sec x\dee{x} = -\int \frac{\dee{u}}{u^2-1} & \text{after substitution}\\ & =-\frac{1}{2}\int \frac{\dee{u}}{u-1} +\frac{1}{2}\int \frac{\dee{u}}{u+1} & \text{partial fractions}\\ & =-\frac{1}{2}\log|u-1|+\frac{1}{2}\log|u+1|+C\\ & =-\frac{1}{2}\log|\sin(x)-1|+\frac{1}{2}\log|\sin(x)+1|+C & \text{rearrange a little}\\ & =\frac{1}{2}\log\left|\frac{1+\sin x}{1-\sin x}\right|+C \end{align*}
    Notice that since \(-1\le\sin x\le 1\text{,}\) we are free to drop the absolute values in the last line if we wish.
Another example in the same spirit, though a touch harder. Again, we saw this problem in Section 1.8 and 1.9.

Example 1.10.6. \(\int \sec^3 x\dee{x}\).

Solution:
  • We’ll start by converting it into the integral of a rational function using the substitution \(u=\sin x\text{,}\) \(\dee{u}=\cos x\dee{x}\text{.}\)
    \begin{align*} \int \sec^3 x\dee{x} &=\int \frac{1}{\cos^3 x}\dee{x} & \text{massage this a little}\\ &=\int \frac{\cos x}{\cos^4 x}\dee{x} &\text{replace $\cos^2x=1-\sin^2x=1-u^2$}\\ &=\int \frac{\cos x\dee{x}}{{[1-\sin^2 x]}^2}\\ &=\int \frac{\dee{u}}{ [1-u^2]^2} \end{align*}
  • We could now find the partial fraction decomposition of the integrand \(\frac{1}{ {[1-u^2]}^2}\) by executing the usual four steps. But it is easier to use
    \begin{gather*} \frac{1}{u^2-1} =\frac{1}{2}\Big[\frac{1}{u-1}-\frac{1}{u+1}\Big] \end{gather*}
    which we worked out in Example 1.10.5 above.
  • Squaring this gives
    \begin{align*} \frac{1}{ {[1-u^2]}^2} &= \frac{1}{4}\Big[\frac{1}{u-1}-\frac{1}{u+1}\Big]^2\\ &=\frac{1}{4} \Big[\frac{1}{(u-1)^2}-\frac{2}{(u-1)(u+1)}+\frac{1}{(u+1)^2}\Big]\\ &=\frac{1}{4} \Big[\frac{1}{(u-1)^2}-\frac{1}{u-1}+\frac{1}{u+1}+\frac{1}{(u+1)^2}\Big] \end{align*}
    where we have again used \(\frac{1}{u^2-1}=\frac{1}{2}\left[\frac{1}{u-1}-\frac{1}{u+1}\right]\) in the last step.
  • It only remains to do the integrals and simplify.
    \begin{align*} &\int \sec^3 x\dee{x} = \frac{1}{4} \int \Big[\frac{1}{(u\!-\!1)^2}-\frac{1}{u\!-\!1}+\frac{1}{u\!+\!1}+\frac{1}{(u\!+\!1)^2}\Big] \dee{u}\\ &=\frac{1}{4}\Big[-\frac{1}{u-1}-\log|u-1|+\log|u+1|-\frac{1}{u+1}\Big]+C\\ &\hskip2in\text{group carefully}\\ &= \frac{-1}{4}\Big[\frac{1}{u-1} + \frac{1}{u+1} \Big] + \frac{1}{4} \Big[ \log|u+1| - \log|u-1| \Big] + C\\ &\hskip2in\text{sum carefully}\\ &=-\frac{1}{4}\frac{2u}{u^2-1}+\frac{1}{4}\log\Big|\frac{u+1}{u-1}\Big|+C\\ &\hskip2in\text{clean up}\\ &= \frac{1}{2}\frac{u}{1-u^2}+\frac{1}{4}\log\Big|\frac{u+1}{u-1}\Big|+C\\ &\hskip2in\text{put $u=\sin x$}\\ & =\frac{1}{2}\frac{\sin x}{\cos^2x} +\frac{1}{4}\log\Big|\frac{\sin x+1}{\sin x-1}\Big|+C \end{align*}

Subsection 1.10.2 The form of partial fraction decompositions

In the examples above we used the partial fractions method to decompose rational functions into easily integrated pieces. Each of those examples was quite involved and we had to spend quite a bit of time factoring and doing long division. The key step in each of the computations was Step 3 — in that step we decomposed the rational function \(\frac{N(x)}{D(x)}\) (or \(\frac{R(x)}{D(x)}\)), for which the degree of the numerator is strictly smaller than the degree of the denominator, into a sum of particularly simple rational functions, like \(\frac{A}{x-a}\text{.}\) We did not, however, give a systematic description of those decompositions.
In this subsection we fill that gap by describing the general
 12 
Well — not the completely general form, in the sense that we are not allowing the use of complex numbers. As a result we have to use both linear and quadratic factors in the denominator. If we could use complex numbers we would be able to restrict ourselves to linear factors.
form of partial fraction decompositions. The justification of these forms is not part of the course, but the interested reader is invited to read the next (optional) subsection where such justification is given. In the following it is assumed that
  • \(N(x)\) and \(D(x)\) are polynomials with the degree of \(N(x)\) strictly smaller than the degree of \(D(x)\text{.}\)
  • \(K\) is a constant.
  • \(a_1\text{,}\) \(a_2\text{,}\) \(\cdots\text{,}\) \(a_j\) are all different numbers.
  • \(m_1\text{,}\) \(m_2\text{,}\) \(\cdots\text{,}\) \(m_j\text{,}\) and \(n_1\text{,}\) \(n_2\text{,}\) \(\cdots\text{,}\) \(n_k\) are all strictly positive integers.
  • \(x^2+b_1x+c_1\text{,}\) \(x^2+b_2x+c_2\text{,}\) \(\ \cdots\ \text{,}\) \(x^2+b_kx+c_k\) are all different.

Subsubsection 1.10.2.1 Simple linear factor case

If the denominator \(D(x)=K(x-a_1)(x-a_2)\cdots(x-a_j)\) is a product of \(j\) different linear factors, then
We can then integrate each term
\begin{align*} \int \frac{A}{x-a}\dee{x} &= A\log|x-a| +C. \end{align*}

Subsubsection 1.10.2.2 General linear factor case

If the denominator \(D(x)=K(x-a_1)^{m_1}(x-a_2)^{m_2}\cdots(x-a_j)^{m_j}\) then
Notice that we could rewrite each line as
\begin{align*} \frac{A_{1}}{x-a}+\frac{A_{2}}{(x-a)^2}+\cdots+\frac{A_{m}}{(x-a)^{m}} &=\frac{A_{1}(x-a)^{m-1}+A_{2}(x-a)^{m-2}+\cdots+A_{m}}{(x-a)^m}\\ &=\frac{B_{1}x^{m-1}+B_{2}x^{m-2}+\cdots+B_{m}}{(x-a)^m} \end{align*}
which is a polynomial whose degree, \(m-1\text{,}\) is strictly smaller than that of the denominator \((x-a)^m\text{.}\) But the form of Equation 1.10.8 is preferable because it is easier to integrate.
\begin{align*} \int \frac{A}{x-a}\dee{x} &= A \log|x-a| +C\\ \int \frac{A}{(x-a)^k} \dee{x} &= -\frac{1}{k-1} \cdot \frac{A}{(x-a)^{k-1}} & \text{provided }k \gt 1. \end{align*}

Subsubsection 1.10.2.3 Simple linear and quadratic factor case

If \(D(x)=K(x-a_1)\cdots(x-a_j)(x^2+b_1x+c_1)\cdots(x^2+b_kx+c_k)\) then
Note that the numerator of each term on the right hand side has degree one smaller than the degree of the denominator.
The quadratic terms \(\frac{Bx+C}{x^2+bx+c}\) are integrated in a two-step process that is best illustrated with a simple example (see also Example 1.10.3 above).
Example 1.10.10. \(\int \frac{2x+7}{x^2+4x+13}\dee{x}\).
Solution:
  • Start by completing the square in the denominator:
    \begin{align*} x^2+4x+13 &= (x+2)^2+9 & \text{and thus}\\ \frac{2x+7}{x^2+4x+13} &= \frac{2x+7}{(x+2)^2+3^2} \end{align*}
  • Now set \(y=(x+2)/3, \dee{y}=\frac{1}{3}\dee{x}\text{,}\) or equivalently \(x=3y-2, \dee{x}=3\dee{y}\text{:}\)
    \begin{align*} \int \frac{2x+7}{x^2+4x+13}\dee{x} &= \int \frac{2x+7}{(x+2)^2+3^2}\dee{x}\\ &= \int \frac{6y-4+7}{3^2 y^2 + 3^2} \cdot 3 \dee{y}\\ &= \int \frac{6y+3}{3(y^2+1)}\dee{y}\\ &= \int \frac{2y+1}{y^2+1}\dee{y} \end{align*}
    Notice that we chose 3 in \(y=(x+2)/3\) precisely to transform the denominator into the form \(y^2+1\text{.}\)
  • Now almost always the numerator will be a linear polynomial of \(y\) and we decompose as follows
    \begin{align*} \int \frac{2x+7}{x^2+4x+13}\dee{x} &= \int \frac{2y+1}{y^2+1}\dee{y}\\ &= \int \frac{2y}{y^2+1}\dee{y} + \int \frac{1}{y^2+1}\dee{y}\\ &= \log|y^2+1| + \arctan y + C\\ &= \log\left|\left(\frac{x+2}{3}\right)^2 +1 \right| + \arctan\left(\frac{x+2}{3} \right)+C \end{align*}

Subsubsection 1.10.2.4 Optional — General linear and quadratic factor case

If \(D(x)=K(x-a_1)^{m_1}\cdots(x-a_j)^{m_j} (x^2+b_1x+c_1)^{n_1}\cdots(x^2+b_kx+c_k)^{n_k}\)
We have already seen how to integrate the simple and general linear terms, and the simple quadratic terms. Integrating general quadratic terms is not so straightforward.
Example 1.10.12. \(\int \frac{\dee{x}}{(x^2+1)^n}\).
This example is not so easy, so it should definitely be considered optional.
Solution: In what follows write
\begin{align*} I_n &= \int \frac{\dee{x}}{(x^2+1)^n}. \end{align*}
  • When \(n=1\) we know that
    \begin{align*} \int \frac{\dee{x}}{x^2+1} &= \arctan x +C \end{align*}
  • Now assume that \(n \gt 1\text{,}\) then
    \begin{align*} \int \frac{1}{(x^2+1)^n}\dee{x} &= \int \frac{(x^2+1-x^2)}{(x^2+1)^n}\dee{x} & \text{sneaky}\\ &= \int \frac{1}{(x^2+1)^{n-1}}\dee{x} - \int \frac{x^2}{(x^2+1)^n}\dee{x}\\ &= I_{n-1} - \int \frac{x^2}{(x^2+1)^n}\dee{x} \end{align*}
    So we can write \(I_n\) in terms of \(I_{n-1}\) and this second integral.
  • We can use integration by parts to compute the second integral:
    \begin{align*} \int \frac{x^2}{(x^2+1)^n}\dee{x} &= \int \frac{x}{2} \cdot \frac{2x}{(x^2+1)^n}\dee{x} & \text{sneaky} \end{align*}
    We set \(u=x/2\) and \(\dee{v}=\frac{2x}{(x^2+1)^n}\dee{x}\text{,}\) which gives \(\dee{u}=\frac{1}{2}\dee{x}\) and \(v=-\frac{1}{n-1} \cdot \frac{1}{(x^2+1)^{n-1}}\text{.}\) You can check \(v\) by differentiating. Integration by parts gives
    \begin{align*} & \int \frac{x}{2} \cdot \frac{2x}{(x^2+1)^n}\dee{x}\\ &\hskip0.5in= - \frac{x}{2(n-1)(x^2+1)^{n-1}} + \int \frac{\dee{x}}{2(n-1)(x^2+1)^{n-1}}\\ &\hskip0.5in= - \frac{x}{2(n-1)(x^2+1)^{n-1}} + \frac{1}{2(n-1)} \cdot I_{n-1} \end{align*}
  • Now put everything together:
    \begin{align*} I_n &= \int \frac{1}{(x^2+1)^n}\dee{x}\\ &= I_{n-1} + \frac{x}{2(n-1)(x^2+1)^{n-1}} - \frac{1}{2(n-1)} \cdot I_{n-1}\\ &= \frac{2n-3}{2(n-1)} I_{n-1} + \frac{x}{2(n-1)(x^2+1)^{n-1}} \end{align*}
  • We can then use this recurrence to write down \(I_n\) for the first few \(n\text{:}\)
    \begin{align*} I_2 &= \frac{1}{2} I_1 + \frac{x}{2 (x^2+1)}+C\\ &= \frac{1}{2}\arctan x + \frac{x}{2(x^2+1)}\\ I_3 &= \frac{3}{4} I_2 + \frac{x}{4(x^2+1)^2}\\ &= \frac{3}{8}\arctan x + \frac{3x}{8(x^2+1)} + \frac{x}{4(x^2+1)^2}+C\\ I_4 &= \frac{5}{6} I_3 + \frac{x}{6(x^2+1)^3}\\ &= \frac{5}{16}\arctan x + \frac{5x}{16(x^2+1)} + \frac{5x}{24(x^2+1)^2} + \frac{x}{6(x^2+1)^3}+C \end{align*}
    and so forth. You can see why partial fraction questions involving denominators with repeated quadratic factors do not often appear on exams.

Subsection 1.10.3 Optional — Justification of the partial fraction decompositions

We will now see the justification for the form of the partial fraction decompositions. We will only consider the case in which the denominator has only linear factors. The arguments when there are quadratic factors too are similar
 13 
In fact, quadratic factors are completely avoidable because, if we use complex numbers, then every polynomial can be written as a product of linear factors. This is the fundamental theorem of algebra.
.

Subsubsection 1.10.3.1 Simple linear factor case

In the most common partial fraction decomposition, we split up
\begin{gather*} \frac{N(x)}{(x-a_1)\times\cdots\times (x-a_d)} \end{gather*}
into a sum of the form
\begin{gather*} \frac{A_1}{x-a_1}+\cdots+\frac{A_d}{x-a_d} \end{gather*}
We now show that this decomposition can always be achieved, under the assumptions that the \(a_i\)’s are all different and \(N(x)\) is a polynomial of degree at most \(d-1\text{.}\) To do so, we shall repeatedly apply the following Lemma.
Proof.
  • To save writing, let \(z=x-a\text{.}\) We then write \(\tilde N(z)=N(z+a)\) and \(\tilde D(z)=D(z+a)\text{,}\) which are again polynomials of degree \(n\) and \(d\) respectively. We also know that \(\tilde D(0)=D(a)\ne 0\text{.}\)
  • In order to complete the proof we need to find a polynomial \(\tilde P(z)\) of degree \(p \lt d\) and a number \(A\) such that
    \begin{gather*} \frac{\tilde N(z)}{\tilde D(z)\,z} =\frac{\tilde P(z)}{\tilde D(z)}+\frac{A}{z} =\frac{\tilde P(z) z+A\tilde D(z)}{\tilde D(z)\,z} \end{gather*}
    or equivalently, such that
    \begin{gather*} \tilde P(z) z+A\tilde D(z)=\tilde N(z). \end{gather*}
  • Now look at the polynomial on the left hand side. Every term in \(\tilde P(z) z\text{,}\) has at least one power of \(z\text{.}\) So the constant term on the left hand side is exactly the constant term in \(A\tilde D(z)\text{,}\) which is equal to \(A\tilde D(0)\text{.}\) The constant term on the right hand side is equal to \(\tilde N(0)\text{.}\) So the constant terms on the left and right hand sides are the same if we choose \(A=\frac{\tilde N(0)}{\tilde D(0)}\text{.}\) Recall that \(\tilde D(0)\) cannot be zero, so \(A\) is well defined.
  • Now move \(A\tilde D(z)\) to the right hand side.
    \begin{gather*} \tilde P(z) z=\tilde N(z)-A\tilde D(z) \end{gather*}
    The constant terms in \(\tilde N(z)\) and \(A\tilde D(z)\) are the same, so the right hand side contains no constant term and the right hand side is of the form \(\tilde N_1(z) z\) for some polynomial \(\tilde N_1(z)\text{.}\)
  • Since \(\tilde N(z)\) is of degree at most \(d\) and \(A\tilde D(z)\) is of degree exactly \(d\text{,}\) \(\tilde N_1\) is a polynomial of degree \(d-1\text{.}\) It now suffices to choose \(\tilde P(z)=\tilde N_1(z)\text{.}\)
Now back to
\begin{gather*} \frac{N(x)}{(x-a_1)\times\cdots\times (x-a_d)} \end{gather*}
Apply Lemma 1.10.13, with \(D(x)=(x-a_2)\times\cdots\times (x-a_d)\) and \(a=a_1\text{.}\) It says
\begin{gather*} \frac{N(x)}{(x-a_1)\times\cdots\times (x-a_d)} =\frac{A_1}{x-a_1}+\frac{P(x)}{(x-a_2)\times\cdots\times (x-a_d)} \end{gather*}
for some polynomial \(P\) of degree at most \(d-2\) and some number \(A_1\text{.}\)
Apply Lemma 1.10.13 a second time, with \(D(x)=(x-a_3)\times\cdots\times (x-a_d)\text{,}\) \(N(x)=P(x)\) and \(a=a_2\text{.}\) It says
\begin{gather*} \frac{P(x)}{(x-a_2)\times\cdots\times (x-a_d)} =\frac{A_2}{x-a_2}+\frac{Q(x)}{(x-a_3)\times\cdots\times (x-a_d)} \end{gather*}
for some polynomial \(Q\) of degree at most \(d-3\) and some number \(A_2\text{.}\)
At this stage, we know that
\begin{gather*} \frac{N(x)}{(x-a_1)\times\cdots\times (x-a_d)} =\frac{A_1}{x-a_1}+\frac{A_2}{x-a_2}+ \frac{Q(x)}{(x-a_3)\times\cdots\times (x-a_d)} \end{gather*}
If we just keep going, repeatedly applying Lemma 1, we eventually end up with
\begin{gather*} \frac{N(x)}{(x-a_1)\times\cdots\times (x-a_d)} =\frac{A_1}{x-a_1}+\cdots+\frac{A_d}{x-a_d} \end{gather*}
as required.

Subsubsection 1.10.3.2 The general case with linear factors

Now consider splitting
\begin{gather*} \frac{N(x)}{(x-a_1)^{n_1}\times\cdots\times (x-a_d)^{n_d}} \end{gather*}
into a sum of the form
 14 
If we allow ourselves to use complex numbers as roots, this is the general case. We don’t need to consider quadratic (or higher) factors since all polynomials can be written as products of linear factors with complex coefficients.
\begin{gather*} \Big[\frac{A_{1,1}}{x-a_1}+\cdots+\frac{A_{1,n_1}}{(x-a_1)^{n_1}}\Big]+\cdots+ \Big[\frac{A_{d,1}}{x-a_d}+\cdots+\frac{A_{d,n_d}}{(x-a_d)^{n_d}}\Big] \end{gather*}
We now show that this decomposition can always be achieved, under the assumptions that the \(a_i\)’s are all different and \(N(x)\) is a polynomial of degree at most \(n_1+\cdots+n_d-1\text{.}\) To do so, we shall repeatedly apply the following Lemma.
Proof.
  • As we did in the proof of the previous lemma, we write \(z=x-a\text{.}\) Then \(\tilde N(z)=N(z+a)\) and \(\tilde D(z)=D(z+a)\) are polynomials of degree \(n\) and \(d\) respectively, \(\tilde D(0)=D(a)\ne 0\text{.}\)
  • In order to complete the proof we have to find a polynomial \(\tilde P(z)\) of degree \(p \lt d\) and numbers \(A_1,\ \cdots,\ A_m\) such that
    \begin{align*} \frac{\tilde N(z)}{\tilde D(z)\,z^m} &=\frac{\tilde P(z)}{\tilde D(z)}+\frac{A_1}{z}+\frac{A_2}{z^2}+\cdots +\frac{A_m}{z^m}\\ &=\frac{\tilde P(z) z^m+A_1z^{m-1}\tilde D(z)+A_2z^{m-2}\tilde D(z)+\cdots+A_m\tilde D(z)}{\tilde D(z)\,z^m} \end{align*}
    or equivalently, such that
    \begin{align*} &\tilde P(z) z^m+A_1z^{m-1}\tilde D(z)+A_2z^{m-2}\tilde D(z)+\cdots +A_{m-1}z\tilde D(z)+A_m\tilde D(z)\\ &\hskip3in=\tilde N(z) \end{align*}
  • Now look at the polynomial on the left hand side. Every single term on the left hand side, except for the very last one, \(A_m\tilde D(z)\text{,}\) has at least one power of \(z\text{.}\) So the constant term on the left hand side is exactly the constant term in \(A_m\tilde D(z)\text{,}\) which is equal to \(A_m\tilde D(0)\text{.}\) The constant term on the right hand side is equal to \(\tilde N(0)\text{.}\) So the constant terms on the left and right hand sides are the same if we choose \(A_m=\frac{\tilde N(0)}{\tilde D(0)}\text{.}\) Recall that \(\tilde D(0)\ne 0\) so \(A_m\) is well defined.
  • Now move \(A_m\tilde D(z)\) to the right hand side.
    \begin{align*} &\tilde P(z) z^m+A_1z^{m-1}\tilde D(z)+A_2z^{m-2}\tilde D(z)+\cdots +A_{m-1}z\tilde D(z)\\ &\hskip3in=\tilde N(z)-A_m\tilde D(z) \end{align*}
    The constant terms in \(\tilde N(z)\) and \(A_m\tilde D(z)\) are the same, so the right hand side contains no constant term and the right hand side is of the form \(\tilde N_1(z) z\) with \(\tilde N_1\) a polynomial of degree at most \(d+m-2\text{.}\) (Recall that \(\tilde N\) is of degree at most \(d+m-1\) and \(\tilde D\) is of degree at most \(d\text{.}\)) Divide the whole equation by \(z\) to get
    \begin{gather*} \tilde P(z) z^{m-1}+A_1z^{m-2}\tilde D(z)+A_2z^{m-3}\tilde D(z)+\cdots +A_{m-1}\tilde D(z) =\tilde N_1(z). \end{gather*}
  • Now, we can repeat the previous argument. The constant term on the left hand side, which is exactly equal to \(A_{m-1}\tilde D(0)\) matches the constant term on the right hand side, which is equal to \(\tilde N_1(0)\) if we choose \(A_{m-1}=\frac{\tilde N_1(0)}{\tilde D(0)}\text{.}\) With this choice of \(A_{m-1}\)
    \begin{gather*} \tilde P(z) z^{m-1}+A_1z^{m-2}\tilde D(z)+A_2z^{m-3}\tilde D(z)+\cdots +A_{m-2} z\tilde D(z)\\ =\tilde N_1(z)-A_{m-1}\tilde D(z)=\tilde N_2(z)z \end{gather*}
    with \(\tilde N_2\) a polynomial of degree at most \(d+m-3\text{.}\) Divide by \(z\) and continue.
  • After \(m\) steps like this, we end up with
    \begin{gather*} \tilde P(z) z=\tilde N_{m-1}(z)-A_1\tilde D(z) \end{gather*}
    after having chosen \(A_1=\frac{\tilde N_{m-1}(0)}{\tilde D(0)}\text{.}\)
  • There is no constant term on the right side so that \(\tilde N_{m-1}(z)-A_1\tilde D(z)\) is of the form \(\tilde N_m(z) z\) with \(\tilde N_m\) a polynomial of degree \(d-1\text{.}\) Choosing \(\tilde P(z)=\tilde N_m(z)\) completes the proof.
Now back to
\begin{gather*} \frac{N(x)}{(x-a_1)^{n_1}\times\cdots\times (x-a_d)^{n_d}} \end{gather*}
Apply Lemma 1.10.14, with \(D(x)=(x-a_2)^{n_2}\times\cdots\times (x-a_d)^{n_d}\text{,}\) \(m=n_1\) and \(a=a_1\text{.}\) It says
\begin{align*} &\frac{N(x)}{(x-a_1)^{n_1}\times\cdots\times (x-a_d)^{n_d}}\\ & =\frac{A_{1,1}}{x-a_1}+\frac{A_{1,2}}{(x-a_1)^2}+\cdots +\frac{A_{1,n_1}}{(x-a)^{n_1}} +\frac{P(x)}{(x-a_2)^{n_2}\times\cdots\times (x-a_d)^{n_d}} \end{align*}
Apply Lemma 1.10.14 a second time, with \(D(x)=(x-a_3)^{n_3}\times\cdots\times (x-a_d)^{n_d}\text{,}\) \(N(x)=P(x)\text{,}\) \(m=n_2\) and \(a=a_2\text{.}\) And so on. Eventually, we end up with
\begin{gather*} \Big[\frac{A_{1,1}}{x-a_1}+\cdots+\frac{A_{1,n_1}}{(x-a_1)^{n_1}}\Big]+\cdots+ \Big[\frac{A_{d,1}}{x-a_d}+\cdots+\frac{A_{d,n_d}}{(x-a_d)^{n_d}}\Big] \end{gather*}
which is exactly what we were trying to show.

Subsubsection 1.10.3.3 Really Optional — The Fully General Case

We are now going to see that, in general, if \(N(x)\) and \(D(x)\) are polynomials with the degree of \(N\) being strictly smaller than the degree of \(D\) (which we’ll denote \(\deg(N) \lt \deg(D)\)) and if
\begin{gather} D(x)=K(x-a_1)^{m_1}\cdots(x-a_j)^{m_j} (x^2+b_1x+c_1)^{n_1}\cdots(x^2+b_kx+c_k)^{n_k}\tag{✶} \end{gather}
(with \(b_\ell^2-4 c_\ell \lt 0\) for all \(1\le\ell\le k\) so that no quadratic factor can be written as a product of linear factors with real coefficients) then there are real numbers \(A_{i,j}\text{,}\) \(B_{i,j}\text{,}\) \(C_{i,j}\) such that
\begin{align*} \frac{N(x)}{D(x)} &=\frac{A_{1,1}}{x-a_1}+\frac{A_{1,2}}{(x-a_1)^2}+\cdots +\frac{A_{1,m_1}}{(x-a_1)^{m_1}}+\cdots\\ &\phantom{=}\!+\frac{A_{j,1}}{x-a_j}+\frac{A_{j,2}}{(x-a_j)^2}+\cdots +\frac{A_{j,m_j}}{(x-a_j)^{m_j}}\\ &\phantom{=}\!+\frac{B_{1,1}x+C_{1,1}}{x^2+b_1x+c_1} +\frac{B_{1,2}x+C_{1,2}}{(x^2+b_1x+c_1)^2}+\!\cdots\! +\frac{B_{1,n_1}x+C_{1,n_1}}{(x^2+b_1x+c_1)^{n_1}}\!+\!\cdots\\ &\phantom{=}\!+\frac{B_{k,1}x+C_{k,1}}{x^2+b_kx+c_k} +\frac{B_{k,2}x+C_{k,2}}{(x^2+b_kx+c_k)^2}+\!\cdots\! +\frac{B_{k,n_k}x+C_{1,n_k}}{(x^2+b_kx+c_k)^{n_k}} \end{align*}
This was Equation 1.10.11. We start with two simpler results, that we’ll use repeatedly to get Equation 1.10.11. In the first simpler result, we consider the fraction \(\frac{P(x)}{Q_1(x)\,Q_2(x)}\) with \(P(x)\text{,}\) \(Q_1(x)\) and \(Q_2(x)\) being polynomials with real coefficients and we are going to assume that when \(P(x)\text{,}\) \(Q_1(x)\) and \(Q_2(x)\) are factored as in (✶), no two of them have a common linear or quadratic factor. As an example, no two of
\begin{align*} P(x) &= 2(x-3)(x-4)(x^2+3x+3)\\ Q_1(x) &= 2(x-1)(x^2+2x+2)\\ Q_2(x) &= 2(x-2)(x^2+2x+3) \end{align*}
have such a common factor. But, for
\begin{align*} P(x) &= 2(x-3)(x-4)(x^2+x+1)\\ Q_1(x) &= 2(x-1)(x^2+2x+2)\\ Q_2(x) &= 2(x-2)(x^2+x+1) \end{align*}
\(P(x)\) and \(Q_2(x)\) have the common factor \(x^2+x+1\text{.}\)
Proof.
We are to find polynomials \(P_1\) and \(P_2\) that obey
\begin{gather*} P(x) = P_1(x)\,Q_2(x) + P_2(x)\,Q_1(x) \end{gather*}
Actually, we are going to find polynomials \(p_1\) and \(p_2\) that obey
\begin{gather} p_1(x)\,Q_1(x) +p_2(x)\,Q_2(x) = C\tag{✶✶} \end{gather}
for some nonzero constant \(C\text{,}\) and then just multiply (✶✶) by \(\frac{P(x)}{C}\text{.}\) To find \(p_1\text{,}\) \(p_2\) and \(C\) we are going to use something called the Euclidean algorithm. It is an algorithm
 15 
It appears in Euclid’s Elements, which was written about 300 BC, and it was probably known even before that.
that is used to efficiently find the greatest common divisors of two numbers. Because \(Q_1(x)\) and \(Q_2(x)\) have no common factors of degree \(1\) or \(2\text{,}\) their ``greatest common divisor’’ has degree \(0\text{,}\) i.e. is a constant.
  • The first step is to apply long division to \(\frac{Q_1(x)}{Q_2(x)}\) to find polynomials \(n_0(x)\) and \(r_0(x)\) such that
    \begin{gather*} \frac{Q_1(x)}{Q_2(x)} = n_0(x) +\frac{r_0(x)}{Q_2(x)}\qquad \text{with }\deg(r_0)\lt\deg(Q_2) \end{gather*}
    or, equivalently,
    \begin{gather*} Q_1(x) = n_0(x)\,Q_2(x) + r_0(x)\qquad \text{with }\deg(r_0)\lt\deg(Q_2) \end{gather*}
  • The second step is to apply long division to \(\frac{Q_2(x)}{r_0(x)}\) to find polynomials \(n_1(x)\) and \(r_1(x)\) such that
    \begin{gather*} Q_2(x) = n_1(x)\,r_0(x) + r_1(x)\qquad \text{with }\deg(r_1)\lt\deg(r_0)\ \ \text{or}\ \ r_1(x)=0 \end{gather*}
  • The third step (assuming that \(r_1(x)\) was not zero) is to apply long division to \(\frac{r_0(x)}{r_1(x)}\) to find polynomials \(n_2(x)\) and \(r_2(x)\) such that
    \begin{gather*} r_0(x) = n_2(x)\,r_1(x) + r_2(x)\qquad \text{with }\deg(r_2)\lt\deg(r_1)\ \ \text{or}\ \ r_2(x)=0 \end{gather*}
  • And so on.
As the degree of the remainder \(r_i(x)\) decreases by at least one each time \(i\) is increased by one, the above iteration has to terminate with some \(r_{\ell+1}(x)=0\text{.}\) That is, we choose \(\ell\) to be index of the last nonzero remainder. Here is a summary of all of the long division steps.
\begin{align*} Q_1(x)&=n_0(x)\, Q_2(x) + r_0(x)\qquad &&\text{with }\deg(r_0)\lt\deg(Q_2)\\ Q_2(x)&=n_1(x)\, r_0(x) + r_1(x)\qquad &&\text{with }\deg(r_1)\lt\deg(r_0)\\ r_0(x)&=n_2(x)\,r_1(x)+r_2(x)\qquad &&\text{with }\deg(r_2)\lt\deg(r_1)\\ r_1(x)&=n_3(x)\,r_2(x)+r_3(x)\qquad &&\text{with }\deg(r_3)\lt\deg(r_2)\\ &\ \ \vdots\\ r_{\ell-2}(x)&=n_\ell(x)\,r_{\ell-1}(x)+r_\ell(x)\qquad &&\text{with }\deg(r_\ell)\lt\deg(r_{\ell-1})\\ r_{\ell-1}(x)&=n_{\ell+1}(x)\,r_\ell(x)+r_{\ell+1}(x)\qquad &&\text{with }r_{\ell+1}=0 \end{align*}
Now we are going to take a closer look at all of the different remainders that we have generated.
  • From first long division step, namely \(Q_1(x) = n_0(x)\,Q_2(x) + r_0(x)\) we have that the remainder
    \begin{gather*} r_0(x)=Q_1(x)-n_0(x)\,Q_2(x) \end{gather*}
  • From the second long division step, namely \(Q_2(x) = n_1(x)\,r_0(x) + r_1(x)\) we have that the remainder
    \begin{align*} & r_1(x)=Q_2(x)-n_1(x)\,r_0(x) = Q_2(x)-n_1(x)\big[Q_1(x)-n_0(x)\,Q_2(x)\big]\\ &\phantom{r_1(x)} =A_1(x)\,Q_1(x)+B_1(x)\,Q_2(x) \end{align*}
    with \(A_1(x) =-n_1(x)\) and \(B_1(x) = 1+n_0(x)\,n_1(x)\text{.}\)
  • From the third long division step (assuming that \(r_1(x)\) was not zero), namely \(r_0(x)=n_2(x)\,r_1(x)+r_2(x)\text{,}\) we have that the remainder
    \begin{align*} r_2(x)&=r_0(x)-n_2(x)\,r_1(x)\\ &=\big[Q_1(x)-n_0(x)\,Q_2(x)\big] -n_2(x)\big[A_1(x)\,Q_1(x)+B_1(x)\,Q_2(x)\big]\\ &=A_2(x)\,Q_1(x)+B_2(x)\,Q_2(x) \end{align*}
    with \(A_2(x)= 1-n_2(x)\,A_1(x)\) and \(B_2(x) = -n_0(x)-n_2(x)\,B_1(x)\text{.}\)
  • And so on. Continuing in this way, we conclude that the final nonzero remainder \(r_\ell(x)=A_\ell(x)\,Q_1(x)+B_\ell(x)\,Q_2(x)\) for some polynomials \(A_\ell\) and \(B_\ell\text{.}\)
Now the last nonzero remainder \(r_\ell(x)\) has to be a nonzero constant \(C\) because
  • it is nonzero by the definition of \(r_\ell(x)\) and
  • if \(r_\ell(x)\) were a polynomial of degree at least one, then
  • so that \(r_\ell(x)\) would be a common factor for \(Q_1(x)\) and \(Q_2(x)\text{,}\) in contradiction to the hypothesis that no two of \(P(x)\text{,}\) \(Q_1(x)\) and \(Q_2(x)\) have a common linear or quadratic factor.
We now have that \(A_\ell(x)\,Q_1(x)+B_\ell(x)\,Q_2(x)=r_\ell(x)=C\text{.}\) Multiplying by \(\frac{P(x)}{C}\) gives
\begin{gather*} \tilde P_2(x)\,Q_1(x)+\tilde P_1(x)\,Q_2(x)=P(x)\quad\text{or}\quad \frac{\tilde P_1(x)}{Q_1(x)} +\frac{\tilde P_2(x)}{Q_2(x)} =\frac{P(x)}{Q_1(x)\,Q_2(x)} \end{gather*}
with \(\tilde P_2(x)=\frac{P(x)\,A_\ell(x)}{C}\) and \(\tilde P_1(x)=\frac{P(x)\,B_\ell(x)}{C}\text{.}\) We’re not quite done, because there is still the danger that \(\deg(\tilde P_1)\ge \deg(Q_1)\) or \(\deg(\tilde P_2)\ge \deg(Q_2)\text{.}\) To deal with that possibility, we long divide \(\frac{\tilde P_1(x)}{Q_1(x)}\) and call the remainder \(P_1(x)\text{.}\)
\begin{gather*} \frac{\tilde P_1(x)}{Q_1(x)}=N(x)+\frac{P_1(x)}{Q_1(x)} \qquad\text{ with }\deg(P_1)\lt\deg(Q_1) \end{gather*}
Therefore we have that
\begin{align*} \frac{P(x)}{Q_1(x)\,Q_2(x)} &=\frac{P_1(x)}{Q_1(x)} +N(x) +\frac{\tilde P_2(x)}{Q_2(x)}\\ &=\frac{P_1(x)}{Q_1(x)} +\frac{\tilde P_2(x)+N(x)Q_2(x)}{Q_2(x)} \end{align*}
Denoting \(P_2(x)=\tilde P_2(x)+N(x)Q_2(x)\) gives \(\frac{P}{Q_1\,Q_2} =\frac{P_1}{Q_1} +\frac{P_2}{Q_2}\) and since \(\deg(P_1)\lt\deg(Q_1)\text{,}\) the only thing left to prove is that \(\deg(P_2)\lt\deg(Q_2)\text{.}\) We assume that \(\deg(P_2)\ge\deg(Q_2)\) and look for a contradiction. We have
\begin{align*} &\deg(P_2Q_1)\ge\deg(Q_1Q_2)\gt\deg(P_1Q_2)\\ &\implies \deg(P)=\deg(P_1Q_2+P_2Q_1)=\deg(P_2Q_1)\ge\deg(Q_1Q_2) \end{align*}
which contradicts the hypothesis that \(\deg(P)\lt\deg(Q_1Q_2)\) and the proof is complete.
For the second of the two simpler results, that we’ll shortly use repeatedly to get Equation 1.10.11, we consider \(\frac{P(x)}{(x-a)^m}\) and \(\frac{P(x)}{{(x^2+bx+c)}^m}\text{.}\)
Proof.
We simply repeatedly use long divison to get
\begin{align*} \frac{P(x)}{Q(x)^m} &=\frac{P(x)}{Q(x)}\,\frac{1}{Q(x)^{m-1}} =\left\{n_1(x) + \frac{r_1(x)}{Q(x)}\right\}\frac{1}{Q(x)^{m-1}}\\ &= \frac{r_1(x)}{Q(x)^m}+\frac{n_1(x)}{Q(x)}\,\frac{1}{Q(x)^{m-2}}\\ &= \frac{r_1(x)}{Q(x)^m} +\left\{n_2(x) + \frac{r_2(x)}{Q(x)}\right\}\frac{1}{Q(x)^{m-2}}\\ &= \frac{r_1(x)}{Q(x)^m} + \frac{r_2(x)}{Q(x)^{m-1}}+\frac{n_2(x)}{Q(x)}\,\frac{1}{Q(x)^{m-3}}\\ &\ \ \vdots\\ &= \frac{r_1(x)}{Q(x)^m} + \frac{r_2(x)}{Q(x)^{m-1}} +\cdots+ \frac{r_{m-2}(x)}{Q(x)^3} +\frac{n_{m-2}(x)}{Q(x)}\,\frac{1}{Q(x)}\\ &= \frac{r_1(x)}{Q(x)^m} + \frac{r_2(x)}{Q(x)^{m-1}} +\cdots+ \frac{r_{m-2}(x)}{Q(x)^3} +\\ &\hskip1in\left\{n_{m-1}(x) + \frac{r_{m-1}(x)}{Q(x)}\right\}\frac{1}{Q(x)}\\ &= \frac{r_1(x)}{Q(x)^m} + \frac{r_2(x)}{Q(x)^{m-1}} +\cdots+ \frac{r_{m-2}(x)}{Q(x)^3}+\frac{r_{m-1}(x)}{Q(x)^2} +\frac{n_{m-1}(x)}{Q(x)} \end{align*}
By the rules of long division every \(\deg(r_i)\lt\deg(Q)\text{.}\) It is also true that the final numerator, \(n_{m-1}\text{,}\) has \(\deg(n_{m-1})\lt\deg(Q)\) — that is, we kept dividing by \(Q\) until the degree of the quotient was less than the degree of \(Q\text{.}\) To see this, note that \(\deg(P)\lt m\deg(Q)\) and
\begin{align*} \deg(n_1) &= \deg(P)-\deg(Q)\\ \deg(n_2) &= \deg(n_1)-\deg(Q)= \deg(P)-2\deg(Q)\\ &\ \ \vdots\\ \deg(n_{m-1}) &= \deg(n_{m-2})-\deg(Q)= \deg(P)-(m-1)\deg(Q) \\ &\lt m\deg(Q)-(m-1)\deg(Q) \\ &=\deg(Q) \end{align*}
So, if \(\deg(Q)=1\text{,}\) then \(r_1, r_2, \ldots, r_{m-1}, n_{m-1}\) are all real numbers, and if \(\deg(Q)=2\text{,}\) then \(r_1, r_2, \ldots, r_{m-1}, n_{m-1}\) all have degree at most one.
We are now in a position to get Equation 1.10.11. We use (✶) to factor
 16 
This is assuming that there is at least one linear factor. If not, we factor \(D(x) = (x^2+b_1x + c_1)^{n_1} Q_2(x)\) instead.
\(D(x)= (x-a_1)^{m_1} Q_2(x)\) and use Lemma 1.10.15 to get
\begin{gather*} \frac{N(x)}{D(x)} =\frac{N(x)}{(x-a_1)^{m_1} Q_2(x)}=\frac{P_1(x)}{(x-a_1)^{m_1}} + \frac{P_2(x)}{Q_2(x)} \end{gather*}
where \(\deg(P_1)\lt m_1\text{,}\) and \(\deg(P_2)\lt\deg(Q_2)\text{.}\) Then we use Lemma Lemma 1.10.16 to get
\begin{gather*} \frac{N(x)}{D(x)} =\frac{P_1(x)}{(x-a_1)^{m_1}} + \frac{P_2(x)}{Q_2(x)} =\frac{A_{1,1}}{x-a_1}+\frac{A_{1,2}}{(x-a_1)^2}+\cdots +\frac{A_{1,m_1}}{(x-a_1)^{m_1}} + \frac{P_2(x)}{Q_2(x)} \end{gather*}
We continue working on \(\frac{P_2(x)}{Q_2(x)}\) in this way, pulling off of the denominator one \((x-a_i)^{m_i}\) or one \((x^2+b_ix + c_i)^{n_i}\) at a time, until we exhaust all of the factors in the denominator \(D(x)\text{.}\)

Exercises 1.10.4 Exercises

Recall that we are using \(\log x\) to denote the logarithm of \(x\) with base \(e\text{.}\) In other courses it is often denoted \(\ln x\text{.}\)

Exercises — Stage 1 .

1.
Below are the graphs of four different quadratic functions. For each quadratic function, decide whether it is: (i) irreducible, (ii) the product of two distinct linear factors, or (iii) the product of a repeated linear factor (and possibly a constant).
2. (✳).
Write out the general form of the partial-fractions decomposition of \(\displaystyle\frac{x^3+3}{(x^2-1)^2(x^2+1)} \text{.}\) You need not determine the values of any of the coefficients.
3. (✳).
Find the coefficient of \(\displaystyle \frac{1}{x-1}\) in the partial fraction decomposition of \(\displaystyle\frac{3x^3-2x^2+11}{x^2(x-1)(x^2+3)}\text{.}\)
4.
Re-write the following rational functions as the sum of a polynomial and a rational function whose numerator has a strictly smaller degree than its denominator. (Remember our method of partial fraction decomposition of a rational function only works when the degree of the numerator is strictly smaller than the degree of the denominator.)
  1. \(\displaystyle \dfrac{x^3+2x+2}{x^2+1}\)
  2. \(\displaystyle \dfrac{15x^4+6x^3+34x^2+4x+20}{5x^2+2x+8}\)
  3. \(\displaystyle \dfrac{2x^5+9x^3+12x^2+10x+30}{2x^2+5}\)
5.
Factor the following polynomials into linear and irreducible factors.
  1. \(\displaystyle 5x^3-3x^2-10x+6\)
  2. \(\displaystyle x^4-3x^2-5\)
  3. \(\displaystyle x^4-4x^3-10x^2-11x-6\)
  4. \(\displaystyle 2x^4+12x^3-x^2-52x+15\)
6.
Here is a fact:
Suppose we have a rational function with a repeated linear factor \((ax+b)^n\) in the denominator, and the degree of the numerator is strictly less than the degree of the denominator. In the partial fraction decomposition, we can replace the terms
\begin{equation*} \frac{A_1}{ax+b} + \frac{A_2}{(ax+b)^2}+\frac{A_3}{(ax+b)^3}+\cdots+ \frac{A_n}{(ax+b)^n}\tag{1} \end{equation*}
with the single term
\begin{equation*} \frac{B_1+B_2x+B_3x^2+\cdots + B_{n}x^{n-1}}{(ax+b)^n}\tag{2} \end{equation*}
and still be guaranteed to find a solution.
Why do we use the sum in (1), rather than the single term in (2), in partial fraction decomposition?

Exercises — Stage 2 .

7. (✳).
Evaluate \(\displaystyle\int_1^2 \frac{\dee{x}}{x+x^2}\text{.}\)
8. (✳).
Calculate \(\displaystyle \int \frac{1}{x^4+x^2}\,\dee{x}\text{.}\)
9. (✳).
Calculate \(\displaystyle \int \frac{12x+4}{(x-3)(x^2+1)}\,\dee{x}\text{.}\)
10. (✳).
Evaluate the following indefinite integral using partial fraction:
\begin{gather*} F(x) = \int \frac{3x^2 -4}{(x-2)(x^2+4)}\,\dee{x} . \end{gather*}
11. (✳).
Evaluate \(\displaystyle\int \frac{x-13}{x^2-x-6}\dee{x}\text{.}\)
12. (✳).
Evaluate \(\displaystyle\int \frac{5x+1}{x^2+5x+6}\dee{x}\text{.}\)
13.
Evaluate \(\displaystyle\int \frac{5x^2-3x-1}{x^2-1} \dee{x}\text{.}\)
14.
Evaluate \(\displaystyle\int \frac{4x^4+14x^2+2}{4x^4+x^2} \dee{x}\text{.}\)
15.
Evaluate \(\displaystyle\int \frac{x^2+2x-1}{x^4-2x^3+x^2} \dee{x}\text{.}\)
16.
Evaluate \(\displaystyle\int \frac{ 3x^2-4x-10}{2x^3-x^2-8x+4} \dee{x}\text{.}\)
17.
Evaluate \(\displaystyle\int_0^1 \frac{10x^2+24x+8}{2x^3+11x^2+6x+5} \dee{x}\text{.}\)

Exercises — Stage 3 .

In Questions 18 and 19, we use partial fraction to find the antiderivatives of two important functions: cosecant, and cosecant cubed.
The purpose of performing a partial fraction decomposition is to manipulate an integrand into a form that is easily integrable. These “easily integrable” forms are rational functions whose denominator is a power of a linear function, or of an irreducible quadratic function. In Questions 20 through 23, we explore the integration of rational functions whose denominators involve irreducible quadratics.
In Questions 24 through 26, we use substitution to turn a non-rational integrand into a rational integrand, then evaluate the resulting integral using partial fraction. Till now, the partial fraction problems you’ve seen have all looked largely the same, but keep in mind that a partial fraction decomposition can be a small step in a larger problem.
18.
Using the method of Example 1.10.5, integrate \(\displaystyle\int \csc x \dee{x}\text{.}\)
19.
Using the method of Example 1.10.6, integrate \(\displaystyle\int \csc^3 x \dee{x}\text{.}\)
20.
Evaluate \(\displaystyle\int_1^2 \frac{3x^3+15x^2+35x+10}{x^4+5x^3+10x^2} \dee{x}\text{.}\)
21.
Evaluate \(\displaystyle\int\left(\frac{3}{x^2+2}+\frac{x-3}{(x^2+2)^2}\right) \dee{x} \text{.}\)
22.
Evaluate \(\displaystyle\int\frac{1}{(1+x^2)^3} \dee{x}\text{.}\)
23.
Evaluate \(\displaystyle\int \left(3x+\frac{3x+1}{x^2+5}+\frac{3x}{(x^2+5)^2}\right) \dee{x}\text{.}\)
24.
Evaluate \(\displaystyle\int \frac{\cos\theta}{3\sin\theta+\cos^2\theta-3} \dee{\theta}\text{.}\)
25.
Evaluate \(\displaystyle\int\frac{1}{e^{2t}+e^t+1} \dee{t}\text{.}\)
26.
Evaluate \(\displaystyle\int\sqrt{1+e^x} \dee{x}\) using partial fraction.
27. (✳).
The region \(R\) is the portion of the first quadrant where \(3\le x\le 4\) and \(0\le y\le\dfrac{10}{\sqrt{25-x^2}}\text{.}\)
  1. Sketch the region \(R\text{.}\)
  2. Determine the volume of the solid obtained by revolving \(R\) around the \(x\)-axis.
  3. Determine the volume of the solid obtained by revolving \(R\) around the \(y\)-axis.
28.
Find the area of the finite region bounded by the curves \(y=\dfrac{4}{3+x^2}\text{,}\) \(y=\dfrac{2}{x(x+1)}\text{,}\) \(x=\dfrac14\text{,}\) and \(x=3\text{.}\)
29.
Let \(F(x) = \displaystyle\int_1^x \frac{1}{t^2-9} \dee{t}\text{.}\)
  1. Give a formula for \(F(x)\) that does not involve an integral.
  2. Find \(F'(x)\text{.}\)