Try the rule calculator
Definition and meaning
The chain rule differentiates a composite function. For h(x)=f(g(x)), the derivative is h'(x)=f'(g(x))g'(x). In plain language: differentiate the outside function while leaving the inside in place, then multiply by the derivative of the inside. Each additional nested layer contributes another derivative factor.
Why the rule works
If u=g(x), then a small change in x first creates a change in u, and that change creates a change in f(u). The difference quotient can be viewed as [change in f/change in u] times [change in u/change in x]. Taking the limit yields df/dx=(df/du)(du/dx), provided the relevant derivatives exist.
A reliable hand method
Read the expression from the outside inward. Mark each layer, differentiate the outermost layer, preserve its input, and multiply by the derivative of that input. Repeat until reaching x. A substitution such as u=3x+1 can make the layers visible without changing the mathematics.
Example 1: (3*x+1)^5
Answer: 15(3x+1)^4
- Differentiate u^5 to get 5u^4.
- Multiply by u'=3.
Example 2: sin(2*x)
Answer: 2cos(2x)
- Preserve the inner expression 2x.
- Multiply cos(2x) by the inner derivative 2.
Example 3: ln(x^2+1)
Answer: 2x/(x^2+1)
- The outer derivative is 1/u.
- Multiply by 2x from the inner polynomial.
Example 4: sqrt(1+x^4)
Answer: 2x^3/sqrt(1+x^4)
- Write the root as u^(1/2).
- Multiply by 4x^3 and simplify the coefficient.
Common mistakes
The most common mistake is stopping after differentiating the outside. The derivative of sin(2x) is not cos(2x); the missing factor is 2. Another error is changing the inside while applying the outer derivative. Preserve the complete inner expression until its own derivative is multiplied.
How to verify an answer
Differentiate the expression independently, compare the structure of each term, and substitute a safe numerical value into both the symbolic derivative and a centered difference quotient. Avoid points outside the original domain and points near a discontinuity. A matching numerical value increases confidence, but it cannot establish equality for every input. Algebraic reasoning and domain analysis remain necessary.
When the calculator and handwritten work differ, first check parentheses, multiplication symbols, the selected variable, and any missing chain-rule factor. Then factor or expand both answers to see whether they are equivalent. The DerivCalc methodology explains why simplification is deliberately conservative.
Related derivative calculators
Questions about this calculator
Can I use the Chain Rule Calculator for homework checks?
Yes. Compare the result and named rules with your own work, then check domain restrictions. The numerical spot-check is a consistency test, not a formal proof.
Why can an equivalent answer look different?
Factoring, expanding, reciprocal notation, and trigonometric identities can produce different-looking expressions with the same values on their shared domain.
Does the calculator replace learning the rule?
No. It is designed to expose the rule and intermediate reasoning. The worked examples explain how to select and apply the method by hand.
Editorial standard: formulas and notation are checked against OpenStax Calculus Volume 1, Chapter 3. Content is written and maintained by SilverCodeLabs. Report a correction with the exact expression and expected result.