The Chain Rule- Differentiating Composite Functions Step-by-Step

What Is the Chain Rule?

The chain rule is a technique for differentiating composite functions—functions made by plugging one function into another. If you see something like f(g(x)), the chain rule tells you how to take the derivative without expanding everything out.

The formula is simple:

f'(g(x)) · g'(x)

In plain English: take the derivative of the outer function (leaving the inner function alone), then multiply by the derivative of the inner function.

Why You Need It

Most functions you'll encounter in calculus aren't simple polynomials. They're nested. The chain rule is how you handle that nesting without losing your mind.

Without it, you'd be stuck expanding (sin(x²))³ into an ugly polynomial and differentiating term by term. With it, you work from the outside in.

Step-by-Step: How to Apply the Chain Rule

Here's the process:

  1. Identify the outer and inner functions — Which function wraps around which?
  2. Differentiate the outer function — Treat the inner function as your variable.
  3. Differentiate the inner function — Take the derivative normally.
  4. Multiply the results — That's your answer.

Example 1: A Simple Power

Find the derivative of f(x) = (3x + 1)⁴

The outer function is raising something to the 4th power. The inner function is 3x + 1.

Step 1: Differentiate the outer function → 4(3x + 1)³

Step 2: Differentiate the inner function → 3

Step 3: Multiply → f'(x) = 4(3x + 1)³ · 3 = 12(3x + 1)³

Example 2: Trig Functions

Find the derivative of f(x) = sin(5x²)

Outer function: sin(u) where u = 5x². Inner function: 5x².

Step 1: Derivative of outer → cos(5x²)

Step 2: Derivative of inner → 10x

Step 3: Multiply → f'(x) = cos(5x²) · 10x = 10x cos(5x²)

Example 3: Multiple Nesting Levels

Find the derivative of f(x) = e^(sin(x²))

This has three layers:

Apply the chain rule twice:

f'(x) = e^(sin(x²)) · cos(x²) · 2x

f'(x) = 2x cos(x²) e^(sin(x²))

Chain Rule vs. Other Rules

You'll use the chain rule alongside other differentiation rules. Here's when each applies:

Rule Use When Example
Power Rule Simple monomials x³ → 3x²
Product Rule Two functions multiplied x² · sin(x)
Quotient Rule Functions divided x² / sin(x)
Chain Rule One function inside another (3x + 1)⁴, sin(5x²)

Often you'll combine rules. A product might contain a composite function, requiring both the product rule and chain rule in the same problem.

Common Mistakes

Dropping the inner function — Students often forget to multiply by the derivative of the inner part. The chain rule requires both pieces.

Misidentifying the outer function — In (sin x)⁴, the outer function is raising to a power, not sine. The outer function is always the last operation applied.

Overthinking simple cases — If there's no nesting, you don't need the chain rule. Only apply it when functions are genuinely composed.

Practical How-To: Getting Started

When you see a function to differentiate, ask yourself this question:

"Can I write this as f(g(x))?"

If yes, the chain rule applies. Work from the outside function inward. Once you get comfortable with two-level nesting, move to three levels. The process is the same—you just repeat it.

For practice, try these:

Each follows the same pattern: identify the layers, differentiate each, multiply together.

Bottom Line

The chain rule isn't complicated. It's just the derivative of the outside multiplied by the derivative of the inside. Once you stop overthinking it and start applying the three-step process consistently, composite functions lose their intimidation factor.