Integral of 1/x Equation Solver with Worked Examples

The integral of is . Type “integrate 1/x” and the solver integrates it.

Write 2x or 2*x to multiply, ^ for powers, and ; between simultaneous equations. You can also type factor, expand, derivative of, integrate … from a to b, limit … as x->0 or 15% of 80.

Try an example

Before you start

This page is easier if you are comfortable with:

What Integral of 1/x means

The power rule fails for , because it would divide by 0. Instead, since , the integral is .

The modulus sign makes the result valid for negative too: .

For , the answer is . It is the missing case of the integral of a power, reverses the derivative of ln x, and extends to the integral of f dash over f.

This page is part of Integration in Calculus. Topics that work alongside it: Derivative of ln x, Integral of f′(x)/f(x), Integral of a power, Integral of e^{kx}, Integral of sec² kx, Integral of sin kx and cos kx and Area between two curves.

What is it used for?

The integral of 1/x is ln|x| + c. It is the one power of x that the power rule cannot handle.

How to use integral of 1/x

  1. Recognise or .
  2. Write .
  3. Divide by if there is a coefficient.
  4. Add .

Graph

Area under y = 1/x from 1 to e00.511.522.533.5400.511.522.53Area under y = 1/x from 1 to exyGraph with x from -0.3 to 4 and y from -0.3 to 3. Shows the curve y = 1/x; a shaded region.

The shaded area is ln e − ln 1 = 1. This is how e can be defined: the point where the area under 1/x reaches 1.

Worked examples

The examples marked with a button were worked out by the solver on this page. You can try each one yourself.

Example 1: integrate 1/x

Find .

Indefinite integral
Answer
ln⁡∣x∣+C\ln\left|x\right| + C
  1. Integrate with respect to
  2. Add the constant of integration
  3. Why the modulus signs
    The function 1/x is defined for negative x too, so the answer uses |x|. Without the modulus signs the answer would only hold for x > 0.

Example 2: integrate 1/(2x+1)

Find .

Indefinite integral
Answer
ln⁡(2x+1)2+C\frac{\ln\left(2 x+1\right)}{2} + C
  1. Integrate with respect to
  2. Add the constant of integration

Example 3: a multiple

Integrate 3/x.

Indefinite integral
Answer
3ln⁡∣x∣+C3 \ln\left|x\right| + C
  1. Integrate with respect to
  2. Add the constant of integration
  3. Why the modulus signs
    The function 1/x is defined for negative x too, so the answer uses |x|. Without the modulus signs the answer would only hold for x > 0.

Special cases

A few situations come up again and again. Knowing them saves time and helps you spot answers that cannot be right.

∫1/x dx

= ln|x| + c

The missing case of the power rule.

∫1/(2x + 1) dx

= ½ ln|2x + 1| + c

Divide by the inner derivative.

With a coefficient

∫3/x dx from 1 to 4 = 3 ln 4 ≈ 4.16

Constants come out.

Negative x

ln|x| uses the modulus

x can be negative.

Word problems

∫1/x dx = ln|x| + c, and ∫1/(ax + b) dx = (1/a) ln|ax + b| + c.

From 1 to 2

Evaluate ∫ from 1 to 2 of 1/x dx to 4 decimal places.

  1. Antiderivativeln x
  2. Limitsln 2 − ln 1
  3. Check: 0.6931 ✓0.6931.

A linear inside

Evaluate ∫ from 0 to 2 of 1/(2x + 1) dx to 4 decimal places.

  1. Antiderivative½ ln(2x + 1)
  2. Limits½ ln 5 − 0
  3. Check: 0.8047 ✓0.8047.

With a coefficient Higher

Evaluate ∫ from 1 to 4 of 3/x dx to 2 decimal places.

  1. Antiderivative3 ln x
  2. Limits3 ln 4
  3. Check: 4.16 ✓4.16.

Area Higher

Find the area under y = 1/x from x = 1 to x = 5 to 2 decimal places.

  1. Integralln 5
  2. Check: 1.61 ✓1.61.

Common mistakes

Using the power rule

∫x⁻¹ dx = x⁰/0 ✗

ln|x| + c ✓

The power rule fails for n = −1.

Forgetting to divide by a

∫1/(2x + 1) dx = ln(2x + 1) ✗

½ ln(2x + 1) ✓

Divide by the coefficient of x.

Dropping the modulus

ln x for negative x ✗

ln|x| ✓

ln of a negative is undefined.

Forgetting + c

no constant ✗

+ c ✓

Indefinite integrals need it.

Exam tips

  1. ∫1/x = ln|x|.
  2. Divide by a for 1/(ax + b).
  3. Use the modulus.
  4. + c for indefinite.
  5. Limits: F(b) − F(a).

Practice questions

Try each one on paper, then open the answer. Use the solver above to see the full working.

1. Evaluate ∫ from 1 to 3 of 1/x dx to 2 decimal places Foundation

1.10

2. Evaluate ∫ from 1 to 10 of 1/x dx to 2 decimal places Foundation

2.30

3. Evaluate ∫ from 1 to 2 of 4/x dx to 2 decimal places Foundation

2.77

4. Evaluate ∫ from 0 to 1 of 1/(x + 1) dx to 4 decimal places Higher

0.6931

5. Evaluate ∫ from 0 to 1 of 2/(2x + 1) dx to 4 decimal places Higher

1.0986

6. Evaluate ∫ from 1 to 2 of 1/(3x) dx to 4 decimal places Higher

0.2310

Practice generator

Unlimited fresh questions with instant marking. Choose a level, work it out on paper, then type your answer.

Solve: …

Key terms

Natural logarithm
ln, base e.
Reciprocal
1/x.
Modulus
The size without sign.
Antiderivative
F with F′ = f.
Definite integral
Has limits.
Constant of integration
c.

Frequently asked questions

What is the integral of 1/x?

ln|x| + c.

What is the integral of 1/(ax + b)?

(1/a) ln|ax + b| + c.

Why does the power rule fail?

It would divide by zero.

Why the modulus?

x may be negative.

Which page covers the derivative?

derivative of ln x.

Which page covers integrating powers?

integral of a power.

More in Calculus and the formula sheets.