Skip to content
LoveToCalc

Theorem — what does that mean?

Antiderivative of 1/x

∫ 1/x dx = ln|x| + C. It is the exception to the power rule, and the absolute value is what makes it hold for negative x.

In Swedish: Primitiv funktion till 1/x

∫1xdx=ln(|x|)+C

x
The variable, any number except 0
C
The constant of integration

What the formula says

∫ 1/x dx = ln|x| + C, x ≠ 0

An antiderivative of 1/x is ln|x|, the natural logarithm of the absolute value of x, and C is the constant of integration. The rule is a theorem: it is the derivative of ln x read backwards, with bars added so that it covers negative x too.

Example. ∫₁^e 1/x dx = ln e − ln 1 = 1 − 0 = 1.

Why the power rule stops here

1/x is x⁻¹, and the power rule for antiderivatives says: add one to the exponent and divide by the new exponent. Here that gives x⁰/0 — division by zero. No power of x has the derivative 1/x. The logarithm is the function that fills the gap.

Why the absolute value

1/x is defined for negative x, but ln x is not. ln|x| is: for x > 0 it is ln x, and for x < 0 it is ln(−x), whose derivative by the chain rule is (−1)/(−x) = 1/x. So ln|x| is an antiderivative on both sides of 0, and ln x only on one.

A second example, left of 0. The integral of 1/x from −3 to −1 is ln|−1| − ln|−3| = 0 − ln 3 = −ln 3 ≈ −1.10. The answer is negative, as it should be — 1/x is negative on the whole interval. Without the bars the same calculation reads ln(−1) − ln(−3), which has no value at all.

Never across 0

The integral of 1/x from −1 to 1 is not ln 1 − ln 1 = 0. 1/x has no value at 0 and is unbounded on both sides of it, so the integral does not exist. ln|x| + C is an antiderivative on (−∞, 0) and on (0, ∞) separately, and a definite integral can only use it inside one of them.

A few more

∫ antiderivative
1/x ln|x| + C
5/x 5 ln|x| + C
1/(2x + 1) ln|2x + 1|/2 + C
x⁻² −1/x + C (the power rule works here)

Common mistakes

Common questions

Why is ∫ 1/x dx not x⁰/0? The power rule divides by n + 1, which is 0 when n = −1. The rule does not hold there, and the logarithm takes over.

Is ln x + C wrong? Not if x is known to be positive — many books write ln x when the problem only concerns x > 0. ln|x| is the form that is true everywhere 1/x is defined.

Last reviewed October 6, 2026 ·How pages are reviewed

Calculate it in practice

CalculusAll formulas