Integration by Partial Fractions

Split one awkward fraction into two easy ones.

A product underneath

Take ∫ 1/((x − 1)(x + 1)) dx. The fraction is not a power of x. It is not a derivative over its function either, since the denominator x² − 1 differentiates to 2x and the numerator is 1. None of the standard integrals fits it as it stands.

But a single linear bracket underneath is easy: 1/(x − 1) integrates to ln|x − 1|. So the plan is to break the fraction into fractions that each have one bracket underneath.

Splitting the fraction

Write it as one fraction over each factor, with numerators still to be found: 1/((x − 1)(x + 1)) = A/(x − 1) + B/(x + 1).

Multiply both sides by (x − 1)(x + 1) to clear the denominators: 1 = A(x + 1) + B(x − 1). This must hold for every value of x, which is what makes the next step work.

Finding A and B

Choose values of x that make one bracket 0. At x = 1, the B term vanishes and 1 = 2A, so A = ½. At x = −1, the A term vanishes and 1 = −2B, so B = −½.

So 1/((x − 1)(x + 1)) = 1/(2(x − 1)) − 1/(2(x + 1)). Check by recombining at x = 2: the left side is 1/(1 × 3) = 1/3, and the right side is 1/(2 × 1) − 1/(2 × 3) = 1/2 − 1/6 = 1/3. At x = 0 both sides are −1.

xy

The gold curve is y = 1/((x − 1)(x + 1)); the plain curves are its two pieces, y = 1/(2(x − 1)) and y = −1/(2(x + 1)). At every x the gold height is the sum of the other two: at x = 2 the pieces are ½ and −1/6, and the gold curve is at 1/3.

Each piece is a logarithm

Each piece is a constant over a linear bracket, and each bracket differentiates to 1, so each integrates to a logarithm: ∫ 1/((x − 1)(x + 1)) dx = ½ ln|x − 1| − ½ ln|x + 1| + C.

The absolute values matter, because x − 1 and x + 1 are negative for some x. For a definite integral, the interval must not cross 1 or −1, where the fraction has no value. From 2 to 3: (½ ln 2 − ½ ln 4) − (½ ln 1 − ½ ln 3) = ½(ln 2 + ln 3 − ln 4) = ½ ln 1.5 ≈ 0.203.

A numerator other than 1

Take (3x + 5)/((x + 1)(x + 2)) = A/(x + 1) + B/(x + 2). Clearing the denominators, 3x + 5 = A(x + 2) + B(x + 1).

At x = −1, 2 = A. At x = −2, −1 = −B, so B = 1. Check at x = 0: the left side is 5/2, and the right side is 2/1 + 1/2 = 5/2.

So ∫ (3x + 5)/((x + 1)(x + 2)) dx = 2 ln|x + 1| + ln|x + 2| + C. From 0 to 1 that is (2 ln 2 + ln 3) − (0 + ln 2) = ln 2 + ln 3 = ln 6 ≈ 1.792.

A repeated factor

Over a repeated factor, one fraction is not enough. A/(x − 1) put over the denominator (x − 1)² has numerator A(x − 1), which is 0 at x = 1, so it can never rebuild a numerator such as x + 1, which is 2 there. Each power of the factor gets its own fraction.

Take (x + 1)/(x − 1)² = A/(x − 1) + B/(x − 1)². Clearing the denominators, x + 1 = A(x − 1) + B. At x = 1, B = 2, and comparing the terms in x gives A = 1. Check at x = 3: the left side is 4/4 = 1, and the right side is 1/2 + 2/4 = 1.

The second piece is a power, not a log: 2/(x − 1)² = 2(x − 1)⁻², which integrates to −2(x − 1)⁻¹. So ∫ (x + 1)/(x − 1)² dx = ln|x − 1| − 2/(x − 1) + C. From 2 to 3 that is (ln 2 − 1) − (0 − 2) = 1 + ln 2 ≈ 1.693.

A quadratic that will not factor

