Skip to content
Tutorials Center
My learning

Topics

Lesson 28 of 39 · Applications of Integration

Area Between Curves

Find the area enclosed between two curves with definite integrals: top minus bottom, intersection points, regions that cross, and code to verify results.

A definite integral gives the area between a curve and the x-axis. But many real regions are bounded by two curves: the space between two roads, the gap between a supply curve and a demand curve, or the cross-section of a tool. The same idea extends naturally to area between curves.

The formula

Suppose f(x) ≥ g(x) for all x in [a, b], so the graph of f is the top curve and g the bottom curve. Then the area between them is

Text
Area = ∫ from a to b of [ f(x) - g(x) ] dx

Why? Cut the region into thin vertical strips of width dx. Each strip has height top - bottom = f(x) - g(x), so its area is [f(x) - g(x)] dx. The integral adds all strips.

This formula works even when parts of the region sit below the x-axis, because only the difference matters. The x-axis is just the special case g(x) = 0.

Steps

  1. Sketch the curves.
  2. Find the intersection points by solving f(x) = g(x). They usually give the limits a and b.
  3. Decide which curve is on top between the limits (test a point in the middle).
  4. Set up ∫ (top - bottom) dx and evaluate.

Example 1: a parabola and a line

Find the area enclosed by y = x² and y = x + 2.

Intersections: x² = x + 2, so x² - x - 2 = 0, which factors as (x - 2)(x + 1) = 0. So x = -1 or x = 2.

Test x = 0: the line gives 2, the parabola gives 0, so the line is on top.

Text
Area = ∫ from -1 to 2 of [(x + 2) - x²] dx
     = [x²/2 + 2x - x³/3] from -1 to 2
     = (2 + 4 - 8/3) - (1/2 - 2 + 1/3)
     = 10/3 - (-7/6) = 9/2 = 4.5
Python Area between a parabola and a line

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Example 2: curves that cross inside the interval

What is the total area between y = sin x and y = cos x from x = 0 to x = π? These curves cross where sin x = cos x, at x = π/4. For 0 ≤ x < π/4, cos x is on top. For π/4 < x ≤ π, sin x is on top. If you integrated sin x - cos x across the whole interval, the two parts would partly cancel and give a wrong answer for the area. Instead, split at the crossing point:

Text
Area = ∫ from 0 to π/4 of (cos x - sin x) dx + ∫ from π/4 to π of (sin x - cos x) dx

Evaluate: the first part is [sin x + cos x] from 0 to π/4 = √2 - 1. The second part is [-cos x - sin x] from π/4 to π = (1 - 0) - (-√2) = 1 + √2. The total is (√2 - 1) + (1 + √2) = 2√2 ≈ 2.828.

The key idea: use |f(x) - g(x)| for the true area, splitting where the curves cross.

Python Splitting at a crossing point

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Integrating with respect to y

Sometimes it is easier to slice the region into thin horizontal strips. If the region lies between a right curve x = R(y) and a left curve x = L(y) for y from c to d, then

Text
Area = ∫ from c to d of [ R(y) - L(y) ] dy

For example, the region between y² = x and y = x - 2 is awkward with vertical strips (the top and bottom curves change), but with horizontal strips the left curve is x = y² and the right is x = y + 2, which meet at y = -1 and y = 2:

Text
Area = ∫ from -1 to 2 of [(y + 2) - y²] dy = 9/2

It is the same calculation as Example 1 with the roles of the variables swapped.

If you find yourself splitting the region into several pieces with dx, try dy. Pick the direction that gives the simplest top/bottom (or left/right) pair.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. The area between y = f(x) (top) and y = g(x) (bottom) from a to b is

    Each thin strip has height top minus bottom, so the integrand is f(x) - g(x).
  2. 2. Where do the limits of integration usually come from?

    Solve f(x) = g(x) to find where the curves meet.
  3. 3. What must you do if two curves cross in the middle of the interval?

    Otherwise parts of the integral have the wrong sign and partly cancel.
  4. 4. What is the area between y = x and y = x² from x = 0 to x = 1?

    ∫ from 0 to 1 of (x - x²) dx = 1/2 - 1/3 = 1/6.

Summary

  • Area between curves: ∫ (top - bottom) dx between the intersection points.
  • Always sketch and test which curve is on top.
  • If the curves cross, split the integral at each crossing.
  • Horizontal strips use ∫ (right - left) dy.

Next: Volumes of Revolution