Difference Rule Calculator
This Difference Rule Calculator differentiates terms that are subtracted from one another, and shows the working line by line. The derivative splits across the minus signs just as it does across plus signs, with each term handled separately and the signs kept as they were. Losing a minus sign is the usual mistake here. Following the same pattern every time keeps each sign attached to its own term.
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.
Formula: Difference Rule
The derivative of a difference is the difference of the derivatives, so each term is differentiated on its own and the results are subtracted.
Useful Tips to Remember
The difference rule says \(\frac{d}{dx}[f(x) - g(x)] = f'(x) - g'(x)\), so each term is differentiated separately. Keep the minus sign in front of every term that follows it, especially when a bracket comes after a minus sign. Constant terms still differentiate to zero. The rule works together with all the other rules used on each term.
Required knowledge
- How to differentiate x raised to a power, covered in the Power Rule Calculator.
- How a number in front of a function stays in front when differentiating, covered in the Constant Multiple Rule Calculator.
Where Is the Difference Rule Used?
The difference rule says that the derivative of a difference is the difference of the derivatives, so each term can be handled separately. It is used whenever a quantity is one amount minus another, such as profit being revenue minus cost. Differentiating \(R(x) - C(x)\) term by term gives marginal profit, which shows whether making one more item earns or loses money. In physics, it handles formulas like the height \(h_0 + vt - 4.9t^2\), where a downward term is subtracted from the upward motion.
- Finding marginal profit from revenue minus cost
- Differentiating height formulas with gravity subtracted
- Working out net rates, such as water flowing in minus water leaking out
- Differentiating polynomials with negative terms
- Comparing how two changing quantities move apart
Difference Rule Practice Problems
Example 1 differentiates \(x^3 - x^2\), and Example 2 differentiates \(5x^2 - 3x + 1\). Try differentiating each term yourself before opening the examples. For two more free worked examples, check out the Difference Rule Notes.
The worked examples below go through the same pattern from start to finish, so you can compare every step with your own working. For more practice, the notes page goes further with extra worked examples and fuller explanations of the ideas behind each step. Use them together 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 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.
Formula
Formula: Difference Rule
The derivative of a difference is the difference of the derivatives, so each term is differentiated on its own and the results are subtracted.
Step 1
Step 1 - Set up the terms in the difference.
In this problem: We are given a difference. The separated terms are \(x^{3}\), \(x^{2}\).
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 \(x^{3}\).
In this problem: The separated term is \(x^{3}\). Use the power rule to get its derivative.
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 \(x^{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{x}^{2}\).
Final Answer
Step 4b
Step 4b - Differentiate the separated term \(x^{2}\).
In this problem: The separated term is \(x^{2}\). Use the power rule to get its derivative.
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 \(x^{2}\). This is a power of \(x\), so the exponent is \(n = 2\).
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 = 2\). 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 \(2{x}^{1}\).
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
See Example 2 Hide Example 2
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.
Formula
Formula: Sum Rule
The derivative of a sum is the sum of the derivatives, so each term is differentiated on its own and the results are added.
Formula: Difference Rule
The derivative of a difference is the difference of the derivatives, so each term is differentiated on its own and the results are subtracted.
Step 1
Step 1 - Set up the terms in the sum and difference.
In this problem: We are given a sum and difference. The separated terms are \(5 x^{2}\), \(3 x\), \(1\).
Step 2
Step 2 - Write the sum rule and difference rule formulas.
In this problem: The sum rule and the difference rule say the derivative of a sum or difference is the sum or difference of the derivatives.
Step 3
Step 3 - Split the derivative across the plus and minus signs.
In this problem: Apply the derivative to each separated term, keeping each sign.
Step 4a
Step 4a - Differentiate the separated term \(5 x^{2}\).
In this problem: The separated term is \(5 x^{2}\). 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 \(5 x^{2}\). This is a constant multiple of a power of \(x\). The coefficient is \(5\), the power part is \(x^{2}\), and the exponent is \(n = 2\).
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: \(5\) is a constant coefficient, so it moves in front of the derivative and the power rule only works on \(x^{2}\).
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 \(5 x^{2}\). The constant coefficient is \(5\), and the variable part is \(x^{2}\).
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 \(5\) outside the derivative and leave \(x^{2}\) inside the derivative.
Final Answer
Step 4
Step 4 - Substitute the exponent into the formula.
In this problem: Here, \(n = 2\). Substitute this exponent into the power rule, then keep the coefficient \(5\) outside.
Step 5
Step 5 - Solve and simplify.
In this problem: Apply the power rule to \(x^{2}\) and multiply by the constant \(5\). This gives \(10{x}^{1}\).
Final Answer
Step 4b
Step 4b - Differentiate the separated term \(3 x\).
In this problem: The separated term is \(3 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 \(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 4c
Step 4c - 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
Notes and Practice Mode
Want to understand the method more deeply? The Difference Rule Notes go through the same pattern with extra worked examples and fuller explanations of the ideas behind each step, so you can see why every step works and not just what to do. When you are ready to test yourself, Difference 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.
Login and upgrade to Plus to unlock the full step solution.
Example Problems
Click one to load it into the box and solve it.