calculus · worked example

Solve ∫ 1/x dx

Method: logarithm antiderivative. Verified step-by-step solution with our free AI math solver.
Problem

1xdx\int \frac{1}{x} \, dx

Step-by-step solution

  1. The power rule for integration xndx=xn+1n+1\int x^n \, dx = \frac{x^{n+1}}{n+1} fails when n=1n = -1 (would divide by zero).

  2. Use the special antiderivative: ddxlnx=1x\frac{d}{dx}\ln|x| = \frac{1}{x}.

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

  4. The absolute value ensures the result is valid for negative xx too (where ln(x)\ln(x) would be undefined in reals).

Answer

lnx+C\ln|x| + C

Want to solve a different problem? Open the integral solver →

Related worked examples

  • /solve/calculus/integral-of-x2-dx
  • /solve/calculus/integral-of-cos-x-dx