Tutorials › AP Calculus › Deriving the Natural Logarithm Derivative

Trigonometric and Exponential Derivatives · Tutorial 148 of 999

Deriving the Natural Logarithm Derivative

Use the difference quotient and logarithm laws to derive the derivative of \(\ln x\), carefully tracking the domain at each step.

Intermediate 9 min read

What You'll Learn

  • State the domain of the natural logarithm and its derivative.
  • Rewrite the logarithm difference in the difference quotient as a single logarithm.
  • Connect a logarithm limit to the derivative of the natural exponential at zero.
  • Derive the formula \( \frac{d}{dx}\ln x=\frac1x \) for positive \(x\).
  • Apply the formula at specific points and check the results.
  • Identify why omitting the logarithm domain leads to an invalid derivative claim.

Why Derive the Logarithm Derivative?

The derivative of the natural logarithm is a compact formula, but its justification brings together several important ideas: the definition of a derivative, the logarithm laws, and the relationship between the natural logarithm and the natural exponential. Careful attention to domain is essential: \(\ln x\) is defined for positive real \(x\), so its derivative can only be considered at points in that domain.

We will start from the difference quotient rather than assume the answer. The argument will use the established fact that the natural exponential has derivative \(e^x\), in particular at \(x=0\). It will not require the chain rule.

Central result: The natural logarithm has domain \((0,\infty)\), and at every \(x>0\), $$ \frac{d}{dx}\ln x=\frac{1}{x}. $$ There is no real derivative of \(\ln x\) at \(x=0\) or at a negative input, because the real-valued function \(\ln x\) is not defined there.

The Function and Its Difference Quotient

The natural logarithm \(\ln x\) is the inverse function of the natural exponential \(e^t\). In particular, for \(x>0\), \(e^{\ln x}=x\), and for real \(t\), \(\ln(e^t)=t\). Because \(e^t\) is positive for every real \(t\), the range of the natural exponential, and therefore the domain of its inverse \(\ln x\), is \((0,\infty)\).

For a function \(f\), its derivative at \(x\), when the limit exists, is the limit of the difference quotient \(\frac{f(x+h)-f(x)}{h}\) as \(h\) approaches zero. For \(f(x)=\ln x\), we must restrict \(h\) so that both logarithms in the quotient are defined. Since \(x>0\), it is enough to require \(|h|<x\), which guarantees \(x+h>0\).

$$ \frac{d}{dx}\ln x = \lim_{h\to 0}\frac{\ln(x+h)-\ln x}{h}, \qquad x>0. $$

The condition \(x>0\) is not a formality. It ensures that \(\ln x\) exists, and the restriction on \(h\) keeps nearby inputs inside the function's domain while taking the limit.

Rewrite the Quotient with a Logarithm Law

For positive numbers \(a\) and \(b\), the logarithm quotient law says \(\ln a-\ln b=\ln(a/b)\). When \(x>0\) and \(|h|<x\), both \(x+h\) and \(x\) are positive, so the law applies. It changes the difference quotient into a form that depends on the ratio \(h/x\).

$$ \begin{aligned} \frac{\ln(x+h)-\ln x}{h} &=\frac{1}{h}\ln\left(\frac{x+h}{x}\right)\\ &=\frac{1}{h}\ln\left(1+\frac{h}{x}\right). \end{aligned} $$

Set \(u=h/x\). Since \(x\) is fixed and positive, \(h\to0\) implies \(u\to0\). Also \(h=xu\), so the quotient becomes \(1/x\) times a standard logarithm limit.

$$ \frac{1}{h}\ln\left(1+\frac{h}{x}\right) = \frac{1}{xu}\ln(1+u) = \frac{1}{x}\cdot\frac{\ln(1+u)}{u}. $$

It remains to establish that \(\lim_{u\to0}\frac{\ln(1+u)}{u}=1\). This is where the derivative of the natural exponential supplies the needed limit.

Deriving the Key Limit

For \(u\) near zero with \(u>-1\), set \(t=\ln(1+u)\). The domain condition \(u>-1\) ensures \(1+u>0\), so this logarithm is defined. The inverse relationship gives \(u=e^t-1\). As \(u\to0\), continuity of the logarithm at \(1\) gives \(t\to0\). For nonzero \(u\), the corresponding \(t\) is also nonzero, and therefore

$$ \frac{\ln(1+u)}{u} = \frac{t}{e^t-1} = \frac{1}{\dfrac{e^t-1}{t}}. $$

The derivative of \(e^t\) at \(t=0\) is \(e^0=1\). By the definition of that derivative, \(\lim_{t\to0}\frac{e^t-e^0}{t}=1\), or equivalently \(\lim_{t\to0}\frac{e^t-1}{t}=1\). Since the denominator approaches \(1\), its reciprocal also approaches \(1\). This proves the desired logarithm limit.

Key limit: The derivative of the natural exponential at zero, together with the inverse relationship between \(\ln\) and \(e^t\), gives $$ \lim_{u\to0}\frac{\ln(1+u)}{u}=1. $$ The expression is considered for \(u\) near zero with \(u>-1\), its required logarithm domain.

Complete Derivation of the Formula

We can now finish the derivation. For a fixed \(x>0\), the difference quotient equals \(1/x\) times the expression in the key limit. As \(h\to0\), \(u=h/x\to0\), so that expression approaches \(1\). Thus the derivative exists and has the stated value.

