When a function is built by plugging one function into another, we call it a composite function.
The Chain Rule is the engine that differentiates such compositions. This article gives intuition, the formal statement, a proof, and worked examples you can copy for practice.
Intuition: Rates Inside Rates
If a quantity \(y\) depends on an intermediate variable \(u\), and \(u\) depends on \(x\), then changes in \(x\) ripple through \(u\) to affect \(y\).
Symbolically, let \(y=f(u)\) and \(u=g(x)\). A small change \(\Delta x\) produces \(\Delta u \approx g'(x)\,\Delta x\), which then produces \(\Delta y \approx f'(u)\,\Delta u\).
Multiplying the rates suggests \(\displaystyle \frac{dy}{dx} \approx f'(u)\,g'(x)\), evaluated at \(u=g(x)\). The Chain Rule makes this exact.
Formal Statement (Two Equivalent Forms)
Function Composition Form
If \(g\) is differentiable at \(x\) and \(f\) is differentiable at \(g(x)\), then the composite \(F(x)=f(g(x))\) is differentiable at \(x\), and
\(F'(x)=f’\!\big(g(x)\big)\cdot g'(x).\)
Leibniz Form
Writing \(y=f(u)\) and \(u=g(x)\) with both differentiable,
\(\displaystyle \frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx},\)
where \(\displaystyle\frac{dy}{du}\) is evaluated at \(u=g(x)\) and \(\displaystyle\frac{du}{dx}\) at \(x\).
A Proof of the Chain Rule
Setup
Let \(y=f(u)\) with \(f\) differentiable at \(b=g(a)\), and let \(u=g(x)\) be differentiable at \(a\).
Define the increments \(\Delta x\), \(\Delta u=g(a+\Delta x)-g(a)\), and \(\Delta y=f(b+\Delta u)-f(b)\).
By the definition of differentiability, there exist functions \(\varepsilon_1(\Delta x)\) and \(\varepsilon_2(\Delta u)\) with \(\varepsilon_1\to 0\) as \(\Delta x\to 0\) and \(\varepsilon_2\to 0\) as \(\Delta u\to 0\) such that
\(\Delta u = g'(a)\,\Delta x + \varepsilon_1(\Delta x)\,\Delta x = \big[g'(a)+\varepsilon_1(\Delta x)\big]\Delta x,\)
\(\Delta y = f'(b)\,\Delta u + \varepsilon_2(\Delta u)\,\Delta u = \big[f'(b)+\varepsilon_2(\Delta u)\big]\Delta u.\)
Combine
Substitute the expression for \(\Delta u\) into \(\Delta y\):
\(\Delta y = \big[f'(b)+\varepsilon_2(\Delta u)\big]\big[g'(a)+\varepsilon_1(\Delta x)\big]\Delta x.\)
Divide by \(\Delta x\):
\(\displaystyle \frac{\Delta y}{\Delta x} = \big[f'(b)+\varepsilon_2(\Delta u)\big]\big[g'(a)+\varepsilon_1(\Delta x)\big].\)
Take Limits
As \(\Delta x\to 0\), we have \(\Delta u\to 0\), so
\(\varepsilon_1(\Delta x)\to 0\)
and
\(\varepsilon_2(\Delta u)\to 0\).
Therefore,
\(\displaystyle \frac{dy}{dx} = \lim_{\Delta x\to 0}\frac{\Delta y}{\Delta x} = f'(b)\,g'(a) = f’\!\big(g(a)\big)\,g'(a).\)
Since \(a\) was arbitrary, the formula holds for every \(x\) in the domain. This proves the Chain Rule.
Useful Special Case: Power Rule + Chain Rule
If \(n\) is any real number and \(u=g(x)\) is differentiable, then
\(\displaystyle \frac{d}{dx}\big(u^n\big) = n\,u^{\,n-1}\,\frac{du}{dx} = n\,[g(x)]^{\,n-1}\,g'(x).\)
Worked Examples
Example 1: A Root of a Quadratic
Let \(F(x)=\sqrt{x^2+3}\). Write \(u=x^2+3\), so \(F(x)=u^{1/2}\). Then
\(F'(x)=\displaystyle \frac{1}{2}\,u^{-1/2}\cdot \frac{du}{dx} = \frac{1}{2\sqrt{u}}\cdot 2x = \displaystyle \frac{x}{\sqrt{x^2+3}}.\)
Example 2: Sine of a Square
Differentiate \(y=\sin(x^2-5)\). Take \(u=x^2-5\).
\(\displaystyle \frac{dy}{dx}=\cos(u)\cdot \frac{du}{dx} =\cos(x^2-5)\cdot 2x =2x\cos(x^2-5).\)
Example 3: Squared Sine
Differentiate \(y=\big(\sin 2x\big)^2\).
View it as outer \((\cdot)^2\) and inner \(\sin(2x)\):
\(\displaystyle \frac{dy}{dx} =2\sin(2x)\cdot \frac{d}{dx}[\sin(2x)] =2\sin(2x)\cdot \cos(2x)\cdot 2 =4\sin(2x)\cos(2x).\)
(Equivalently, \(y’ = 2\sin(2x)\cos(2x)=\sin(4x)\) by a trig identity.)
Example 4: A Quotient Inside a Power
Let \(g(t)=\left(\displaystyle\frac{t+1}{3t-2}\right)^{7}\). Then
\(g'(t) =7\left(\displaystyle\frac{t+1}{3t-2}\right)^{6} \cdot \displaystyle\frac{d}{dt}\!\left(\displaystyle\frac{t+1}{3t-2}\right) =7\left(\displaystyle\frac{t+1}{3t-2}\right)^{6} \cdot \displaystyle\frac{(3t-2)\cdot 1-(t+1)\cdot 3}{(3t-2)^2}\)
\(\quad =7\left(\displaystyle\frac{t+1}{3t-2}\right)^{6} \cdot \displaystyle\frac{3t-2-3t-3}{(3t-2)^2} = -\,\displaystyle\frac{35}{(3t-2)^{\,8}}\,(t+1)^{6}.\)
Example 5: Product + Chain
Differentiate \(y=(x-1)^{4}\,(x^3+2)^{5}\). Use the Product Rule and then the Chain Rule:
\(\displaystyle \frac{dy}{dx} =(x-1)^{4}\cdot 5(x^3+2)^{4}\cdot 3x^{2} +(x^3+2)^{5}\cdot 4(x-1)^{3}.\)
You may factor \((x-1)^{3}(x^3+2)^{4}\) for a cleaner final form if desired.
Example 6: Exponential of a Trig Function
Differentiate \(y=e^{\cos(3x)}\).
\(\displaystyle \frac{dy}{dx} =e^{\cos(3x)}\cdot \frac{d}{dx}[\cos(3x)] =e^{\cos(3x)}\cdot (-\sin(3x))\cdot 3 =-3e^{\cos(3x)}\sin(3x).\)
Example 7: Two Links in the Chain
If \(f(x)=\sin(\cos(x^2))\), then
\(f'(x)=\cos(\cos(x^2))\cdot \frac{d}{dx}[\cos(x^2)] =\cos(\cos(x^2))\cdot\big(-\sin(x^2)\big)\cdot 2x =-2x\,\cos(\cos(x^2))\,\sin(x^2).\)
Common Pitfalls
- Forgetting to multiply by the inner derivative. Every outer differentiation must be followed by the derivative of the inside.
- Evaluating at the wrong place. In \(f'(g(x))\), the outer derivative is computed at \(u=g(x)\), not at \(x\).
- Product vs. chain. If factors are multiplied (not composed), apply the Product Rule first, then the Chain Rule to each factor as needed.
Takeaway
The Chain Rule turns complicated compositions into manageable steps: differentiate the outer, keep the inside unchanged, and multiply by the derivative of the inner. Mastering this pattern unlocks derivatives across algebraic, trigonometric, exponential, and logarithmic families.
See more in: Wikipedia, Khan Academy, and MIT OCW.









