The Chain Rule

Many functions are built by composition: one function applied inside another. The Chain Rule tells us how to differentiate such compositions by multiplying the derivative of the outer function (evaluated at the inner function) by the derivative of the inner function.

Form Chain Rule
Function notation \phi'(x)=f'(g(x))\cdot g'(x)
Leibniz notation d y d x = d y d u d u d x
Operator form (f\circ g)'=(f'\circ g)\cdot g'

Statement and Interpretation

How can we differentiate ϕ ( x ) = x 2 + 1 ? This function is the composition of y = f ( u ) = u and u = g ( x ) = x 2 + 1 .

The Chain Rule. If ϕ ( x ) = f ( g ( x ) ) , then ϕ has a derivative and

\phi'(x)=f'(g(x))\cdot g'(x)

If y = f ( u ) where u = g ( x ) , then

\frac{dy}{dx}=\frac{dy}{du}\cdot\frac{du}{dx}=f'(u)\cdot g'(x)

When applying the Chain Rule, proceed from the outer function to the inner:

\frac{d}{dx}\bigg[f(g(x))\bigg]=\underbrace{f'}_{\text{derivative of outer}}(\underbrace{g(x)}_{\text{at inner}})\cdot\underbrace{g'(x)}_{\text{derivative of inner}}

The expression d y d x = d y d u d u d x is slightly imprecise. To be rigorous:

( d y d x ) x 0 = ( d y d u ) g ( x 0 ) ( d u d x ) x 0

The derivative of y with respect to x at x 0 equals the derivative of y with respect to u evaluated at g ( x 0 ) , multiplied by the derivative of u with respect to x at x 0 .

