Chain Rule Calculator

Free chain rule calculator with step-by-step solutions. Decompose composite functions into outer and inner layers, apply the chain rule, and see the full derivative with interactive graph.

= sin(x^2 + 1)

sin(x²)
cos(3x+1)
e^(x²)
ln(x²+1)
(2x+1)⁵
√(x²+4)
tan(sin(x))
sin³(x)
e^(sin(x))
ln(cos(x))
(x³-2x)⁴
arctan(x²)

Derivative

Chain Rule

cos(x^2 + 1) · 2x

Chain Decomposition

Outer and inner functions

O
Outer function

f(u) = sin(u)

f′(u) = cos(u)

I
Inner function

g(x) = x^2 + 1

g′(x) = 2x

Graph

f(x) and f'(x)

-4-2024
f(x)
f′(x)

Step-by-Step Solution

Chain rule applied step by step

1

Identify the composite function

f(g(x)) where f(u) = sin(u)

u = g(x) = x^2 + 1

sin(x^2 + 1)

2

Differentiate the outer function

f′(u) = cos(u)

Substitute u = x^2 + 1

f′(g(x)) = cos((x^2 + 1))

3

Differentiate the inner function

g(x) = x^2 + 1

Apply standard differentiation rules

g′(x) = 2x

4

Apply the Chain Rule: multiply derivatives

d/dx[f(g(x))] = f′(g(x)) · g′(x)

= cos((x^2 + 1)) · 2x

cos(x^2 + 1) · 2x

Common Chain Rule Patterns

Quick reference for frequently used compositions

FunctionDerivative
sin(u)cos(u) · u'
cos(u)-sin(u) · u'
e^ue^u · u'
ln(u)(1/u) · u'
u^nn·u^(n-1) · u'
tan(u)sec²(u) · u'
√u1/(2√u) · u'
a^ua^u·ln(a) · u'
arcsin(u)1/√(1-u²) · u'
arctan(u)1/(1+u²) · u'

What Is the Chain Rule?

The fundamental rule for differentiating composite functions

Composition of functions

The chain rule computes the derivative of a composite function — a function built by plugging one into another. If y = f(g(x)), the chain rule gives dy/dx = f'(g(x)) · g'(x).

Leibniz's intuition

If y = f(u) and u = g(x), then dy/dx = (dy/du) · (du/dx). The du terms "cancel" like fractions — an elegant mnemonic that makes the rule easy to remember.

Chain Rule Formula

d/dx[f(g(x))] = f'(g(x)) · g'(x)

Lagrange

(f ∘ g)'(x) = f'(g(x)) · g'(x)

Leibniz

dy/dx = (dy/du) · (du/dx)

Common Chain Rule Patterns

Most frequently used chain rule derivatives in calculus

PatternFormula
Trig + Chain
d/dx[sin(u)] = cos(u) · u'
Exponential + Chain
d/dx[e^u] = e^u · u'
Power + Chain
d/dx[u^n] = n·u^(n-1) · u'
Log + Chain
d/dx[ln(u)] = (1/u) · u'
Root + Chain
d/dx[√u] = u'/(2√u)
Inverse Trig + Chain
d/dx[arctan(u)] = u'/(1+u²)

Always multiply by the inner derivative u' — it's the step most students forget.

When to Use the Chain Rule

Recognizing composite functions in calculus problems

Use the chain rule whenever you need to differentiate a function within a function. If the argument is more than just the variable, the chain rule applies.

Trig of a non-x expression

sin(x²), cos(3x + 1), tan(ln(x))

Exponential with a non-x exponent

e^(2x), e^(sin(x)), 2^(x²)

Power of a non-x base

(x² + 1)³, (sin(x))⁴

Log of a non-x argument

ln(x² + 1), log(sin(x))

Nested functions

sin(cos(x)), e^(ln(x²)), √(tan(x))

If the argument is simply x (like sin(x) or e^x), use basic derivative rules directly — no chain rule needed.

Common Mistakes with the Chain Rule

Pitfalls to avoid when differentiating composite functions

Forgetting the inner derivative

The most common error — differentiating the outer function but forgetting to multiply by the derivative of the inner function.

Wrong

d/dx[sin(x²)] = cos(x²)

Correct

d/dx[sin(x²)] = cos(x²) · 2x

Not recognizing the composition

Failing to identify that a function is composite and trying to use basic rules directly.

Wrong

d/dx[e^(3x)] = e^(3x)

Correct

d/dx[e^(3x)] = 3·e^(3x)

Wrong order of composition

Mixing up which function is the outer and which is the inner when decomposing.

Wrong

sin(x²): outer = x², inner = sin

Correct

sin(x²): outer = sin(u), inner = x²

Frequently Asked Questions

Common questions about the chain rule and composite function derivatives

Embed Chain Rule Calculator

Add this calculator to your website or blog for free.