Steply

Partial fractions

Calculus 2 · 20 problems, easy to harder

▶ Watch the first one solved

How we do it

  1. Factor the bottom
  2. Split the fraction
  3. Clear the bottoms
  4. Find A and B
  5. Integrate
  6. Check

The steps for Integrate ∫ 1/(x^2 - 1) dx. Every solution names its steps, so you always know what comes next.

Worked examples

Integrate ∫ 1/(x^2 - 1) dx Easy

The question

Question: find the integral of 1, all over x² − 1.

∫ 1x2 − 1 dx =

1 Factor the bottom

First factor the bottom.

x² − 1 is a difference of two squares: x² minus 1 squared.

So it is (x − 1)(x + 1).

x2 − 1 = (x + 1)(x − 1)
a² − b² = (a − b)(a + b), b = 1

2 Split the fraction

Two simple fractions can add up to this one: A over (x + 1), plus B over (x − 1).

We find the numbers A and B.

1(x + 1)(x − 1) = A(x + 1) + B(x − 1)

Careful!

ln of the bottom works only when the top is the bottom's derivative.

Here it is not, so we split.

Careful: not ∫ 1x2 − 1 dx = ln|x2 − 1| ✗

3 Clear the bottoms

Multiply both sides by (x + 1)(x − 1).

On the left the bottom goes.

On the right each fraction keeps the other bracket.

1 = A(x − 1) + B(x + 1)

4 Find A and B

Put in x = −1: it makes (x + 1) zero, so the B part is gone.

x = −1: 1 = A(−2) + B(0)

Divide by −2: A = −1/2.

A = 1−2 = −12

Put in x = 1: it makes (x − 1) zero, so the A part is gone.

x = 1: 1 = B(2) + A(0)

Divide by 2: B = 1/2.

B = 12 = 12

5 Integrate

Now the integral is two easy pieces.

∫ 1(x + 1)(x − 1) dx = ∫ (−12(x + 1) + 12(x − 1)) dx

One over x minus a number integrates to ln of it, like 1 over x.

∫ 1x − p dx = ln|x − p| + C

So the answer is −1/2 × ln|x + 1| + 1/2 × ln|x − 1| + C.

= −12ln|x + 1| + 12ln|x − 1| + C

6 Check

Let's check: add the two fractions back over one bottom, (x + 1)(x − 1).

−12(x + 1) + 12(x − 1) = −12(x − 1) + 12(x + 1)(x + 1)(x − 1)

Open the brackets and add: the top is 1 again.

Right!

= 1(x + 1)(x − 1)

Let's look back.

First: factor the bottom.

Then: split the fraction.

Then: clear the bottoms.

Then: find A and B.

Then: integrate.

Last: check.

Answer
= −12ln|x + 1| + 12ln|x − 1| + C

▶ Watch it solved

Integrate ∫ (3x + 1)/((x - 1)(x + 2)) dx Medium

The question

Question: find the integral of (3x + 1), all over (x − 1)(x + 2).

∫ 3x + 1(x − 1)(x + 2) dx =

1 Split the fraction

Two simple fractions can add up to this one: A over (x − 1), plus B over (x + 2).

We find the numbers A and B.

3x + 1(x − 1)(x + 2) = A(x − 1) + B(x + 2)

Careful!

ln of the bottom works only when the top is the bottom's derivative.

Here it is not, so we split.

Careful: not ∫ 3x + 1(x − 1)(x + 2) dx = ln|(x − 1)(x + 2)| ✗

2 Clear the bottoms

Multiply both sides by (x − 1)(x + 2).

On the left the bottom goes.

On the right each fraction keeps the other bracket.

3x + 1 = A(x + 2) + B(x − 1)

3 Find A and B

Put in x = 1: it makes (x − 1) zero, so the B part is gone.

x = 1: 4 = A(3) + B(0)

Divide by 3: A = 4/3.

A = 43 = 43

Put in x = −2: it makes (x + 2) zero, so the A part is gone.

x = −2: −5 = B(−3) + A(0)

Divide by −3: B = 5/3.

B = −5−3 = 53

4 Integrate

Now the integral is two easy pieces.

∫ 3x + 1(x − 1)(x + 2) dx = ∫ (43(x − 1) + 53(x + 2)) dx

One over x minus a number integrates to ln of it, like 1 over x.

∫ 1x − p dx = ln|x − p| + C

So the answer is 4/3 × ln|x − 1| + 5/3 × ln|x + 2| + C.

= 43ln|x − 1| + 53ln|x + 2| + C

5 Check

Let's check: add the two fractions back over one bottom, (x − 1)(x + 2).

43(x − 1) + 53(x + 2) = 43(x + 2) + 53(x − 1)(x − 1)(x + 2)

Open the brackets and add: the top is 3x + 1 again.

Right!

= 3x + 1(x − 1)(x + 2)

Let's look back.

First: split the fraction.

Then: clear the bottoms.

Then: find A and B.

Then: integrate.

Last: check.

Answer
= 43ln|x − 1| + 53ln|x + 2| + C

▶ Watch it solved

Integrate ∫ (4x + 2)/(x^2 - 2x - 3) dx Harder

The question

Question: find the integral of (4x + 2), all over x² − 2x − 3.

