Fiveable

Calculus I Unit 3 Review

QR code for Calculus I practice questions

3.6 The Chain Rule

3.6 The Chain Rule

Written by the Fiveable Content Team • Last updated August 2025
Written by the Fiveable Content Team • Last updated August 2025
Calculus I
Unit & Topic Study Guides

The chain rule lets you find derivatives of composite functions, where one function is nested inside another. Since composite functions show up constantly in calculus (and in nearly every application), this is one of the most frequently used differentiation techniques you'll encounter.

The Chain Rule

Chain rule for composite functions

A composite function has the form f(g(x))f(g(x)), where you plug one function into another. The chain rule says: to differentiate a composite function, take the derivative of the outer function (evaluated at the inner function) and multiply by the derivative of the inner function.

h(x)=f(g(x))g(x)h'(x) = f'(g(x)) \cdot g'(x)

The key step is identifying which part is the outer function and which is the inner function.

Example 1: h(x)=sin(x2)h(x) = \sin(x^2)

  • Outer function: f(x)=sin(x)f(x) = \sin(x), so f(x)=cos(x)f'(x) = \cos(x)
  • Inner function: g(x)=x2g(x) = x^2, so g(x)=2xg'(x) = 2x
  • h(x)=cos(x2)2xh'(x) = \cos(x^2) \cdot 2x

Example 2: h(x)=ecos(x)h(x) = e^{\cos(x)}

  • Outer function: f(x)=exf(x) = e^x, so f(x)=exf'(x) = e^x
  • Inner function: g(x)=cos(x)g(x) = \cos(x), so g(x)=sin(x)g'(x) = -\sin(x)
  • h(x)=ecos(x)(sin(x))h'(x) = e^{\cos(x)} \cdot (-\sin(x))

Think of it this way: the chain rule tracks how a small change in xx ripples through the layers. A change in xx first affects g(x)g(x), and that change in g(x)g(x) then affects f(g(x))f(g(x)). Multiplying the two rates together gives the total rate of change.

Chain rule for composite functions, The Chain Rule · Calculus

Combining chain rule with other rules

Most real problems require the chain rule together with other differentiation rules. Here's how they combine.

Power rule + chain rule: When you raise an entire expression to a power:

h(x)=(g(x))n    h(x)=n(g(x))n1g(x)h(x) = (g(x))^n \implies h'(x) = n(g(x))^{n-1} \cdot g'(x)

For example, h(x)=(x2+1)3h(x) = (x^2 + 1)^3:

  1. Bring down the exponent and reduce the power: 3(x2+1)23(x^2 + 1)^2
  2. Multiply by the derivative of the inside: 2x\cdot\, 2x
  3. Result: h(x)=6x(x2+1)2h'(x) = 6x(x^2 + 1)^2

Product rule + chain rule: When two functions are multiplied and at least one is composite, apply the product rule first, then use the chain rule wherever you need to differentiate a composite piece.

h(x)=f(x)g(x)    h(x)=f(x)g(x)+f(x)g(x)h(x) = f(x) \cdot g(x) \implies h'(x) = f'(x) \cdot g(x) + f(x) \cdot g'(x)

For example, h(x)=x3e2xh(x) = x^3 \cdot e^{2x}:

  1. Product rule: h(x)=3x2e2x+x3ddx[e2x]h'(x) = 3x^2 \cdot e^{2x} + x^3 \cdot \frac{d}{dx}[e^{2x}]
  2. Chain rule on e2xe^{2x}: derivative is 2e2x2e^{2x}
  3. Result: h(x)=3x2e2x+2x3e2xh'(x) = 3x^2 e^{2x} + 2x^3 e^{2x}

Quotient rule + chain rule: Same idea. Apply the quotient rule for the overall structure, then use the chain rule on any composite pieces in the numerator or denominator.

h(x)=f(x)g(x)    h(x)=f(x)g(x)f(x)g(x)(g(x))2h(x) = \frac{f(x)}{g(x)} \implies h'(x) = \frac{f'(x) \cdot g(x) - f(x) \cdot g'(x)}{(g(x))^2}

Chain rule for composite functions, OpenAlgebra.com: Free Algebra Study Guide & Video Tutorials: Function Composition

Chain rule for multiple compositions

When three or more functions are nested, you apply the chain rule at each layer, working from the outside in, and multiply all the derivatives together.

For h(x)=f(g(k(x)))h(x) = f(g(k(x))):

h(x)=f(g(k(x)))g(k(x))k(x)h'(x) = f'(g(k(x))) \cdot g'(k(x)) \cdot k'(x)

Example: h(x)=ln(sin(ex))h(x) = \ln(\sin(e^x))

  1. Identify the layers: outer f(x)=ln(x)f(x) = \ln(x), middle g(x)=sin(x)g(x) = \sin(x), inner k(x)=exk(x) = e^x
  2. Derivative of the outer, evaluated at everything inside it: 1sin(ex)\frac{1}{\sin(e^x)}
  3. Times the derivative of the middle, evaluated at the innermost part: cos(ex)\cdot\, \cos(e^x)
  4. Times the derivative of the innermost function: ex\cdot\, e^x
  5. Result: h(x)=cos(ex)exsin(ex)h'(x) = \frac{\cos(e^x) \cdot e^x}{\sin(e^x)}

A common mistake here is forgetting one of the layers. Every time you "peel off" an outer function, you still owe a derivative for everything that remains inside.

Variables and implicit differentiation

The chain rule also powers implicit differentiation, which you use when a relationship between xx and yy isn't solved for yy explicitly (for example, x2+y2=25x^2 + y^2 = 25).

The core idea: whenever you differentiate a term involving yy with respect to xx, you treat yy as a function of xx and attach a dydx\frac{dy}{dx} factor by the chain rule.

Example: Differentiate x2+y2=25x^2 + y^2 = 25 with respect to xx.

  1. Differentiate each term: 2x+2ydydx=02x + 2y \cdot \frac{dy}{dx} = 0

    • The 2ydydx2y \cdot \frac{dy}{dx} comes from the chain rule applied to y2y^2, since yy depends on xx.
  2. Solve for dydx\frac{dy}{dx}: dydx=2x2y=xy\frac{dy}{dx} = \frac{-2x}{2y} = \frac{-x}{y}

Real-world applications of chain rule

The chain rule shows up whenever a quantity you care about depends on an intermediate variable that itself changes.

  • Velocity and acceleration: If position is given as a composite function like s(t)=(3t2+1)4s(t) = (3t^2 + 1)^4, you need the chain rule to find velocity v(t)=s(t)v(t) = s'(t) and then acceleration a(t)=v(t)a(t) = v'(t).
  • Economics: If cost depends on production quantity, and production quantity depends on time, the chain rule connects the rate of cost change to the rate of time change: dCdt=dCdqdqdt\frac{dC}{dt} = \frac{dC}{dq} \cdot \frac{dq}{dt}.
  • Engineering optimization: Objective functions often involve nested expressions. The chain rule is necessary for computing the derivatives that locate maximum and minimum values.