TExcelTAD
Home › School Calculus: Limits, Derivatives & Integrals › The Chain Rule for Composite Functions

The Chain Rule for Composite Functions

In elementary algebra, functions often nest inside one another: y=(3x2+1)5y = (3x^2 + 1)^5 or y=x3−4y = \sqrt{x^3 - 4}. Here, the output of an inner function u=g(x)u = g(x) serves as the input to an outer function y=f(u)y = f(u).

If you expand (3x2+1)5(3x^2 + 1)^5 by hand using the Binomial Theorem to differentiate it term-by-term, the calculation takes an entire page and is prone to arithmetic slips. If the power is 5050 or a fraction like 12\frac{1}{2}, expanding is outright impossible.

The Chain Rule provides the definitive paper tool for differentiating composite functions swiftly and accurately.


1. Core Formulas

Let y=f(u)y = f(u) where u=g(x)u = g(x). If gg is differentiable at xx and ff is differentiable at g(x)g(x), then the composite function (f∘g)(x)=f(g(x))(f \circ g)(x) = f(g(x)) is differentiable at xx.

Leibniz Notation:dydx=dydu⋅dudxLagrange (Prime) Notation:ddx[f(g(x))]=f′(g(x))⋅g′(x)\begin{aligned} \text{\bf Leibniz Notation:} & \quad \frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} \\ \text{\bf Lagrange (Prime) Notation:} & \quad \frac{d}{dx}\left[ f(g(x)) \right] = f'(g(x)) \cdot g'(x) \end{aligned}

The Generalized Power Rule

A crucial and very common application is differentiating an inner function raised to a constant power nn:

ddx[(u(x))n]=n(u(x))n−1⋅u′(x)\frac{d}{dx}\left[ \big(u(x)\big)^n \right] = n \big(u(x)\big)^{n-1} \cdot u'(x)

The Generalized Radical Rule

For square roots of any differentiable function u(x)>0u(x) > 0:

ddx[u(x)]=u′(x)2u(x)\frac{d}{dx}\left[ \sqrt{u(x)} \right] = \frac{u'(x)}{2\sqrt{u(x)}}

[!IMPORTANT] Verbal Rule to Memorize: "Take the derivative of the outer function, leave the inner function completely untouched inside, then multiply the entire result by the derivative of the inner function."


2. Intuitive Meaning on Paper

Why does the chain factor g′(x)g'(x) appear?

Think of rates of change as gear ratios:

  • If a bicycle wheel yy turns 33 times as fast as the pedals uu (dydu=3\frac{dy}{du} = 3),
  • and the pedals uu turn 22 times as fast as your foot's crank xx (dudx=2\frac{du}{dx} = 2),
  • then the wheel yy turns 3×2=63 \times 2 = 6 times as fast as your foot's crank (dydx=6\frac{dy}{dx} = 6).

The rates of change multiply directly along the chain:

ΔyΔx=ΔyΔu⋅ΔuΔx\frac{\Delta y}{\Delta x} = \frac{\Delta y}{\Delta u} \cdot \frac{\Delta u}{\Delta x}

Taking limits as Δx→0\Delta x \to 0 gives dydx=dydu⋅dudx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}.


3. Step-by-Step Paper Notebook Method

Think of composite functions as layers of an onion: differentiate from the outermost layer to the innermost layer.

mermaid
flowchart LR
    A["Identify Outer f(u) and Inner u = g(x)"] --> B["Compute Outer Derivative f'(u), keeping u unchanged"]
    B --> C["Compute Inner Derivative u' = g'(x) in Margin"]
    C --> D["Multiply: f'(g(x)) × g'(x)"]
    D --> E["Simplify & Factor Result"]
  1. Step 1: Identify Outer and Inner layers.
    • Write u=inside expressionu = \text{inside expression}.
    • Write y=f(u)=outside shell expressiony = f(u) = \text{outside shell expression}.
  2. Step 2: Differentiate the Outer shell.
    • Compute f′(u)f'(u) with respect to uu.
    • Crucial: Keep uu inside parentheses unchanged! Do not touch or differentiate the contents inside uu during this step.
  3. Step 3: Differentiate the Inner function.
    • In the side margin, calculate u′=dudxu' = \frac{du}{dx}.
  4. Step 4: Multiply by the chain factor u′u'.
    • Multiply f′(u)f'(u) by (u′)(u'). Always place u′u' inside parentheses if it contains multiple terms!
  5. Step 5: Substitute back u=g(x)u = g(x) and clean up.
    • Replace any remaining uu with its formula in xx, collect numeric factors at the front, and simplify.

4. Worked Examples

Example 1: The Generalized Power Rule

Problem: Differentiate y=(3x2−5x+1)4y = (3x^2 - 5x + 1)^4 on paper.

Step 1: Identify Outer and Inner functions

  • Inner: u=3x2−5x+1u = 3x^2 - 5x + 1
  • Outer: y=u4y = u^4

Step 2: Differentiate in the margin

