← MathScape

Derivative of the Natural Logarithm

MATH161
Reference: Stewart 6.4  •  Chapter: 6  •  Section: 4

Navigation: Wiki Home > Skills > Derivative of the Natural Logarithm

Derivative of the Natural Logarithm

Why Does $\ln x$ Have Such a Simple Derivative?

The natural logarithm is the inverse of $e^x$, the one exponential function whose derivative equals itself. This special relationship gives $\ln x$ the remarkably clean derivative $1/x$. No other logarithm has this property—base-10 or base-2 logs all have an extra constant factor. This is precisely why mathematicians prefer natural logarithms in calculus.

When you differentiate expressions involving products, quotients, or powers, the chain rule combined with $\frac{d}{dx}(\ln x) = \frac{1}{x}$ transforms complicated derivatives into manageable algebra.

Prerequisite Map

This skill
Derivative of Natural Logarithm

Before You Start: Prerequisite Check

Can you apply the chain rule?

Test yourself: Find $\frac{d}{dx}[\cos(3x)]$.

Answer: $-3\sin(3x)$

If you got this wrong, review the chain rule before continuing.

Can you use implicit differentiation?

Test yourself: If $xy = 1$, find $\frac{dy}{dx}$.

Answer: Differentiate both sides: $y + x\frac{dy}{dx} = 0$, so $\frac{dy}{dx} = -\frac{y}{x}$.

If this is unfamiliar, review implicit differentiation.


Quick Reference

Property Value
Concept Logarithmic Derivatives
Chapter 6.4
Difficulty Intermediate
Time ~20 minutes

Key Concepts

The Fundamental Formula

$$\boxed{\frac{d}{dx}(\ln x) = \frac{1}{x}}$$

This holds for $x > 0$, since $\ln x$ is only defined for positive inputs.

Why It Works

Let $y = \ln x$. Then by the definition of logarithm:

$$e^y = x$$

Differentiating both sides implicitly:

$$e^y \frac{dy}{dx} = 1$$

Solving for $\frac{dy}{dx}$:

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

The key insight: since $e^y = x$, we can replace $e^y$ with $x$ directly.

The Chain Rule Form

When differentiating $\ln(g(x))$ where $g(x)$ is a differentiable function:

