practicecalculus
Exponential and logarithmic functions

Natural Logarithm ln(x): Graph, Rules, Derivative and Integral

The natural logarithm ln x: its graph, log rules, why its derivative is 1/x, the integral x ln x - x + C, and worked calculus examples.

Exponential and logarithmic functions Updated 3 min read

At a glance

f(x) = \ln x
Domain
(0, \infty)
Range
(-\infty, \infty)
Derivative
\frac{1}{x}
Integral
x\ln x - x + C
Key values
\ln 1 = 0, \ln e = 1
Inverse
e^x
Asymptote
x = 0
On this page
  1. Definition and formula
  2. Graph of ln x
  3. Key properties
  4. Log rules
  5. Derivative of ln x
  6. Integral of ln x
  7. Worked examples
  8. Common mistakes
  9. How it connects

The natural logarithm \ln x answers the question "what power of e gives x?". It is the inverse of the natural exponential function, and its derivative is the remarkably simple \frac{1}{x}, which makes it the logarithm of choice in calculus.

Definition and formula

\ln x = y \iff e^y = x, \qquad x > 0

Equivalently, \ln x is the area under the reciprocal function from 1 to x:

\ln x = \int_1^x \frac{1}{t}\,dt

Graph of ln x

Graph of y = ln(x) and its inverse y = eˣ
The natural log is the reflection of e^x across the line y = x. It crosses the x-axis at (1, 0) and has a vertical asymptote at x = 0.

Key properties

  • Domain (0, \infty), range all reals.
  • Key values: \ln 1 = 0, \ln e = 1, \ln e^k = k.
  • Increasing everywhere (\frac{1}{x} > 0) and concave down (-\frac{1}{x^2} < 0).
  • Vertical asymptote x = 0: \lim_{x \to 0^+}\ln x = -\infty. Also \lim_{x \to \infty}\ln x = \infty, but very slowly; \ln x grows slower than any positive power of x.
  • Inverse identities: e^{\ln x} = x for x > 0 and \ln e^x = x for all x.

Log rules

Rule Formula
Product \ln(ab) = \ln a + \ln b
Quotient \ln\frac{a}{b} = \ln a - \ln b
Power \ln(a^k) = k\ln a
Change of base \log_b x = \frac{\ln x}{\ln b}

These hold for a, b > 0. There is no rule for \ln(a + b).

Derivative of ln x

\frac{d}{dx}\ln x = \frac{1}{x}

Proof sketch: if y = \ln x then e^y = x. Differentiating implicitly gives e^y y' = 1, so y' = \frac{1}{e^y} = \frac{1}{x}. With the chain rule:

\frac{d}{dx}\ln g(x) = \frac{g'(x)}{g(x)}

Integral of ln x

Using integration by parts with u = \ln x, dv = dx, so du = \frac{1}{x}\,dx and v = x:

\int \ln x\,dx = x\ln x - \int x \cdot \frac{1}{x}\,dx = x\ln x - x + C

The reverse direction is the more common one: \int \frac{1}{x}\,dx = \ln|x| + C.

Worked examples

Example 1: chain rule. \frac{d}{dx}\ln(x^2 + 1) = \frac{2x}{x^2 + 1}.

Example 2: simplify first. \frac{d}{dx}\ln\frac{x^3}{x + 1} = \frac{d}{dx}\left[3\ln x - \ln(x + 1)\right] = \frac{3}{x} - \frac{1}{x + 1}.

Example 3: product rule. \frac{d}{dx}(x^2\ln x) = 2x\ln x + x.

Example 4: definite integral. \int_1^e \ln x\,dx = \left[x\ln x - x\right]_1^e = (e - e) - (0 - 1) = 1.

Example 5: logarithmic integral. With u = x^2 + 4, \int \frac{2x}{x^2 + 4}\,dx = \ln(x^2 + 4) + C. No absolute value is needed since x^2 + 4 > 0.

Common mistakes

  1. Splitting a log of a sum. \ln(x + 1) \ne \ln x + \ln 1.
  2. Writing \frac{d}{dx}\ln(5x) = \frac{1}{5x}. The chain rule gives \frac{5}{5x} = \frac{1}{x}.
  3. Writing \int \ln x\,dx = \frac{1}{x} + C. That is the derivative, not the integral.
  4. Confusing \ln x^2 with (\ln x)^2. The first is 2\ln x; the second is a square.
  5. Taking \ln of 0 or a negative number. Check the domain, especially after a substitution.

How it connects

Taking \ln of both sides turns hard products and powers into sums, the idea behind logarithmic differentiation. Logs with other bases are just rescaled natural logs; see logarithmic functions. For more worked practice, read the guide to derivatives of exponential and logarithmic functions.

Practice it now

Exponentials and logarithms

Solve real problems on this topic with instant feedback, hints and a step-by-step walkthrough for every answer. Free, no sign-up needed to start.

Practice this lesson

Frequently asked questions

What is the derivative of ln x?

The derivative of \ln x is \frac{1}{x} for x > 0. More generally, \frac{d}{dx}\ln|x| = \frac{1}{x} for every x \ne 0.

What is the integral of ln x?

Use integration by parts with u = \ln x and dv = dx: \int \ln x\,dx = x\ln x - x + C.

What is the difference between ln and log?

\ln x is the logarithm with base e \approx 2.718. In most calculus books \log x means base 10, though some advanced texts use \log for base e as well.

What is the derivative of ln(2x)?

By the chain rule, \frac{d}{dx}\ln(2x) = \frac{2}{2x} = \frac{1}{x}. Equivalently, \ln(2x) = \ln 2 + \ln x, and the constant \ln 2 has derivative 0.

Why is ln of a negative number undefined?

Because e^y is positive for every real y, no real power of e equals a negative number or zero. So \ln x is only defined for x > 0.

Written by the PracticeCalculus team

We build interactive calculus lessons and write every page to be clear and correct. Spotted something off? Tell us and we will fix it.