x² + 1 has no real factors, since x² + 1 is never 0. Over it, the numerator must be one degree lower than the quadratic, so it is linear, Px + Q, not a bare constant.

Take 2/((x + 1)(x² + 1)) = A/(x + 1) + (Px + Q)/(x² + 1). Clearing the denominators, 2 = A(x² + 1) + (Px + Q)(x + 1). At x = −1, 2 = 2A, so A = 1. The x² terms give 0 = A + P, so P = −1, and the constant terms give 2 = A + Q, so Q = 1. Check at x = 1: the left side is 2/(2 × 2) = ½, and the right side is ½ + 0/2 = ½.

The pieces are 1/(x + 1) + 1/(x² + 1) − x/(x² + 1). The first is a log, the second integrates to tan⁻¹x, and the third is half of 2x/(x² + 1), a derivative over its function: ∫ 2/((x + 1)(x² + 1)) dx = ln|x + 1| + tan⁻¹x − ½ ln(x² + 1) + C.

Divide first if the top is too big

The split works when the numerator has lower degree than the denominator. If not, divide first. x²/(x² − 1) = 1 + 1/(x² − 1), and the fraction left over splits as before, so ∫ x²/(x² − 1) dx = x + ½ ln|x − 1| − ½ ln|x + 1| + C.

Worked example: Two Reagents Meeting in a Reactor: A Time Found by Splitting One Fraction Into Two

