Enter a function
Use x, powers, fractions, roots, parentheses, and supported functions such as sin, cos, ln, and e^x.
Derivative
Apply the chain rule
- 1Start with the entered function
- 2Differentiate each nested layer
The symbolic engine follows the expression from the outer operation inward. Each composite layer contributes its derivative and the derivative of the expression inside it.
- 3Power rule
Bring the exponent down, reduce it by one, then multiply by the inner derivative.
- 4Trigonometric chain rule
Differentiate sin(u), then multiply by u'.
- ✓Final derivative
Chain Rule Calculator Guide
The chain rule differentiates a composite function by differentiating the outer function while keeping its inner input intact, then multiplying by the derivative of that inner function. It is essential whenever one expression is evaluated inside another, such as sin(x²), (3x + 1)⁵, or ln(cos x).
Evaluate the outer derivative at the original inner expression, then multiply by the derivative of the inner expression. For three nested layers, apply the rule repeatedly so every layer contributes a factor.
How to use this calculator
- Enter the composite function using parentheses, for example sin(x^2).
- Identify the outer operation and the expression inside it.
- Differentiate the outer operation while retaining the inner expression.
- Multiply by the derivative of the inner expression.
- Repeat the chain rule for any additional nested layer, then simplify.
Worked example
Problem: Differentiate f(x) = sin(x²).
Method: Let u = x². Then d/du sin(u) = cos(u) and du/dx = 2x.
Result: f′(x) = cos(x²) · 2x = 2x cos(x²).
The derivative of sine is evaluated at the complete inner expression x², and the factor 2x accounts for how quickly x² changes.
Important differentiation ideas
- Keep the inner expression intact. When differentiating the outer function, substitute the full inner expression back into the result before multiplying by the inner derivative.
- Multiply every layer. For f(g(h(x))), the derivative is f′(g(h(x))) · g′(h(x)) · h′(x). Omitting one factor changes the rate.
- Combine rules when needed. A composite expression can also contain products, quotients, and sums. Apply each rule to the part of the expression it governs.
- Respect the domain. For example, ln(u(x)) requires u(x) > 0, and a denominator must remain nonzero.
Common mistakes to avoid
- Forgetting to multiply by the derivative of the inner function.
- Replacing the inner expression too early, for example writing cos(x) instead of cos(x²) for the derivative of sin(x²).
- Multiplying the two function values instead of multiplying the two derivatives in the chain-rule pattern.
- Applying the chain rule to a product without also using the product rule.
- Dropping domain restrictions after simplifying the derivative.
Key terms
- Composite function
- A function formed by applying one function to the output of another, written f(g(x)) or (f ∘ g)(x).
- Outer function
- The operation applied last. In sin(x²), sine is the outer function.
- Inner function
- The expression evaluated first. In sin(x²), the inner function is x².
- Differentiable
- A function is differentiable at a point when its derivative exists there as a finite limit.
Frequently asked questions
What does the chain rule calculate?
It calculates the derivative of a composite function by combining the change in the outer function with the change in its inner input.
What is the chain rule formula?
For y = f(g(x)), dy/dx = f′(g(x))g′(x). The outer derivative is evaluated at the inner function, then multiplied by the inner derivative.
How do I identify the inner function?
Look for the expression being passed into another operation. In cos(4x² + 1), the inner function is 4x² + 1 and cosine is the outer function.
Can the chain rule handle more than two layers?
Yes. Apply it repeatedly, multiplying by the derivative contributed by each nested layer.
Does the calculator simplify every equivalent form?
It simplifies common symbolic operations but may leave a correct derivative in an unsimplified equivalent form. Algebraically equivalent forms can look different.
References
- OpenStax, Rice University: Calculus Volume 1 — The Chain Rule — Composite-function differentiation, repeated layers, and worked chain-rule examples.
- MathCracker: Chain Rule Calculator — Reference for the focused input, composite-function explanation, and worked-step calculator experience.