Skip to content
LoveToCalc

Theorem — what does that mean?

The chain rule

Differentiate the outer function at the inner one, then multiply by the inner derivative.

In Swedish: Kedjeregeln

ddxf(g(x))=f′(g(x))g′(x)

x
The variable

Practice questions

Work out

f′(2)wheref(x)=(2x−3)4

What the formula says

d/dx f(g(x)) = f′(g(x)) · g′(x)

The chain rule differentiates a composite function, one function inside another. g is the inner function and f the outer one. The derivative is the outer derivative, taken at the inner function, times the inner derivative. The rule is a theorem.

What sets the chain rule apart from the product rule is that the two functions do not stand side by side but one inside the other. sin(x) · x² needs the product rule; sin(x²) needs the chain rule. Run backwards, the chain rule is integration by substitution.

Worked examples

sin(x² + 1). The inner function is g(x) = x² + 1 with g′(x) = 2x. The outer one is sin, with derivative cos.

(2x + 1)³. The inner function is 2x + 1 with derivative 2. The outer one is u³, with derivative 3u².

A linear inner function. d/dx f(3x) = 3 · f′(3x). That is why the derivative of eˣ becomes 3e^(3x) when the exponent is 3x.

Common mistakes

Common questions

When do you use the chain rule? Whenever something other than plain x sits where a function expects its argument: inside a bracket that is raised to a power, in an exponent, under a root sign or inside sin, cos or ln.

How do you tell which function is inner and which is outer? Think about how you would work out the value for a given x. What you work out first is the inner function, what you do last is the outer. In sin(x² + 1) you work out x² + 1 first and take the sine last.

Can you use the chain rule more than once? Yes, once for each layer. sin(e^(x²)) has three: sin outermost, e^u in the middle and x² innermost. The derivative is cos(e^(x²)) · e^(x²) · 2x, one factor per layer.

To see the rule applied to your own function, step by step, there is the derivative calculator.

Last reviewed October 6, 2026 ·How pages are reviewed

Ready-made worksheets with this formula

Sheets that ask this formula, with their answer keys. Open one to see the questions or print it.

High school

  • Differentiation rules

    Four questions on each: the sum rule, the product rule, the quotient rule and the chain rule. No calculator. The first one is worked.

CalculusAll formulas