Integrals: functions and by parts

∫1/x dx = log|x| + C

The integral of 1/x is log|x| + C, the formula for the n=−1 case where the power rule fails.

1xdx=logx+C\int \frac{1}{x}\,dx=\log|x|+C

The power formula for xnx^n fails at n=1n=-1 because the denominator becomes 00. lnx\ln|x| fills that gap.

1xdx=lnx+C\int \frac{1}{x}\,dx=\ln|x|+C

The absolute value is there so the formula also works for negative xx.

Examples

  1. 01Integrate1xdx\displaystyle \int \frac{1}{x} \, dxAnswerHide
    Answerlogex+C\displaystyle \log_e|x| + C
  2. 02Find the value141x2dx\displaystyle \int_{1}^{4} \frac{1}{x^2} \, dxAnswerHide
    Answer34\displaystyle \frac{3}{4}
  3. 03For which n does this formula fail?xndx=xn+1n+1\displaystyle \int x^{n}\,dx = \frac{x^{n+1}}{n+1}AnswerHide
    Answern=1\displaystyle n=-1
  4. 04Find the value351x2dx\displaystyle \int_{3}^{5} \frac{1}{x^2} \, dxAnswerHide
    Answer215\displaystyle \frac{2}{15}
  5. 05Find the value461x2dx\displaystyle \int_{4}^{6} \frac{1}{x^2} \, dxAnswerHide
    Answer112\displaystyle \frac{1}{12}
  6. 06What is this?2xdx\displaystyle \int \frac{2}{x}\,dxAnswerHide
    Answer2logex+C\displaystyle 2\log_e|x|+C

FAQ

Q1Why the absolute value?Show answerHide
A
So that 1x\frac{1}{x} has an antiderivative for x<0x<0 too. Differentiating logx\log|x| gives 1x\frac{1}{x} regardless of the sign of x.

Practice this pattern in the app, 5 problems a day.

Download on the App Store
This topic
∫1/x dx = log|x| + C
Next
Last in this chapter

Published 2026-09-03 · Updated 2026-09-05