Question In a reactor, the stirred mixture starts with 3 moles per liter of A and 1 mole per liter of B, and the two combine one for one. Writing x for the moles per liter of product formed, chemical engineers show that the time taken to reach a given amount X is n = ∫0X2(3 − x)(1 − x)dx minutes. (a) How long until three quarters of the B has reacted? (b) How long until nine tenths of it has? Take ln 3 = 1.0986 and ln 7 = 1.9459, and give each answer to three significant figures.

  1. 1.Split the integrand: 2(3−x)(1−x) = A3−x + B1−x, which on clearing the denominators means 2 = A(1 − x) + B(3 − x) for every x.

    0481200.250.50.750.9x, moles per liter of productminutes per mole per liter2/((3 − x)(1 − x)) = A/(3 − x) + B/(1 − x)
    0481200.250.50.750.9x, moles per liter of productminutes per mole per liter2/((3 − x)(1 − x)) = A/(3 − x) + B/(1 − x)
    Split the bottom: 2(3−x)(1−x) = A3−x + B1−x, so 2 = A(1−x) + B(3−x).
  2. 2.Choose values of x that kill one bracket at a time. Putting x = 1 gives 2 = 2B, so B = 1; putting x = 3 gives 2 = −2A, so A = −1. The integrand is 11−x − 13−x.

    0481200.250.50.750.9x, moles per liter of productminutes per mole per liter2/((3 − x)(1 − x)) = A/(3 − x) + B/(1 − x)x = 1 gives B = 1; x = 3 gives A = −1
    0481200.250.50.750.9x, moles per liter of productminutes per mole per liter2/((3 − x)(1 − x)) = A/(3 − x) + B/(1 − x)x = 1 gives B = 1; x = 3 gives A = −1
    Putting x = 1 gives B = 1 and putting x = 3 gives A = −1, so the integrand is 11−x − 13−x.
  3. 3.Each piece has a constant on top and a bracket below whose derivative is −1, so each integrates to a logarithm with a minus sign: ∫dx1−x = −ln(1−x) and ∫dx3−x = −ln(3−x). Together, n = [ln(3−x) − ln(1−x)]0X = [ln3−x1−x]0X.

    0481200.250.50.750.9x, moles per liter of productminutes per mole per liter2/((3 − x)(1 − x)) = A/(3 − x) + B/(1 − x)x = 1 gives B = 1; x = 3 gives A = −1integral = ln(3 − x) − ln(1 − x)
    0481200.250.50.750.9x, moles per liter of productminutes per mole per liter2/((3 − x)(1 − x)) = A/(3 − x) + B/(1 − x)x = 1 gives B = 1; x = 3 gives A = −1integral = ln(3 − x) − ln(1 − x)
    Each piece integrates to a logarithm, and together they make [ln3−x1−x].
  4. 4.(a) Three quarters of the B reacted means X = 0.75. At that point ln2.250.25 = ln 9, and at x = 0 the value is ln31 = ln 3. So n = ln 9 − ln 3 = ln 3 = 1.10 minutes.

    0481200.250.50.750.9x, moles per liter of productminutes per mole per liter0.75 mol: 1.10 min2/((3 − x)(1 − x)) = A/(3 − x) + B/(1 − x)x = 1 gives B = 1; x = 3 gives A = −1integral = ln(3 − x) − ln(1 − x)(a) ln 9 − ln 3 = ln 3 = 1.10 min
    0481200.250.50.750.9x, moles per liter of productminutes per mole per liter0.75 mol: 1.10 min2/((3 − x)(1 − x)) = A/(3 − x) + B/(1 − x)x = 1 gives B = 1; x = 3 gives A = −1integral = ln(3 − x) − ln(1 − x)(a) ln 9 − ln 3 = ln 3 = 1.10 min
    (a) At x = 0.75 the value is ln 9 and at x = 0 it is ln 3, so the time is ln 3 = 1.10 minutes.
  5. 5.(b) Nine tenths reacted means X = 0.9, where ln2.10.1 = ln 21, so n = ln 21 − ln 3 = ln 7 = 1.95 minutes. Check: the last fifteen hundredths of B take 1.95 − 1.10 = 0.85 minutes, longer than everything before them took per mole, and as x climbs toward 1 the logarithm runs away, so B is never quite used up. That is what the chemistry says too.

    0481200.250.50.750.9x, moles per liter of productminutes per mole per liter0.75 mol: 1.10 min0.90 mol: 1.95 min2/((3 − x)(1 − x)) = A/(3 − x) + B/(1 − x)x = 1 gives B = 1; x = 3 gives A = −1integral = ln(3 − x) − ln(1 − x)(a) ln 9 − ln 3 = ln 3 = 1.10 min(b) ln 21 − ln 3 = ln 7 = 1.95 min
    0481200.250.50.750.9x, moles per liter of productminutes per mole per liter0.75 mol: 1.10 min0.90 mol: 1.95 min2/((3 − x)(1 − x)) = A/(3 − x) + B/(1 − x)x = 1 gives B = 1; x = 3 gives A = −1integral = ln(3 − x) − ln(1 − x)(a) ln 9 − ln 3 = ln 3 = 1.10 min(b) ln 21 − ln 3 = ln 7 = 1.95 min
    (b) At x = 0.9 the value is ln 21, so the time is ln 7 = 1.95 minutes, and the curve runs away as x climbs toward 1.

Answer: (a) ln 3 = 1.10 minutes; (b) ln 7 = 1.95 minutes

Common mistakes

  • Writing ∫dx1−x as ln(1−x). Differentiating ln(1−x) gives −11−x, so the integral is −ln(1−x). The minus signs on both pieces are what turn the answer the right way up; lose one and the time comes out negative.
  • Splitting the fraction by inspection as 13−x + 11−x. That is not equal to the integrand: at x = 0 it comes to 13 + 1 = 43, while the integrand is 23. The two numerators have to be found, and here they are −1 and 1.

More techniques of integration problems, worked step by step →

The usual mistakes

Guessing the numerators. 1/(x − 1) − 1/(x + 1) looks right, but at x = 2 it gives 1 − 1/3 = 2/3, twice the true 1/3. Find A and B, then check one value.

Leaving out the absolute values. ln(x − 1) has no value for x < 1, while the fraction does.

A bracket written the other way round. 1/(1 − x) differentiates to a minus: its integral is −ln|1 − x| + C.

One fraction over a repeated factor. (x − 1)² needs A/(x − 1) and B/(x − 1)².

A constant over an irreducible quadratic. x² + 1 needs Ax + B on top; a constant alone cannot rebuild every numerator.

Practice Integration by Partial Fractions in the app