The chain rule differentiates a composition: a function applied to the output of another function. It translates how the outer output changes per inner unit and how the inner value changes per input unit into one overall rate.
Think in layers
If and then
Differentiate the outer function while leaving its input intact, then multiply by the derivative of the inner function. The notation resembles cancellation of units, but the rule is a theorem about derivatives, not a license to treat every differential expression as an ordinary fraction.
For the outer function is the fifth power and the inner function is The derivative is
Example: several nested layers
Differentiate The outermost layer is sine, the middle layer is a cube, and the innermost expression is
Working inward gives
Every changing layer contributes a factor. The cosine's input remains the original cubed expression; differentiating does not replace that input by its derivative.
A useful way to avoid missing a layer is to name intermediate variables temporarily, then restore the original expression after differentiating.
Example: chain and product rules together
For first recognize a product. Its derivative is
The exponential factor needs the chain rule because its exponent is Factoring gives
Choosing the outer structure first is important. The chain rule handles composition, while the product rule handles multiplication. An expression can require both, and using one does not automatically account for the other.
For the outer log derivative gives and the inner derivative gives producing Its original argument is always positive, so the function and derivative are defined for every real .
Higher derivatives mean differentiate again
The second derivative is the derivative of The third derivative is and higher orders can be written These are not powers of the first derivative.
For the derivatives are and Further derivatives are zero.
For sine and cosine, derivatives cycle: sine, cosine, negative sine, negative cosine, then sine again. The cycle can simplify a high-order derivative, but an inner coefficient still contributes repeatedly.
Example: the inner factor appears at every differentiation
For the first derivative is Differentiating again gives The coefficient is 4 because the inner derivative 2 appears both times.
For the nth derivative is It is not merely at every order. Each new differentiation multiplies by another 3.
When differentiating a product such as to find a second derivative, apply the product rule anew. A first derivative that looks simpler can still contain multiple changing factors.
Keep rates and units coherent
If position is measured in meters and time in seconds, the first derivative has units and the second . A second derivative measures how the first rate changes, not the amount squared.
Likewise, if a cost depends on temperature and temperature depends on time, the chain rule multiplies dollars per degree by degrees per hour to give dollars per hour. This interpretation often makes the required factors intuitive.
A constant inner function has derivative zero, making the entire composition constant. The chain rule captures this automatically through its inner derivative factor.
Try it yourself
Find the first and second derivatives of
Answer: The first is Using the product rule again gives Expanding the original to provides the same derivatives as a check.
What to remember
Identify the outer structure, differentiate each layer, and multiply all inner rates. For higher derivatives, start a fresh differentiation of the complete previous derivative.