practicecalculus
Exponential and log derivatives

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).

Exponential and log derivatives Updated 3 min read

At a glance

\frac{d}{dx}\,\ln x = \frac{1}{x}
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
On this page
  1. Graph of ln x and its derivative
  2. Proof that the derivative of ln x is 1/x
  3. The chain rule version: derivative of ln(u)
  4. Worked examples
  5. Common mistakes

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 of y = ln x and its derivative y = 1/x
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.

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 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ˣ page.

The chain rule version: derivative of ln(u)

Most logs you meet have something other than plain x inside. With the 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:

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.

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.
  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, or see the natural logarithm function page.

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 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}.

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.