Integral of 1/x
Updated 6 November 2026 · Checked numerically by the ihateDesmos engine
The integral of 1/x
∫
1x
dx =ln(|x|)+C
The integral of 1/x is ln|x| + C. It is the one power the power rule can’t handle: with n = −1, the formula would divide by zero.
y=1x
in blue and its integral y=ln(|x|)
(with C = 0) in red. Defined for x ≠ 0.How to integrate 1/x
Method: log rule.
- 1The power rule fails here, because n + 1 = 0 would mean dividing by zero.
- 2For x > 0, we know the derivative of ln x is 1/x, so ln x is an antiderivative.
- 3For x < 0, the chain rule gives d/dx ln(−x) = (−1)/(−x) = 1/x, so ln(−x) works there.
- 4Both cases are covered by ln|x|.
- 5So ∫(1/x) dx = ln|x| + C.
What it means
The area under y = 1/x grows without limit, but very slowly: from 1 to 10 it is about 2.3, and from 1 to 1,000,000 only about 13.8. Each doubling of x adds the same amount, ln 2 ≈ 0.693.
The integral from 1 to e
Using the antiderivative: F(e) − F(1) = 1, which is about 1. A direct numerical integration of 1/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 | 1/x | Slope of the answer |
|---|---|---|
| −3 | −1/3 | −1/3 |
| −1 | −1 | −1 |
| 1/2 | 2 | 2 |
| 1 | 1 | 1 |
| 3 | 1/3 | 1/3 |
Common mistakes
- Using the power rule to get x⁰/0, which is undefined.
- Writing ln x without the absolute value, which fails for negative x.
- Integrating across x = 0, like from −1 to 1. The function blows up there, so the integral diverges.
Frequently asked questions
What is the integral of 1/x?
The integral of 1/x is ln|x| + C, for x ≠ 0.
What is the integral of 1/x from 1 to e?
1, which is about 1.
Why is there an absolute value in ln|x|?
Because 1/x exists for negative x, but ln x doesn’t. ln|x| is defined on both sides of zero and has the right derivative on each.
What is the integral of 1/(2x)?
(1/2) ln|x| + C. The constant 1/2 stays outside.
What is the integral of 1/(ax + b)?
(1/a) ln|ax + b| + C.
Keep going
Integrate any function
Type your own function into the integral calculator for the steps, the answer and a graph.