The Chain Rule: How to Differentiate Functions Inside Functions
When you have a function nested inside another function — like (3x + 1)⁵ or sin(x²) — you can’t just differentiate the outside and ignore the inside. The Chain Rule says: take the derivative of the outer function (leaving the inner function alone), then multiply by the derivative of the inner function. In symbols: if y = f(g(x)), then y’ = f'(g(x)) · g'(x).
Derivative of the outside, times derivative of the inside. Memory hook: peel the function like an onion — outer layer first, then work inward.
The logic behind the rule
- 💡 Think of nested functions as a machine inside a machine — x goes into g first, then the result goes into f.
- 💡 The Chain Rule tracks how a tiny change in x ripples through both layers.
- ✅ Each layer’s rate of change gets multiplied because rates compound, just like unit conversions.
One line to remember: derivatives of nested functions multiply because change passes through each layer.
Where students trip up
- ❌ Forgetting to multiply by the inner derivative (the most common error).
- ❌ Differentiating the inside first instead of the outside.
- ❌ Dropping parentheses and losing track of what’s ‘inside’ vs ‘outside.’
- ✅ Fix: always label the outer and inner function before differentiating.
If your answer feels too simple, you probably forgot the inner derivative.
How to recognize when to use it
- 🎯 Powers of expressions: (3x+1)⁵, (x²-4)³
- 🎯 Trig of expressions: sin(x²), cos(5x)
- 🎯 Exponentials and logs of expressions: e^(2x), ln(x²+1)
- 💡 Rule of thumb: if you see a function ‘wrapped around’ another expression, the Chain Rule applies.
Copy-paste method
- 1️⃣ Identify the outer function f and inner function g.
- 2️⃣ Differentiate f, keeping g(x) unchanged inside it.
- 3️⃣ Differentiate g(x) separately.
- 4️⃣ Multiply the two results together.
y = f(g(x)) y' = f'(g(x)) * g'(x)
Same four steps work for every nested function, every time.
Try it: y = sin(x²)
- Outer function: sin(u), derivative = cos(u)
- Inner function: u = x², derivative = 2x
- Combine: y’ = cos(x²) · 2x
✅ Final answer: y’ = 2x·cos(x²) — same pattern every time you see a function inside a function.


