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:
Or, in Leibniz notation:
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:
- f'(g(x)) - Derivative of the outer function, evaluated at the inner function
- g'(x) - Derivative of the inner function
- The dot (·) - Multiply these two derivatives together
💡 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:
- Functions raised to powers: (x² + 1)⁵, (sin x)³
- Trig functions with expressions inside: sin(2x), cos(x²), tan(3x + 1)
- Exponentials with complex exponents: e^(x²), e^(sin x)
- Logarithms with expressions inside: ln(x² + 1), log(cos x)
- Square roots with expressions: √(x² + 1), √(sin x)
⚠️ 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:
- Identify the outer function - What's on the outside?
- Identify the inner function - What's nested inside?
- Find the derivative of the outer function - But keep the inner function unchanged
- Find the derivative of the inner function
- Multiply the two derivatives together
- Simplify your answer
Example 1: Basic Chain Rule
Outer function: f(u) = u⁵
Inner function: u = g(x) = x² + 3
f'(u) = 5u⁴
So f'(g(x)) = 5(x² + 3)⁴ — notice we kept the inside unchanged!
g'(x) = 2x
dy/dx = f'(g(x)) · g'(x)
dy/dx = 5(x² + 3)⁴ · 2x
dy/dx = 10x(x² + 3)⁴
Example 2: Trig Function Chain Rule
Outer function: f(u) = sin(u)
Inner function: u = g(x) = 3x²
f'(u) = cos(u)
So f'(g(x)) = cos(3x²)
g'(x) = 6x
dy/dx = cos(3x²) · 6x
dy/dx = 6x cos(3x²)
Example 3: Exponential Chain Rule
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
This requires the chain rule twice!
Outer: u², derivative is 2u
So we get: 2sin(3x) · [derivative of sin(3x)]
Now find derivative of sin(3x) using chain rule again:
derivative of sin(3x) = cos(3x) · 3
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!
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)
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³)
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)
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
- Practice identifying composite functions - Before calculating, always identify what's inside what
- Write out each step - Don't try to do it all in your head until you're very comfortable
- Use u-substitution for complex problems - Let u = inner function, then find dy/du and du/dx
- Check your work - Use our calculator to verify your answers
- Practice with different types - Trig, exponential, logarithmic, and polynomial functions
- 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
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
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:
- Velocity v(t) = ds/dt = 5cos(2t) · 2 = 10cos(2t)
- Acceleration a(t) = dv/dt = -10sin(2t) · 2 = -20sin(2t)
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:
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:
- 📚 Learn the Product Rule - For multiplied functions
- 📚 Master the Quotient Rule - For divided functions
- 📚 Understand Implicit Differentiation - Uses chain rule extensively
- 🧮 Explore All Our Calculators - 15+ free tools
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 →