Skip to content
EN - Language: English

Lesson 3 of 3 · 15 min

The chain rule: derivatives of composite functions

How to differentiate a function inside a function - and how not to lose the derivative of the inner function along the way.

The chain rule

A composite function is a function inside a function, for example (3x+1)5(3x + 1)^5: on the outside there’s a power, on the inside there’s 3x+13x + 1. You differentiate it like this:

(f(g(x)))′=f′(g(x))⋅g′(x)\big(f(g(x))\big)' = f'(g(x)) \cdot g'(x)

In words: the derivative of the outer function (with the inside left untouched) times the derivative of the inner function.

Example 1: a power

For (3x+1)5(3x + 1)^5, the outer function is u5u^5 and the inner function is u=3x+1u = 3x + 1:

((3x+1)5)′=5(3x+1)4⋅3=15(3x+1)4\big((3x + 1)^5\big)' = 5(3x + 1)^4 \cdot 3 = 15(3x + 1)^4

Example 2: sine

(sin⁡(x2))′=cos⁡(x2)⋅2x\big(\sin(x^2)\big)' = \cos(x^2) \cdot 2x

Example 3: a square root

(1+x2)′=121+x2⋅2x=x1+x2\left(\sqrt{1 + x^2}\right)' = \frac{1}{2\sqrt{1 + x^2}} \cdot 2x = \frac{x}{\sqrt{1 + x^2}}

A common mistake

Forgetting the inner derivative. If you skipped multiplying by 33 in Example 1, you’d get 5(3x+1)45(3x + 1)^4 - a result three times too small. A good habit: once you’ve differentiated the outer function, always ask yourself what’s inside.

Sources

We checked the facts on this page against these sources. All of them may be reused freely: they carry an open licence or are not covered by copyright.

  1. Active Calculus (Boelkins) - 2.5 The chain rule (inner and outer functions, C'(x) = f'(g(x)) g'(x), the example sin(x²)) · CC BY-SA 4.0
  2. Dale Hoffman - Contemporary Calculus, 2.4 The Chain Rule (derivative of the outside function times the derivative of the inside function) (PDF) · CC BY 3.0 US
  3. Calaway, Hoffman and Lippman - Applied Calculus, 2.5 Chain Rule (the rule in words, the most common place for mistakes) (PDF) · CC BY 3.0 US
  4. Jameson, Machaba and Fasinu - Misconceptions and Errors Among Grade 12 Students When Learning Differentiation Rules, Mathematics Education Journal 8(2), 2024 (overlooking the chain rule, treating the inner function as a constant) · CC BY-SA 4.0
  5. Wikibooks - Calculus/Chain Rule (the rule and the exercise with the square root of 1 + x²) · CC BY-SA 4.0