Chain Rule Calculator

Enter your composite function using standard math notation (e.g. cos(2x), sin(x²), (3x+1)⁵) and the Chain Rule Calculator will apply the chain rule to find the derivative. Select the variable, choose optional simplification, and get the derivative result with a step-by-step breakdown of the outer and inner function derivatives.

Enter the composite function using standard notation. Use * for multiplication and ^ for powers.

Results

Derivative f'(x)

--

Outer Function f(u)

--

Inner Function g(x)

--

Derivative of Outer f'(u)

--

Derivative of Inner g'(x)

--

Chain Rule: f'(g(x)) · g'(x)

--

Results Table

Frequently Asked Questions

What is the chain rule in calculus?

The chain rule is a formula for finding the derivative of a composite function. If y = f(g(x)), the chain rule states that dy/dx = f'(g(x)) · g'(x). In words: you differentiate the outer function (leaving the inner function unchanged) and then multiply by the derivative of the inner function.

How do I identify the outer and inner functions?

The inner function g(x) is the expression 'inside' — the one you would substitute first if you were evaluating. The outer function f(u) is applied to that result. For example, in cos(2x), the inner function is 2x and the outer function is cos(u).

Can the chain rule be applied more than once?

Yes — when a function has multiple layers of composition, you apply the chain rule repeatedly. For example, sin((3x+1)²) requires applying the chain rule to the sine, then again to the squared term. This is sometimes called the 'extended chain rule' or 'generalized chain rule'.

What is the chain rule formula?

The chain rule formula is: d/dx[f(g(x))] = f'(g(x)) · g'(x). Equivalently, using Leibniz notation: dy/dx = (dy/du) · (du/dx), where u = g(x) is the inner function and y = f(u) is the outer function.

How do I differentiate e^(3x) using the chain rule?

For e^(3x), the outer function is e^u and the inner function is g(x) = 3x. The derivative of e^u is e^u, and the derivative of 3x is 3. Applying the chain rule: d/dx[e^(3x)] = e^(3x) · 3 = 3e^(3x).

Does the chain rule apply to trigonometric functions?

Absolutely. Any trig function with a non-trivial argument requires the chain rule. For example, d/dx[sin(5x)] = cos(5x) · 5 = 5cos(5x), and d/dx[tan(x²)] = sec²(x²) · 2x = 2x·sec²(x²).

What is the difference between the chain rule and the product rule?

The chain rule applies when one function is composed inside another — f(g(x)). The product rule applies when two functions are multiplied together — f(x)·g(x). Sometimes a derivative requires both rules at once, for example d/dx[x·sin(x²)] uses the product rule at the outer level and the chain rule for sin(x²).

How do I use this calculator to apply the chain rule?

Type your composite function into the input field using standard notation (e.g. cos(2*x) or (3*x+1)^5), or select a preset example. Choose the variable you are differentiating with respect to, and the calculator will identify the outer and inner functions, compute their derivatives, and display the full chain rule result step by step.

More Math Tools