Proof An increment Δ x determines Δ u = g ( x + Δ x ) g ( x ) , and in turn Δ y = f ( u + Δ u ) f ( u ) . The key step: define \alpha(\Delta u)=\begin{cases}\dfrac{f(u+\Delta u)-f(u)}{\Delta u}-f'(u) & \text{if }\Delta u\neq0\\0 & \text{if }\Delta u=0\end{cases} Since f is differentiable, α is continuous at Δ u = 0 with lim Δ u 0 α ( Δ u ) = 0 . It follows that f(u+\Delta u)-f(u)=\Delta u\,[\alpha(\Delta u)+f'(u)] This holds even when Δ u = 0 . Therefore: \begin{aligned} \lim_{\Delta x\to0}\frac{\phi(x+\Delta x)-\phi(x)}{\Delta x}&=\lim_{\Delta x\to0}\frac{\Delta u\,[\alpha(\Delta u)+f'(u)]}{\Delta x}\\ &=\underbrace{\lim_{\Delta x\to0}\frac{\Delta u}{\Delta x}}_{g'(x)}\cdot\underbrace{\lim_{\Delta x\to0}[\alpha(\Delta u)+f'(u)]}_{0+f'(u)}\\ &=g'(x)\cdot f'(g(x)) \end{aligned}

Triple composition: If y = f ( u ) , u = g ( v ) , v = h ( x ) , then

\frac{dy}{dx}=\frac{dy}{du}\frac{du}{dv}\frac{dv}{dx}=f'(g(h(x)))\cdot g'(h(x))\cdot h'(x)

Worked Examples

Compute \phi'(x) if ϕ ( x ) = x 2 + 1 .

Solution Write ϕ = f g with f ( x ) = x and g ( x ) = x 2 + 1 . Since f'(x)=\dfrac{1}{2\sqrt{x}}: f'(x^2+1)=\frac{1}{2\sqrt{x^2+1}} Therefore \phi'(x)=\frac{1}{2\sqrt{x^2+1}}\cdot2x=\frac{x}{\sqrt{x^2+1}} Using Leibniz notation: set y = u and u = x 2 + 1 : d y d x = 1 2 u 2 x = x x 2 + 1

Prove d d x x m / n = m n x m / n 1 where m and n are integers.

Solution Let y = u m and u = x 1 / n . Then d y d x = d y d u d u d x = ( m u m 1 ) ( 1 n x 1 / n 1 ) = m n x ( m 1 ) / n x ( 1 n ) / n = m n x m / n 1

Evaluate d d x 1 3 x 2 .

Solution Let u = 1 3 x 2 and y = u : d y d x = 1 2 u ( 6 x ) = 3 x 1 3 x 2

Evaluate d d x 4 x 2 3 x 5 .

Solution Let y = u 1 / 5 and u = 4 x 2 3 / x : d y d u = 1 5 u 4 / 5 = 1 5 ( 4 x 2 3 x ) 4 / 5 d u d x = 8 x + 3 x 2 d y d x = 1 5 ( 4 x 2 3 x ) 4 / 5 ( 8 x + 3 x 2 ) = ( 8 5 x + 3 5 x 2 ) 1 ( 4 x 2 3 x ) 4 5

The Power Rule with Chain Rule

In general, the Power Rule combined with the Chain Rule gives:

d d x u α = α u α 1 d u d x

The derivative of a function raised to a constant power equals the product of the exponent, the function raised to the diminished power, and the derivative of the function.

Differentiate y = ( 1 x 2 ) 2 + 3 ( 1 x 2 ) + 1 .

Solution Let u = 1 / x 2 , then y = u 2 + 3 u + 1 : d y d x = ( 2 u + 3 ) d d x x 2 = ( 2 u + 3 ) ( 2 x 3 ) = ( 2 x 2 + 3 ) ( 2 x 3 ) = 4 x 5 6 x 3

If y = ( x + 1 ) x 2 + 1 , find d y / d x .

Solution \begin{aligned} \frac{dy}{dx}&=1\cdot\sqrt{x^2+1}+(x+1)\cdot\frac{1}{2}(x^2+1)^{-1/2}\cdot2x\\ &=\sqrt{x^2+1}+\frac{x(x+1)}{\sqrt{x^2+1}}\\ &=\frac{x^2+1+x^2+x}{\sqrt{x^2+1}}=\frac{2x^2+x+1}{\sqrt{x^2+1}} \end{aligned}

If y = x x 5 + 1 5 , find d y / d x .

Solution Write y = ( x x 5 + 1 ) 1 / 5 . Let u = x / ( x 5 + 1 ) , so y = u 1 / 5 : d y d x = 1 5 u 4 / 5 d u d x = 1 5 ( x x 5 + 1 ) 4 / 5 ( x 5 + 1 ) 5 x 5 ( x 5 + 1 ) 2 = 1 5 x 4 / 5 1 4 x 5 ( x 5 + 1 ) 6 / 5

If f ( x ) = x 2 1 3 and g ( x ) = x 4 1 , find (g\circ f)'(x) and its value at x = 3 .

Solution **Method (a):** Let u = f ( x ) = ( x 2 1 ) 1 / 3 and y = g ( u ) = u 4 1 . d u d x = 1 3 ( x 2 1 ) 2 / 3 2 x = 2 x 3 ( x 2 1 ) 2 3 d y d x = 4 u 3 d u d x = 4 ( x 2 1 ) 2 x 3 ( x 2 1 ) 2 3 = 8 3 x ( x 2 1 ) 2 3 At x = 3 : d y d x | x = 3 = 8 3 3 8 2 3 = 8 4 = 16 . **Method (b):** Since f ( 3 ) = ( 9 1 ) 1 / 3 = 2 : f'(x)=\frac{2x}{3}(x^2-1)^{-2/3},\qquad g'(x)=4x^3 (g\circ f)'(3)=g'(f(3))\cdot f'(3)=g'(2)\cdot f'(3)=(4\cdot8)\times\frac{2}{3\cdot(8)^{2/3}}=32\times\frac{2}{12}=16 Both methods agree: (g\circ f)'(3)=16.

Frequently Asked Questions

How do I identify the inner and outer functions? Ask what the last operation performed would be if you were computing f ( x ) from scratch. For x 2 + 1 , the last step is taking the square root, so the outer function is and the inner function is x 2 + 1 .

Can I apply the Chain Rule multiple times? Yes. For y = f ( g ( h ( x ) ) ) the derivative is f'(g(h(x)))\cdot g'(h(x))\cdot h'(x). Just work from outermost to innermost.

Why does the simple "cancel d u " argument have a flaw? The simple proof assumes Δ u 0 when dividing Δ y / Δ x by Δ u / Δ u . But Δ u can be zero for infinitely many values of Δ x . The rigorous proof using the auxiliary function α handles this case.