Calculus · Grade 12 and undergraduate
The Chain Rule: Derivatives of Composite Functions
Quick answer
A composite function f(g(x)) has an outer function f and an inner function g. The chain rule says its derivative is f′(g(x)) · g′(x): differentiate the outer function with the inside left alone, then multiply by the derivative of the inside. In Leibniz notation, dy/dx = dy/du · du/dx, because rates of change multiply along a chain like gear ratios. The rule gives the derivatives of [g(x)]^n, e^g(x), sin g(x), ln g(x) and a^x.
What you'll learn
- Identify the outer and inner functions of a composite
- Apply the chain rule, in function and Leibniz notation
- Differentiate powers, exponentials, sines and logarithms of an inner function
- Apply the chain rule more than once, and differentiate a^x
Functions inside functions
is a composite: first compute the inner function , then apply the outer function . So are , and .
None of the rules so far handles these directly, and expanding by hand is no way to live.
The chain rule
If , then
Differentiate the outer function, leaving the inside untouched, then multiply by the derivative of the inside. With , the same rule in Leibniz notation reads
Why the rates multiply
Think of three gears. If gear turns times for each turn of gear , and gear turns times for each turn of , then turns times for each turn of .
Derivatives are rates, and rates along a chain compound the same way. A small change causes a change in the inner function. That in turn causes . Each link multiplies the change by its own rate, so the rate through the whole chain is the product of the rates.
Patterns to know
Each row is the chain rule with a familiar outer function:
| Function | Derivative |
|---|---|
And for any base : since , the chain rule gives
Worked examples
Common mistakes
Practice problems
-
Differentiate .
Answer
Full solution
.
-
Differentiate .
Answer
Full solution
, so .
-
Differentiate and .
Answer
and
Full solution
The inner functions are and , with derivatives and .
-
Differentiate .
Answer
Full solution
.
-
Differentiate .
Answer
Full solution
.
-
Differentiate .
Answer
Full solution
, so .
-
Differentiate .
Answer
Full solution
Three links: the cube, the tangent, the . .
-
Differentiate .
Answer
Full solution
Product rule, with the chain rule for : .
-
If , , and , find .
Answer
Full solution
.
-
A student writes . What went wrong?
Hint
What is the derivative of the inside?
Answer
The inner derivative is missing. The answer is .
Full solution
The outer derivative must be multiplied by the derivative of , which is .
.
Frequently asked questions
What is the chain rule?
The derivative of f(g(x)) is f′(g(x)) · g′(x): the derivative of the outer function, evaluated at the inner one, times the derivative of the inner function.
How do I spot a composite function?
Look for something other than plain x inside a function: a power of (3x + 1), e raised to −x², the sine of 5x. The something is the inner function.
Why do the derivatives multiply?
Rates of change compound. If u changes 3 times as fast as x, and y changes 2 times as fast as u, then y changes 6 times as fast as x.
What is the derivative of a^x?
a^x ln a. Write a^x = e^(x ln a) and apply the chain rule.
What is the derivative of ln(g(x))?
g′(x)/g(x). For example, the derivative of ln(x² + 1) is 2x/(x² + 1).