Skip to content

Integrating ln x: By Parts, Checks and Worked Examples

Integrating ln x by parts
Calculus7 min readExplorer to Challenger

Integrating ln x gives x ln x − x + C. No simple rule gives it, so use integration by parts. Write ln x as ln x × 1, and let u = ln x and dv = dx. Then differentiate the answer to check it.

Hidden times 1, then by parts.

∫ ln x dx = x ln x − x + C

The shaded area under y = ln x from 1 to e is exactly 1. Example 3 shows why.
Explorer

Why integrating ln x needs integration by parts

ln x is the natural logarithm: the power you raise e (about 2.718) to, to get x. It only works for x > 0.

Most basic integrals undo a known derivative. The derivative of ln x is 1/x, but no basic rule runs the other way. The power rule needs xⁿ, and ln x is not a power of x.

Integration by parts: ∫ u dv = uv − ∫ v du. ln x is not a product, so make one: ln x × 1. Take u = ln x, because its derivative 1/x is simple. Take dv = dx, so v = x.

Remember this

u = ln x, dv = dx

Explorer

Integrating ln x step by step: 3 worked examples

Example 1: ∫ ln x dx

  1. Let u = ln x, so du = (1/x) dx. Let dv = dx, so v = x.

  2. Use uv − ∫ v du: x ln x − ∫ x × (1/x) dx.

  3. x × (1/x) = 1, and ∫ 1 dx = x.

  4. ∫ ln x dx = x ln x − x + C. You can also write x(ln x − 1) + C.

Example 2: ∫ x ln x dx

  1. Still choose u = ln x. The x goes with dx: dv = x dx, so v = x²/2.

  2. uv − ∫ v du = (x²/2) ln x − ∫ (x²/2)(1/x) dx = (x²/2) ln x − ∫ (x/2) dx.

  3. ∫ x ln x dx = (x²/2) ln x − x²/4 + C.

Rule of thumb: next to a power of x, ln x is still the u.

Example 3: the definite integral from 1 to e

  1. Use Example 1: F(x) = x ln x − x. No + C is needed for a definite integral.

  2. At x = e: e × ln e − e = e × 1 − e = 0.

  3. At x = 1: 1 × ln 1 − 1 = 0 − 1 = −1.

  4. F(e) − F(1) = 0 − (−1) = 1.

ln x is not negative from 1 to e. So this is the shaded area in the picture: 1 square unit.

Explorer

Check it by differentiating, then use the family table

Differentiate x ln x − x. The product rule on x ln x gives ln x + x × (1/x) = ln x + 1. Take away 1, the derivative of x. You get ln x back. Make this 20-second check a habit.

IntegrateAnswer (+ C)How
ln xx ln x − xBy parts, u = ln x
ln(ax), a > 0x ln(ax) − xln(ax) = ln a + ln x
log₁₀ x(x ln x − x) ÷ ln 10log₁₀ x = ln x ÷ ln 10
x ln x(x²/2) ln x − x²/4Example 2
(ln x)²x(ln x)² − 2x ln x + 2xBy parts twice
(ln x) ÷ x(ln x)² ÷ 2Substitution, t = ln x

In the ln(ax) row, ln a only adds a constant, and + C takes it in.

One more case: ∫ ln x dx from 0 to 1 is −1, not “undefined”. ln 0 does not exist, but x ln x gets closer to 0 as x shrinks to 0. The answer is negative: ln x is below the x-axis there.

Explorer

Common mistakes when integrating ln x

  1. Writing 1/x. That is the derivative of ln x, not its integral.
  2. Choosing dv = ln x dx. Then v = ∫ ln x dx, the very thing you want.
  3. Dropping the “− x” or the “+ C”. x ln x alone differentiates to ln x + 1.
  4. A sign slip in uv − ∫ v du. Writing “+ ∫ v du” gives x ln x + x, which is wrong.
  5. Reading log₁₀ as ln. For base 10, divide by ln 10.

