Why a Composite Derivative Has Two Factors
A composite function applies one function to the output of another. For example, in \((3x+2)^5\), the expression \(3x+2\) is calculated first, and then its value is raised to the fifth power. Differentiating the whole expression requires tracking both changes: how the outer power changes when its input changes, and how the inner expression changes as \(x\) changes.
The chain rule combines these two rates of change by multiplication. In this tutorial, the focus is a single composite layer: one inner function followed by one outer function. The practical habit is to write the outer derivative and inner derivative as separate factors before simplifying.
Identify the Inner and Outer Functions
Suppose \(y=(3x+2)^5\). The inner function is \(g(x)=3x+2\). The outer function takes an input \(u\) and raises it to the fifth power, so \(f(u)=u^5\). Using a separate placeholder \(u\) makes the roles clear: \(y=f(g(x))\).
The placeholder \(u\) is not an additional variable whose value must be found. It simply marks the input to the outer function. Its value in this composition is \(u=g(x)=3x+2\).
The Chain Rule for One Layer
The chain rule is the result used for every example in this tutorial. It says to evaluate the derivative of the outer function at the inner function's output, then multiply by the derivative of the inner function.
In Leibniz notation, if \(u=g(x)\) and \(y=f(u)\), the same rule is written as a product of two factors:
Here, \(\frac{dy}{du}\) means the derivative of the outer relationship \(y=f(u)\), and \(\frac{du}{dx}\) means the derivative of the inner relationship \(u=g(x)\). The notation highlights the order of the factors; the rule is justified by the chain rule, not by treating these symbols as ordinary fractions.
Why the Factors Multiply
The multiplication reflects how small changes pass through the two functions. If \(x\) changes by a small amount, the inner output changes at a rate of \(g'(x)\) units per unit of \(x\). The outer output then changes at a rate of \(f'(g(x))\) units per unit of the inner output. Combining the rates gives the change in the outer output per unit of \(x\).
More precisely, the local linear approximation for the inner function is \(\Delta u \approx g'(x)\Delta x\). The outer function's local linear approximation is \(\Delta y \approx f'(g(x))\Delta u\). Substituting the first relationship into the second gives \(\Delta y \approx f'(g(x))g'(x)\Delta x\). Dividing by \(\Delta x\) and taking the limit as \(\Delta x\) approaches zero gives the chain rule. This explains why the inner derivative is necessary: a change in \(x\) first produces a change in the input to the outer function.
Worked Examples
Worked Example: Differentiate a Fifth Power of a Linear Expression
Differentiate \(y=(3x+2)^5\). Then verify the result by expanding the original expression.
Step 1: Identify the layers. Let \(u=3x+2\), so \(y=u^5\). The outer function is \(f(u)=u^5\), and the inner function is \(g(x)=3x+2\).
Step 2: Differentiate each layer. The outer derivative is \(\frac{dy}{du}=5u^4\). The inner derivative is \(\frac{du}{dx}=3\).
Step 3: Multiply the factors and substitute \(u=3x+2\).
Check by expansion. The binomial expansion is \((3x+2)^5=243x^5+810x^4+1080x^3+720x^2+240x+32\). Differentiating term by term gives \(1215x^4+3240x^3+3240x^2+1440x+240\). Also, \((3x+2)^4=81x^4+216x^3+216x^2+96x+16\), so \(15(3x+2)^4=1215x^4+3240x^3+3240x^2+1440x+240\). The two derivatives agree.
Worked Example: Differentiate Cosine of a Linear Expression
Differentiate \(y=\cos(4x)\), where angles are measured in radians.
Step 1: Identify the layers. Set \(u=4x\). The outer function is \(y=\cos u\), and the inner function is \(u=4x\).
Step 2: Differentiate each layer. The derivative of cosine with respect to its input is \(\frac{dy}{du}=-\sin u\). The inner derivative is \(\frac{du}{dx}=4\).
Step 3: Multiply, then replace \(u\) by \(4x\).
Check at \(x=\frac{\pi}{8}\) using the difference quotient. At this input, \(4x=\frac{\pi}{2}\), so the derivative predicted by the formula is \(-4\sin(\frac{\pi}{2})=-4\). Directly, for a nonzero increment \(h\),
As \(h\) approaches zero, \(\frac{\sin(4h)}{4h}\) approaches \(1\), so the limit is \(-4\). This agrees with the chain-rule result at \(x=\frac{\pi}{8}\).
Worked Example: Use Function Notation and Evaluate at a Point
Let \(y=f(g(x))\), where \(f(u)=u^3+2u\) and \(g(x)=4x-1\). Find \(\frac{dy}{dx}\) at \(x=1\), and check by expanding the composition.
Step 1: Differentiate the outer function. Since \(f(u)=u^3+2u\), its derivative is \(f'(u)=3u^2+2\).
Step 2: Differentiate the inner function. Since \(g(x)=4x-1\), its derivative is \(g'(x)=4\).
Step 3: Apply the chain rule.
At \(x=1\), the inner value is \(g(1)=4(1)-1=3\), and the outer derivative there is \(f'(3)=3(3)^2+2=29\). Therefore, \(\frac{dy}{dx}\big|_{x=1}=29\cdot4=116\).
Check by expansion. The composition expands as \((4x-1)^3+2(4x-1)=64x^3-48x^2+20x-3\). Its derivative is \(192x^2-96x+20\), which at \(x=1\) is \(192-96+20=116\). The result matches.
A Reliable Procedure
When a function has one inner expression inside one outer function, keep the calculation organized in this order:
Write \(u=g(x)\), or identify the expression playing that role.
Differentiate with respect to \(u\), leaving the input in place.
Find \(\frac{du}{dx}\).
Multiply the outer derivative by the inner derivative, then express the result in terms of \(x\).
This order prevents a common confusion: differentiating the outside correctly but forgetting that its input is changing with \(x\). The chain rule applies when the inner function is differentiable at the input and the outer function is differentiable at the resulting inner value.
Common Mistake: Omitting the Inner Derivative
For \(y=\cos(4x)\), an incomplete calculation is to differentiate cosine and stop at \(-\sin(4x)\). That calculation has differentiated the outer function, but it has not accounted for the rate at which \(4x\) changes.
The difference is visible at \(x=\frac{\pi}{8}\). The incorrect expression gives \(-1\), while the correct derivative gives \(-4\), as the difference-quotient check showed. Always account for the inner derivative, even when it is a constant factor.
Why This Method Matters
Many expressions are easiest to understand as a familiar outer function acting on a more complicated input. Recognizing that structure lets you use familiar derivative formulas without treating the entire expression as a new function. It also gives a useful check: each derivative factor has a specific role, and leaving out either one changes the rate of change.
Before simplifying, preserve the product of factors. For example, writing \(5(3x+2)^4\cdot3\) makes the outer and inner contributions visible. It can then be simplified to \(15(3x+2)^4\). This is especially useful when checking work or explaining a derivative to someone else.
Check Your Understanding
For each question, identify the inner and outer functions before calculating.
- Differentiate \(y=(2x-5)^4\), and state the two derivative factors before multiplying.
- Differentiate \(y=\sin(7x)\). What is the inner derivative?
- If \(y=f(g(x))\), \(f'(u)=2u+1\), \(g(x)=3x-2\), and \(g'(x)=3\), write \(\frac{dy}{dx}\) in terms of \(x\).
- Explain why \(\frac{d}{dx}\cos(4x)\) is not just \(-\sin(4x)\).
- For \(y=(3x+2)^5\), give one independent way to check the chain-rule result.