The Chain Rule

A function inside a function multiplies rates.

A function inside a function

y = (3x + 1)⁵ is made in two stages. First x goes to u = 3x + 1, the inner function. Then u goes to y = u⁵, the outer function. Everything inside the bracket travels together as one quantity, u.

Multiplying out (3x + 1)⁵ would give six terms to differentiate one at a time. The chain rule differentiates each stage once instead.

The outer function first

As a function of u, y = u⁵, and the power rule gives dy/du = 5u⁴ = 5(3x + 1)⁴. The power comes down to the front and drops by one, while the inside is left as it stands.

This is the gradient of y with respect to u. It is not yet dy/dx, because u does not change at the same rate as x.

Why the rates multiply

The inner function is u = 3x + 1, so du/dx = 3: u changes 3 times as fast as x. A small step Δx in x moves u by Δu = 3Δx, and that step in u moves y by about 5u⁴ × Δu. So y moves by about 5u⁴ × 3 × Δx.

In general, Δy/Δx = (Δy/Δu) × (Δu/Δx). As Δx → 0, Δu → 0 as well, and the three quotients become the three derivatives: dy/dx = dy/du × du/dx. The gradient in u is scaled once on the way from x to u and again on the way from u to y.

x02.51.25× 2u163.5× 2u = 7y13612.25

a step in x is doubled on the way to u and multiplied by 2u on the way to y, so the rates multiply: dy/dx = 14

Make dy/dx equal 12

Three number lines: x, then u = 2x + 1, then y = u². A step in x moves u twice as far, and a step in u moves y 2u times as far, so dy/dx = 2u × 2 = 4u. At x = 1, u = 3 and dy/dx = 12, which is 8x + 4, the derivative of the multiplied-out 4x² + 4x + 1.

Times the derivative of the inside

So dy/dx = 5(3x + 1)⁴ × 3 = 15(3x + 1)⁴. At x = 0 the inside is 1, and the gradient is 15. At x = 1/3 the inside is 2, and the gradient is 15 × 2⁴ = 240.

Check at x = 0 with a chord. (1.003)⁵ = 1.0150903, so the chord from x = 0 to x = 0.001 has gradient 0.0150903/0.001 = 15.09.

A linear inside, such as 3x + 1, contributes just its coefficient. An inside that is not linear contributes its own derivative, which depends on x.

Insides that are not linear

For y = (x² + 1)³, the inner function is u = x² + 1 and the outer function is u³. Then dy/du = 3u² and du/dx = 2x, so dy/dx = 3(x² + 1)² × 2x = 6x(x² + 1)². At x = 1 that is 6 × 4 = 24. Multiplying out instead, (x² + 1)³ = x⁶ + 3x⁴ + 3x² + 1, which differentiates to 6x⁵ + 12x³ + 6x, and that is 6 + 12 + 6 = 24 at x = 1.

For y = √(x² + 9), the inner function is u = x² + 9 and the outer function is √u = u^(1/2). Then dy/du = 1/(2√u) and du/dx = 2x, so dy/dx = 2x/(2√(x² + 9)) = x/√(x² + 9). At x = 4 the root is √25 = 5, and the gradient is 4/5 = 0.8. Check: √(4.01² + 9) = 5.0080036, so the chord from x = 4 to x = 4.01 has gradient 0.8004.

For y = 1/(x² + 1) = (x² + 1)⁻¹, the inner function is x² + 1 and the outer function is u⁻¹. The chain rule gives −(x² + 1)⁻² × 2x = −2x/(x² + 1)², the same as the quotient rule, and −0.5 at x = 1.

xy

The gold curve y = √(x² + 9), lowest at (0, 3), and its tangent at (4, 5), the gold line with gradient x/√(x² + 9) = 4/5.

More than two layers

Each layer adds one factor. y = ((2x + 1)² + 1)³ has three: the innermost u = 2x + 1, then w = u² + 1, then the outer y = w³. So dy/dx = dy/dw × dw/du × du/dx = 3w² × 2u × 2.

At x = 0, u = 1 and w = 2, so dy/dx = 3 × 4 × 2 × 2 = 48. The chord from x = 0 to x = 0.001 has gradient 48.14, and with a step of 0.000001 the chord gradient is 48.0001.

