Steply

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

Step by step, with the reason for every step · Partial fractions · Calculus 2

Step by step

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

Your turn

Try this one yourself, then check:

∫ 3x + 1(x − 3)(x + 2) dx
Show the answer
2ln|x − 3| + ln|x + 2| + C

More from Partial fractions

The whole lesson: Partial fractions →