Intuition The core idea (WHY it exists)
A composite function f ( g ( x ) ) f(g(x)) f ( g ( x )) is a machine feeding a machine . You wiggle x x x a tiny bit, the inner machine g g g amplifies the wiggle by its rate g ′ ( x ) g'(x) g ′ ( x ) , then the outer machine f f f amplifies that wiggle by its rate f ′ ( g ( x ) ) f'(g(x)) f ′ ( g ( x )) . Total amplification = product of the two amplifications.
The rates multiply because they act in sequence, like gear ratios in a gearbox.
If g g g is differentiable at x x x and f f f is differentiable at g ( x ) g(x) g ( x ) , then the composite h ( x ) = f ( g ( x ) ) h(x)=f(g(x)) h ( x ) = f ( g ( x )) is differentiable at x x x and
h ′ ( x ) = f ′ ( g ( x ) ) ⋅ g ′ ( x ) . h'(x) = f'(g(x))\cdot g'(x). h ′ ( x ) = f ′ ( g ( x )) ⋅ g ′ ( x ) .
In Leibniz notation, with u = g ( x ) u=g(x) u = g ( x ) and y = f ( u ) y=f(u) y = f ( u ) :
d y d x = d y d u ⋅ d u d x . \frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}. d x d y = d u d y ⋅ d x d u .
The Leibniz form makes the multiplication look like cancelling fractions — that's a mnemonic, not a proof (they are not literal fractions).
Common mistake Steel-man: "Just cancel
Δ u \Delta u Δ u — the proof is one line!"
Why it feels right: the naïve cancellation gives the correct answer , and d y / d x = ( d y / d u ) ( d u / d x ) dy/dx=(dy/du)(du/dx) d y / d x = ( d y / d u ) ( d u / d x ) looks like fraction cancellation.
Why it's wrong: Δ u \Delta u Δ u can equal 0 0 0 for infinitely many Δ x ≠ 0 \Delta x\neq 0 Δ x = 0 (e.g. g ( x ) = x 2 sin ( 1 / x ) g(x)=x^2\sin(1/x) g ( x ) = x 2 sin ( 1/ x ) near 0 0 0 , or any constant patch). Dividing by Δ u \Delta u Δ u is then undefined.
The fix: the E ( k ) E(k) E ( k ) "error function" multiplies — never divides — so it survives Δ u = 0 \Delta u=0 Δ u = 0 . Same answer, but legal everywhere.
h ( x ) = ( 3 x 2 + 1 ) 5 h(x)=(3x^2+1)^5 h ( x ) = ( 3 x 2 + 1 ) 5
Outer f ( u ) = u 5 f(u)=u^5 f ( u ) = u 5 , inner g ( x ) = 3 x 2 + 1 g(x)=3x^2+1 g ( x ) = 3 x 2 + 1 .
f ′ ( u ) = 5 u 4 f'(u)=5u^4 f ′ ( u ) = 5 u 4 — why? power rule on the outer shell.
g ′ ( x ) = 6 x g'(x)=6x g ′ ( x ) = 6 x — why? derivative of the inside.
h ′ ( x ) = 5 ( 3 x 2 + 1 ) 4 ⋅ 6 x = 30 x ( 3 x 2 + 1 ) 4 . h'(x)=5(3x^2+1)^4\cdot 6x = 30x(3x^2+1)^4. h ′ ( x ) = 5 ( 3 x 2 + 1 ) 4 ⋅ 6 x = 30 x ( 3 x 2 + 1 ) 4 .
Why this step? Plug u = g ( x ) u=g(x) u = g ( x ) back into f ′ ( u ) f'(u) f ′ ( u ) , then multiply by g ′ ( x ) g'(x) g ′ ( x ) .
h ( x ) = sin ( x 2 ) h(x)=\sin(x^2) h ( x ) = sin ( x 2 )
f ( u ) = sin u ⇒ f ′ ( u ) = cos u f(u)=\sin u\Rightarrow f'(u)=\cos u f ( u ) = sin u ⇒ f ′ ( u ) = cos u ; g ( x ) = x 2 ⇒ g ′ ( x ) = 2 x g(x)=x^2\Rightarrow g'(x)=2x g ( x ) = x 2 ⇒ g ′ ( x ) = 2 x .
h ′ ( x ) = cos ( x 2 ) ⋅ 2 x = 2 x cos ( x 2 ) . h'(x)=\cos(x^2)\cdot 2x=2x\cos(x^2). h ′ ( x ) = cos ( x 2 ) ⋅ 2 x = 2 x cos ( x 2 ) .
Why this step? Differentiate the outer sin \sin sin keeping the inside frozen, then multiply by the inside's rate. Note cos ( x 2 ) ≠ cos ( 2 x ) \cos(x^2)\neq\cos(2x) cos ( x 2 ) = cos ( 2 x ) — keep the inside intact!
h ( x ) = e sin x h(x)=e^{\sin x} h ( x ) = e s i n x
f ( u ) = e u , f ′ ( u ) = e u f(u)=e^u,\ f'(u)=e^u f ( u ) = e u , f ′ ( u ) = e u ; g ( x ) = sin x , g ′ ( x ) = cos x g(x)=\sin x,\ g'(x)=\cos x g ( x ) = sin x , g ′ ( x ) = cos x .
h ′ ( x ) = e sin x cos x . h'(x)=e^{\sin x}\cos x. h ′ ( x ) = e s i n x cos x .
Worked example 4. Triple nesting:
h ( x ) = cos ( 4 x ) = ( cos 4 x ) 1 / 2 h(x)=\sqrt{\cos(4x)}=(\cos 4x)^{1/2} h ( x ) = cos ( 4 x ) = ( cos 4 x ) 1/2
Chain it twice: outermost power, then cos \cos cos , then 4 x 4x 4 x .
h ′ ( x ) = 1 2 ( cos 4 x ) − 1 / 2 ⋅ ( − sin 4 x ) ⋅ 4 = − 2 sin 4 x cos 4 x . h'(x)=\tfrac12(\cos 4x)^{-1/2}\cdot(-\sin 4x)\cdot 4 = \frac{-2\sin 4x}{\sqrt{\cos 4x}}. h ′ ( x ) = 2 1 ( cos 4 x ) − 1/2 ⋅ ( − sin 4 x ) ⋅ 4 = c o s 4 x − 2 s i n 4 x .
Why this step? Each layer contributes one factor; multiply all the layer-rates together (peel the onion outside-in).
Worked example 5. Verify against a known rule —
h ( x ) = ( x 2 ) 3 = x 6 h(x)=(x^2)^{3}=x^6 h ( x ) = ( x 2 ) 3 = x 6
Chain: 6 ( x 2 ) 2 ⋅ 2 x = 6 x 4 ⋅ 2 x = 12 x 5 6(x^2)^2\cdot 2x=6x^4\cdot 2x=12x^5 6 ( x 2 ) 2 ⋅ 2 x = 6 x 4 ⋅ 2 x = 12 x 5 . Direct: d d x x 6 = 6 x 5 \frac{d}{dx}x^6=6x^5 d x d x 6 = 6 x 5 .
Mismatch?! Re-check: outer f ( u ) = u 3 f(u)=u^3 f ( u ) = u 3 , f ′ = 3 u 2 f'=3u^2 f ′ = 3 u 2 , so 3 ( x 2 ) 2 ⋅ 2 x = 3 x 4 ⋅ 2 x = 6 x 5 3(x^2)^2\cdot2x=3x^4\cdot2x=6x^5 3 ( x 2 ) 2 ⋅ 2 x = 3 x 4 ⋅ 2 x = 6 x 5 . ✓
Why this step? Forecast-then-verify caught my arithmetic slip (I wrote 6 6 6 instead of 3 3 3 for f ′ f' f ′ ) — always re-derive f ′ f' f ′ .
Recall Feynman: explain to a 12-year-old
Imagine a bike with two gears connected. You pedal a little (that's x x x ). The first gear turns 3× as fast as your pedals. The second gear turns 5× as fast as the first. So the back wheel turns 5 × 3 = 15 5\times 3 = 15 5 × 3 = 15 times as fast as your feet. The chain rule just says: to get the total speed-up, multiply the speed-ups of each gear. f ′ ( g ( x ) ) f'(g(x)) f ′ ( g ( x )) is the second gear's ratio, g ′ ( x ) g'(x) g ′ ( x ) is the first gear's ratio.
Mnemonic "Outside-in, peel the onion"
D erivative of the O utside (leave inside alone), T imes derivative of the I nside.
DOTI : "Do the Outside, Then the Inside (and multiply)."
Recall Active recall checkpoint
Cover the answers. Can you (a) state both notations, (b) explain why naïve cancellation fails, (c) differentiate sin ( x 2 ) \sin(x^2) sin ( x 2 ) without peeking?
What is the chain rule for h = f ( g ( x ) ) h=f(g(x)) h = f ( g ( x )) ? h ′ ( x ) = f ′ ( g ( x ) ) g ′ ( x ) h'(x)=f'(g(x))\,g'(x) h ′ ( x ) = f ′ ( g ( x )) g ′ ( x ) .
State the chain rule in Leibniz notation. d y d x = d y d u ⋅ d u d x \dfrac{dy}{dx}=\dfrac{dy}{du}\cdot\dfrac{du}{dx} d x d y = d u d y ⋅ d x d u with
u = g ( x ) u=g(x) u = g ( x ) .
Why can't we just multiply/divide by Δ u \Delta u Δ u in the proof? Δ u = g ( x + Δ x ) − g ( x ) \Delta u=g(x+\Delta x)-g(x) Δ u = g ( x + Δ x ) − g ( x ) can be
0 0 0 even when
Δ x ≠ 0 \Delta x\neq0 Δ x = 0 , making the division undefined.
What property of g g g guarantees Δ u → 0 \Delta u\to0 Δ u → 0 as Δ x → 0 \Delta x\to0 Δ x → 0 ? Differentiability of
g g g implies continuity of
g g g .
In the rigorous proof, what is E ( k ) E(k) E ( k ) and why is it used? The error
E ( k ) = f ( u + k ) − f ( u ) k − f ′ ( u ) E(k)=\frac{f(u+k)-f(u)}{k}-f'(u) E ( k ) = k f ( u + k ) − f ( u ) − f ′ ( u ) (with
E ( 0 ) = 0 E(0)=0 E ( 0 ) = 0 ); it lets us
multiply instead of divide, avoiding
Δ u = 0 \Delta u=0 Δ u = 0 .
Differentiate sin ( x 2 ) \sin(x^2) sin ( x 2 ) . 2 x cos ( x 2 ) 2x\cos(x^2) 2 x cos ( x 2 ) .
Differentiate e sin x e^{\sin x} e s i n x . e sin x cos x e^{\sin x}\cos x e s i n x cos x .
Differentiate ( 3 x 2 + 1 ) 5 (3x^2+1)^5 ( 3 x 2 + 1 ) 5 . 30 x ( 3 x 2 + 1 ) 4 30x(3x^2+1)^4 30 x ( 3 x 2 + 1 ) 4 .
For triple nesting, how many factors appear? One per layer; multiply all layer-derivatives, evaluating each outer at the relevant inner value.
Common slip when differentiating sin ( x 2 ) \sin(x^2) sin ( x 2 ) ? Writing
cos ( 2 x ) \cos(2x) cos ( 2 x ) — you must keep the inside intact:
cos ( x 2 ) \cos(x^2) cos ( x 2 ) , then multiply by
2 x 2x 2 x .
Derivative — limit definition — the chain rule is built directly from the difference-quotient limit.
Continuity implies differentiability fails converse — we use "differentiable ⇒ continuous" for g g g .
Product rule and Quotient rule — sibling differentiation rules; often combined with the chain rule.
Implicit differentiation — is literally the chain rule applied to y ( x ) y(x) y ( x ) .
Related rates — physical applications where d y d t = d y d x d x d t \frac{dy}{dt}=\frac{dy}{dx}\frac{dx}{dt} d t d y = d x d y d t d x .
Inverse function derivative — derived by chain-ruling f ( f − 1 ( x ) ) = x f(f^{-1}(x))=x f ( f − 1 ( x )) = x .
wiggle amplified in sequence
multiply and divide by delta u
h' = f' of g x times g' x
dy/dx = dy/du times du/dx
Fraction cancelling mnemonic
Derivative definition limit
Intuition Hinglish mein samjho
Dekho, chain rule ka core idea bahut simple hai: jab ek function doosre function ke andar baitha ho — jaise sin ( x 2 ) \sin(x^2) sin ( x 2 ) — toh hum use "machine feeding machine" ki tarah sochte hain. Pehle inner machine g ( x ) = x 2 g(x)=x^2 g ( x ) = x 2 apna kaam karti hai, uska rate hota hai g ′ ( x ) = 2 x g'(x)=2x g ′ ( x ) = 2 x . Phir outer machine sin \sin sin uske upar kaam karti hai, uska rate hota hai cos ( inside ) \cos(\text{inside}) cos ( inside ) . Total rate = dono rates ka multiplication : h ′ ( x ) = f ′ ( g ( x ) ) ⋅ g ′ ( x ) h'(x)=f'(g(x))\cdot g'(x) h ′ ( x ) = f ′ ( g ( x )) ⋅ g ′ ( x ) . Yaad rakho gear example — agar pehla gear 3× tez ghoomta hai aur doosra usse 5× tez, toh wheel 15 × 15\times 15 × tez. Rates multiply hote hain kyunki wo sequence mein lagte hain.
Proof ka asli twist yeh hai: agar tum seedha Δ u \Delta u Δ u se multiply-divide karoge toh galat ho sakta hai, kyunki kabhi-kabhi Δ u = g ( x + Δ x ) − g ( x ) \Delta u = g(x+\Delta x)-g(x) Δ u = g ( x + Δ x ) − g ( x ) zero ho jata hai even when Δ x ≠ 0 \Delta x \neq 0 Δ x = 0 . Tab divide karna illegal hai. Isliye hum ek "error function" E ( k ) E(k) E ( k ) banate hain jo k = 0 k=0 k = 0 par bhi 0 0 0 deti hai aur continuous hoti hai. Isse hum multiply karte hain, divide nahi — toh zero-wala problem khatam. Yahi cheez exam mein extra marks dilati hai jab teacher rigorous proof maangta hai.
Practical tip: hamesha "outside-in" peel karo — pehle bahar wale function ka derivative lo (inside ko mat chhedo), phir inside ka derivative multiply karo. Galti yeh hoti hai ki log sin ( x 2 ) \sin(x^2) sin ( x 2 ) ka derivative cos ( 2 x ) \cos(2x) cos ( 2 x ) likh dete hain — galat! Inside intact rehna chahiye: cos ( x 2 ) ⋅ 2 x \cos(x^2)\cdot 2x cos ( x 2 ) ⋅ 2 x . DOTI yaad rakho: D erivative of O utside T imes derivative of I nside. Triple nesting mein bas har layer ka ek factor multiply karte jao.