Area Between Curves

The area between two curves is one of the most common applications of the definite integral. The idea is simple: you integrate the difference of two functions over an interval. The details that trip students up are choosing which function goes first and handling curves that cross.

If you want to check your work along the way, the integral calculator solves definite integrals step by step and plots the result. For a broader overview of methods, see How to Solve Integrals Step by Step.

This article covers the formula, how to find the limits of integration, and what to do when the curves swap places. Two worked examples follow.

Area Under One Curve

Before two curves, recall the single-curve case. If f(x) \ge 0 on [a, b], the area between the graph and the x-axis is

A = \int_a^b f(x)\,dx.

If f is negative somewhere on the interval, the integral counts that part as negative area. To get the actual geometric area, you split the interval at the points where f changes sign and integrate |f(x)| piece by piece.

For example, the area under y = \sin x from 0 to \pi is

\int_0^\pi \sin x\,dx = \left[-\cos x\right]_0^\pi = -(-1) - (-1) = 2.

If you need a refresher on evaluating integrals like this, see How to Evaluate Definite Integrals.

Area Between Two Curves: Top Minus Bottom

Suppose f(x) \ge g(x) for every x in [a, b]. Then the area of the region between the graphs is

A = \int_a^b \bigl(f(x) - g(x)\bigr)\,dx.

Here f is the upper curve and g is the lower curve. Think of it as the area under the top curve minus the area under the bottom curve.

This formula works even if one or both curves dip below the x-axis, because subtracting the lower function always gives a nonnegative height f(x) - g(x).

The recipe is always the same:

  1. Sketch the curves, or at least decide which one is on top.
  2. Find where they intersect to get a and b.
  3. Integrate top minus bottom.

Finding Intersection Points

When the problem does not give you the limits, they come from the points where the curves meet. Set the functions equal and solve:

f(x) = g(x).

For y = x^2 and y = x this gives x^2 = x, so x^2 - x = 0 and x(x - 1) = 0. The curves meet at x = 0 and x = 1.

Moving everything to one side and factoring is the usual approach. If the equation does not factor, you may need the quadratic formula or a numerical method.

Once you have the intersection points, always check which curve is on top between them. Pick a test value inside each interval and compare the two function values. Do not assume the order from the way the problem lists the curves.

Curves That Cross: Splitting the Integral

Sometimes the curves intersect more than twice, or they cross inside the interval you care about. Then the upper and lower functions swap, and a single integral of f - g would give the wrong answer. Positive and negative pieces would partly cancel instead of adding up.

The fix is to split the interval at every intersection point and use top minus bottom on each piece. If the curves cross at x = c between a and b, and f \ge g on [a, c] while g \ge f on [c, b], then

A = \int_a^c \bigl(f(x) - g(x)\bigr)\,dx + \int_c^b \bigl(g(x) - f(x)\bigr)\,dx.

Equivalently, A = \int_a^b |f(x) - g(x)|\,dx, but in practice you write it as separate integrals with the correct order in each.

Situation What to do
One curve is above the other on all of [a, b] Single integral of top minus bottom
Limits are not given Solve f(x) = g(x) for the bounds
Curves cross inside the interval Split at each crossing, use top minus bottom on every piece

Example 1: y = x^2 and y = x

Find the area of the region enclosed by y = x^2 and y = x.

Step 1: Intersection points. From the previous section, the curves meet at x = 0 and x = 1.

Step 2: Which curve is on top? Take the test value x = \tfrac12. Then x = 0.5 and x^2 = 0.25, so the line y = x is above the parabola on (0, 1).

Step 3: Set up the integral.

A = \int_0^1 \left(x - x^2\right)dx.

Step 4: Integrate.

A = \left[\frac{x^2}{2} - \frac{x^3}{3}\right]_0^1 = \left(\frac12 - \frac13\right) - 0 = \frac16.

Check. Differentiating the antiderivative gives \frac{d}{dx}\left(\frac{x^2}{2} - \frac{x^3}{3}\right) = x - x^2, which matches the integrand. The area is \frac16.

You can check this step by step in the integral calculator by entering x-x^2 with limits 0 and 1.

Example 2: Curves That Swap Top and Bottom

Find the total area enclosed by y = x^3 and y = x.

Step 1: Intersection points. Solve x^3 = x:

x^3 - x = 0 \quad\Longrightarrow\quad x(x - 1)(x + 1) = 0.

The curves meet at x = -1, x = 0 and x = 1. That gives two separate regions.

Step 2: Which curve is on top in each region?

The curves swap places at the origin, so we split the integral there.

Step 3: Set up two integrals.

A = \int_{-1}^{0} \left(x^3 - x\right)dx + \int_{0}^{1} \left(x - x^3\right)dx.

Step 4: Integrate each part.

For the first integral:

\int_{-1}^{0} \left(x^3 - x\right)dx = \left[\frac{x^4}{4} - \frac{x^2}{2}\right]_{-1}^{0} = 0 - \left(\frac14 - \frac12\right) = \frac14.

For the second integral:

\int_{0}^{1} \left(x - x^3\right)dx = \left[\frac{x^2}{2} - \frac{x^4}{4}\right]_{0}^{1} = \frac12 - \frac14 = \frac14.

Step 5: Add the pieces.

A = \frac14 + \frac14 = \frac12.

Check. Differentiating \frac{x^4}{4} - \frac{x^2}{2} gives x^3 - x, and differentiating \frac{x^2}{2} - \frac{x^4}{4} gives x - x^3. Both match their integrands. The two regions are mirror images of each other (the difference x - x^3 is an odd function), so equal areas of \frac14 are what we expect.

A common mistake. If you ignore the crossing and integrate x - x^3 over the whole interval [-1, 1], you get

\int_{-1}^{1} \left(x - x^3\right)dx = 0,

because the positive and negative parts cancel. The area is clearly not zero, which is why the split is necessary.

Summary

The same setup of identifying the region, finding its bounds and integrating over it carries over to solids obtained by rotating a region around an axis. This is the topic of Volumes of Revolution.