Skip to content

Chain Rule

In this lesson you’ll learn the chain rule, which handles composite functions. Any time one function is plugged into another, the chain rule is how you differentiate it.

You already know how to differentiate x⁵ (power rule) and sin(x) (trig derivative). But what about sin(x⁵)? Or (3x² + 1)⁷? These are composite functions: one function wrapped around another. The basic rules don’t cover this directly. The chain rule does.

If y = f(g(x)), the derivative is:

dydx=f(g(x))g(x)\frac{dy}{dx} = f'(g(x)) \cdot g'(x)

In words: differentiate the outside function first (leaving the inside alone), then multiply by the derivative of the inside.

In Leibniz notation, if y depends on u and u depends on x:

dydx=dydududx\frac{dy}{dx} = \frac{dy}{du} \cdot \frac{du}{dx}

The du’s look like they cancel, which is a nice way to remember it (though it’s not literally fraction cancellation, it works as a memory trick).

The process is always the same:

  1. Identify the outside function and the inside function
  2. Differentiate the outside, leaving the inside untouched
  3. Multiply by the derivative of the inside

Example 1: Power of a function

Find the derivative of y = (3x² + 5)⁴.

Outside: u⁴. Inside: u = 3x² + 5.

Derivative of outside: 4u³. Derivative of inside: 6x.

y=4(3x2+5)36x=24x(3x2+5)3y' = 4(3x^2 + 5)^3 \cdot 6x = 24x(3x^2 + 5)^3

Example 2: Trig of a function

Differentiate y = sin(5x³ - 2x).

Outside: sin(u). Inside: u = 5x³ - 2x.

Derivative of outside: cos(u). Derivative of inside: 15x² - 2.

y=cos(5x32x)(15x22)y' = \cos(5x^3 - 2x) \cdot (15x^2 - 2)

Example 3: Chain rule combined with product rule

Find y’ for y = (x² + 1)³ sin(2x).

This is a product of two functions, and each one needs the chain rule internally.

Let u = (x² + 1)³ and v = sin(2x).

For u: chain rule gives u’ = 3(x² + 1)² times 2x = 6x(x² + 1)².

For v: chain rule gives v’ = cos(2x) times 2 = 2cos(2x).

Now apply the product rule:

y=6x(x2+1)2sin(2x)+(x2+1)32cos(2x)y' = 6x(x^2 + 1)^2 \sin(2x) + (x^2 + 1)^3 \cdot 2\cos(2x)

This is a common pattern in Calculus 1: the chain rule rarely shows up alone. It almost always combines with the product rule, quotient rule, or both.

The chain rule shows up whenever one rate of change depends on another:

  • Physics: if temperature depends on altitude and altitude depends on time, the chain rule connects the rate of temperature change to the rate of climbing.
  • Economics: if profit depends on sales volume and sales volume depends on advertising spend, the chain rule tells you how profit changes with advertising.
  • Biology: if population growth rate depends on food supply and food supply depends on rainfall, the chain rule links them.
  • Related rates problems (coming soon) are entirely built on the chain rule.
The Chain Rule is used when:
If y = (x³ + 2)⁵, then dy/dx =
The derivative of sin(4x) is:
In the chain rule, you first differentiate:
Which function requires the chain rule to differentiate?