# Derivative of ln x: Formula, Proof and Examples

> The derivative of ln x is 1/x. See why, with a proof from eʸ = x, the chain rule version for ln(u), a graph and worked examples like ln(2x) and ln(x²+1).

Source: https://practicecalculus.com/derivatives/ln-x
Updated: 2026-11-06

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

## At a glance

- **Derivative:** $\dfrac{1}{x}$ for $x > 0$
- **Chain rule form:** $\dfrac{d}{dx}\ln u = \dfrac{u'}{u}$
- **Absolute value form:** $\dfrac{d}{dx}\ln\lvert x\rvert = \dfrac{1}{x}$ for $x \ne 0$
- **Domain of ln x:** $x > 0$
- **Integral version:** $\int \frac{1}{x}\,dx = \ln\lvert x\rvert + C$

## Key takeaways

- The derivative of $\ln x$ is $\frac{1}{x}$.
- With the chain rule, the derivative of $\ln u$ is $\frac{u'}{u}$: the derivative of the inside over the inside.
- Constant multiples inside the log disappear: $\frac{d}{dx}\ln(5x) = \frac{1}{x}$, because $\ln 5x = \ln 5 + \ln x$.
- The same formula holds for $\ln\lvert x\rvert$, which is why $\int \frac{1}{x}\,dx = \ln\lvert x\rvert + C$.

The **derivative of $\ln x$ is $\dfrac{1}{x}$**. It is one of the most used results in calculus, and it fills a gap the power rule leaves: no power of $x$ has $\frac{1}{x}$ as its derivative, but the natural log does.

$$\frac{d}{dx}\,\ln x = \frac{1}{x}, \qquad x > 0$$

## Graph of ln x and its derivative

```graph
title: 'Graph of y = ln x and its derivative y = 1/x'
caption: 'The slope of $\ln x$ is large near $x = 0$ and shrinks as $x$ grows. At $x = 1$ the slope is exactly $1$, matching $\frac{1}{1} = 1$.'
x: [-0.5, 6]
y: [-3, 4]
functions:
  - expr: ln(x)
    label: y = ln x
    domain: [0.02, 6]
  - expr: 1/x
    label: y = 1/x (derivative)
    dashed: true
    domain: [0.2, 6]
points:
  - [1, 0, '(1, 0)']
  - [1, 1, 'slope 1']
```

Since $\frac{1}{x}$ is always positive for $x > 0$, the natural log is always increasing. And since $\frac{1}{x}$ gets smaller as $x$ grows, $\ln x$ climbs more and more slowly, which is why it is concave down.

## Proof that the derivative of ln x is 1/x

Let $y = \ln x$. By the definition of the natural log, this means

$$e^y = x$$

Differentiate both sides with respect to $x$, using [implicit differentiation](/rules/implicit-differentiation) on the left:

$$e^y \cdot \frac{dy}{dx} = 1 \quad\Longrightarrow\quad \frac{dy}{dx} = \frac{1}{e^y} = \frac{1}{x}$$

The last step uses $e^y = x$ again. The proof relies on the derivative of $e^x$ being $e^x$, which you can read about on the [derivative of eˣ](/derivatives/e-to-the-x) page.

## The chain rule version: derivative of ln(u)

Most logs you meet have something other than plain $x$ inside. With the [chain rule](/rules/chain-rule):

$$\frac{d}{dx}\,\ln u = \frac{1}{u}\cdot u' = \frac{u'}{u}$$

In words: **the derivative of the inside, over the inside**.

| Function | Inside $u$ | Derivative $\frac{u'}{u}$ |
| --- | --- | --- |
| $\ln(2x)$ | $2x$ | $\frac{2}{2x} = \frac{1}{x}$ |
| $\ln(x^2 + 1)$ | $x^2 + 1$ | $\frac{2x}{x^2 + 1}$ |
| $\ln(\sin x)$ | $\sin x$ | $\frac{\cos x}{\sin x} = \cot x$ |
| $\ln(e^x + 3)$ | $e^x + 3$ | $\frac{e^x}{e^x + 3}$ |
| $\ln(\ln x)$ | $\ln x$ | $\frac{1}{x\ln x}$ |

## Worked examples

**Example 1: a product.** Differentiate $f(x) = x^3 \ln x$ with the [product rule](/rules/product-rule):

$$f'(x) = 3x^2 \ln x + x^3 \cdot \frac{1}{x} = 3x^2\ln x + x^2$$

**Example 2: simplify first.** Differentiate $g(x) = \ln\!\left(\dfrac{x^4}{x + 1}\right)$. Log rules turn the quotient into a difference:

$$g(x) = 4\ln x - \ln(x + 1) \quad\Longrightarrow\quad g'(x) = \frac{4}{x} - \frac{1}{x + 1}$$

This is much faster than using the quotient rule inside the chain rule. Splitting logs before differentiating is the idea behind [logarithmic differentiation](/rules/logarithmic-differentiation).

**Example 3: a tangent line.** The tangent to $y = \ln x$ at $x = e$ has slope $\frac{1}{e}$ and passes through $(e, 1)$:

$$y - 1 = \frac{1}{e}(x - e) \quad\Longrightarrow\quad y = \frac{x}{e}$$

This line passes through the origin.

## Common mistakes

1. **Writing $\frac{1}{u}$ and stopping.** $\frac{d}{dx}\ln(x^2 + 1)$ is not $\frac{1}{x^2+1}$. Multiply by the inside derivative $2x$.
2. **Treating $\ln(x^2)$ and $(\ln x)^2$ as the same.** $\frac{d}{dx}\ln(x^2) = \frac{2}{x}$, but $\frac{d}{dx}(\ln x)^2 = \frac{2\ln x}{x}$.
3. **Using $\frac{1}{x}$ for other bases.** $\frac{d}{dx}\log_{10} x$ needs the extra factor $\frac{1}{\ln 10}$. See the [derivative of log x](/derivatives/log-x).
4. **Forgetting the domain.** $\ln x$ only exists for $x > 0$. For negative inputs use $\ln\lvert x\rvert$, which has the same derivative $\frac{1}{x}$.

For more on logs and exponentials together, read [derivatives of exponential and logarithmic functions](/blog/derivatives-of-exponential-and-logarithmic-functions), or see the [natural logarithm](/functions/natural-logarithm) function page.

## Frequently asked questions

### What is the derivative of ln x?

The derivative of $\ln x$ is $\frac{1}{x}$, for every $x > 0$.

### What is the derivative of ln(2x)?

It is $\frac{1}{x}$. By the chain rule, $\frac{d}{dx}\ln(2x) = \frac{2}{2x} = \frac{1}{x}$. You can also see it from $\ln(2x) = \ln 2 + \ln x$, where $\ln 2$ is a constant.

### What is the derivative of ln(x²)?

It is $\frac{2x}{x^2} = \frac{2}{x}$. You can also rewrite $\ln(x^2) = 2\ln x$ first and get $\frac{2}{x}$ directly.

### Is the derivative of ln x the same as the derivative of log x?

Only for the natural log. For a base-10 log, $\frac{d}{dx}\log_{10} x = \frac{1}{x\ln 10}$. In general $\frac{d}{dx}\log_b x = \frac{1}{x\ln b}$.
