Steply

Integrate ∫ 2/(x^2 + 2x) dx

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

Step by step

The question

Question: find the integral of 2, all over x² + 2x.

∫ 2x2 + 2x dx =

1 Factor the bottom

First factor the bottom.

We need two numbers that multiply to 0 and add to 2: 2 and 0.

x2 + 2x = (x + 2)x
2 × 0 = 0, 2 + 0 = 2

2 Split the fraction

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

We find the numbers A and B.

2(x + 2)x = A(x + 2) + Bx

Careful!

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

Here it is not, so we split.

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

3 Clear the bottoms

Multiply both sides by (x + 2)x.

On the left the bottom goes.

On the right each fraction keeps the other bracket.

2 = Ax + B(x + 2)

4 Find A and B

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

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

Divide by −2: A = −1.

A = 2−2 = −1

Put in x = 0: it makes x zero, so the A part is gone.

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

Divide by 2: B = 1.

B = 22 = 1

5 Integrate

Now the integral is two easy pieces.

∫ 2(x + 2)x dx = ∫ (−1(x + 2) + 1x) 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 −ln|x + 2| + ln|x| + C.

= −ln|x + 2| + ln|x| + C

6 Check

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

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

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

Right!

= 2(x + 2)x

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
= −ln|x + 2| + ln|x| + C

Your turn

Try this one yourself, then check:

∫ 4x2 + 2x dx
Show the answer
−2ln|x + 2| + 2ln|x| + C

More from Partial fractions

The whole lesson: Partial fractions →