CALCULUS WORKSPACE

Chain Rule Calculator

Differentiate nested functions with a clear chain rule, symbolic result, and rule-by-rule working.

CALCULUS

Enter a function

Examples

Use x, powers, fractions, roots, parentheses, and supported functions such as sin, cos, ln, and e^x.

EXACT SYMBOLIC RESULT

Derivative

✓ Calculated
f′(x)=2⋅cos⁡(x2)⋅xf'(x) = 2 \cdot \cos\left({x}^{2}\right) \cdot x
WORKED SOLUTION

Apply the chain rule

fracddxf(g(x))=f′(g(x))g′(x)\\frac{d}{dx}f(g(x))=f'(g(x))g'(x)
  1. 1
    Start with the entered functiony=sin⁡(x2)y = \sin\left({x}^{2}\right)
  2. 2
    Differentiate 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.

  3. 3
    Power rule

    Bring the exponent down, reduce it by one, then multiply by the inner derivative.

    x2⟶2⋅x{x}^{2} \longrightarrow 2 \cdot x
  4. 4
    Trigonometric chain rule

    Differentiate sin(u), then multiply by u'.

    sin⁡(x2)⟶2⋅cos⁡(x2)⋅x\sin\left({x}^{2}\right) \longrightarrow 2 \cdot \cos\left({x}^{2}\right) \cdot x
  5. ✓
    Final derivativef′(x)=2⋅cos⁡(x2)⋅xf'(x) = 2 \cdot \cos\left({x}^{2}\right) \cdot x
CORE IDEA

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).

ddxf(g(x))=f′(g(x)) g′(x)\frac{d}{dx}f(g(x))=f'(g(x))\,g'(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

  1. Enter the composite function using parentheses, for example sin(x^2).
  2. Identify the outer operation and the expression inside it.
  3. Differentiate the outer operation while retaining the inner expression.
  4. Multiply by the derivative of the inner expression.
  5. 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

Related calculus tools