Difference Rule Integration Calculator

Published on: July 17, 2026
Final Answer: Free | Full Steps: Plus

This Difference Rule Integration Calculator integrates terms that are subtracted from one another, and shows the working line by line. The integral splits across the minus signs just as it does across plus signs, with each term handled separately and the signs left as they were. A single constant of integration covers the whole answer. 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 for integration.
  3. Split the integral across the subtraction signs.
  4. Integrate each separated term as Step 4a, Step 4b, Step 4c, and so on.
  5. Combine the results and add the constant of integration C.

Formula: Difference Rule for Integration

The integral of a difference is the difference of the integrals, so each term is integrated on its own and the results are subtracted.

\(\int \left(f\left(x\right) - g\left(x\right)\right)\, dx = \int f\left(x\right)\, dx - \int g\left(x\right)\, dx\)

Useful Tips to Remember

The difference rule says \(\int [f(x) - g(x)]\,dx = \int f(x)\,dx - \int g(x)\,dx\). Keep the minus sign in front of every part of the second function. Integrate each term separately and combine them with one \(+C\) at the end. The rule does not work for products or quotients.

Required knowledge

Where Is the Difference Rule for Integration Used?

The difference rule for integration says that the integral of a difference is the difference of the integrals, so each term can be integrated on its own. It is used whenever a total is one amount minus another, such as the net water in a tank from inflow minus outflow, or profit from revenue minus cost. Integrating each rate separately and then subtracting gives the net change over time. It also finds the area between two curves, where the lower curve is subtracted from the upper one before integrating.

  • Finding net change from inflow minus outflow
  • Calculating total profit from revenue and cost rates
  • Finding the area enclosed between an upper and a lower curve
  • Integrating polynomials with negative terms
  • Working out net displacement in physics

Difference Rule Integration Practice Problems

Example 1 integrates \(x^3 - x^2\), and Example 2 integrates \(5x^2 - 3x\). Try integrating each term yourself before checking. For two more free worked examples, check out the Difference Rule Integration 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

\(\int x^{3} - x^{2}\, dx\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the difference rule for integration.
  3. Split the integral across the subtraction signs.
  4. Integrate each separated term as Step 4a, Step 4b, Step 4c, and so on.
  5. Combine the results and add the constant of integration C.

Formula

Formula: Difference Rule for Integration

The integral of a difference is the difference of the integrals, so each term is integrated on its own and the results are subtracted.

\(\int \left(f\left(x\right) - g\left(x\right)\right)\, dx = \int f\left(x\right)\, dx - \int g\left(x\right)\, dx\)

Step 1

Step 1 - Set up the terms in the difference.

In this problem: We are integrating a difference. The separate terms are \(x^{3}\), \(x^{2}\).

\(\int x^{3} - x^{2}\, dx\)

Step 2

Step 2 - Write the difference rule for integration.

In this problem: The integral of a difference is the difference of the integrals.

\(\int \left(f\left(x\right) - g\left(x\right)\right)\, dx = \int f\left(x\right)\, dx - \int g\left(x\right)\, dx\)

Step 3

Step 3 - Split the integral across the subtraction signs.

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

\(\int \left(x^{3} - x^{2}\right)\, dx = \int x^{3}\, dx - \int x^{2}\, dx\)

Step 4a

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

In this problem: The separated term is \(x^{3}\).

\(\int x^{3}\, dx = \frac{x^{4}}{4}\)

Step 4b

Step 4b - Integrate the separated term \(x^{2}\).

In this problem: The separated term is \(x^{2}\).

\(\int x^{2}\, dx = \frac{x^{3}}{3}\)

Step 5

Step 5 - Combine the results and add the constant of integration C.

In this problem: Put the integral of each term back together, keeping the signs, and add one constant C.

\(\int \left(x^{3} - x^{2}\right)\, dx = \frac{x^{4}}{4} - \frac{x^{3}}{3} + C\)

Final Answer

\(\int x^{3} - x^{2}\, dx = \frac{x^{4}}{4} - \frac{x^{3}}{3} + C\)
See Example 2 Hide Example 2

Problem

\(\int 5 x^{2} - 3 x\, dx\)

Approach

Step-by-step method

  1. Set up the problem.
  2. Write the difference rule for integration.
  3. Split the integral across the subtraction signs.
  4. Integrate each separated term as Step 4a, Step 4b, Step 4c, and so on.
  5. Combine the results and add the constant of integration C.

Formula

Formula: Difference Rule for Integration

The integral of a difference is the difference of the integrals, so each term is integrated on its own and the results are subtracted.

\(\int \left(f\left(x\right) - g\left(x\right)\right)\, dx = \int f\left(x\right)\, dx - \int g\left(x\right)\, dx\)

Step 1

Step 1 - Set up the terms in the difference.

In this problem: We are integrating a difference. The separate terms are \(5 x^{2}\), \(3 x\).

\(\int 5 x^{2} - 3 x\, dx\)

Step 2

Step 2 - Write the difference rule for integration.

In this problem: The integral of a difference is the difference of the integrals.

\(\int \left(f\left(x\right) - g\left(x\right)\right)\, dx = \int f\left(x\right)\, dx - \int g\left(x\right)\, dx\)

Step 3

Step 3 - Split the integral across the subtraction signs.

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

\(\int \left(5 x^{2} - 3 x\right)\, dx = \int 5 x^{2}\, dx - \int 3 x\, dx\)

Step 4a

Step 4a - Integrate the separated term \(5 x^{2}\).

In this problem: The separated term is \(5 x^{2}\).

\(\int 5 x^{2}\, dx = \frac{5 x^{3}}{3}\)

Step 4b

Step 4b - Integrate the separated term \(3 x\).

In this problem: The separated term is \(3 x\).

\(\int 3 x\, dx = \frac{3 x^{2}}{2}\)

Step 5

Step 5 - Combine the results and add the constant of integration C.

In this problem: Put the integral of each term back together, keeping the signs, and add one constant C.

\(\int \left(5 x^{2} - 3 x\right)\, dx = \frac{5 x^{3}}{3} - \frac{3 x^{2}}{2} + C\)

Final Answer

\(\int 5 x^{2} - 3 x\, dx = \frac{5 x^{3}}{3} - \frac{3 x^{2}}{2} + C\)

Notes and Practice Mode

Example Problems

Click one to load it into the box and solve it.