The usual mistakes

Stopping after the outer function. 5(3x + 1)⁴ leaves out the factor 3, so every gradient comes out 3 times too small: 5 at x = 0 instead of 15.

Multiplying by the inner derivative without lowering the power. 15(3x + 1)⁵ is 480 at x = 1/3, not 240.

Giving dy/du as the answer. 5(3x + 1)⁴ is the rate per unit of u, and a rate per unit of x needs the factor du/dx.

A balloon being inflated

In the application below, the volume of a balloon depends on its radius, and the radius depends on time. The chain rule multiplies the two rates: dV/dr, from the power rule, times dr/dx, the rate at which the radius grows.

Worked example: A Weather Balloon Being Inflated: the Volume and the Surface Area Growing Through a Radius That Grows

Question A weather balloon is inflated so that it stays spherical and its radius grows at a steady 0.5 cm per second. Its volume is V = 43π r3 and its surface area is A = 4π r2, with r in centimeters. Let x be the number of seconds. (a) How fast is the volume growing when the radius is 6 cm? (b) How fast is the surface area growing at that same moment?

  1. 1.Let x be the number of seconds. The radius grows steadily, so drdx = 0.5 centimeters per second.

    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)dr/dx = 0.5 cm per second
    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)dr/dx = 0.5 cm per second
    The radius grows steadily, so drdx = 0.5 cm per second. The dashed circle is the balloon a moment later.
  2. 2.The chain rule links the two rates: dVdx = dVdr × drdx.

    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)dV/dx = dV/dr × dr/dx
    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)dV/dx = dV/dr × dr/dx
    The chain rule links the two rates: dVdx = dVdr × drdx.
  3. 3.Differentiate the volume with respect to the radius by the power rule: V = 43π r3 gives dVdr = 4π r2, which is 144π when r = 6.

    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)V = 4 pi r3/3, so dV/dr = 4 pi r2r = 6: dV/dr = 144 pi
    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)V = 4 pi r3/3, so dV/dr = 4 pi r2r = 6: dV/dr = 144 pi
    The power rule gives dVdr = 4π r2, which is 144π at r = 6: the gradient of the tangent drawn on the curve.
  4. 4.(a) dVdx = 144π × 0.5 = 72π ≈ 226 cubic centimeters per second.

    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)dV/dx = 144 pi × 0.5 = 72 piabout 226 cubic cm per second
    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)dV/dx = 144 pi × 0.5 = 72 piabout 226 cubic cm per second
    (a) dVdx = 144π × 0.5 = 72π ≈ 226 cubic cm per second.
  5. 5.For the surface area, A = 4π r2 gives dAdr = 8π r, which is 48π when r = 6.

    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)A = 4 pi r2, so dA/dr = 8 pi rr = 6: dA/dr = 48 pi
    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)A = 4 pi r2, so dA/dr = 8 pi rr = 6: dA/dr = 48 pi
    The surface area is A = 4π r2, so dAdr = 8π r = 48π at r = 6.
  6. 6.(b) dAdx = 48π × 0.5 = 24π ≈ 75.4 square centimeters per second. Check: in a tenth of a second the radius goes from 6 to 6.05 cm and the volume grows by about 22.8 cubic centimeters.

    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)dA/dx = 48 pi × 0.5 = 24 piabout 75.4 square cm per second
    r = 6 cmradius grows 0.5 cm per second050010001500200002468radius in cm, rvolume, cubic cm(6, 905)dA/dx = 48 pi × 0.5 = 24 piabout 75.4 square cm per second
    (b) dAdx = 48π × 0.5 = 24π ≈ 75.4 square cm per second.

Answer: (a) 72π ≈ 226 cubic centimeters per second; (b) 24π ≈ 75.4 square centimeters per second

Common mistakes

  • Giving dVdr = 144π as the answer to part (a). That is the rate for each centimeter of radius, not for each second; it must still be multiplied by drdx.
  • Differentiating 43π r3 as though π were a variable. Here π is a constant multiplier and stays where it is, while only r3 is differentiated.

More rules of differentiation problems, worked step by step →

Practice The Chain Rule in the app