Recitation Ten

In this recitation, we covered more trigonometric substitutions as well as partial fraction decomposition.

Partial Fraction Decomposition

Partial fractions decomposition can be seen as an algebra trick that we like to apply for integrals. One can see it as a “reverse foil for denominators” (but this is a little reductive). For example, let’s look at the function

\[\frac{1}{x^2 - 1}.\]

The denominator is easy to factor in this case:

\[x^2 - 1 = (x-1)(x+1).\]

However, integrating this function is hard, even decomposed like this. A \(u\)-substitution doesn’t work, and the only other trick we know so far is a trig substitution. Ideally, there is a better way.

Remember that when we add fractions we have to cross multiply. In particular, if \(A\) and \(B\) are constants, then

\[\frac{A}{x-1} + \frac{B}{x+1} = \frac{A(x+1) + B(x-1)}{(x-1)(x+1)} = \frac{A(x+1) + B(x-1)}{x^2-1}.\]

Now if simplify the numerator, we have

\[Ax + A + Bx - B = (A+B)x + (A-B).\]

The question is whether or not we can choose \(A\) and \(B\) so that the numerator is just one. This tells us that we need to look at the system of equations

\[A + B = 0 \text{ and } A - B = 1.\]

The first equation tells us that \(A = - B\), and substituting this into the second tells us that \(- 2B = 1\) or \(B = -1/2\), so \(A = 1/2\). Since there is a solution, we get

\[\frac{1}{2(x-1)} - \frac{1}{2(x+1)} = \frac{1}{x^2-1}.\]

This is beautiful, because this tells us that

\[\int \frac{dx}{x^2-1} = \frac{1}{2} \int \frac{dx}{x-1} - \frac{1}{2} \int \frac{dx}{x+1},\]

and the integrals on the right are much easier.

Let’s think about

\[\frac{1}{(x-1)(x+4)^2}\]

and try the same procedure. If we blindly repeat what we just did, we would try to find \(A\) and \(B\) so that

\[\frac{A}{x-1} + \frac{B}{(x+4)^2} = \frac{1}{(x-1)(x+4)^2}.\]

So far so good – let’s combine the fractions on the left to get

\[\frac{A(x+4)^2 + B(x-1)}{(x-1)(x+4)^2} = \frac{1}{(x-1)(x+4)^2}.\]

For this to work, we would need to find \(A\) and \(B\) so that

\[A Ax^2 + (8A + B)x + (16A - B) = 1.\]

The system of equations we have is

\[A = 0, \ \ 8A + B = 0, \ \ 16A - B = 1.\]

Notice there is no solution to this system, so something went wrong. One big problem is that we have three equations and two unknowns. Unless there’s some redundancy in the equations, the system is overdetermined, and so there cannot be any solutions. We need a third unknown to balance things out. However, we don’t want to be random with things – we need the denominators to balance out in the end. Let’s use the quadratic term to our advantage and write

\[\frac{A}{x-1} + \frac{B}{(x+4)} + \frac{C}{(x+4)^2} = \frac{1}{(x-1)(x+4)^2}.\]

The denominators are all correct and now we have three unknowns. Simplifying the numerator on the left, we see that we need to solve

\[A(x+4)^2 + B(x+4)(x-1) + C(x-1) = 1.\]

Expanding the terms on the left:

\[(A + B)x^2 + (8A +3B + C)x + (16A - 4B - C) = 1,\]

or in other words,

\[A+ B = 0, \ \ 8A + 3B + C = 0, \ \ 16A - 4B - C = 1.\]

We now have three equations for three unknowns, so it’s a more promising set up. Solving gets us

\[A = - B = \frac{1}{25}, \ \ C = - \frac{1}{5}.\]

So:

\[\frac{1}{(x-1)(x+4)^2} = \frac{1}{25(x-1)} - \frac{1}{25(x+4)} - \frac{1}{5(x+4)^2}.\]

Notice that all of the terms on the right are integrable (in the sense that we know how to take their integrals), so we’ve improved things dramatically!

We have the following general formula for partial fractions: for constants \(n_1, n_2, \ldots, n_k \geq 1\) with \(\sum_{j=1}^k n_j = N\), we can find constants \(A_{1,1}, A_{1,2}, \ldots, A_{1, n_1}, A_{2, 1}, \ldots, A_{k, n_k}\) so that

\[\frac{1}{(x-a_1)^{n_1} (x - a_2)^{n_2} \cdots (x - a_k)^{n_k}} = \sum_{j=1}^N \sum_{i=1}^{n_j} \frac{A_{j,i}}{(x-a_j)^i}.\]

This is a scary formula, though (double sum!). The (possibly easier) thing to remember is that if there is a power greater than one, we have to keep adding on constants and powers until we reach that power. So for example:

\[\frac{1}{(x+3)^3} = \frac{A}{x+3} + \frac{B}{(x+3)^2} + \frac{C}{(x+3)^3}.\]

This ensures that we have enough unknowns for our equations.

One other case we need to worry about is when the denominator cannot be factored into linear terms. For example, what if we have something like

\[\frac{1}{(x-1)(x^2 + x + 4)}?\]

The first \((x-1)\) term is good – nothing to worry about there. If try using the quadratic formula on the second term, we see that the term under the radical will be

\[(1)^2 - 4(1)(4) = 1 - 16 = -15.\]

This means that we cannot factor any further (the polynomial is irreducible). Still, we would like to break this up into a sum of easier terms. If we blindly try the old approach, we get

\[\frac{1}{(x-1)(x^2+x+4)} = \frac{A}{x-1} + \frac{B}{x^2 + x + 4}.\]

Cross-multiplying gives us that

\[1 = A(x^2 + x +4) + B(x-1) = Ax^2 + (A+B)x + (4A-B).\]

So our system of equations is

\[A = 0, \ \ A+B = 0, \ \ 4A-B = 1.\]

We see a problem here – if \(A =0\), the second equation says \(B = 0\), and the third equation says \(0 = 1\). So we didn’t put the right terms, and our guess is that there’s something wrong with the quadratic term. One way of fixing this is by adding a linear term on top instead of a quadratic term. Let’s try

\[\frac{1}{(x-1)(x^2+x+4)} = \frac{A}{x-1} + \frac{Bx + C}{x^2 + x + 4}.\]

Cross multiplying gives

\[1 = A(x^2 + x + 4) + (Bx+C)(x-1) = (A + B)x^2 + (A - B + C)x + (4A - C).\]

This seems better – we have three equations and three variables. Our system will be

\[0 = A+B, \ \ A - B + C = 0, \ \ 4A - C = 1.\]

The first equation tells us \(A = -B\). Substituting this into the second tells us \(-2B + C = 0\) or \(2B = C\). Substituting \(A = -B\) and \(C = 2B\) into the third gives us

\[4A - C = -4B - 2B = -6B = 1.\]

We get \(B = -1/6\), \(A = 1/6\), and \(C = -1/3\), and more importantly, it worked!

The “rulebook” is the following:

  • Factor the denominator until you get a product of irreducible polynomials.
  • If an irreducible polynomial is by itself (so no powers), then we put a polynomial of degree one less in the numerator (so if its linear, we put a constant, if its quadratic, we put a linear, etc.).
  • If an irreducible polynomial is not by itself, so in particular raised by a power \(n\), then we repeat the above procedure \(n\) times, raising the power of the denominator by one each time.
Written on September 20, 2023