The Chain Rule and Repeated Nesting

AP Calculus BC · Unit 3 — Differentiation: Composite, Implicit, and Inverse Functions

One rule, applied from the outside in

$$\frac{d}{dx}f\big(g(x)\big)=f'\big(g(x)\big)\cdot g'(x),\qquad\text{or}\qquad \frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}$$

The safest way to run the rule is mechanical. Step 1: read the expression from the outside and name each layer. Step 2: differentiate the outermost layer and leave everything inside it completely alone. Step 3: multiply by the derivative of what was inside. If the expression is nested three deep, the answer carries three factors, and the count of factors is itself a check on your work.

Three templates account for most of Section I:

$$\frac{d}{dx}e^{g(x)}=e^{g(x)}g'(x),\qquad\frac{d}{dx}\ln\big(g(x)\big)=\frac{g'(x)}{g(x)},\qquad\frac{d}{dx}\big[g(x)\big]^{n}=n\big[g(x)\big]^{n-1}g'(x)$$

A warning about notation that BC exams exploit: $\sin^{2}(3x)$ means $\big[\sin(3x)\big]^{2}$, so it is nested three deep — squaring, then sine, then $3x$ — and its derivative is $6\sin(3x)\cos(3x)$.

xuy dx du = g′(x) · dx (3 times) dy = f′(u) · du (3 times again) 9 times in total — the two factors MULTIPLY, they do not add
Why it is multiplication and not addition. A small segment $dx$ on the $x$-axis passing through $g$ is stretched to $g'(x)\,dx$ on the $u$-axis; that segment then passes through $f$ and is stretched by a further factor of $f'(u)$. When two magnifications happen in series, the total factor is the product, just like two lenses placed one behind the other. The picture also explains why forgetting the inner factor is not a small error: if $g'=3$ and you drop it, the result is three times too small, not off by a few percent.

Worked example: three nested layers with a logarithm

Find $\dfrac{dy}{dx}$ for $y=\ln\left(\cos\left(3x\right)\right)$, then simplify to a familiar trigonometric function.

Solution

Three layers: the outermost is $\ln$, the middle is $\cos$, and the innermost is $3x$. So the answer must have exactly three factors.

$$\frac{dy}{dx}=\frac{1}{\cos(3x)}\cdot\left(-\sin(3x)\right)\cdot 3$$

Combine:

$$\frac{dy}{dx}=-3\cdot\frac{\sin(3x)}{\cos(3x)}=-3\tan(3x)$$

The three-second check: you count three layers in the problem, and the first line of the solution has exactly three factors. If you wrote only two factors, you surely forgot a layer.

Common mistake

The costliest mistake of the chapter is forgetting the factor from the innermost layer: writing $\frac{d}{dx}\sin(4x)=\cos(4x)$ instead of $4\cos(4x)$. The prevention is not "be more careful" but a counting step: before writing the answer, count the layers in the problem and count the factors in the answer; the two numbers must be equal. The second mistake is stuffing the factor inside the function: $\frac{d}{dx}\tan\left(x^{2}\right)$ is $2x\sec^{2}\left(x^{2}\right)$, not $\sec^{2}(2x)$ — the chain-rule factor always stands outside and never slips into the argument.

Key takeaway

Count the layers, one factor per layer, and the factor always sits outside the function. The notation $\sin^{2}(3x)$ is three layers, not two — read the notation carefully before putting pen to paper.

← Tangent Lines, Normal Lines and Linear Approximation · All AP Calculus BC lessons · Practice AP Calculus BC questions (free, instant scoring) · Implicit Differentiation and Higher-Order Derivatives →