Composite functions

Chain Rule

Differentiate composite functions by identifying inner and outer layers, applying the chain rule in order, and preserving signs and factors.

How this page is maintained

Written for learners, checked against the sources below, and reviewed every year. Last reviewed July 22, 2026.

Short answer

For a composite function y = f(g(x)), the derivative is y' = f'(g(x))*g'(x). Differentiate the outer function first, keep the inner expression unchanged, then multiply by the inner derivative.

  • Identify inner and outer functions before any derivative step.
  • Do not replace inner expression too early.
  • Multiply by the inner derivative every time.

Decompose nested structure

Expressions like (3x-1)^5, sin(x^2), and e^(4x+7) are composite. They are not handled by a single power or trig rule alone.

Label inner function g(x) and outer function f(u). This makes the chain step explicit and easier to check.

Apply chain rule with clean substitution

Differentiate outer with respect to inner variable, then multiply by derivative of inner with respect to x.

For multiple nesting layers, repeat chain rule from outside to inside.

  • Outer derivative keeps inner expression in place.
  • Inner derivative usually introduces constants.
  • Final check: dimensions and sign should match function behavior.

Differentiate a nested power

Find d/dx of (2x^3 - 5x)^4.

  1. Outer function is u^4, inner function is u = 2x^3 - 5x.
  2. Outer derivative gives 4u^3, so write 4(2x^3 - 5x)^3.
  3. Multiply by inner derivative d/dx(2x^3 - 5x) = 6x^2 - 5.
Result: Derivative is 4(2x^3 - 5x)^3(6x^2 - 5).

Common mistakes

  • Applying power rule but forgetting inner derivative.
  • Differentiating inner first and losing the outer structure.
  • Mixing up which part is inner in trig or exponential composites.
  • Expanding huge powers unnecessarily before differentiating.

Try one

What extra factor appears when differentiating cos(7x)?

A factor of 7 from the inner derivative, giving -sin(7x)*7.

Sources

Learn this with a tutor

Tell LearnLive what you already know and what you need to do with chain rule.

Build this course