Calculus › Section C · Derivatives › Topic C.4

The chain rule

Most functions you meet in practice are built by putting one function inside another. The chain rule is how you differentiate them, and it rests on one idea: rates of change multiply.

Functions inside functions

Look at \((3x + 1)^5\), \(\sin(x^2)\) or \(e^{-0.5t}\). None of these fits the basic rules directly, because each is a composition: an inner function feeds its output into an outer one. In \(\sin(x^2)\), the inner function squares \(x\) and the outer function takes the sine of the result. You could expand \((3x + 1)^5\) into a polynomial before differentiating, but that is slow, and for \(\sin(x^2)\) there is nothing to expand. You need a rule for compositions themselves.

Rates multiply

Picture three gears. The middle gear turns 2 times for every turn of the first, and the last gear turns 3 times for every turn of the middle one. Then the last gear turns \(3 \times 2 = 6\) times for every turn of the first. Derivatives behave the same way. If \(y\) depends on \(u\) and \(u\) depends on \(x\), the rate of \(y\) with respect to \(x\) is the product of the two rates. In Leibniz notation this reads almost like cancelling fractions:

\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}

The fractions do not literally cancel, but the notation is a good memory aid.

The rule in function notation

If \(y = f(g(x))\), then

\frac{d}{dx} f(g(x)) = f'(g(x)) \cdot g'(x)

Say it in words: take the derivative of the outside function, keep the inside exactly as it is, then multiply by the derivative of the inside. The phrase "keep the inside" matters. The outer derivative is evaluated at \(g(x)\), not at \(x\). Identifying the outer and inner functions is the whole skill, so practise naming them before you differentiate anything.

Worked example: a power of a binomial

Differentiate \(y = (3x + 1)^5\). The outer function is \(u^5\) and the inner function is \(u = 3x + 1\). The outer derivative is \(5u^4\), so keep the inside to get \(5(3x + 1)^4\). The inner derivative is 3. Multiplying gives \(y' = 15(3x + 1)^4\). You can check the method on a smaller power: \((3x + 1)^2 = 9x^2 + 6x + 1\) has derivative \(18x + 6\), and the chain rule gives \(2(3x + 1) \cdot 3 = 18x + 6\) as well.

The general power rule

Powers of functions come up so often that the pattern gets its own name: \(\frac{d}{dx}[g(x)]^n = n[g(x)]^{n-1} g'(x)\). It works for any real power, including roots. For \(y = \sqrt{x^2 + 9}\), rewrite it as \((x^2 + 9)^{1/2}\). Then \(y' = \frac{1}{2}(x^2 + 9)^{-1/2} \cdot 2x\), which simplifies to \(\frac{x}{\sqrt{x^2 + 9}}\). At \(x = 4\) the slope is \(\frac{4}{5}\), a quick number to check against a graph.

Trigonometric and exponential chains

The same pattern works with every outer function whose derivative you know. For \(\sin(x^2)\), the outer derivative is cosine and the inner derivative is \(2x\), so the derivative is \(2x\cos(x^2)\). For \(e^{-0.5t}\), the exponential is its own derivative and the inner derivative is \(-0.5\), giving \(-0.5e^{-0.5t}\). For \(\cos^3 x\), which means \((\cos x)^3\), the outer function is the cube: \(3\cos^2 x \cdot (-\sin x) = -3\cos^2 x \sin x\).

Chains with more than two links

Some functions are nested three or more deep, and the rule simply repeats, one layer at a time from the outside in. Take \(y = \sin^2(4x)\), which is \([\sin(4x)]^2\). The outermost layer is the square, giving \(2\sin(4x)\). The next layer is the sine, giving \(\cos(4x)\). The innermost is \(4x\), giving 4. Multiply all three: \(y' = 8\sin(4x)\cos(4x)\). Each layer contributes exactly one factor, so counting layers is a good check that nothing was missed.

Combining with the product rule

Real problems often need several rules at once. For \(y = x^2(5x - 2)^3\), the top-level structure is a product, so start with the product rule, then use the chain rule inside it. The derivative of \(x^2\) is \(2x\), and the derivative of \((5x - 2)^3\) is \(3(5x - 2)^2 \cdot 5\). So \(y' = 2x(5x - 2)^3 + 15x^2(5x - 2)^2\). Factoring out \(x(5x - 2)^2\) gives the tidier \(y' = x(5x - 2)^2(25x - 4)\).

Worked example: a cooling cup of coffee

A cup of coffee cools according to \(T(t) = 20 + 70e^{-0.1t}\) degrees Celsius, where \(t\) is in minutes. How fast is it cooling? By the chain rule, \(T'(t) = 70 \cdot e^{-0.1t} \cdot (-0.1) = -7e^{-0.1t}\). At \(t = 0\), the temperature is falling at 7 degrees per minute. At \(t = 10\), it is falling at \(7e^{-1} \approx 2.6\) degrees per minute. The coffee cools quickly at first and then more slowly as it approaches room temperature, 20 degrees.

Common mistakes to avoid

The classic slip is forgetting the inner derivative: \(\frac{d}{dx}(3x + 1)^5\) is not \(5(3x + 1)^4\). The second is changing the inside when differentiating the outside: the derivative of \(\sin(x^2)\) is not \(\cos(x) \cdot 2x\), because the cosine must still be applied to \(x^2\). The third is stopping one layer early in a deep chain. Work from the outside in and write one factor per layer.

Key takeaways

For a composition \(f(g(x))\), the derivative is \(f'(g(x)) \cdot g'(x)\): the outer derivative with the inside unchanged, times the inner derivative. In Leibniz form, \(\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}\), because rates of change multiply. The general power rule handles powers and roots of functions. Longer chains get one factor per layer, and the chain rule combines freely with the product and quotient rules.

Flashcards

Flashcard

Composition

One function inside another: f(g(x))

g is the inner function, f the outer.

Test your understanding

Question 1 of 5

What is the derivative of (2x - 7)⁴?

Question 2 of 5

What is the derivative of sin(5x)?

Question 3 of 5

What is the derivative of e^(x²)?

Question 4 of 5

What is the derivative of √(4x + 1)?

Question 5 of 5

If f(x) = cos(3x), what is f′(π/6)?

Standards: 3

← Previous topicNext topic →