Introduction to the Chain Rule
The chain rule is one of the most important and frequently used rules in calculus. It allows us to differentiate composite functions - functions that are made by combining two or more functions. Understanding the chain rule is essential for solving complex differentiation problems in mathematics, physics, engineering, and many other fields.
Why the Chain Rule Matters:
- Essential for differentiating composite functions
- Used extensively in physics for related rates problems
- Fundamental for understanding derivatives of inverse functions
- Critical for multivariable calculus and partial derivatives
- Used in machine learning for backpropagation algorithms
In this comprehensive guide, we'll explore the chain rule from basic concepts to advanced applications, with detailed examples and interactive practice to help you master this essential calculus technique.
What is the Chain Rule?
The chain rule is a formula for computing the derivative of the composition of two or more functions. If we have a function that can be written as f(g(x)), then the chain rule tells us how to find its derivative.
This can also be written using Leibniz notation:
Where y = f(u) and u = g(x).
Intuitive Explanation:
Think of the chain rule as measuring how changes in x affect changes in y through an intermediate variable u. If x changes, it causes u to change at a rate of du/dx. Then, as u changes, it causes y to change at a rate of dy/du. The overall rate of change dy/dx is the product of these two rates.
- Identify the outer function and the inner function
- Differentiate the outer function, keeping the inner function unchanged
- Multiply by the derivative of the inner function
- Simplify the result if possible
See your progress by testing yourself with the derivative calculator.
Basic Chain Rule Examples
Let's start with some fundamental examples to understand how the chain rule works:
Example 1: Simple Polynomial
Function: y = (3x + 2)5
Outer function: f(u) = u5 where u = 3x + 2
Derivative: f'(u) = 5u4
Inner derivative: u' = 3
Result: y' = 5(3x + 2)4 × 3 = 15(3x + 2)4
Example 2: Square Root
Function: y = √(x2 + 1)
Outer function: f(u) = √u where u = x2 + 1
Derivative: f'(u) = 1/(2√u)
Inner derivative: u' = 2x
Result: y' = [1/(2√(x2 + 1))] × 2x = x/√(x2 + 1)
Example 3: Reciprocal
Function: y = 1/(2x - 5)
Outer function: f(u) = 1/u where u = 2x - 5
Derivative: f'(u) = -1/u2
Inner derivative: u' = 2
Result: y' = [-1/(2x - 5)2] × 2 = -2/(2x - 5)2
Example 4: Power Rule
Function: y = (x3 - 2x)4
Outer function: f(u) = u4 where u = x3 - 2x
Derivative: f'(u) = 4u3
Inner derivative: u' = 3x2 - 2
Result: y' = 4(x3 - 2x)3 × (3x2 - 2)
Chain Rule Practice
Chain Rule for Multiple Composition
When we have functions composed of more than two functions, we can extend the chain rule. For three functions: f(g(h(x))), the derivative is:
This pattern continues for any number of composed functions - we simply multiply the derivatives of each function in sequence, working from the outside in.
Triple Composition
Function: y = sin(√(x2 + 1))
Breakdown: y = f(g(h(x))) where:
f(u) = sin(u), g(v) = √v, h(x) = x2 + 1
Derivatives:
f'(u) = cos(u), g'(v) = 1/(2√v), h'(x) = 2x
Result: y' = cos(√(x2 + 1)) × [1/(2√(x2 + 1))] × 2x
= [x cos(√(x2 + 1))] / √(x2 + 1)
Quadruple Composition
Function: y = esin(x2)
Breakdown: y = f(g(h(i(x)))) where:
f(u) = eu, g(v) = sin(v), h(w) = w2, i(x) = x
Derivatives:
f'(u) = eu, g'(v) = cos(v), h'(w) = 2w, i'(x) = 1
Result: y' = esin(x2) × cos(x2) × 2x × 1
= 2x esin(x2) cos(x2)
For a composition of n functions: f1(f2(...fn(x)...))
Each function's derivative is evaluated at the composition of the functions inside it.
Chain Rule with Trigonometric Functions
The chain rule is frequently used with trigonometric functions. Here are some common examples:
Sine Function
Function: y = sin(3x2)
Outer function: f(u) = sin(u) where u = 3x2
Derivative: f'(u) = cos(u)
Inner derivative: u' = 6x
Result: y' = cos(3x2) × 6x = 6x cos(3x2)
Cosine Function
Function: y = cos(5x + 2)
Outer function: f(u) = cos(u) where u = 5x + 2
Derivative: f'(u) = -sin(u)
Inner derivative: u' = 5
Result: y' = -sin(5x + 2) × 5 = -5 sin(5x + 2)
Tangent Function
Function: y = tan(x3)
Outer function: f(u) = tan(u) where u = x3
Derivative: f'(u) = sec2(u)
Inner derivative: u' = 3x2
Result: y' = sec2(x3) × 3x2 = 3x2 sec2(x3)
Inverse Trigonometric
Function: y = arcsin(2x)
Outer function: f(u) = arcsin(u) where u = 2x
Derivative: f'(u) = 1/√(1 - u2)
Inner derivative: u' = 2
Result: y' = [1/√(1 - (2x)2)] × 2 = 2/√(1 - 4x2)
| Function | Derivative | Chain Rule Form |
|---|---|---|
| sin(u) | cos(u) | cos(u) × u' |
| cos(u) | -sin(u) | -sin(u) × u' |
| tan(u) | sec2(u) | sec2(u) × u' |
| cot(u) | -csc2(u) | -csc2(u) × u' |
| sec(u) | sec(u)tan(u) | sec(u)tan(u) × u' |
| csc(u) | -csc(u)cot(u) | -csc(u)cot(u) × u' |
To verify your knowledge, try solving real scenarios using the derivative calculator.
Chain Rule with Exponential and Logarithmic Functions
Exponential and logarithmic functions frequently appear in chain rule problems. Here are key examples:
Natural Exponential
Function: y = ex2
Outer function: f(u) = eu where u = x2
Derivative: f'(u) = eu
Inner derivative: u' = 2x
Result: y' = ex2 × 2x = 2x ex2
General Exponential
Function: y = ag(x)
Rewrite: y = eg(x) ln(a)
Outer function: f(u) = eu where u = g(x) ln(a)
Derivative: f'(u) = eu
Inner derivative: u' = g'(x) ln(a)
Result: y' = eg(x) ln(a) × g'(x) ln(a) = ag(x) g'(x) ln(a)
Natural Logarithm
Function: y = ln(x2 + 1)
Outer function: f(u) = ln(u) where u = x2 + 1
Derivative: f'(u) = 1/u
Inner derivative: u' = 2x
Result: y' = (1/(x2 + 1)) × 2x = 2x/(x2 + 1)
General Logarithm
Function: y = loga(g(x))
Rewrite: y = ln(g(x)) / ln(a)
Outer function: f(u) = u/ln(a) where u = ln(g(x))
Derivative: f'(u) = 1/ln(a)
Inner derivative: u' = g'(x)/g(x)
Result: y' = [1/ln(a)] × [g'(x)/g(x)] = g'(x)/(g(x) ln(a))
| Function | Derivative | Chain Rule Form |
|---|---|---|
| eu | eu | eu × u' |
| au | au ln(a) | au ln(a) × u' |
| ln(u) | 1/u | (1/u) × u' |
| loga(u) | 1/(u ln(a)) | 1/(u ln(a)) × u' |
Chain Rule in Implicit Differentiation
Implicit differentiation relies heavily on the chain rule. When we differentiate both sides of an equation with respect to x, we apply the chain rule to terms involving y.
Basic Implicit Differentiation
Equation: x2 + y2 = 25
Differentiate both sides:
d/dx(x2) + d/dx(y2) = d/dx(25)
2x + 2y × dy/dx = 0 (chain rule on y2)
Solve for dy/dx:
2y × dy/dx = -2x
dy/dx = -x/y
Product Rule with Chain Rule
Equation: x2y + y3 = 10
Differentiate both sides:
d/dx(x2y) + d/dx(y3) = 0
(2xy + x2 × dy/dx) + 3y2 × dy/dx = 0
Solve for dy/dx:
x2 × dy/dx + 3y2 × dy/dx = -2xy
dy/dx (x2 + 3y2) = -2xy
dy/dx = -2xy/(x2 + 3y2)
- Differentiate both sides of the equation with respect to x
- Apply chain rule to terms containing y (treat y as a function of x)
- Collect all terms with dy/dx on one side
- Factor out dy/dx
- Solve for dy/dx
Test your learning by applying concepts in real situations with the derivative calculator.
Real-World Applications of the Chain Rule
The chain rule has numerous applications in physics, engineering, economics, and other fields. Here are some practical examples:
Physics: Related Rates
Problem: A spherical balloon is being inflated. The radius increases at 2 cm/s. How fast is the volume increasing when the radius is 10 cm?
Volume: V = (4/3)πr3
Chain rule: dV/dt = dV/dr × dr/dt
dV/dr = 4πr2, dr/dt = 2 cm/s
Result: dV/dt = 4π(10)2 × 2 = 800π cm3/s
Economics: Marginal Cost
Problem: A company's cost function is C(q) = 1000 + 5q + 0.01q2, where q is production level. If production increases at a rate of 10 units per day, how fast is cost changing when q = 100?
Chain rule: dC/dt = dC/dq × dq/dt
dC/dq = 5 + 0.02q, dq/dt = 10
Result: dC/dt = (5 + 0.02×100) × 10 = (5 + 2) × 10 = 70 dollars/day
Chemistry: Reaction Rates
Problem: In a chemical reaction, concentration C changes with temperature T as C(T) = k/(T+273). If temperature increases at 5°C/min, how fast is concentration changing when T = 25°C?
Chain rule: dC/dt = dC/dT × dT/dt
dC/dT = -k/(T+273)2, dT/dt = 5
Result: dC/dt = -k/(25+273)2 × 5 = -5k/2982
Biology: Population Growth
Problem: A bacteria population grows as P(t) = 1000e0.1t. If the growth rate parameter increases at 0.02 per day, how fast is the population growing when t = 10 days?
Chain rule: dP/dt = dP/dk × dk/dt (where k = 0.1)
dP/dk = 1000t ekt, dk/dt = 0.02
Result: dP/dt = 1000×10×e0.1×10 × 0.02 = 200e bacteria/day
Common Mistakes and How to Avoid Them
Students often make specific errors when applying the chain rule. Here's how to avoid them:
Mistake: Forgetting the Inner Derivative
d/dx [(3x+2)5] ≠ 5(3x+2)4
Missing the multiplication by the derivative of (3x+2)
Correct Approach
d/dx [(3x+2)5] = 5(3x+2)4 × 3
= 15(3x+2)4
Mistake: Misidentifying Inner/Outer Functions
For sin(x2), outer function is sin(u), not u2
Confusing the order of composition
Correct Approach
sin(x2) means sin(u) where u = x2
Derivative: cos(x2) × 2x
Mistake: Incorrect Trigonometric Derivatives
d/dx [sin(2x)] ≠ cos(2x)
Forgetting to multiply by the derivative of the inner function
Correct Approach
d/dx [sin(2x)] = cos(2x) × 2
= 2 cos(2x)
Mistake: Not Simplifying Final Answer
Leaving answers like 2(3x+1)4 × 3 instead of 6(3x+1)4
Missing opportunity to simplify
Correct Approach
Always multiply constants together
2(3x+1)4 × 3 = 6(3x+1)4
- Practice identification: Always clearly identify inner and outer functions
- Use substitution: Let u = inner function to make the process clearer
- Check your work: Differentiate simple examples to verify your understanding
- Simplify: Always simplify your final answer when possible
- Practice regularly: The chain rule requires practice to master
Challenge your math skills with applied problems using the derivative calculator.
Practice Problems
Chain Rule Practice
Test your understanding with these practice problems. Try to solve them before checking the solutions.
Solution:
1. Identify outer function: f(u) = u4 where u = 2x3 - 5x
2. Outer derivative: f'(u) = 4u3
3. Inner derivative: u' = 6x2 - 5
4. Apply chain rule: y' = 4(2x3 - 5x)3 × (6x2 - 5)
Final Answer: y' = 4(2x3 - 5x)3(6x2 - 5)
Solution:
1. Identify outer function: f(u) = sin(u) where u = 3x2 + 2x
2. Outer derivative: f'(u) = cos(u)
3. Inner derivative: u' = 6x + 2
4. Apply chain rule: y' = cos(3x2 + 2x) × (6x + 2)
Final Answer: y' = (6x + 2) cos(3x2 + 2x)
Solution:
1. Identify outer function: f(u) = eu where u = x3
2. Outer derivative: f'(u) = eu
3. Inner derivative: u' = 3x2
4. Apply chain rule: y' = ex3 × 3x2
Final Answer: y' = 3x2 ex3
Solution:
1. Identify outer function: f(u) = ln(u) where u = cos(x)
2. Outer derivative: f'(u) = 1/u
3. Inner derivative: u' = -sin(x)
4. Apply chain rule: y' = (1/cos(x)) × (-sin(x))
5. Simplify: y' = -sin(x)/cos(x) = -tan(x)
Final Answer: y' = -tan(x)
Solution:
1. Differentiate both sides: d/dx(x2y) + d/dx(y3) = d/dx(x)
2. Apply product rule to x2y: 2xy + x2 × dy/dx
3. Apply chain rule to y3: 3y2 × dy/dx
4. Right side: 1
5. Combine: 2xy + x2 × dy/dx + 3y2 × dy/dx = 1
6. Factor dy/dx: dy/dx (x2 + 3y2) = 1 - 2xy
7. Solve: dy/dx = (1 - 2xy)/(x2 + 3y2)
Final Answer: dy/dx = (1 - 2xy)/(x2 + 3y2)