The antiderivative of the natural logarithm is not another logarithm — it requires integration by parts, even though there is only one function in the integrand.
Result
\[ \int \ln(x)\,dx = x\ln(x) - x + C \]
Derivation
There is only one function, so set \(u = \ln(x)\) and \(dv = dx\). Then \(du = \tfrac{1}{x}\,dx\) and \(v = x\).
Apply the integration by parts formula \(\int u\,dv = uv - \int v\,du\):
\[ \int \ln(x)\,dx = x\ln(x) - \int x \cdot \frac{1}{x}\,dx = x\ln(x) - \int 1\,dx = x\ln(x) - x + C \]Verification: \(\dfrac{d}{dx}[x\ln(x) - x] = \ln(x) + 1 - 1 = \ln(x)\) ✓
Definite integral examples
\(\int_1^e \ln(x)\,dx\)
\[ \Big[x\ln(x) - x\Big]_1^e = (e \cdot 1 - e) - (1 \cdot 0 - 1) = 0 + 1 = 1 \]\(\int_1^{e^2} \ln(x)\,dx\)
\[ \Big[x\ln(x) - x\Big]_1^{e^2} = (e^2 \cdot 2 - e^2) - (0 - 1) = e^2 + 1 \approx 8.389 \]Common variants
| Integral | Antiderivative | Notes |
|---|---|---|
| \(\int \ln(ax)\,dx\) | \(x\ln(ax) - x + C\) | Same result since \(\ln(ax) = \ln a + \ln x\) and the constant integrates away. |
| \(\int x\ln(x)\,dx\) | \(\dfrac{x^2 \ln(x)}{2} - \dfrac{x^2}{4} + C\) | Integration by parts with u = ln(x). |
| \(\int \ln^2(x)\,dx\) | \(x\ln^2(x) - 2x\ln(x) + 2x + C\) | Integration by parts applied twice. |
Try it in the calculator
Paste any variant below into the step-by-step integral calculator for a full worked solution and graph.
Open in calculator →