$$\boxed{\frac{d}{dx}[\ln(g(x))] = \frac{g'(x)}{g(x)}}$$

This formula appears constantly in applications. Notice the pattern: the derivative of what's inside goes on top, while the original inside function goes on the bottom.

Handling Absolute Values

For $x \neq 0$:

$$\frac{d}{dx}(\ln\vert x\vert ) = \frac{1}{x}$$

This works because:

This is important for integration: $\int \frac{1}{x}\,dx = \ln\vert x\vert + C$

Domain Restrictions: Watch Out!

Critical point: $\ln x$ is only defined for $x > 0$. When differentiating, always check that your input stays positive.

Situation Valid Domain
$\ln x$ $x > 0$
$\ln(x^2)$ $x \neq 0$ (since $x^2 > 0$ when $x \neq 0$)
$\ln(\sin x)$ Where $\sin x > 0$ (e.g., $(0, \pi)$)
$\ln(1 - x^2)$ $-1 < x < 1$

Common Patterns

Expression Derivative Valid When
$\ln x$ $\frac{1}{x}$ $x > 0$
$\ln(ax)$, $a > 0$ $\frac{1}{x}$ $x > 0$
$\ln(x^n)$ $\frac{n}{x}$ depends on $n$
$\ln(\sin x)$ $\cot x$ $\sin x > 0$
$\ln(\cos x)$ $-\tan x$ $\cos x > 0$
$[\ln x]^n$ $\frac{n[\ln x]^{n-1}}{x}$ $x > 0$

Practice Problems

Level 1 Direct Application

Find the derivative of $f(x) = \ln(5x)$.

Thought Process

Use the chain rule form: $\frac{d}{dx}[\ln(g(x))] = \frac{g'(x)}{g(x)}$.

Here $g(x) = 5x$, so $g'(x) = 5$.

Show Answer

$$f'(x) = \frac{5}{5x} = \frac{1}{x}$$

Note: This matches $\frac{d}{dx}(\ln x) = \frac{1}{x}$ because $\ln(5x) = \ln 5 + \ln x$, and the constant $\ln 5$ disappears when differentiating.

Level 2 Chain Rule with Polynomial

Find $\frac{d}{dx}\left[\ln(x^2 + 4)\right]$.

Thought Process

Apply the chain rule formula with $g(x) = x^2 + 4$.

Compute $g'(x) = 2x$.

Then substitute into $\frac{g'(x)}{g(x)}$.

Show Answer

$$\frac{d}{dx}\left[\ln(x^2 + 4)\right] = \frac{2x}{x^2 + 4}$$

Level 3 Logarithm of Trigonometric Function

Find $\frac{d}{dx}[\ln(\tan x)]$.

Thought Process

Use the chain rule with $g(x) = \tan x$.

Recall that $\frac{d}{dx}(\tan x) = \sec^2 x$.

Then simplify the resulting fraction using trig identities.

Show Answer

$$\frac{d}{dx}[\ln(\tan x)] = \frac{\sec^2 x}{\tan x}$$

To simplify, write everything in terms of sine and cosine:

$$= \frac{1/\cos^2 x}{\sin x/\cos x} = \frac{1}{\cos^2 x} \cdot \frac{\cos x}{\sin x} = \frac{1}{\sin x \cos x}$$

Using the identity $\sin(2x) = 2\sin x \cos x$:

$$= \frac{2}{2\sin x \cos x} = \frac{2}{\sin(2x)} = 2\csc(2x)$$

Level 4 Nested Function with Product Rule

Find $\frac{d}{dx}\left[x^2 \ln(3x + 1)\right]$.

Thought Process

This requires the product rule because we have $x^2$ times $\ln(3x+1)$.

Product rule: $(uv)' = u'v + uv'$

Let $u = x^2$ and $v = \ln(3x+1)$.

Find $u' = 2x$ and $v' = \frac{3}{3x+1}$ (using the chain rule on the ln).

Show Answer

Using the product rule:

$$\frac{d}{dx}\left[x^2 \ln(3x + 1)\right] = 2x \cdot \ln(3x+1) + x^2 \cdot \frac{3}{3x+1}$$

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

This can also be written with a common denominator:

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

Level 5 Prove a Derivative Identity

Show that $\frac{d}{dx}\left[\ln\left(x + \sqrt{x^2 + 1}\right)\right] = \frac{1}{\sqrt{x^2 + 1}}$.

Thought Process

Apply the chain rule with $g(x) = x + \sqrt{x^2 + 1}$.

The derivative of $\sqrt{x^2 + 1}$ requires another chain rule application.

After finding $g'(x)$, substitute into $\frac{g'(x)}{g(x)}$ and simplify carefully.

The key algebraic trick: multiply numerator and denominator strategically to simplify.

Show Answer

Let $g(x) = x + \sqrt{x^2 + 1}$.

First, find $g'(x)$: $$g'(x) = 1 + \frac{1}{2}(x^2 + 1)^{-1/2} \cdot 2x = 1 + \frac{x}{\sqrt{x^2 + 1}}$$

Get a common denominator: $$g'(x) = \frac{\sqrt{x^2 + 1} + x}{\sqrt{x^2 + 1}}$$

Now apply the chain rule: $$\frac{d}{dx}\left[\ln(g(x))\right] = \frac{g'(x)}{g(x)} = \frac{\frac{\sqrt{x^2 + 1} + x}{\sqrt{x^2 + 1}}}{x + \sqrt{x^2 + 1}}$$

Since the numerator (after the outer fraction) equals $x + \sqrt{x^2 + 1}$ and this matches the denominator:

$$= \frac{1}{\sqrt{x^2 + 1}}$$

This identity is significant because $\ln(x + \sqrt{x^2+1}) = \sinh^{-1}(x)$, the inverse hyperbolic sine.

Still Confused?

Why is the derivative $\frac{1}{x}$ and not $\frac{1}{\ln x}$?

A common confusion! The derivative formula $\frac{d}{dx}(\ln x) = \frac{1}{x}$ might seem strange because $x$ appears, not $\ln x$.

Think of it this way: The derivative measures the rate of change. For $\ln x$:

  • Near $x = 1$: $\ln x$ changes at rate $1/1 = 1$
  • Near $x = 10$: $\ln x$ changes at rate $1/10 = 0.1$ (slower)

The rate depends on where you are ($x$), not on the output value ($\ln x$).

When do I use $\ln x$ vs $\ln\vert x\vert $?
  • Use $\ln x$ when you know $x > 0$ (e.g., $x$ represents time, population, distance)
  • Use $\ln\vert x\vert $ when $x$ could be negative (e.g., in integration, or when $x$ is unrestricted)

The derivative is $\frac{1}{x}$ in both cases, but the domains differ:

  • $\ln x$ is defined for $x > 0$
  • $\ln\vert x\vert $ is defined for $x \neq 0$
I keep making errors with the chain rule. Help!

Use this template: When differentiating $\ln(\text{stuff})$:

$$\frac{d}{dx}[\ln(\text{stuff})] = \frac{\text{derivative of stuff}}{\text{stuff}}$$

Example: $\frac{d}{dx}[\ln(x^2 + 1)]$

  • stuff = $x^2 + 1$
  • derivative of stuff = $2x$
  • Answer: $\frac{2x}{x^2 + 1}$

Always write out "stuff" and "derivative of stuff" separately until it becomes automatic.


Mastery Checklist

Mental Model

The Fraction Pattern: When differentiating $\ln(\text{stuff})$, the answer is always a fraction:

This "derivative over original" pattern is unique to logarithmic functions and explains why logarithms are so useful for simplifying derivatives of products and quotients.


Connections

Looking back:

Looking ahead:

Real-world connections:


Previous Up Next
Chain Rule Skills Index Logarithmic Differentiation

Last updated: 2026-01-22