Chain Rule Calculator
Free chain rule calculator with step-by-step solutions. Decompose composite functions into outer and inner layers, apply the chain rule, and see the full derivative with interactive graph.
= sin(x^2 + 1)
Derivative
cos(x^2 + 1) · 2x
Chain Decomposition
Outer and inner functions
f(u) = sin(u)
f′(u) = cos(u)
g(x) = x^2 + 1
g′(x) = 2x
Graph
f(x) and f'(x)
Step-by-Step Solution
Chain rule applied step by step
Identify the composite function
f(g(x)) where f(u) = sin(u)
u = g(x) = x^2 + 1
sin(x^2 + 1)
Differentiate the outer function
f′(u) = cos(u)
Substitute u = x^2 + 1
f′(g(x)) = cos((x^2 + 1))
Differentiate the inner function
g(x) = x^2 + 1
Apply standard differentiation rules
g′(x) = 2x
Apply the Chain Rule: multiply derivatives
d/dx[f(g(x))] = f′(g(x)) · g′(x)
= cos((x^2 + 1)) · 2x
cos(x^2 + 1) · 2x
Common Chain Rule Patterns
Quick reference for frequently used compositions
| Function | Derivative |
|---|---|
| sin(u) | cos(u) · u' |
| cos(u) | -sin(u) · u' |
| e^u | e^u · u' |
| ln(u) | (1/u) · u' |
| u^n | n·u^(n-1) · u' |
| tan(u) | sec²(u) · u' |
| √u | 1/(2√u) · u' |
| a^u | a^u·ln(a) · u' |
| arcsin(u) | 1/√(1-u²) · u' |
| arctan(u) | 1/(1+u²) · u' |
What Is the Chain Rule?
The fundamental rule for differentiating composite functions
The chain rule computes the derivative of a composite function — a function built by plugging one into another. If y = f(g(x)), the chain rule gives dy/dx = f'(g(x)) · g'(x).
If y = f(u) and u = g(x), then dy/dx = (dy/du) · (du/dx). The du terms "cancel" like fractions — an elegant mnemonic that makes the rule easy to remember.
Chain Rule Formula
d/dx[f(g(x))] = f'(g(x)) · g'(x)
Lagrange
(f ∘ g)'(x) = f'(g(x)) · g'(x)
Leibniz
dy/dx = (dy/du) · (du/dx)
Common Chain Rule Patterns
Most frequently used chain rule derivatives in calculus
| Pattern | Formula |
|---|---|
Trig + Chain | d/dx[sin(u)] = cos(u) · u' |
Exponential + Chain | d/dx[e^u] = e^u · u' |
Power + Chain | d/dx[u^n] = n·u^(n-1) · u' |
Log + Chain | d/dx[ln(u)] = (1/u) · u' |
Root + Chain | d/dx[√u] = u'/(2√u) |
Inverse Trig + Chain | d/dx[arctan(u)] = u'/(1+u²) |
Always multiply by the inner derivative u' — it's the step most students forget.
When to Use the Chain Rule
Recognizing composite functions in calculus problems
Use the chain rule whenever you need to differentiate a function within a function. If the argument is more than just the variable, the chain rule applies.
sin(x²), cos(3x + 1), tan(ln(x))
e^(2x), e^(sin(x)), 2^(x²)
(x² + 1)³, (sin(x))⁴
ln(x² + 1), log(sin(x))
sin(cos(x)), e^(ln(x²)), √(tan(x))
If the argument is simply x (like sin(x) or e^x), use basic derivative rules directly — no chain rule needed.
Common Mistakes with the Chain Rule
Pitfalls to avoid when differentiating composite functions
The most common error — differentiating the outer function but forgetting to multiply by the derivative of the inner function.
Wrong
d/dx[sin(x²)] = cos(x²)
Correct
d/dx[sin(x²)] = cos(x²) · 2x
Failing to identify that a function is composite and trying to use basic rules directly.
Wrong
d/dx[e^(3x)] = e^(3x)
Correct
d/dx[e^(3x)] = 3·e^(3x)
Mixing up which function is the outer and which is the inner when decomposing.
Wrong
sin(x²): outer = x², inner = sin
Correct
sin(x²): outer = sin(u), inner = x²
Frequently Asked Questions
Common questions about the chain rule and composite function derivatives
Embed Chain Rule Calculator
Add this calculator to your website or blog for free.
You Might Also Like
Related calculators from other categories
Last updated Apr 29, 2026