AP Calculus AB and BC
Integral of 1/x: Answer, Proof, and Mistakes
The integral of 1/x is ln|x| + C. The absolute value is not optional: 1/x is defined for every x except 0, and ln|x| is an antiderivative on both sides of 0, while ln x only works for x > 0. Differentiating ln|x| gives 1/x on the negative branch too, since the chain rule contributes a -1 that cancels.
Why the answer carries an absolute value
The power rule for antiderivatives handles every exponent except , because that is the one case where the denominator collapses to 0. So needs its own rule, and that rule comes from running the derivative of the natural log backwards.
Since , the function is an antiderivative of . But exists only for , while is defined for every . An antiderivative has to live on the same domain as the function it undoes, so by itself is too small an answer.
The bars are the fix, not decoration
is defined for every , which is exactly where lives. Writing silently discards the entire negative half of the domain.
Checking both branches
For the absolute value does nothing, since , and the derivative is the familiar one.
For we have , so . The chain rule produces times the inside derivative , and the two negatives cancel.
Both branches return , and that is what lets one expression, , cover the whole domain.
A subtlety AP does not test
The domain comes in two disconnected pieces, so strictly the general antiderivative allows a different constant on each: for and for . AP work expects the single form, so write .
The chain rule form you will actually use
Most AP appearances of this integral are a -substitution in disguise (Unit 6, Topic 6.9). Whenever the numerator is the derivative of the denominator, the integral is a log.
When the inside is linear, substituting gives , so a factor of comes out front. Forgetting that factor is the most common error on these.
For example, has , so the answer is . Differentiating it gives , which confirms the constant is right.
When the inside is always positive you may drop the bars, because there. That is why is written without absolute value.
Where this shows up on the AP exam
The rule belongs to Unit 6, Topic 6.8 (Finding Antiderivatives and Indefinite Integrals: Basic Rules and Notation), and it returns in Topic 6.9 (Integrating Using Substitution). Unit 6 carries a weighting of 15 to 20 percent on both AB and BC, the largest integration block on either exam.
It also drives separable differential equations in Unit 7. Separating the variables in leaves on the left, so is the step that eventually exponentiates into .
A definite integral that stays on one side of the asymptote behaves normally.
One that crosses does not. On BC this is an improper integral (Topic 6.13), and it diverges.
Mistakes that cost points
- Writing when the domain includes negative . The answer is .
- Applying the power rule to and producing , which is undefined.
- Losing the when the inside is .
- Calling zero by odd symmetry. The integrand is odd, but a symmetry argument needs the integral to converge first, and this one does not.
- Dropping the constant of integration on an indefinite integral.
Every answer on this page is machine checked
An automated test differentiates the antiderivative above and confirms it returns the integrand. A wrong sign or a missing factor fails the build, so it cannot reach you.
Frequently asked questions
Why is the integral of 1/x ln|x| and not ln x?
Because is defined for every , while exists only for . The absolute value extends the antiderivative onto the negative branch, where .
Is the absolute value always required?
Only when the inside can be negative. If it is guaranteed positive, as in , the bars are unnecessary. Keeping them is never wrong, since wherever .
What is the integral of 1/(ax+b)?
. The substitution gives , which is where the comes from. For instance, .
Can you integrate 1/x across x = 0?
No. has a vertical asymptote at , so an integral such as is improper. Split it at 0 and each piece diverges, so the whole integral diverges. Integrals that stay entirely on one side, like , are ordinary definite integrals.
What is the derivative of ln|x|?
for every . That two-sided validity is exactly why , and not , is the antiderivative of .