1
Start with the derivative definition.
Fix \(x>0\) and take \(h\to0\) while requiring \(x+h>0\).
2
Use the logarithm quotient law.
Rewrite \(\ln(x+h)-\ln x\) as \(\ln(1+h/x)\); its inputs are positive under the stated restrictions.
3
Rescale the increment.
Let \(u=h/x\), so the difference quotient is \(\frac1x\frac{\ln(1+u)}{u}\) and \(u\to0\).
4
Apply the established limit.
Since \(\lim_{u\to0}\frac{\ln(1+u)}{u}=1\), the original quotient approaches \(1/x\).
$$ \begin{aligned} \frac{d}{dx}\ln x &=\lim_{h\to0}\frac{\ln(x+h)-\ln x}{h}\\ &=\lim_{h\to0}\frac{1}{x}\cdot \frac{\ln(1+h/x)}{h/x}\\ &=\frac{1}{x}\cdot 1\\ &=\frac{1}{x}, \qquad x>0. \end{aligned} $$

The condition \(x>0\) has been used throughout: it defines the original function and makes the logarithm law and the nearby-input restriction valid. Therefore this is a derivative formula on the positive domain, not a claim about all real numbers.

Worked Examples

Worked Example: Find the Derivative at \(x=4\)

Because \(4>0\), \(\ln x\) is defined and differentiable at \(x=4\). Substitute \(x=4\) into the derived formula:

$$ \left.\frac{d}{dx}\ln x\right|_{x=4} = \frac{1}{4}. $$

Check directly with the difference quotient at \(x=4\). For \(h\) near zero with \(4+h>0\), the logarithm law gives

$$ \begin{aligned} \frac{\ln(4+h)-\ln4}{h} &=\frac{1}{h}\ln\left(\frac{4+h}{4}\right)\\ &=\frac{1}{4}\cdot\frac{\ln(1+h/4)}{h/4}. \end{aligned} $$

As \(h\to0\), \(h/4\to0\), and the key limit makes the second factor approach \(1\). The quotient therefore approaches \(1/4\), confirming the derivative.

Worked Example: Find the Derivative at \(x=1\)

The input \(1\) is positive, so the formula applies. Substitution gives

$$ \left.\frac{d}{dx}\ln x\right|_{x=1} = \frac{1}{1} = 1. $$

For a check from the definition, use \(\ln 1=0\). For \(h\) near zero with \(1+h>0\),

$$ \begin{aligned} \frac{\ln(1+h)-\ln1}{h} &=\frac{\ln(1+h)}{h}. \end{aligned} $$

This is precisely the key limit, with \(u=h\), and it approaches \(1\). Thus the difference quotient confirms the computed derivative at \(x=1\).

Worked Example: Find the Tangent Line to \(y=\ln x\) at \(x=e\)

The point on the graph at \(x=e\) is \((e,\ln e)=(e,1)\). Since \(e>0\), the derivative formula gives the slope at that point as \(1/e\). Using the point-slope form of a line, the tangent line is

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

Expanding verifies the equivalent equation \(y=x/e\): \(y-1=x/e-e/e=x/e-1\), so adding \(1\) to both sides yields \(y=x/e\). It passes through \((e,1)\), since \(e/e=1\), and its slope is \(1/e\), as required by the derivative. This check confirms both the point and the slope.

A Common Domain Mistake

A tempting but incorrect shortcut is to state the formula without its domain. For example, someone might write, “The derivative of \(\ln x\) is \(1/x\) for every real \(x\), so at \(x=-2\) the derivative is \(-1/2\).” The arithmetic \(1/(-2)=-1/2\) is correct, but the derivative claim is not: \(\ln(-2)\) is not a real number, so there is no real-valued function \(\ln x\) defined on an interval around \(-2\) to differentiate.

$$ \ln(-2)\ \text{is undefined in the real numbers} \quad\Longrightarrow\quad \left.\frac{d}{dx}\ln x\right|_{x=-2} \ \text{is undefined}. $$

The correction is to state the formula with its condition: \(\frac{d}{dx}\ln x=1/x\) for \(x>0\). The value \(x=0\) is excluded as well, both because \(\ln 0\) is undefined and because \(1/x\) is undefined there.

Why the Derivation Matters

The difference quotient shows exactly how the derivative formula follows from local changes in the input. The logarithm law isolates the relative change \(h/x\), and the behavior near \(1\) is controlled by the derivative of the natural exponential at zero. This explains the reciprocal \(1/x\): the same small relative increment is scaled by \(1/x\) when it is expressed in terms of the original increment \(h\).

The main practical habit is to keep the domain attached to the rule. The formula is simple, but the condition \(x>0\) is part of the result, not optional decoration. Whenever you use the natural logarithm derivative, first check that its input is positive.

Check Your Understanding

Answer each question using the derivative definition and the domain conditions explained above.

  1. For which real values of \(x\) is \(\ln x\) defined, and on which values does the derived derivative formula apply?
  2. Which logarithm law rewrites \(\ln(x+h)-\ln x\) as a single logarithm, and what positivity conditions are needed?
  3. Why does the substitution \(u=h/x\) still give \(u\to0\) when \(h\to0\) for fixed \(x>0\)?
  4. Use the formula to find the derivative of \(\ln x\) at \(x=5\), then state why it is defined there.
  5. Explain why substituting \(x=-3\) into \(1/x\) does not give the real derivative of \(\ln x\) at \(-3\).

Test yourself: AP Calculus practice exams

Ready to check what you know? Work an AP-style practice exam, then open the full solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers all of AP Calculus AB & BC: full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon
Clinical Biostats