∫ 4x + 2x2 − 2x − 3 dx =

1 Factor the bottom

First factor the bottom.

We need two numbers that multiply to −3 and add to −2: 1 and −3.

x2 − 2x − 3 = (x + 1)(x − 3)
1 × (−3) = −3, 1 + (−3) = −2

2 Split the fraction

Two simple fractions can add up to this one: A over (x + 1), plus B over (x − 3).

We find the numbers A and B.

4x + 2(x + 1)(x − 3) = A(x + 1) + B(x − 3)

Careful!

ln of the bottom works only when the top is the bottom's derivative.

Here it is not, so we split.

Careful: not ∫ 4x + 2x2 − 2x − 3 dx = ln|x2 − 2x − 3| ✗

3 Clear the bottoms

Multiply both sides by (x + 1)(x − 3).

On the left the bottom goes.

On the right each fraction keeps the other bracket.

4x + 2 = A(x − 3) + B(x + 1)

4 Find A and B

Put in x = −1: it makes (x + 1) zero, so the B part is gone.

x = −1: −2 = A(−4) + B(0)

Divide by −4: A = 1/2.

A = −2−4 = 12

Put in x = 3: it makes (x − 3) zero, so the A part is gone.

x = 3: 14 = B(4) + A(0)

Divide by 4: B = 7/2.

B = 144 = 72

5 Integrate

Now the integral is two easy pieces.

∫ 4x + 2(x + 1)(x − 3) dx = ∫ (12(x + 1) + 72(x − 3)) dx

One over x minus a number integrates to ln of it, like 1 over x.

∫ 1x − p dx = ln|x − p| + C

So the answer is 1/2 × ln|x + 1| + 7/2 × ln|x − 3| + C.

= 12ln|x + 1| + 72ln|x − 3| + C

6 Check

Let's check: add the two fractions back over one bottom, (x + 1)(x − 3).

12(x + 1) + 72(x − 3) = 12(x − 3) + 72(x + 1)(x + 1)(x − 3)

Open the brackets and add: the top is 4x + 2 again.

Right!

= 4x + 2(x + 1)(x − 3)

Let's look back.

First: factor the bottom.

Then: split the fraction.

Then: clear the bottoms.

Then: find A and B.

Then: integrate.

Last: check.

Answer
= 12ln|x + 1| + 72ln|x − 3| + C

▶ Watch it solved

Practice

Try each one, then open the answer. Stuck? Open the problem to watch every step.

Easy

  1. ∫ 1/(x^2 - 1) dx
    Answer
    = −12ln|x + 1| + 12ln|x − 1| + C
  2. ∫ 2/((x - 1)(x + 1)) dx
    Answer
    = ln|x − 1| − ln|x + 1| + C
  3. ∫ 3/((x - 2)(x + 1)) dx
    Answer
    = ln|x − 2| − ln|x + 1| + C
  4. ∫ 4/(x^2 - 4) dx
    Answer
    = −ln|x + 2| + ln|x − 2| + C
  5. ∫ 5/(x^2 + x - 6) dx
    Answer
    = −ln|x + 3| + ln|x − 2| + C
  6. ∫ 1/(x^2 + 3x + 2) dx
    Answer
    = −ln|x + 2| + ln|x + 1| + C
  7. ∫ 6/(x^2 - 9) dx
    Answer
    = −ln|x + 3| + ln|x − 3| + C
  8. ∫ 2/(x^2 + 2x) dx
    Answer
    = −ln|x + 2| + ln|x| + C

Medium

  1. ∫ (3x + 1)/((x - 1)(x + 2)) dx
    Answer
    = 43ln|x − 1| + 53ln|x + 2| + C
  2. ∫ (x + 7)/(x^2 - x - 6) dx
    Answer
    = −ln|x + 2| + 2ln|x − 3| + C
  3. ∫ (2x + 5)/(x^2 + 3x + 2) dx
    Answer
    = −ln|x + 2| + 3ln|x + 1| + C
  4. ∫ (5x - 1)/(x^2 - 1) dx
    Answer
    = 3ln|x + 1| + 2ln|x − 1| + C
  5. ∫ (x + 5)/(x^2 + x - 2) dx
    Answer
    = −ln|x + 2| + 2ln|x − 1| + C
  6. ∫ x/((x - 2)(x - 4)) dx
    Answer
    = −ln|x − 2| + 2ln|x − 4| + C
  7. ∫ from 2 to 4 of 1/(x^2 - 1) dx
    Answer
    = 12ln 95 ≈ 0.294

Harder

  1. ∫ (4x + 2)/(x^2 - 2x - 3) dx
    Answer
    = 12ln|x + 1| + 72ln|x − 3| + C
  2. ∫ (x - 9)/(x^2 + 2x - 3) dx
    Answer
    = 3ln|x + 3| − 2ln|x − 1| + C
  3. ∫ from 3 to 5 of 2/(x^2 - 4) dx
    Answer
    = 12ln 157 ≈ 0.381
  4. ∫ from 1 to 2 of 3/(x^2 + 3x) dx
    Answer
    = ln 85 ≈ 0.470
  5. ∫ (7x - 2)/(x^2 - x - 2) dx
    Answer
    = 3ln|x + 1| + 4ln|x − 2| + C