⛓️ Chain Rule Explained: Complete Guide with 15+ Examples

Master the chain rule in calculus with our comprehensive guide. Learn how to find derivatives of composite functions with clear explanations, step-by-step examples, practice problems, and common mistakes to avoid. Perfect for students learning differentiation.

What is the Chain Rule?

The chain rule is one of the most important and powerful differentiation techniques in calculus. It allows you to find the derivative of composite functions—functions that are "nested" inside other functions.

Think of it like peeling an onion: you work from the outside layer to the inside, taking derivatives as you go. If you've ever tried to find the derivative of something like sin(x²) or (3x + 5)⁷ and felt stuck, the chain rule is exactly what you need!

🎯 In Simple Terms: The chain rule helps you differentiate functions where one function is inside another. It's essential for solving most real-world calculus problems.

The Chain Rule Formula

Here's the mathematical statement of the chain rule:

If y = f(g(x)), then dy/dx = f'(g(x)) · g'(x)

Or, in Leibniz notation:

dy/dx = (dy/du) · (du/dx)

where u = g(x) is the "inner function" and y = f(u) is the "outer function".

Breaking Down the Formula

Let's understand each part:

💡 Memory Trick: "Derivative of the outside, leave the inside alone, times derivative of the inside." Say this out loud while solving problems!

When Do You Need the Chain Rule?

You need the chain rule whenever you see a composite function—a function inside another function. Here are common signs:

⚠️ Common Mistake: Students often forget to use the chain rule! For example, the derivative of sin(2x) is NOT just cos(2x)—you must multiply by 2 (the derivative of the inner function 2x).

Step-by-Step Process

Follow these steps every time you use the chain rule:

  1. Identify the outer function - What's on the outside?
  2. Identify the inner function - What's nested inside?
  3. Find the derivative of the outer function - But keep the inner function unchanged
  4. Find the derivative of the inner function
  5. Multiply the two derivatives together
  6. Simplify your answer

Example 1: Basic Chain Rule

📝 Find the derivative of y = (x² + 3)⁵
Step 1: Identify the functions

Outer function: f(u) = u⁵

Inner function: u = g(x) = x² + 3

Step 2: Derivative of outer function

f'(u) = 5u⁴

So f'(g(x)) = 5(x² + 3)⁴ — notice we kept the inside unchanged!

Step 3: Derivative of inner function

g'(x) = 2x

Step 4: Apply chain rule

dy/dx = f'(g(x)) · g'(x)

dy/dx = 5(x² + 3)⁴ · 2x

Step 5: Simplify

dy/dx = 10x(x² + 3)⁴

Example 2: Trig Function Chain Rule

📝 Find the derivative of y = sin(3x²)
Step 1: Identify the functions

Outer function: f(u) = sin(u)

Inner function: u = g(x) = 3x²

Step 2: Derivative of outer function

f'(u) = cos(u)

So f'(g(x)) = cos(3x²)

Step 3: Derivative of inner function

g'(x) = 6x

Step 4: Apply chain rule

dy/dx = cos(3x²) · 6x

Final Answer

dy/dx = 6x cos(3x²)

Example 3: Exponential Chain Rule

📝 Find the derivative of y = e^(x² + 2x)

Solution:

Outer function: e^u, derivative is e^u

Inner function: u = x² + 2x, derivative is 2x + 2

Applying chain rule:

dy/dx = e^(x² + 2x) · (2x + 2) = (2x + 2)e^(x² + 2x)

Example 4: Multiple Nested Functions

📝 Find the derivative of y = sin²(3x) = [sin(3x)]²

This requires the chain rule twice!

First application (outermost)

Outer: u², derivative is 2u

So we get: 2sin(3x) · [derivative of sin(3x)]

Second application (inner)

Now find derivative of sin(3x) using chain rule again:

derivative of sin(3x) = cos(3x) · 3

Combine everything

dy/dx = 2sin(3x) · cos(3x) · 3

dy/dx = 6sin(3x)cos(3x)

Or using the double angle identity: dy/dx = 3sin(6x)

More Examples: Quick Reference

Function f(x) Derivative f'(x) Chain Rule Applied
(2x + 1)³ 3(2x + 1)² · 2 = 6(2x + 1)² Power rule + chain rule
cos(x²) -sin(x²) · 2x = -2x sin(x²) Trig derivative + chain rule
√(x² + 1) (1/2)(x² + 1)^(-1/2) · 2x = x/√(x² + 1) Power rule + chain rule
e^(5x) e^(5x) · 5 = 5e^(5x) Exponential + chain rule
ln(x³ + 1) (1/(x³ + 1)) · 3x² = 3x²/(x³ + 1) Logarithm + chain rule
tan(2x) sec²(2x) · 2 = 2sec²(2x) Trig derivative + chain rule

Common Mistakes to Avoid

Mistake #1: Forgetting to Apply the Chain Rule

❌ Wrong: d/dx[sin(2x)] = cos(2x)

✅ Correct: d/dx[sin(2x)] = cos(2x) · 2 = 2cos(2x)

Why: You must multiply by the derivative of the inner function (2x), which is 2!

Mistake #2: Not Keeping the Inner Function

❌ Wrong: d/dx[(x² + 1)⁴] = 4x³

✅ Correct: d/dx[(x² + 1)⁴] = 4(x² + 1)³ · 2x = 8x(x² + 1)³

Why: When taking the derivative of the outer function, keep the inner function unchanged!

Mistake #3: Confusing Chain Rule with Product Rule

Chain rule: f(g(x)) — one function INSIDE another

Product rule: f(x) · g(x) — two functions MULTIPLIED together