dydu=4u3dudx=6x−5\begin{aligned} \frac{dy}{du} &= 4u^3 \\ \frac{du}{dx} &= 6x - 5 \end{aligned}

Step 3: Apply the Chain Rule

dydx=dydu⋅dudx=4u3⋅(6x−5)\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = 4u^3 \cdot (6x - 5)

Step 4: Substitute uu back

dydx=4(3x2−5x+1)3(6x−5)\frac{dy}{dx} = 4(3x^2 - 5x + 1)^3 (6x - 5)

Step 5: Simplify Write the linear factor right after the constant:

dydx=4(6x−5)(3x2−5x+1)3\frac{dy}{dx} = 4(6x - 5)(3x^2 - 5x + 1)^3

Final Answer:

dydx=4(6x−5)(3x2−5x+1)3\frac{dy}{dx} = 4(6x - 5)(3x^2 - 5x + 1)^3

Example 2: Radical of a Polynomial

Problem: Find f′(x)f'(x) on paper for:

f(x)=2x3+7xf(x) = \sqrt{2x^3 + 7x}

Step 1: Rewrite as a rational exponent

f(x)=(2x3+7x)1/2f(x) = (2x^3 + 7x)^{1/2}

Here, u(x)=2x3+7xu(x) = 2x^3 + 7x and the outer function is u1/2u^{1/2}.

Step 2: Differentiate the inner function in the margin

u′(x)=ddx[2x3+7x]=6x2+7u'(x) = \frac{d}{dx}[2x^3 + 7x] = 6x^2 + 7

Step 3: Apply the Generalized Radical / Power Rule

f′(x)=12(u(x))12−1⋅u′(x)=12(2x3+7x)−1/2⋅(6x2+7)\begin{aligned} f'(x) &= \frac{1}{2} \big(u(x)\big)^{\frac{1}{2} - 1} \cdot u'(x) \\ &= \frac{1}{2} (2x^3 + 7x)^{-1/2} \cdot (6x^2 + 7) \end{aligned}

Step 4: Move the negative exponent to the denominator as a square root

f′(x)=6x2+722x3+7xf'(x) = \frac{6x^2 + 7}{2\sqrt{2x^3 + 7x}}

Final Answer:

f′(x)=6x2+722x3+7xf'(x) = \frac{6x^2 + 7}{2\sqrt{2x^3 + 7x}}

Example 3: Combining the Chain Rule with the Quotient Rule

Problem: Calculate g′(x)g'(x) on paper for:

g(x)=(2x+1x−3)3g(x) = \left( \frac{2x + 1}{x - 3} \right)^3

Step 1: Identify the outer power and inner fraction

  • Outer: y=u3  ⟹  dydu=3u2y = u^3 \implies \frac{dy}{du} = 3u^2
  • Inner: u=2x+1x−3u = \frac{2x + 1}{x - 3}

Step 2: Compute u′u' using the Quotient Rule Set up the numerator and denominator:

Num=2x+1  ⟹  Num′=2Den=x−3  ⟹  Den′=1\begin{aligned} \text{Num} &= 2x + 1 \implies \text{Num}' = 2 \\ \text{Den} &= x - 3 \implies \text{Den}' = 1 \end{aligned}

Then:

u′=(2)(x−3)−(2x+1)(1)(x−3)2=2x−6−2x−1(x−3)2=−7(x−3)2\begin{aligned} u' &= \frac{(2)(x - 3) - (2x + 1)(1)}{(x - 3)^2} \\ &= \frac{2x - 6 - 2x - 1}{(x - 3)^2} \\ &= \frac{-7}{(x - 3)^2} \end{aligned}

Step 3: Apply the Chain Rule

g′(x)=3u2⋅u′=3(2x+1x−3)2⋅(−7(x−3)2)\begin{aligned} g'(x) &= 3u^2 \cdot u' \\ &= 3 \left( \frac{2x + 1}{x - 3} \right)^2 \cdot \left( \frac{-7}{(x - 3)^2} \right) \end{aligned}

Step 4: Combine into a single simplified rational fraction

g′(x)=3⋅(2x+1)2(x−3)2⋅−7(x−3)2=3⋅(−7)⋅(2x+1)2(x−3)2⋅(x−3)2=−21(2x+1)2(x−3)4\begin{aligned} g'(x) &= 3 \cdot \frac{(2x + 1)^2}{(x - 3)^2} \cdot \frac{-7}{(x - 3)^2} \\ &= \frac{3 \cdot (-7) \cdot (2x + 1)^2}{(x - 3)^2 \cdot (x - 3)^2} \\ &= \frac{-21(2x + 1)^2}{(x - 3)^4} \end{aligned}

Final Answer:

g′(x)=−21(2x+1)2(x−3)4g'(x) = \frac{-21(2x + 1)^2}{(x - 3)^4}

5. Common Paper Traps & Exam Pitfalls

