Difference Rule Notes

Published on: September 29, 2026

These Difference Rule Notes explain how to differentiate terms that are subtracted from one another, with the working shown 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

  1. Set up the problem.
  2. Write the difference rule formula.
  3. Split the derivative across the subtraction signs.
  4. Differentiate each separated term as Step 4a, Step 4b, Step 4c, and so on.
  5. 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.

\(\frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right)\)

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

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\). Examples 3 and 4 give you two more of the same kind to try, \(f\left(x\right) = x^{4} - x^{2}\) and \(f\left(x\right) = 4 x^{3} - 2 x + 5\). Try differentiating each term yourself before opening the examples.

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

\(f\left(x\right) = x^{3} - x^{2}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the difference rule formula.
  3. Split the derivative across the subtraction signs.
  4. Differentiate each separated term as Step 4a, Step 4b, Step 4c, and so on.
  5. 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.

\(\frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right)\)

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}\).

\(f\left(x\right) = 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.

\(\frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right)\)

Step 3

Step 3 - Split the derivative across the subtraction signs.

In this problem: Apply the derivative to each separated term, keeping each sign.

\(\frac{d}{dx}\left(x^{3} - x^{2}\right) = \frac{d}{dx}\left(x^{3}\right) - \frac{d}{dx}\left(x^{2}\right)\)

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.

\(\frac{d}{dx}\left(x^{3}\right) = 3 x^{2}\)

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.

\(\frac{d}{dx}\left(x^{2}\right) = 2 x\)

Step 5

Step 5 - Combine and simplify.

In this problem: Combine the derivative from each separated term, keeping the signs, then simplify.

\(f'\left(x\right) = 3 x^{2} - 2 x\)

Final Answer

\(f'\left(x\right) = 3 x^{2} - 2 x\)
See Example 2 Hide Example 2

Problem

\(f\left(x\right) = 5 x^{2} - 3 x + 1\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the difference rule formula.
  3. Split the derivative across the subtraction signs.
  4. Differentiate each separated term as Step 4a, Step 4b, Step 4c, and so on.
  5. 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.

\(\frac{d}{dx}\left(f\left(x\right) + g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) + \frac{d}{dx}g\left(x\right)\)

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.

\(\frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right)\)

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\).

\(f\left(x\right) = 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.

\(\begin{gathered} \frac{d}{dx}\left(f\left(x\right) + g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) + \frac{d}{dx}g\left(x\right) \\ \frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right) \end{gathered}\)

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.

\(\frac{d}{dx}\left(5 x^{2} - 3 x + 1\right) = \frac{d}{dx}\left(5 x^{2}\right) - \frac{d}{dx}\left(3 x\right) + \frac{d}{dx}\left(1\right)\)

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.

\(\frac{d}{dx}\left(5 x^{2}\right) = 10 x\)

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.

\(\frac{d}{dx}\left(3 x\right) = 3\)

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.

\(\frac{d}{dx}\left(1\right) = 0\)

Step 5

Step 5 - Combine and simplify.

In this problem: Combine the derivative from each separated term, keeping the signs, then simplify.

\(f'\left(x\right) = 10 x - 3 + 0 = 10 x - 3\)

Final Answer

\(f'\left(x\right) = 10 x - 3\)
See Example 3 Hide Example 3

Problem

\(f\left(x\right) = x^{4} - x^{2}\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the difference rule formula.
  3. Split the derivative across the subtraction signs.
  4. Differentiate each separated term as Step 4a, Step 4b, Step 4c, and so on.
  5. 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.

\(\frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right)\)

Step 1

Step 1 - Set up the terms in the difference.

In this problem: We are given a difference. The separated terms are \(x^{4}\), \(x^{2}\).

\(f\left(x\right) = x^{4} - 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.

\(\frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right)\)

Step 3

Step 3 - Split the derivative across the subtraction signs.

In this problem: Apply the derivative to each separated term, keeping each sign.

\(\frac{d}{dx}\left(x^{4} - x^{2}\right) = \frac{d}{dx}\left(x^{4}\right) - \frac{d}{dx}\left(x^{2}\right)\)

Step 4a

Step 4a - Differentiate the separated term \(x^{4}\).

In this problem: The separated term is \(x^{4}\). Use the power rule to get its derivative.

\(\frac{d}{dx}\left(x^{4}\right) = 4 x^{3}\)

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.

\(\frac{d}{dx}\left(x^{2}\right) = 2 x\)

Step 5

Step 5 - Combine and simplify.

In this problem: Combine the derivative from each separated term, keeping the signs, then simplify.

\(f'\left(x\right) = 4 x^{3} - 2 x\)

Final Answer

\(f'\left(x\right) = 4 x^{3} - 2 x\)
See Example 4 Hide Example 4

Problem

\(f\left(x\right) = 4 x^{3} - 2 x + 5\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the difference rule formula.
  3. Split the derivative across the subtraction signs.
  4. Differentiate each separated term as Step 4a, Step 4b, Step 4c, and so on.
  5. 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.

\(\frac{d}{dx}\left(f\left(x\right) + g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) + \frac{d}{dx}g\left(x\right)\)

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.

\(\frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right)\)

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 \(4 x^{3}\), \(2 x\), \(5\).

\(f\left(x\right) = 4 x^{3} - 2 x + 5\)

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.

\(\begin{gathered} \frac{d}{dx}\left(f\left(x\right) + g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) + \frac{d}{dx}g\left(x\right) \\ \frac{d}{dx}\left(f\left(x\right) - g\left(x\right)\right) = \frac{d}{dx}f\left(x\right) - \frac{d}{dx}g\left(x\right) \end{gathered}\)

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.

\(\frac{d}{dx}\left(4 x^{3} - 2 x + 5\right) = \frac{d}{dx}\left(4 x^{3}\right) - \frac{d}{dx}\left(2 x\right) + \frac{d}{dx}\left(5\right)\)

Step 4a

Step 4a - Differentiate the separated term \(4 x^{3}\).

In this problem: The separated term is \(4 x^{3}\). Use the power rule to get its derivative.

\(\frac{d}{dx}\left(4 x^{3}\right) = 12 x^{2}\)

Step 4b

Step 4b - Differentiate the separated term \(2 x\).

In this problem: The separated term is \(2 x\). Use the power rule to get its derivative.

\(\frac{d}{dx}\left(2 x\right) = 2\)

Step 4c

Step 4c - Differentiate the separated term \(5\).

In this problem: The separated term is \(5\). Use the constant rule to get its derivative.

\(\frac{d}{dx}\left(5\right) = 0\)

Step 5

Step 5 - Combine and simplify.

In this problem: Combine the derivative from each separated term, keeping the signs, then simplify.

\(f'\left(x\right) = 12 x^{2} - 2 + 0 = 12 x^{2} - 2\)

Final Answer

\(f'\left(x\right) = 12 x^{2} - 2\)

Calculator and Practice Mode