Integral of x ln x: Formula, Steps and Examples
The integral of x ln x is (x²/2) ln x − x²/4 + C. See the integration by parts steps with u = ln x, a check, a graph and the xⁿ ln x formula.
Products and integration by parts Updated 3 min read
At a glance
- Antiderivative
- \frac{x^2}{2}\ln x - \frac{x^2}{4} + C
- Method
- Integration by parts with u = \ln x, dv = x\,dx
- From 1 to e
- \frac{e^2 + 1}{4} \approx 2.097
- From 0 to 1
- -\frac{1}{4}
- General power
- \int x^n\ln x\,dx = \frac{x^{n+1}}{n+1}\ln x - \frac{x^{n+1}}{(n+1)^2} + C, n \ne -1
On this page
The integral of x\ln x is \dfrac{x^2}{2}\ln x - \dfrac{x^2}{4} + C. It is a product of a power and a log, so integration by parts is the tool, with the log as u.
Graph of x ln x with the area from 1 to e
How to integrate x ln x step by step
Use integration by parts: \int u\,dv = uv - \int v\,du.
- Choose the parts. u = \ln x and dv = x\,dx. Logs come first in LIATE.
- Find du and v. du = \frac{1}{x}\,dx and v = \frac{x^2}{2}.
- Apply the formula. \int x\ln x\,dx = \frac{x^2}{2}\ln x - \int\frac{x^2}{2}\cdot\frac{1}{x}\,dx = \frac{x^2}{2}\ln x - \frac{1}{2}\int x\,dx
- Finish. \frac{1}{2}\int x\,dx = \frac{x^2}{4}, so \int x\ln x\,dx = \frac{x^2}{2}\ln x - \frac{x^2}{4} + C
The key moment is step 3: the \frac{1}{x} from du cancels one power of x from v, leaving a plain power. That always happens with a log as u.
Check by differentiating
The derivative of x ln x page has the forward calculation.
Definite integrals
From 1 to e:
That is about 2.097.
From 0 to 1: this is improper at 0 because \ln x is undefined there, but x^2\ln x \to 0 as x \to 0^+:
The general power xⁿ ln x
The same steps with dv = x^n\,dx and v = \frac{x^{n+1}}{n+1} give
| Integral | Answer |
|---|---|
| \int\ln x\,dx (n = 0) | x\ln x - x + C |
| \int x^2\ln x\,dx | \frac{x^3}{3}\ln x - \frac{x^3}{9} + C |
| \int\sqrt{x}\ln x\,dx | \frac{2}{3}x^{3/2}\ln x - \frac{4}{9}x^{3/2} + C |
| \int\frac{\ln x}{x^2}\,dx (n = -2) | -\frac{\ln x}{x} - \frac{1}{x} + C |
Worked examples
Example 1: a cube. \int x^3\ln x\,dx = \frac{x^4}{4}\ln x - \frac{x^4}{16} + C, from the general formula with n = 3.
Example 2: a log of a power. \int x\ln(x^2)\,dx. Use \ln(x^2) = 2\ln x for x > 0:
Example 3: the n = −1 case. \int\frac{\ln x}{x}\,dx breaks the formula (it would divide by zero). Use u = \ln x, du = \frac{dx}{x} instead: \int u\,du = \frac{(\ln x)^2}{2} + C.
Example 4: a squared log. \int x(\ln x)^2\,dx. Parts with u = (\ln x)^2, dv = x\,dx gives \frac{x^2}{2}(\ln x)^2 - \int x\ln x\,dx, which you now know:
Common mistakes
- Choosing u = x. Then v needs \int\ln x\,dx, and the leftover integral is harder than the original.
- Forgetting to simplify \frac{x^2}{2}\cdot\frac{1}{x}. It is \frac{x}{2}, and that integrates to \frac{x^2}{4}, not \frac{x^2}{2}.
- Integrating the factors separately. \frac{x^2}{2}(x\ln x - x) is not the answer.
- Using the general formula with n = -1. See Example 3.
Related pages: the integral of ln x, the integral of x eˣ and the integration by parts guide.
Practice it now
Repeated parts and LIATE
Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.
Practice this lesson