Example: sin(x²) needs chain rule, but x² · sin(x) needs product rule

Practice Problems

Test your understanding with these practice problems. Try them yourself before checking the solutions!

🎯 Practice Problem 1

Find the derivative of: y = (3x² - 5x + 2)⁶

Show Solution

Outer function: u⁶, derivative = 6u⁵

Inner function: 3x² - 5x + 2, derivative = 6x - 5

Answer: dy/dx = 6(3x² - 5x + 2)⁵(6x - 5)

🎯 Practice Problem 2

Find the derivative of: y = cos(5x³)

Show Solution

Outer function: cos(u), derivative = -sin(u)

Inner function: 5x³, derivative = 15x²

Answer: dy/dx = -15x² sin(5x³)

🎯 Practice Problem 3

Find the derivative of: y = e^(sin x)

Show Solution

Outer function: e^u, derivative = e^u

Inner function: sin x, derivative = cos x

Answer: dy/dx = cos(x) · e^(sin x)

🎯 Practice Problem 4 (Challenge!)

Find the derivative of: y = ln(cos²(3x))

Show Solution

This requires chain rule THREE times!

Outermost: ln(u), derivative = 1/u

Middle: u², derivative = 2u

Innermost: cos(3x), derivative = -3sin(3x)

Combining: dy/dx = [1/cos²(3x)] · 2cos(3x) · (-3sin(3x))

Simplify: dy/dx = -6sin(3x)/cos(3x) = -6tan(3x)

Answer: dy/dx = -6tan(3x)

Tips for Mastering the Chain Rule

  1. Practice identifying composite functions - Before calculating, always identify what's inside what
  2. Write out each step - Don't try to do it all in your head until you're very comfortable
  3. Use u-substitution for complex problems - Let u = inner function, then find dy/du and du/dx
  4. Check your work - Use our calculator to verify your answers
  5. Practice with different types - Trig, exponential, logarithmic, and polynomial functions
  6. Recognize patterns - After practice, you'll start seeing common patterns

Chain Rule Combined with Other Rules

In real problems, you'll often need to combine the chain rule with other differentiation rules:

Chain Rule + Product Rule

📝 Example: y = x² · sin(3x)

First apply product rule, then chain rule for sin(3x):

dy/dx = 2x · sin(3x) + x² · [cos(3x) · 3]

dy/dx = 2x sin(3x) + 3x² cos(3x)

Chain Rule + Quotient Rule

📝 Example: y = sin(x²) / cos(x²)

This is tan(x²), so we can use chain rule directly:

dy/dx = sec²(x²) · 2x = 2x sec²(x²)

Real-World Applications

The chain rule appears constantly in real-world problems:

Physics - Velocity and Acceleration

If position s(t) = 5sin(2t), then:

Biology - Population Growth

If population P(t) = 1000e^(0.05t²), the growth rate is:

dP/dt = 1000e^(0.05t²) · (0.1t) = 100t · e^(0.05t²)

Economics - Marginal Cost

If cost C(x) = 1000√(x² + 100), the marginal cost is:

C'(x) = 1000 · (1/2)(x² + 100)^(-1/2) · 2x = 1000x/√(x² + 100)

Advanced Chain Rule Concepts

Implicit Differentiation Uses Chain Rule

When differentiating implicitly (like x² + y² = 25), you're actually using the chain rule! When you write dy/dx after differentiating y², that's the chain rule in action.

Related Rates Problems

Related rates problems heavily rely on the chain rule. When you relate dV/dt to dr/dt, you're using: dV/dt = (dV/dr) · (dr/dt) — that's the chain rule!

Chain Rule with Multiple Variables (Preview)

In multivariable calculus, the chain rule extends to functions of several variables. If z = f(x,y) where x and y are functions of t, then:

dz/dt = (∂z/∂x)(dx/dt) + (∂z/∂y)(dy/dt)

This is the multivariable chain rule, which you'll encounter in Calculus III!

🧮 Practice with Our Chain Rule Calculator

Ready to check your work? Use our free chain rule calculator to get instant, step-by-step solutions!

Try Chain Rule Calculator →

Summary: Key Takeaways

  • Chain rule formula: dy/dx = f'(g(x)) · g'(x)
  • Use it when: You have one function inside another (composite functions)
  • Process: Derivative of outer × derivative of inner
  • Common with: Powers, trig functions, exponentials, logarithms
  • Can be nested: Apply multiple times for deeply nested functions
  • Combines with: Product rule, quotient rule, implicit differentiation
  • Practice is essential: The more you practice, the more automatic it becomes

What's Next?

Now that you've mastered the chain rule, continue building your calculus skills:

Frequently Asked Questions

Q: When do I use chain rule vs product rule?

A: Use the chain rule when one function is INSIDE another (like sin(x²)). Use the product rule when two functions are MULTIPLIED together (like x² · sin(x)).

Q: Can I use the chain rule multiple times?

A: Absolutely! For deeply nested functions like sin(cos(x²)), you'll apply the chain rule three times, working from outside to inside.

Q: What if I forget which function is outer and which is inner?

A: Ask yourself: "If I were to evaluate this function with a number, which operation would I do LAST?" That's your outer function. For sin(x²), you'd square first, then take sine—so sine is outer.

Q: Do I always need to write out u = g(x)?

A: For learning, yes! Once you're comfortable, you can do it in your head. But when in doubt, write it out—it prevents mistakes.

Q: How do I know if my answer is correct?

A: Use our derivative calculator to check your work! It shows step-by-step solutions so you can see where you might have gone wrong.

📖 Keep Learning!

Master all differentiation techniques with our comprehensive guides and free calculators.

Explore More Tutorials →