The chain rule is the most important differentiation rule of all. It differentiates composite functions, a function inside another function, such as (3x + 1)⁵, √(1 + x²) or sin(x²). Almost every derivative you meet from now on uses it, often more than once. This lesson explains the idea with a simple “rates multiply” picture, gives two ways to write the rule, and works through examples from easy to tricky, including the chain rule combined with the product and quotient rules.
In this lesson you will learn
- How to spot the inside and outside functions
- The chain rule in Leibniz form dy/dx = dy/du · du/dx
- The “outside-inside” method: f′(g(x)) · g′(x)
- The general power rule for (expression)ⁿ
- Using the chain rule several times, and with the product and quotient rules
You should know composite functions, the power rule and the product and quotient rules.
The Idea: Rates Multiply
Imagine three gears. Gear A turns gear B, and gear B turns gear C. If B turns 3 times for each turn of A, and C turns 4 times for each turn of B, then C turns 3 × 4 = 12 times for each turn of A. Rates of change in a chain multiply.
In a composite function y = f(g(x)), let u = g(x) be the inside. Then x changes u, and u changes y:
dy dy du
── = ── · ── (Leibniz form)
dx du dx
It looks as if the du’s cancel. They do not really cancel, because dy/dx is not a fraction, but the notation makes the rule easy to remember.
The Outside-Inside Method
d/dx [ f(g(x)) ] = f′(g(x)) · g′(x)
1. Differentiate the OUTSIDE function, leaving the inside unchanged.
2. Multiply by the derivative of the INSIDE.
Example 1: y = (3x + 1)⁵
Outside: ( )⁵ → 5( )⁴
Inside: 3x + 1 → 3
dy/dx = 5(3x + 1)⁴ · 3 = 15(3x + 1)⁴
Example 2: y = √(1 + x²) = (1 + x²)^(1/2)
Outside: ( )^(1/2) → ½( )^(−1/2)
Inside: 1 + x² → 2x
dy/dx = ½(1 + x²)^(−1/2) · 2x = x / √(1 + x²)
Check Example 1 a different way: expanding (3x + 1)⁵ fully and differentiating every term gives the same polynomial as 15(3x + 1)⁴, just with much more work. The chain rule saves you that work.
The General Power Rule
The most common use of the chain rule is a bracket raised to a power:
d/dx [ (g(x))ⁿ ] = n (g(x))ⁿ⁻¹ · g′(x)
y = 1/(x² − 5)³ = (x² − 5)⁻³
dy/dx = −3(x² − 5)⁻⁴ · 2x = −6x / (x² − 5)⁴
The “times the inside derivative” is the part people forget
Without the extra factor g′(x), the answer is wrong unless the inside happens to be plain x. A quick check: if the inside is exactly x, its derivative is 1, and the chain rule reduces to the ordinary power rule. Any other inside must contribute its own derivative.
With Trigonometric and Exponential Functions
You will learn these derivatives fully in the next two lessons; here is a preview of how the chain rule combines with them.
d/dx sin(x²) = cos(x²) · 2x = 2x cos(x²)
d/dx sin²x = 2 sin x · cos x = sin 2x (outside is ( )², inside is sin x)
d/dx e^(5x) = e^(5x) · 5 = 5e^(5x)
d/dx ln(x² + 1) = (1/(x² + 1)) · 2x = 2x/(x² + 1)
Notice the difference between sin(x²), where x is squared first, and sin²x = (sin x)², where the sine is squared. They have different inside and outside functions.
Several Layers
Some functions have a chain of three or more. Work from the outside in, multiplying a derivative for each layer:
y = sin³(2x) = (sin(2x))³
Layer 1 (cube): 3 sin²(2x)
Layer 2 (sine): cos(2x)
Layer 3 (2x): 2
dy/dx = 3 sin²(2x) · cos(2x) · 2 = 6 sin²(2x) cos(2x)
Chain Rule With Product and Quotient Rules
y = x²(2x − 1)⁴
Product rule with u = x², v = (2x − 1)⁴.
u′ = 2x, v′ = 4(2x − 1)³ · 2 = 8(2x − 1)³ (chain rule inside)
dy/dx = 2x(2x − 1)⁴ + x² · 8(2x − 1)³
= 2x(2x − 1)³ [ (2x − 1) + 4x ] (take out the common factor)
= 2x(2x − 1)³ (6x − 1)
Factorising the answer, as in the last two lines, is worth the effort. It makes the derivative easy to set equal to zero: here dy/dx = 0 at x = 0, x = 1/2 and x = 1/6.
Common Mistakes
- Forgetting to multiply by the inside derivative. d/dx (3x + 1)⁵ is not 5(3x + 1)⁴.
- Changing the inside when differentiating the outside. Keep g(x) unchanged inside f′.
- Mixing up sin(x²) and sin²x. Identify which function is applied last; that is the outside.
- Stopping after one layer. Every layer contributes a factor.
- Leaving the answer unsimplified when you need its zeros. Factorise common brackets.
Practice Exercises
Exercise 1. Differentiate y = (x³ − 2x)⁴.
Show answer
dy/dx = 4(x³ − 2x)³ · (3x² − 2) = 4(3x² − 2)(x³ − 2x)³.
Exercise 2. Differentiate y = 1/√(4 − x²).
Show answer
y = (4 − x²)^(−1/2). dy/dx = −½(4 − x²)^(−3/2) · (−2x) = x / (4 − x²)^(3/2).
Exercise 3. Find the slope of y = (2x + 1)³ at x = 1.
Show answer
dy/dx = 3(2x + 1)² · 2 = 6(2x + 1)². At x = 1: 6 · 9 = 54.
Frequently Asked Questions
What is the chain rule in simple words?
The chain rule differentiates a function inside another function. Differentiate the outside function while leaving the inside unchanged, then multiply by the derivative of the inside. In Leibniz notation, dy/dx equals dy/du times du/dx.
How do I know when to use the chain rule?
Use it whenever something other than plain x sits inside a function: a bracket raised to a power, a square root of an expression, or sin, cos, e or ln of anything more than x. If you can name an inside and an outside function, you need the chain rule.
Summary
- Chain rule: dy/dx = dy/du · du/dx, or [f(g(x))]′ = f′(g(x)) · g′(x).
- Differentiate the outside, keep the inside, then multiply by the inside’s derivative.
- General power rule: [(g(x))ⁿ]′ = n(g(x))ⁿ⁻¹ g′(x).
- Many layers mean many factors, one per layer.
- Combine with the product and quotient rules, then factorise the result.
