The chain rule is the derivative rule for a function inside another function. If one quantity depends on a middle step, and that middle step depends on xx, the total rate of change comes from multiplying those two changes together.

What The Chain Rule Says

If y=f(g(x))y = f(g(x)), and gg is differentiable at xx while ff is differentiable at g(x)g(x), then:

ddxf(g(x))=f(g(x))g(x)\frac{d}{dx} f(g(x)) = f'(g(x)) \cdot g'(x)

In plain language: differentiate the outer function, keep the inner expression in place, then multiply by the derivative of the inner expression.

Intuition

A composite function changes in two layers. First, a small change in xx changes the inner expression g(x)g(x). Then that change in g(x)g(x) changes the outer value f(g(x))f(g(x)).

The chain rule connects those layers. It says the overall change is the change from the outside times the change from the inside.

Worked Example

Find the derivative of:

y=(3x2+1)5y = (3x^2 + 1)^5

Here the inner function is:

u=3x2+1u = 3x^2 + 1

and the outer function is:

y=u5y = u^5

Differentiate the outer function first:

dydu=5u4\frac{dy}{du} = 5u^4

Now differentiate the inner function:

dudx=6x\frac{du}{dx} = 6x

Multiply them:

dydx=dydududx=5u46x\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx} = 5u^4 \cdot 6x

Substitute back u=3x2+1u = 3x^2 + 1:

dydx=30x(3x2+1)4\frac{dy}{dx} = 30x(3x^2 + 1)^4

That last factor, 6x6x, is the part people most often forget.

Common Mistakes

  1. Differentiating the outer function and stopping too early. For (3x2+1)5(3x^2 + 1)^5, 5(3x2+1)45(3x^2 + 1)^4 is not the full derivative.
  2. Misidentifying the outer function. In sin(x2)\sin(x^2), the outer function is sin()\sin(\cdot), not the square.
  3. Using the chain rule when there is no composition. For x3+1x^3 + 1, you do not need an extra inner derivative.

When You Use It

The chain rule appears whenever functions are nested. Common examples include:

  1. Powers of expressions such as (x2+4x1)7(x^2 + 4x - 1)^7
  2. Trig functions of expressions such as sin(5x)\sin(5x) or cos(x3)\cos(x^3)
  3. Exponentials and logs such as ex2e^{x^2} or ln(1+x4)\ln(1 + x^4)
  4. Implicit differentiation, where several chain rule steps often appear at once

A Fast Check

After differentiating a composite function, ask one question: did the derivative of the inner expression appear somewhere in the answer?

If not, there is a good chance the chain rule step is incomplete.

Try Your Own Version

Take y=(2x3)4y = (2x - 3)^4 and name the inner function before you differentiate. If your final answer does not include the derivative of 2x32x - 3, redo the last step and check where it disappeared.

Need help with a problem?

Upload your question and get a verified, step-by-step solution in seconds.

Open GPAI Solver →