Skip to main content
\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)
Mathematics LibreTexts

8.1: Partial Fractions

  • Page ID
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}} } \) \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash {#1}}} \)\(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\) \(\newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\) \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\) \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\) \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\) \( \newcommand{\Span}{\mathrm{span}}\)

    If a generating function looks like \(\dfrac{1}{(1+ax^i)^j}\), we can use the Generalised Binomial Theorem to find the coefficient of \(x^r\). But what can we do if the generating function looks like \(\dfrac{1}{(a+bx+cx^2)}\), for example, or even more complicated expressions?

    One tool that can help us extract coefficients from some expressions like this, is the method of partial fractions.

    Example \(\PageIndex{1}\)

    Suppose we have a generating function

    \(f(x) = \dfrac{1+x}{(1-2x)(2+x)}\)

    How can we work out the coefficient of \(x^r\)?


    Well, if we could separate the factors of the denominator, we would know how to deal with each separately. In fact, this is exactly what we do. We set

    \(f(x) = \dfrac{1+x}{(1-2x)(2+x)} = \dfrac{A}{1-2x} + \dfrac{B}{2+x}\)

    As we work this through, you’ll see that in working this out, we end up with two equations in the two unknowns \(A\) and \(B\), which we can therefore solve! So it is possible to “split up” the original generating function, into two separate fractions, each of which has as its denominator one of the factors of the original denominator. This is the method of partial fractions.

    To solve for \(A\) and \(B\), we add the fractions \(\dfrac{A}{(1 − 2x)}\) and \(\dfrac{B}{(2 + x)}\) over a common denominator. This gives

    \(\dfrac{A(2 + x) + B(1 − 2x)}{(1 − 2x)(2 + x)} = f(x) = \dfrac{1+x}{(1-2x)(2+x)}\)

    Clearly, this forces the numerators to be equal, so

    \(A(2 + x) + B(1 − 2x) = 1 + x\).

    Since these are equal as polynomials in \(x\), the constant terms must be equal, and the coefficients of \(x\) must be equal, giving us two equations: \(2A + B = 1\) and \((A − 2B)x = x\), so \(A − 2B = 1\). Now there are many ways to algebraically solve for \(A\) and \(B\); for example, the first equation gives \(B = 1 − 2A\); plugging this into the last equation gives \(A − 2(1 − 2A) = 1\), so \(5A = 3\), so \(A = \dfrac{3}{5}\). Now

    \(B = 1 − 2 \left( \dfrac{3}{5} \right) = \dfrac{−1}{5}\).

    Thus, we have

    \(f(x) = \dfrac{\dfrac{3}{5}}{1 − 2x} - \dfrac{\dfrac{1}{5}}{2+x} \)

    Notice that the \(2 + x\) is still a bit problematic. We can use the Generalised Binomial Theorem to work out coefficients for something that looks like \((1 + ax^i)^j\), but we need that \(1\), and here instead we have a \(2\). To deal with this, we observe that

    \(2 + x = 2(1 + \left(\dfrac{1}{2} \right)x)\).


    \(f(x) = \dfrac{\dfrac{3}{5}}{1 − 2x} - \dfrac{\dfrac{1}{10}}{1+ \left( \dfrac{1}{2} \right) x} \)

    Now let’s expand each of the two summands separately. We have

    \( \dfrac{3}{5} (1-2x)^{-1} = \dfrac{3}{5} (1 + 2x + (2x)^2 + (2x)^3 + . . .)\),

    so the coefficient of \(x^r\) in this part is \(\left( \dfrac{3}{5} \right) 2^r\). Also,

    \(\dfrac{-1}{10}(1+(\dfrac{1}{2})x)^{-1} = \dfrac{-1}{10} (1 - \dfrac{1}{2}x + (\dfrac{1}{2}x)^2 - (\dfrac{1}{2}x)^3 + - ...) \),

    so the coefficient of \(x^r\) in this part is \(\left( \dfrac{-1}{10} \right) (-1)^r \left( \dfrac{1}{2} \right)^r\).

    Thus, the coefficient of \(x^r\) in \(f(x)\) is \(\left( \dfrac{3}{5} \right) (2)^r - \dfrac{-1}{10} \left( \dfrac{-1}{2} \right)^r\).

    The method of partial fractions can be applied to any generating function that has a denominator that can be factored into simpler terms. However, polynomials of degree \(3\) or higher can become hard to factor, so we’ll mostly restrict our attention to applying this either with denominators that are already factored, or with denominators that have degree at most two.

    There is an extra trick that you should be aware of. This arises if the denominator is divisible by a square. For example, if we are looking for the coefficient of \(x^r\) in

    \(g(x) = \dfrac{1+x}{(1-2x)^2(2+x)}\)

    then it doesn’t make sense to separate all of the factors out as before, because

    \(g(x) = \dfrac{A}{1-2x} + \dfrac{B}{1-2x} +\dfrac{C}{2+x} = \dfrac{A+B}{1-2x} + \dfrac{C}{2+x} \)

    and when we add this up, the denominator will be \((1 − 2x)(2 + x)\) rather than \((1 − 2x)^2 (2 + x)\). This can be dealt with in either of two ways. First, you can include both \(1 − 2x\) and \((1 − 2x)^2\) as denominators:

    \(g(x) = \dfrac{A}{1-2x} + \dfrac{B}{(1-2x)^2} +\dfrac{C}{2+x}\).

    The second option is to include only \((1 − 2x)^2\) as one of the denominators, but to include an \(x\) in the corresponding numerator, in addition to the constant term:

    \(g(x) = \dfrac{Ax+B}{(1-2x)^2} + \dfrac{C}{2+x} \).

    Either of these methods can be generalised in natural ways to cases where the denominator is divisible by some higher power.

    We’ll see more examples of partial fractions applied to specific situations, so we’ll leave the explanation there for now.

    Exercise \(\PageIndex{1}\)

    Find the coefficient of \(x^r\) in each of the following generating functions, using the method of partial fractions and the Generalised Binomial Theorem.

    1. \(\dfrac{1}{(1+2x)(2−x)}\)
    2. \(\dfrac{x}{(1+x)^2(1−x)}\)
    3. \(\dfrac{(1+2x)}{(1−2x)(2+x)(1+x)}\)
    • Was this article helpful?