Check this with the Free Maths Assessment Test

  • Gives 1/x, the derivative: CNC, concept not clear.
  • Picks u = 1 and dv = ln x dx: CNC, concept not clear.
  • Leaves out “− x” or “+ C”: BPT, bad presentation.
  • Flips the minus in uv − ∫ v du: CMT, calculation mistake.
  • Treats log base 10 as ln: DRC, did not read carefully.

The Free Maths Assessment Test finds which of the 6 mistake types your child makes, and their real maths level. About the Free Maths Assessment Test

BMI = Bureau of Math Investigation

Challenger

Test prep corner

Integrating ln x in JEE Main maths

NTA’s JEE Main 2027 maths topic list covers this in Unit 8, Integral Calculus. It names “logarithmic functions”, integration “by parts”, definite integrals and areas under simple curves. These are JEE-style questions, not real past questions.

JEE-style: Find the area of the region bounded by y = ln x, the x-axis and the line x = e².

The curve meets the x-axis at x = 1. [x ln x − x] from 1 to e² is (2e² − e²) − (−1) = e² + 1, about 8.39. Trap: starting at x = 0, where the curve is below the axis.

JEE-style: Evaluate ∫ (ln x)² dx from x = 1 to x = e.

Use the table: x(ln x)² − 2x ln x + 2x. At e: e − 2e + 2e = e. At 1: 0 − 0 + 2 = 2. The answer is e − 2, about 0.718. Trap: forgetting that the lower limit gives 2, not 0.

Ten more, across units, in our JEE-style maths questions with answers.

Facts checked on 12 November 2026 on jeemain.nta.nic.in.

Explorer

Quick check: 5 questions on integrating ln x

1. In ∫ ln x dx by parts, what should u be?

Not quite. Then you must integrate ln x to find v.

Yes! Its derivative, 1/x, is easy to use.

Not quite. x is v, after you integrate dx.

2. What is the derivative of x ln x?

Yes! Product rule: ln x + x × (1/x).

Not quite. Use the product rule on x times ln x.

Not quite. That is why the answer needs “− x”.

3. What is ∫ ln(3x) dx?

Not quite. Differentiate it: you get 3 ln(3x).

Not quite. That mixes up integrating and differentiating.

Yes! ln(3x) = ln 3 + ln x, and ln 3 goes into C.

4. What is ∫ ln x dx from 1 to 2?

Yes! (2 ln 2 − 2) − (0 − 1), about 0.386.

Not quite. At x = 1 the value is −1, not 0. Take it away.

Not quite. That is ln x at x = 2, not the area.

5. Which method finds ∫ (ln x)/x dx fastest?

Not quite. That is for (ln x)².

Yes! dt = dx/x, so you get ∫ t dt = (ln x)²/2 + C.

Not quite. ln x is not a power of x.

Got 2 or fewer right? Book the Free Maths Assessment Test to find the cause.

Questions people ask about integrating ln x

What is the integral of ln x?

∫ ln x dx = x ln x − x + C, for x > 0. You can also write it as x(ln x − 1) + C.

Why do we use integration by parts for ln x?

No basic rule has ln x as a derivative. Writing ln x × 1 makes a product, and with u = ln x the new integral is just ∫ 1 dx.

How do I check my answer?

Differentiate it. If you do not get back ln x, look for a lost “− x” or a sign slip.

What is the integral of ln x from 1 to e?

It is 1. At e, x ln x − x is 0. At 1, it is −1. So the answer is 0 − (−1) = 1.

Is integrating ln x in JEE Main?

Yes. NTA’s 2027 maths topic list names logarithmic functions and integration by parts in Unit 8, Integral Calculus.

Is the “− x” still going missing?

The Free Maths Assessment Test finds your child’s real maths level and the reason for each mistake.

BMI = Bureau of Math Investigation

Written by Himanshu Jain

B.Tech, IIT Delhi. Founder of Math Quotient.

WhatsApp us