Tutorials › Calculus I › The Chain Rule for Natural Logarithms

Exponential and Logarithmic Derivatives · Tutorial 536 of 1495

The Chain Rule for Natural Logarithms

Use the inner function’s derivative and its positive value to differentiate natural logarithms of composite functions.

Intermediate 9 min read

What You'll Learn

  • State the chain rule formula for the natural logarithm and its positivity condition
  • Identify the intervals where a logarithmic composite is defined
  • Differentiate logarithms of polynomial and other composite inputs
  • Check derivatives by computing the inner and outer contributions
  • Avoid omitting the inner derivative and interpret derivative signs carefully

Why the Chain Rule Is Needed

A natural logarithm can have a function, rather than a single variable, as its input. For example, \(\ln(3x^2+1)\) means that the polynomial \(3x^2+1\) is first evaluated, and the natural logarithm is then applied to that value. When \(x\) changes, both the input to the logarithm and the logarithm’s output change.

The chain rule accounts for these two stages. The derivative of the outer function \(\ln(t)\) contributes a factor of \(1/t\), evaluated at the inner function, while the derivative of the inner function contributes its own factor. Leaving out either contribution gives an incorrect derivative.

Key formula: If \(u\) is differentiable and \(u(x)>0\), then \[ \frac{d}{dx}\ln(u(x))=\frac{u'(x)}{u(x)}. \]

Definition and Conditions

The natural logarithm \(\ln(t)\) is defined for positive real inputs \(t>0\), and its derivative is \(1/t\). To differentiate \(\ln(u(x))\) at a point \(x\), the inner function \(u\) must be differentiable there and its value must be positive. On any open interval where \(u\) is differentiable and positive, the formula applies throughout that interval.

Rule (chain rule for the natural logarithm): Let \(I\) be an open interval, and let \(u:I\to\mathbb R\) be differentiable with \(u(x)>0\) for every \(x\in I\). Then \(y=\ln(u(x))\) is differentiable on \(I\), and \[ y'=\frac{u'(x)}{u(x)}. \]

The positivity condition is essential: \(\ln(u(x))\) is a real-valued function only at points where \(u(x)>0\). If \(u\) is positive on only part of the real line, the derivative rule applies on the intervals in that part where \(u\) is also differentiable. A point where \(u(x)=0\) is not in the domain of the logarithm.

In practice, identify the inner function first. Then find its derivative, substitute the inner function into the denominator, and check the domain. The order matters: the numerator is the derivative of the entire inner function, not just a constant chosen from the expression.

Why the Formula Works

The rule follows from the ordinary chain rule and the derivative of the natural logarithm. A short difference-quotient argument also shows how the two rates of change combine. Fix a point \(x\) with \(u(x)>0\), and write \(a=u(x)\) and \(\Delta u=u(x+h)-u(x)\). As \(h\to0\), differentiability of \(u\) implies \(\Delta u\to0\).

Since the derivative of \(\ln(t)\) at \(t=a\) is \(1/a\), differentiability of the logarithm gives \[ \ln(a+\Delta u)-\ln(a)=\frac{1}{a}\Delta u+r(\Delta u), \] where the remainder satisfies \(r(k)/k\to0\) as \(k\to0\). Also, differentiability of \(u\) gives \[ \Delta u=u'(x)h+o(h). \] In particular, \(\Delta u=O(h)\). Thus the remainder \(r(\Delta u)\) is \(o(h)\), including when \(\Delta u\) is zero for some values of \(h\). Dividing the logarithm increment by \(h\) and taking the limit yields \[ \lim_{h\to0}\frac{\ln(u(x+h))-\ln(u(x))}{h} =\frac{1}{a}u'(x). \] Substituting \(a=u(x)\) gives the stated formula.

This argument reflects the chain rule’s meaning: the rate of change of the output with respect to \(x\) is the rate of change of the logarithm with respect to its input, multiplied by the rate of change of that input with respect to \(x\).

Worked Examples

Worked Example: A Quadratic Inside the Logarithm

Differentiate \(y=\ln(2x^2-3x+4)\) and state its domain.

First define the inner function: \[ u(x)=2x^2-3x+4. \] Complete the square to check positivity: \[ u(x)=2\left(x-\frac{3}{4}\right)^2+\frac{23}{8}. \] The squared term is nonnegative and \(23/8>0\), so \(u(x)>0\) for every real \(x\). Therefore the logarithm is defined on all of \(\mathbb R\).

Differentiate the inner function: \[ u'(x)=4x-3. \] Apply the formula: \[ y'=\frac{u'(x)}{u(x)} =\frac{4x-3}{2x^2-3x+4}. \]

Check the two chain-rule contributions: the outer derivative at \(u(x)\) is \(1/(2x^2-3x+4)\), and the inner derivative is \(4x-3\). Their product is exactly the derivative above. For instance, at \(x=0\), the inner value is \(4\), the inner derivative is \(-3\), and \(y'(0)=(-3)/4=-3/4\).

Worked Example: A Power of a Polynomial

Differentiate \(y=\ln((x^2+1)^3)\).

The inner function is \(u(x)=(x^2+1)^3\). Since \(x^2+1\ge1\), we have \(u(x)>0\) for every real \(x\), so the domain is all real numbers. Differentiate the inner function using the power rule and chain rule: \[ u'(x)=3(x^2+1)^2(2x)=6x(x^2+1)^2. \] Therefore, \[ y'=\frac{u'(x)}{u(x)} =\frac{6x(x^2+1)^2}{(x^2+1)^3} =\frac{6x}{x^2+1}. \]

To check, expand the inner polynomial: \[ (x^2+1)^3=x^6+3x^4+3x^2+1. \] Its derivative is \[ 6x^5+12x^3+6x=6x(x^2+1)^2. \] Dividing this derivative by the original inner function \((x^2+1)^3\) gives \(6x/(x^2+1)\), agreeing with the result.

Worked Example: A Trigonometric Composite Input

Differentiate \(y=\ln(2+\sin x)\).

Let \(u(x)=2+\sin x\). Since \(-1\le\sin x\le1\), it follows that \(u(x)\ge1>0\). Thus the logarithm is defined for all real \(x\). The inner derivative is \[ u'(x)=\cos x. \] Consequently, \[ y'=\frac{\cos x}{2+\sin x}. \]

Check at \(x=0\): \(u(0)=2+\sin(0)=2\), and \(u'(0)=\cos(0)=1\). The formula gives \(y'(0)=1/2\), which is the outer derivative \(1/2\) multiplied by the inner derivative \(1\).

Worked Example: A Linear Input and Its Domain

Differentiate \(y=\ln(5-2x)\) and determine where the derivative applies.

The logarithm requires \(5-2x>0\). Solving, \[ -2x>-5 \qquad\Longrightarrow\qquad x<\frac{5}{2}, \] where the inequality reverses because we divide by a negative number. The domain is therefore \((-\infty,5/2)\).

Set \(u(x)=5-2x\), so \(u'(x)=-2\). On the domain, \[ y'=\frac{-2}{5-2x}. \] As a check at \(x=0\), the inner value is \(5\) and its derivative is \(-2\), giving \(y'(0)=-2/5\). The denominator approaches zero as \(x\) approaches \(5/2\) from below, but \(x=5/2\) itself is not in the domain.

A Common Mistake: Omitting the Inner Derivative

A frequent error is to write \(1/u(x)\) as the derivative of \(\ln(u(x))\), forgetting that \(u\) itself changes with \(x\). The outer derivative supplies \(1/u(x)\), but the chain rule also requires multiplication by \(u'(x)\).

For example, a wrong calculation for \(\ln(3x^2+1)\) is \[ \frac{d}{dx}\ln(3x^2+1)=\frac{1}{3x^2+1}. \] This omits the derivative of the inner function. Since \(u'(x)=6x\), the correct calculation is \[ \frac{d}{dx}\ln(3x^2+1) =\frac{6x}{3x^2+1}. \] At \(x=1\), the incorrect expression gives \(1/4\), while the correct derivative is \(6/4=3/2\). The discrepancy shows why both factors are necessary.

Interpreting the Sign of the Derivative

Where \(u(x)>0\), the denominator in \(u'(x)/u(x)\) is positive. Therefore the derivative of \(\ln(u(x))\) has the same sign as \(u'(x)\) at each point: it is positive where \(u'(x)>0\), negative where \(u'(x)<0\), and zero where \(u'(x)=0\).

Do not conclude that a strictly increasing positive function must have a strictly positive derivative at every point. For example, \(u(x)=1+x^3\) is positive and strictly increasing on \((-1/2,1/2)\), but \(u'(0)=0\). Hence \[ \left.\frac{d}{dx}\ln(1+x^3)\right|_{x=0} =\frac{u'(0)}{u(0)} =\frac{0}{1}=0. \] More generally, if a differentiable function is increasing on an interval, its derivative is nonnegative at interior points; if it is decreasing, its derivative is nonpositive. Strict monotonicity alone does not rule out a zero derivative at an individual point.

A Reliable Procedure

1
Identify the input.
Write \(u(x)\) for the entire expression inside the natural logarithm.
2
Check positivity.
Determine where \(u(x)>0\); only there is the real-valued logarithm defined.
3
Differentiate the input.
Compute \(u'(x)\), including any necessary chain-rule factors.
4
Form and simplify the quotient.
Use \(u'(x)/u(x)\), then check that the result respects the domain.

Why This Rule Matters

The chain rule for natural logarithms appears whenever a logarithm measures the change of a quantity that itself depends on \(x\). Its formula separates that change into two parts: the input’s rate of change \(u'(x)\), and the reciprocal of the input \(1/u(x)\). This makes it useful for differentiating logarithms of polynomials, trigonometric expressions, and many other differentiable functions, provided the input remains positive.

The most reliable habits are to check positivity before differentiating, to find the derivative of the complete inner function, and to keep the denominator as the original input. With those checks in place, the formula is concise without hiding the conditions that make it valid.

Check Your Understanding

For each question, pay attention to both the inner derivative and the domain of the logarithm.

  1. Differentiate \(\ln(x^2+4)\) and state its domain.
  2. For \(y=\ln(3-4x)\), find the domain and derivative.
  3. Differentiate \(\ln((x^2+2)^2)\). Explain why the logarithm is defined for every real \(x\).
  4. In the chain rule formula, which factor comes from differentiating the logarithm, and which comes from differentiating its input?
  5. Can a strictly increasing differentiable positive function have derivative zero at a point? Explain using the sign formula.

Test yourself: Calculus I final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): 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