Common Mistake Why It Fails Correct Paper Method
Forgetting the inner derivative: ddx[(5x−2)3]=3(5x−2)2\frac{d}{dx}[(5x - 2)^3] = 3(5x - 2)^2 Forgets to multiply by ddx[5x−2]=5\frac{d}{dx}[5x - 2] = 5. 3(5x−2)2⋅5=15(5x−2)23(5x - 2)^2 \cdot 5 = 15(5x - 2)^2
Premature inner differentiation: ddx[(x2+4)3]=3(2x)2\frac{d}{dx}[(x^2 + 4)^3] = 3(2x)^2 You must leave the inner expression untouched in the power! 3(x2+4)2⋅(2x)=6x(x2+4)23(x^2 + 4)^2 \cdot (2x) = 6x(x^2 + 4)^2
Missing grouping parentheses on u′u': 4(x2+1)3⋅2x+54(x^2 + 1)^3 \cdot 2x + 5 Without parentheses, only the first term multiplies the chain factor. 4(x2+1)3⋅(2x+5)4(x^2 + 1)^3 \cdot (2x + 5)
Differentiating multi-layer chains halfway: [((2x+1)3+4)2]′[( (2x+1)^3 + 4 )^2]' Fails to chain all the way down to xx. Differentiate layer 1, then layer 2, then layer 3.

6. Pencil & Paper Practice

Grab your pencil and solve these three problems step by step.

  1. Practice 1: Find dydx\frac{dy}{dx} for y=(4−5x2)6y = (4 - 5x^2)^6.
  2. Practice 2: Differentiate f(x)=1(x3+2x)4f(x) = \frac{1}{(x^3 + 2x)^4} by first rewriting it with a negative exponent.
  3. Practice 3: Find the slope of the tangent line to the curve h(x)=x2+5h(x) = \sqrt{x^2 + 5} at the point where x=2x = 2.
Click to view step-by-step solutions

Solution to Practice 1

Let u=4−5x2  ⟹  u′=−10xu = 4 - 5x^2 \implies u' = -10x. Outer function is y=u6  ⟹  y′=6u5⋅u′y = u^6 \implies y' = 6u^5 \cdot u'.

dydx=6(4−5x2)5⋅(−10x)=−60x(4−5x2)5\begin{aligned} \frac{dy}{dx} &= 6(4 - 5x^2)^5 \cdot (-10x) \\ &= -60x(4 - 5x^2)^5 \end{aligned}
  • Final Answer: dydx=−60x(4−5x2)5\frac{dy}{dx} = -60x(4 - 5x^2)^5

Solution to Practice 2

Rewrite with a negative exponent:

f(x)=(x3+2x)−4f(x) = (x^3 + 2x)^{-4}

Let u=x3+2x  ⟹  u′=3x2+2u = x^3 + 2x \implies u' = 3x^2 + 2. Apply the Generalized Power Rule:

f′(x)=−4(x3+2x)−5⋅(3x2+2)=−4(3x2+2)(x3+2x)5\begin{aligned} f'(x) &= -4(x^3 + 2x)^{-5} \cdot (3x^2 + 2) \\ &= -\frac{4(3x^2 + 2)}{(x^3 + 2x)^5} \end{aligned}
  • Final Answer: f′(x)=−4(3x2+2)(x3+2x)5f'(x) = -\frac{4(3x^2 + 2)}{(x^3 + 2x)^5}

Solution to Practice 3

Rewrite the radical: h(x)=(x2+5)1/2h(x) = (x^2 + 5)^{1/2}. Differentiate using the Chain Rule:

h′(x)=12(x2+5)−1/2⋅(2x)=2x2x2+5=xx2+5h'(x) = \frac{1}{2}(x^2 + 5)^{-1/2} \cdot (2x) = \frac{2x}{2\sqrt{x^2 + 5}} = \frac{x}{\sqrt{x^2 + 5}}

Evaluate at x=2x = 2:

h′(2)=222+5=24+5=29=23h'(2) = \frac{2}{\sqrt{2^2 + 5}} = \frac{2}{\sqrt{4 + 5}} = \frac{2}{\sqrt{9}} = \frac{2}{3}
  • Final Answer: The slope of the tangent line is h′(2)=23h'(2) = \frac{2}{3}.

Test yourself

What is the derivative of f(x)=(2x+7)5f(x) = (2x + 7)^5?

  1. 5(2x+7)45(2x + 7)^4
  2. 10(2x+7)410(2x + 7)^4
  3. 10(2x+7)510(2x + 7)^5
  4. 2(2x+7)42(2x + 7)^4

What is ddx[3x2−1]\frac{d}{dx}\left[\sqrt{3x^2 - 1}\right]?

  1. 3x3x2−1\frac{3x}{\sqrt{3x^2 - 1}}
  2. 6x3x2−1\frac{6x}{\sqrt{3x^2 - 1}}
  3. 123x2−1\frac{1}{2\sqrt{3x^2 - 1}}
  4. 3x23x2−1\frac{3x}{2\sqrt{3x^2 - 1}}

If y=u3+2uy = u^3 + 2u and u=4x−1u = 4x - 1, what is dydx\frac{dy}{dx} evaluated at x=1x = 1?

  1. 2929
  2. 116116
  3. 3131
  4. 124124