Chain Rule Calculator

Split a composite function into its outer and inner parts, differentiate each, and multiply. Every layer of the chain is shown.

Reads as sin⁡(x2+1)\sin\left(x^{2} + 1\right)
Try:

Answer

ddx[sin⁡(x2+1)]=2xcos⁡(x2+1)\frac{d}{dx}\left[\sin\left(x^{2} + 1\right)\right] = 2 x \cos\left(x^{2} + 1\right)

Outer function

f(u)=sin⁡(u)f(u) = \sin\left(u\right)f′(u)=cos⁡(u)f'(u) = \cos\left(u\right)

Inner function

u=x2+1u = x^{2} + 1u′=2xu' = 2 x
dydx=f′(u)⋅u′=(cos⁡(x2+1))⋅(2x)\frac{dy}{dx} = f'(u)\cdot u' = \left(\cos\left(x^{2} + 1\right)\right)\cdot\left(2 x\right)

Rates multiply

Inner changes 1.6× as fast as x. Outer changes -0.06915× as fast as u. So f(g(x)) changes 1.6 × -0.06915 = -0.1106× as fast as x.

Step by step

  1. Sum rule

    Differentiate term by term.

    ddx[x2+1]=ddx[x2]+ddx[1]\frac{d}{dx}\left[x^{2} + 1\right] = \frac{d}{dx}\left[x^{2}\right] + \frac{d}{dx}\left[1\right]
  2. Power rule

    d/dx[xⁿ] = n·xⁿ⁻¹.

    ddx[x2]=2x\frac{d}{dx}\left[x^{2}\right] = 2 x
  3. Trig rule + chain rule

    Outer function sin⁡(□)\sin\left(□\right), inner u = x2+1x^{2} + 1; multiply the outer derivative by u′.

    ddx[sin⁡(x2+1)]=cos⁡(x2+1)⋅ddx[x2+1]\frac{d}{dx}\left[\sin\left(x^{2} + 1\right)\right] = \cos\left(x^{2} + 1\right) \cdot \frac{d}{dx}\left[x^{2} + 1\right]

Still stuck? Ask the tutor

An AI tutor reads the problem and steps above and explains them in plain words. It can make mistakes, so check it against the worked steps.

The chain rule in one sentence

Derivative of the outside, evaluated at the inside, times the derivative of the inside: ddxf(g(x))=f′(g(x)) g′(x)\frac{d}{dx}f(g(x)) = f'(g(x))\,g'(x). The slider above shows why: rates of change multiply through each layer, just like gear ratios.

Common mistakes

  • Forgetting the inner derivative: ddxsin⁡(3x)=3cos⁡(3x)\frac{d}{dx}\sin(3x) = 3\cos(3x), not cos⁡(3x)\cos(3x).
  • Changing the inside: the outer derivative keeps the original inner function, cos⁡(x2)\cos(x^2) not cos⁡(2x)\cos(2x).
  • Stopping one layer early on nested functions like sin⁡(x2)\sqrt{\sin(x^2)}.

All the rules together are on derivative rules.

Questions students ask

What is the chain rule?

The rule for differentiating a function inside another function: ddxf(g(x))=f′(g(x))⋅g′(x)\frac{d}{dx}f(g(x)) = f'(g(x))\cdot g'(x). Differentiate the outside (leaving the inside alone), then multiply by the derivative of the inside.

How do I spot the inner function?

Ask "what would I calculate first?" For sin⁡(x2)\sin(x^2) you would square xx first, so g(x)=x2g(x) = x^2 is inside and sin⁡\sin is outside. The calculator draws this split for you.

What about several layers, like sin(e^(3x))?

Apply the rule repeatedly: each layer contributes one factor. ddxsin⁡(e3x)=cos⁡(e3x)⋅e3x⋅3\frac{d}{dx}\sin(e^{3x}) = \cos(e^{3x})\cdot e^{3x}\cdot 3. The steps list shows every layer.

Why does the chain rule work?

Rates multiply. If uu changes 3 times as fast as xx, and yy changes 2 times as fast as uu, then yy changes 2×3=62 \times 3 = 6 times as fast as xx. In Leibniz notation: dydx=dydu⋅dudx\frac{dy}{dx} = \frac{dy}{du}\cdot\frac{du}{dx}.