Integral of ln x
The integral of ln x is x ln x − x + C. It is the classic use of integration by parts, where the second factor is simply 1.
How to integrate ln x
Method: integration by parts.
- 1Write the integrand as ln x · 1, and choose u = ln x and dv = dx.
- 2Then du = (1/x) dx and v = x.
- 3Integration by parts says ∫u dv = uv − ∫v du.
- 4So ∫ln x dx = x ln x − ∫x · (1/x) dx = x ln x − ∫1 dx.
- 5This gives x ln x − x + C.
- 6Check: the derivative of x ln x − x is ln x + 1 − 1 = ln x.
What it means
ln x is negative between 0 and 1 and positive after that, so the integral falls until x = 1 and rises afterwards. Its minimum, at x = 1, is exactly where ln x crosses the axis.
The integral from 1 to e
Using the antiderivative: F(e) − F(1) = 1, which is about 1. A direct numerical integration of ln x gives 1, which agrees.
Check by differentiating
The derivative of the answer should give back the original function. The last column measures that slope directly from the answer, and it matches.
| x | ln x | Slope of the answer |
|---|---|---|
| 1/2 | −ln 2 | −ln 2 |
| 1 | 0 | −0 |
| 2 | ln 2 | ln 2 |
| e | 1 | 1 |
| 4 | 2ln 2 | 2ln 2 |
Common mistakes
- Writing 1/x, which is the derivative of ln x, not its integral.
- Forgetting the −x term, which comes from the second integral.
- Forgetting the + C.
Frequently asked questions
What is the integral of ln x?
What is the integral of ln x from 1 to e?
Why does integrating ln x need integration by parts?
What is the integral of ln x from 0 to 1?
What is the integral of (ln x)²?
Keep going
It is 1/x.
Defined for x > 0, through (1, 0) and (e, 1).
It is (x ln x − x)/ln 10 + C.
It is 2x ln|x| − 2x + C.
It is x² ln x/2 − x²/4 + C.
Every standard integral and technique, with examples.
Type your own function into the integral calculator for the steps, the answer and a graph.