Steply

Integrate ∫ ln x dx

Step by step, with the reason for every step · Integration by parts · Calculus 2

Step by step

The question

Question: find the integral of ln x.

∫ ln x dx =

1 Choose u and dv

Choose u = ln x: its derivative, 1/x, is simpler.

We do not know how to integrate ln x yet.

So dv is the rest.

u = ln x, dv = 1 dx

2 Find du and v

The derivative of ln x is 1 over x.

And v is the integral of dv: x, by the power rule.

du = 1x dx, v = x

3 Use the rule

The rule: the integral of u dv is u v, minus the integral of v du.

It comes from the product rule, backwards.

∫ u dv = uv − ∫ v du

u times v, minus the integral of v times du.

= x ln x − ∫ 1 dx

4 The new integral

The new integral is easy: the power rule.

= x ln x − x

Careful!

It is u v minus the integral of v du.

Not plus!

Careful: not uv + ∫ v du ✗

Open the bracket: a minus in front of a bracket changes the sign of every part inside.

Add C.

So the answer is x ln x − x + C.

= x ln x − x + C

5 Check

Let's check: take the derivative of our answer.

The product rule on each term: the first's slope times the second, plus the first times the second's slope.

derivative: ln x + 1 − 1

The other terms cancel, and we get ln x: the question again.

Right!

= ln x

Let's look back.

First: choose u and dv.

Then: find du and v.

Then: use the rule.

Then: the new integral.

Last: check.

Answer
= x ln x − x + C

Your turn

Try this one yourself, then check:

Find the integral of ∫ 3 ln x dx
Show the answer
3x ln x − 3x + C

More from Integration by parts

The whole lesson: Integration by parts →