Chain Rule Calculator — Step-by-Step Derivatives

Calculate derivatives of composite functions using the chain rule. Picks outer and inner function, shows u-substitution steps, dy/du, du/dx, and final answer.

Chain Rule — Step by Step

Function to differentiate:

y = sin(x^2)

1

Identify inner and outer functions

Let u = g(x) = x^2 (inner)

Then y = f(u) = sin(u) (outer)

2

Differentiate the outer function (with respect to u)

dy/du = cos(u)

3

Differentiate the inner function (with respect to x)

du/dx = g'(x) = 2x^1

4

Apply chain rule: dy/dx = (dy/du) × (du/dx)

Substitute g(x) back in for u:

Answer:

dy/dx = [cos(x^2)] · [2x^1]

Chain rule: if y = f(g(x)), then dy/dx = f'(g(x)) · g'(x)

93% found this helpful

How to Use This Calculator

  1. 1

    Select the outer function f(u)

    Choose the outermost function — the last operation applied to x. Options include power (uⁿ), sin, cos, tan, eᵘ, ln, √u, arcsin, and arctan. For y = sin(x²), select sin. For y = (3x+1)⁵, select power and set n=5.

  2. 2

    Select the inner function g(x)

    Choose the inner function — what's inside the outer function. Options include xⁿ, ax+b, sin(x), cos(x), eˣ, ln(x), and √x. Set any parameters (exponent n, coefficients a and b for linear functions).

  3. 3

    Read the step-by-step solution

    The calculator shows: (1) the composite function y = f(g(x)), (2) u-substitution: let u = g(x), (3) dy/du from the outer function, (4) du/dx from the inner function, (5) the final answer dy/dx = f'(g(x)) × g'(x).

What Each Value Means

Outer Function f(u) (function)
The function applied last in a composition. When you substitute g(x) for u, you get the full composite function f(g(x)). The chain rule requires differentiating this function with respect to u (not x), keeping the inner function g(x) as the argument.
Inner Function g(x) (function)
The function applied first in a composition — the argument of the outer function. Its derivative g'(x) is the multiplier in the chain rule: dy/dx = f'(g(x)) × g'(x). Correctly identifying g(x) is the key first step.
dy/du (expression)
The derivative of the outer function with respect to u, evaluated at u = g(x). This treats the inner function as if it were a simple variable u. For example, if the outer function is sin(u), then dy/du = cos(u) = cos(g(x)).

Frequently Asked Questions

What is the chain rule in calculus?
The chain rule is a formula for differentiating composite functions. If y = f(g(x)), then dy/dx = f'(g(x)) × g'(x). In words: differentiate the outer function (keeping the inner function inside), then multiply by the derivative of the inner function. Example: y = sin(x²). Outer = sin(u), inner = u = x². dy/dx = cos(x²) × 2x.
What is u-substitution in the chain rule?
U-substitution is a notation technique that makes chain rule steps explicit. Let u = g(x) (the inner function). Then y = f(u) (the outer function). Find dy/du (outer derivative) and du/dx (inner derivative). Apply chain rule: dy/dx = (dy/du) × (du/dx), then substitute g(x) back for u. Example: y = e^(3x). Let u = 3x, so y = e^u. dy/du = e^u. du/dx = 3. dy/dx = e^u × 3 = 3e^(3x).
How do I identify the inner and outer functions?
The outer function is the 'last operation' applied. The inner function is what's 'inside' that outer function. For sin(x²): sin is the outer (last applied), x² is the inner (computed first). For e^(cos x): e^ is the outer, cos x is the inner. For (3x+1)^5: power (^5) is the outer, 3x+1 is the inner. A useful test: cover the inner function with the letter u and identify what shape the outer function has.
What are common chain rule patterns I should memorize?
Six patterns cover most calculus problems: (1) d/dx[f(x)^n] = n·f(x)^(n-1)·f'(x). (2) d/dx[sin(f(x))] = cos(f(x))·f'(x). (3) d/dx[cos(f(x))] = -sin(f(x))·f'(x). (4) d/dx[e^(f(x))] = e^(f(x))·f'(x). (5) d/dx[ln(f(x))] = f'(x)/f(x). (6) d/dx[√f(x)] = f'(x)/(2√f(x)). In each case, multiply the standard derivative by f'(x) — the derivative of the inner function.
Can the chain rule be applied multiple times?
Yes — for deeply nested functions like sin(e^(x²)), you apply the chain rule repeatedly. Outermost first: d/dx[sin(e^(x²))] = cos(e^(x²)) × d/dx[e^(x²)]. Then apply chain rule again to the inner: d/dx[e^(x²)] = e^(x²) × 2x. Combining: cos(e^(x²)) × e^(x²) × 2x. Each application peels one layer off the composition.