How to Apply the Chain Rule Step by Step

When to Use the Chain Rule

Use the chain rule whenever you have a function composed inside another function — a “function of a function.” Signs you need it:

  • A trig function with something other than plain x: sin(x²), cos(3x+1)
  • An exponential with a non-x exponent: e^(x²), 3^(sin x)
  • A power with a non-x base: (2x+1)^5, (sin x)^3
  • A logarithm of a non-x argument: ln(x² + 1), log(sin x)

Step 1 — Identify the Outer and Inner Functions

Ask: “What is the last operation applied?” That is the outer function. What it acts on is the inner function.

Examples:

  • y = sin(): outer = sin(·), inner = x²
  • y = e^(cos x): outer = e^(·), inner = cos x
  • y = (3x+1)^5: outer = (·)^5, inner = 3x+1
  • y = ln(√x): outer = ln(·), inner = √x

Step 2 — Let u = Inner Function

Write: let u = g(x) = [inner function]

This temporarily simplifies the outer function to a familiar form:

  • y = sin(x²) becomes y = sin(u), u = x²
  • y = (3x+1)^5 becomes y = u^5, u = 3x+1

Step 3 — Find dy/du

Differentiate the outer function with respect to u using standard derivative rules:

y = f(u)dy/du
sin(u)cos(u)
cos(u)−sin(u)
e^ue^u
ln(u)1/u
u^nn·u^(n−1)
√u1/(2√u)

Step 4 — Find du/dx

Differentiate the inner function g(x) with respect to x:

  • u = x²: du/dx = 2x
  • u = 3x+1: du/dx = 3
  • u = cos x: du/dx = −sin x
  • u = e^x: du/dx = e^x

Step 5 — Apply the Chain Rule

dy/dx = (dy/du) × (du/dx)

Substitute g(x) back in for u wherever it appears in dy/du.

Full example — y = sin(x²):

  • u = x², so y = sin(u)
  • dy/du = cos(u) = cos(x²)
  • du/dx = 2x
  • dy/dx = cos(x²) × 2x = 2x cos(x²)

Full example — y = e^(3x+1):

  • u = 3x+1, so y = e^u
  • dy/du = e^u = e^(3x+1)
  • du/dx = 3
  • dy/dx = e^(3x+1) × 3 = 3e^(3x+1)

Common Mistakes to Avoid

  1. Forgetting to multiply by g’(x) — the most common error. Always multiply by the inner derivative.
  2. Not substituting g(x) back — dy/du uses u; the final answer must express everything in terms of x.
  3. Applying chain rule when not needed — y = x·sin(x) needs the product rule, not chain rule. Chain rule is only for composite functions, not products.
  4. Wrong identification of inner/outer — if unsure, work from the outside in: what operation would you apply last if computing y for a specific x value?

For a detailed breakdown of all seven common chain rule errors with fixes, see 7 Common Chain Rule Mistakes. To practice this method on eight progressively harder problems, see the Chain Rule Practice Problems guide. For the full pattern reference table (all function types), see the Chain Rule Patterns Reference.

References & Sources

  1. [1] Khan Academy — Chain Rule Introduction (opens in new tab)
  2. [2] MIT OpenCourseWare — Derivatives of Composite Functions (opens in new tab)