Chain Rule Notes
These Chain Rule Notes explain how to differentiate a function sitting inside another function, with the working shown line by line. The outer function is differentiated with the inner one left untouched, and the result is then multiplied by the derivative of the inner function. Forgetting that second factor is the usual error. Following the same pattern every time keeps the outer and inner layers clearly separate.
Step-by-step method
- Set up the problem.
- Write the chain rule formula.
- Differentiate the outer function with respect to u.
- Differentiate the inner function with respect to the variable.
- Multiply the derivatives and substitute u back.
Formula: Chain Rule
This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.
Useful Tips to Remember
The chain rule says \(\frac{d}{dx}f(g(x)) = f'(g(x)) \cdot g'(x)\): differentiate the outer function, keep the inside unchanged, then multiply by the derivative of the inside. Forgetting to multiply by the inner derivative is the most common mistake. For functions with several layers, apply the rule once for each layer, working from the outside in.
Required knowledge
- How to differentiate x raised to a power, covered in the Power Rule Calculator.
- How to differentiate each part on its own, covered in the Derivative Calculator.
Where Is the Chain Rule Used?
The chain rule differentiates a function inside another function, multiplying the derivative of the outer part by the derivative of the inner part. Real quantities are often linked in chains, such as the volume of a balloon depending on its radius, which depends on time, so the chain rule connects their rates of change. It is used in physics for related rates, in economics when one quantity drives another, and it is the core of backpropagation, the method that trains neural networks in artificial intelligence.
- Training neural networks with backpropagation
- Solving related rates problems, like a balloon being inflated
- Differentiating functions such as \(\sin(3x^2)\) and \(e^{5x}\)
- Linking rates of change in physics and chemistry
- Working out how costs change when production depends on time
Chain Rule Practice Problems
Example 1 differentiates \((2x + 3)^5\), and Example 2 differentiates \(\sin(3x)\). Examples 3 and 4 give you two more of the same kind to try, \(f\left(x\right) = \left(4 x - 1\right)^{3}\) and \(f\left(x\right) = \cos{\left(2 x \right)}\). Try finding the outer and inner derivatives yourself before opening each example.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. Try each problem on paper first, then open the example and check your working one step at a time, so you can see exactly which step went wrong if your answer does not match. Use them to check your answers and to understand why each step works.
See Example 1 Hide Example 1
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the chain rule formula.
- Differentiate the outer function with respect to u.
- Differentiate the inner function with respect to the variable.
- Multiply the derivatives and substitute u back.
Formula
Formula: Chain Rule
This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.
Step 1
Step 1 - Identify the inner function u and the outer function.
In this problem: The inner function is \(u = 2 x + 3\) and the outer function is \(u^{5}\).
Step 2
Step 2 - Write the chain rule formula.
In this problem: Differentiate the outer function with respect to u, then multiply by the derivative of the inner function.
Step 3
Step 3 - Differentiate the outer function with respect to u.
In this problem: Treat u as the variable: the derivative of \(u^{5}\) is \(5 u^{4}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(u^{5}\). This is a power of \(x\), so the exponent is \(n = 5\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Substitute the given power into the formula.
In this problem: Here, \(n = 5\). Substitute this exponent into the power rule, but do not simplify yet.
Step 4
Step 4 - Solve and simplify.
In this problem: Now subtract 1 from the exponent. This gives \(5{u}^{4}\).
Final Answer
Step 4
Step 4 - Differentiate the inner function with respect to the variable.
In this problem: The derivative of \(2 x + 3\) is \(2\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the sum rule formula.
- Split the derivative across the addition signs.
- Differentiate each separated term as Step 4a, Step 4b, Step 4c, and so on.
- Combine the term derivatives and simplify.
Step 1
Step 1 - Set up the terms in the sum.
In this problem: We are given a sum. The separate terms are \(2 x\), \(3\).
Step 2
Step 2 - Write the sum rule formula.
In this problem: The sum rule says the derivative of a sum is the sum of the derivatives.
Step 3
Step 3 - Split the derivative across the addition signs.
In this problem: Apply the derivative to each separated term.
Step 4a
Step 4a - Differentiate the separated term \(2 x\).
In this problem: The separated term is \(2 x\). Use the power rule to get its derivative.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- If there is a number in front, move it out with the constant multiple rule.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(2\) times \(x\). Rewrite the variable part as \(x^{1}\), so the power rule can be used with exponent \(n = 1\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Move the number in front out with the constant multiple rule.
In this problem: \(2\) is a constant coefficient, so it moves in front of the derivative and the power rule only works on \(x\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant multiple rule formula.
- Apply the constant multiple rule.
Step 1
Step 1 - Set up the coefficient and the variable part.
In this problem: We are given \(2 x^{1}\). The constant coefficient is \(2\), and the variable part is \(x^{1}\).
Step 2
Step 2 - Write the constant multiple rule formula.
In this problem: The constant multiple rule says a constant coefficient stays outside the derivative.
Step 3
Step 3 - Apply the constant multiple rule.
In this problem: Move the constant coefficient \(2\) outside the derivative and leave \(x^{1}\) inside the derivative.
Final Answer
Step 4
Step 4 - Substitute the exponent into the formula.
In this problem: Use the rewritten power form from Step 1. Here, \(n = 1\). Substitute this exponent into the power rule, then keep the coefficient \(2\) outside.
Step 5
Step 5 - Solve and simplify.
In this problem: Apply the power rule to \(x\) and multiply by the constant \(2\). This gives \(2\).
Final Answer
Step 4b
Step 4b - Differentiate the separated term \(3\).
In this problem: The separated term is \(3\). Use the constant rule to get its derivative.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant rule formula.
- Apply the constant rule.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(3\). This expression does not contain \(x\), so it is a constant.
Step 2
Step 2 - Write the constant rule formula.
In this problem: The constant rule says the derivative of any constant is \(0\).
Step 3
Step 3 - Apply the constant rule.
In this problem: Since \(3\) is constant, its derivative is \(0\).
Final Answer
Step 5
Step 5 - Combine and simplify.
In this problem: Combine the derivative from each separated term, then simplify the result.
Final Answer
Step 5
Step 5 - Multiply the derivatives and substitute u back.
In this problem: Multiply the two derivatives and replace u with \(2 x + 3\), then simplify.
Final Answer
See Example 2 Hide Example 2
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the chain rule formula.
- Differentiate the outer function with respect to u.
- Differentiate the inner function with respect to the variable.
- Multiply the derivatives and substitute u back.
Formula
Formula: Chain Rule
This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.
Step 1
Step 1 - Identify the inner function u and the outer function.
In this problem: The inner function is \(u = 3 x\) and the outer function is \(\sin{\left(u \right)}\).
Step 2
Step 2 - Write the chain rule formula.
In this problem: Differentiate the outer function with respect to u, then multiply by the derivative of the inner function.
Step 3
Step 3 - Differentiate the outer function with respect to u.
In this problem: Treat u as the variable: the derivative of \(\sin{\left(u \right)}\) is \(\cos{\left(u \right)}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the derivative rule for that trigonometric function.
- Apply the derivative rule.
Step 1
Step 1 - Identify the trigonometric function and any constant multiple.
In this problem: The function is \(\sin{\left(u \right)}\).
Step 2
Step 2 - Write the derivative rule for that trigonometric function.
In this problem: The derivative of \(\sin{\left(u \right)}\) is \(\cos{\left(u \right)}\).
Step 3
Step 3 - Apply the derivative rule.
In this problem: Put \(\sin{\left(u \right)}\) into the rule from Step 2.
Final Answer
Step 4
Step 4 - Differentiate the inner function with respect to the variable.
In this problem: The derivative of \(3 x\) is \(3\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- If there is a number in front, move it out with the constant multiple rule.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(3\) times \(x\). Rewrite the variable part as \(x^{1}\), so the power rule can be used with exponent \(n = 1\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Move the number in front out with the constant multiple rule.
In this problem: \(3\) is a constant coefficient, so it moves in front of the derivative and the power rule only works on \(x\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant multiple rule formula.
- Apply the constant multiple rule.
Step 1
Step 1 - Set up the coefficient and the variable part.
In this problem: We are given \(3 x^{1}\). The constant coefficient is \(3\), and the variable part is \(x^{1}\).
Step 2
Step 2 - Write the constant multiple rule formula.
In this problem: The constant multiple rule says a constant coefficient stays outside the derivative.
Step 3
Step 3 - Apply the constant multiple rule.
In this problem: Move the constant coefficient \(3\) outside the derivative and leave \(x^{1}\) inside the derivative.
Final Answer
Step 4
Step 4 - Substitute the exponent into the formula.
In this problem: Use the rewritten power form from Step 1. Here, \(n = 1\). Substitute this exponent into the power rule, then keep the coefficient \(3\) outside.
Step 5
Step 5 - Solve and simplify.
In this problem: Apply the power rule to \(x\) and multiply by the constant \(3\). This gives \(3\).
Final Answer
Step 5
Step 5 - Multiply the derivatives and substitute u back.
In this problem: Multiply the two derivatives and replace u with \(3 x\), then simplify.
Final Answer
See Example 3 Hide Example 3
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the chain rule formula.
- Differentiate the outer function with respect to u.
- Differentiate the inner function with respect to the variable.
- Multiply the derivatives and substitute u back.
Formula
Formula: Chain Rule
This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.
Step 1
Step 1 - Identify the inner function u and the outer function.
In this problem: The inner function is \(u = 4 x - 1\) and the outer function is \(u^{3}\).
Step 2
Step 2 - Write the chain rule formula.
In this problem: Differentiate the outer function with respect to u, then multiply by the derivative of the inner function.
Step 3
Step 3 - Differentiate the outer function with respect to u.
In this problem: Treat u as the variable: the derivative of \(u^{3}\) is \(3 u^{2}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(u^{3}\). This is a power of \(x\), so the exponent is \(n = 3\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Substitute the given power into the formula.
In this problem: Here, \(n = 3\). Substitute this exponent into the power rule, but do not simplify yet.
Step 4
Step 4 - Solve and simplify.
In this problem: Now subtract 1 from the exponent. This gives \(3{u}^{2}\).
Final Answer
Step 4
Step 4 - Differentiate the inner function with respect to the variable.
In this problem: The derivative of \(4 x - 1\) is \(4\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the difference rule formula.
- Split the derivative across the subtraction signs.
- Differentiate each separated term as Step 4a, Step 4b, Step 4c, and so on.
- Combine the term derivatives and simplify.
Step 1
Step 1 - Set up the terms in the difference.
In this problem: We are given a difference. The separated terms are \(4 x\), \(1\).
Step 2
Step 2 - Write the difference rule formula.
In this problem: The difference rule says the derivative of a difference is the difference of the derivatives.
Step 3
Step 3 - Split the derivative across the subtraction signs.
In this problem: Apply the derivative to each separated term, keeping each sign.
Step 4a
Step 4a - Differentiate the separated term \(4 x\).
In this problem: The separated term is \(4 x\). Use the power rule to get its derivative.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- If there is a number in front, move it out with the constant multiple rule.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(4\) times \(x\). Rewrite the variable part as \(x^{1}\), so the power rule can be used with exponent \(n = 1\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Move the number in front out with the constant multiple rule.
In this problem: \(4\) is a constant coefficient, so it moves in front of the derivative and the power rule only works on \(x\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant multiple rule formula.
- Apply the constant multiple rule.
Step 1
Step 1 - Set up the coefficient and the variable part.
In this problem: We are given \(4 x^{1}\). The constant coefficient is \(4\), and the variable part is \(x^{1}\).
Step 2
Step 2 - Write the constant multiple rule formula.
In this problem: The constant multiple rule says a constant coefficient stays outside the derivative.
Step 3
Step 3 - Apply the constant multiple rule.
In this problem: Move the constant coefficient \(4\) outside the derivative and leave \(x^{1}\) inside the derivative.
Final Answer
Step 4
Step 4 - Substitute the exponent into the formula.
In this problem: Use the rewritten power form from Step 1. Here, \(n = 1\). Substitute this exponent into the power rule, then keep the coefficient \(4\) outside.
Step 5
Step 5 - Solve and simplify.
In this problem: Apply the power rule to \(x\) and multiply by the constant \(4\). This gives \(4\).
Final Answer
Step 4b
Step 4b - Differentiate the separated term \(1\).
In this problem: The separated term is \(1\). Use the constant rule to get its derivative.
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant rule formula.
- Apply the constant rule.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(1\). This expression does not contain \(x\), so it is a constant.
Step 2
Step 2 - Write the constant rule formula.
In this problem: The constant rule says the derivative of any constant is \(0\).
Step 3
Step 3 - Apply the constant rule.
In this problem: Since \(1\) is constant, its derivative is \(0\).
Final Answer
Step 5
Step 5 - Combine and simplify.
In this problem: Combine the derivative from each separated term, keeping the signs, then simplify.
Final Answer
Step 5
Step 5 - Multiply the derivatives and substitute u back.
In this problem: Multiply the two derivatives and replace u with \(4 x - 1\), then simplify.
Final Answer
See Example 4 Hide Example 4
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the chain rule formula.
- Differentiate the outer function with respect to u.
- Differentiate the inner function with respect to the variable.
- Multiply the derivatives and substitute u back.
Formula
Formula: Chain Rule
This rule differentiates a function inside another function. Differentiate the outer function, then multiply by the derivative of the inner function.
Step 1
Step 1 - Identify the inner function u and the outer function.
In this problem: The inner function is \(u = 2 x\) and the outer function is \(\cos{\left(u \right)}\).
Step 2
Step 2 - Write the chain rule formula.
In this problem: Differentiate the outer function with respect to u, then multiply by the derivative of the inner function.
Step 3
Step 3 - Differentiate the outer function with respect to u.
In this problem: Treat u as the variable: the derivative of \(\cos{\left(u \right)}\) is \(- \sin{\left(u \right)}\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the derivative rule for that trigonometric function.
- Apply the derivative rule.
Step 1
Step 1 - Identify the trigonometric function and any constant multiple.
In this problem: The function is \(\cos{\left(u \right)}\).
Step 2
Step 2 - Write the derivative rule for that trigonometric function.
In this problem: The derivative of \(\cos{\left(u \right)}\) is \(- \sin{\left(u \right)}\).
Step 3
Step 3 - Apply the derivative rule.
In this problem: Put \(\cos{\left(u \right)}\) into the rule from Step 2.
Final Answer
Step 4
Step 4 - Differentiate the inner function with respect to the variable.
In this problem: The derivative of \(2 x\) is \(2\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the power rule formula.
- If there is a number in front, move it out with the constant multiple rule.
- Substitute the exponent into the power rule.
- Solve and simplify.
Step 1
Step 1 - Set up the problem.
In this problem: We are given \(2\) times \(x\). Rewrite the variable part as \(x^{1}\), so the power rule can be used with exponent \(n = 1\).
Step 2
Step 2 - Write the power rule formula.
In this problem: The power rule says to move the exponent to the front, then subtract 1 from the exponent.
Step 3
Step 3 - Move the number in front out with the constant multiple rule.
In this problem: \(2\) is a constant coefficient, so it moves in front of the derivative and the power rule only works on \(x\).
Problem
Approach
Step-by-step method
- Set up the problem.
- Write the constant multiple rule formula.
- Apply the constant multiple rule.
Step 1
Step 1 - Set up the coefficient and the variable part.
In this problem: We are given \(2 x^{1}\). The constant coefficient is \(2\), and the variable part is \(x^{1}\).
Step 2
Step 2 - Write the constant multiple rule formula.
In this problem: The constant multiple rule says a constant coefficient stays outside the derivative.
Step 3
Step 3 - Apply the constant multiple rule.
In this problem: Move the constant coefficient \(2\) outside the derivative and leave \(x^{1}\) inside the derivative.
Final Answer
Step 4
Step 4 - Substitute the exponent into the formula.
In this problem: Use the rewritten power form from Step 1. Here, \(n = 1\). Substitute this exponent into the power rule, then keep the coefficient \(2\) outside.
Step 5
Step 5 - Solve and simplify.
In this problem: Apply the power rule to \(x\) and multiply by the constant \(2\). This gives \(2\).
Final Answer
Step 5
Step 5 - Multiply the derivatives and substitute u back.
In this problem: Multiply the two derivatives and replace u with \(2 x\), then simplify.
Final Answer
Calculator and Practice Mode
Want to check your own working? The Chain Rule Calculator solves any problem you type in and shows every step, so you can compare it line by line with your answer and find exactly where a mistake crept in. When you are ready to test yourself, Chain Rule Practice gives you a new problem at Easy, Medium or Hard level, checks your answer and shows the full working whenever you get one wrong. Practice Mode is available on the Plus and Pro plans.