# What is the area between two curves?

Finds the area between y = f(x) and y = g(x), from a to b or between their crossings.

- Page: https://www.acalculator.org/math/area-between-curves-calculator
- JSON spec: https://www.acalculator.org/math/area-between-curves-calculator.json
- Version: e966ebbb14c8

## Default answer

Example with the default inputs (Curve y = f(x) 9 - (x/2)^2, Curve y = g(x) 6 - x): The area between 9 - (x/2)^2 and 6 - x is 21.33333333.

## Inputs

| Key | Label | Description |
| --- | --- | --- |
| f | Curve y = f(x) | The first curve. |
| g | Curve y = g(x) | The second curve. |
| a | From x = a (optional) | Left end, or empty for the crossings. |
| b | To x = b (optional) | Right end. |

## Outputs

| Key | Label | Description |
| --- | --- | --- |
| area | Area | The integral of \|f(x) − g(x)\| from a to b. |
| exact | Exact area | The area, exactly. |
| lower | From x = | Left end used. |
| upper | To x = | Right end used. |

## Method

Area = ∫ |f(x) − g(x)| dx from a to b, split where the curves cross.

## Assumptions

- Crossings searched for in ±10^6.

## Worked examples

1. f = 9 - (x/2)^2, g = 6 - x gives area = 21.333333, exact = 64/3, lower = -2, upper = 6. Source: OpenStax (Strang and Herman, 2016), Calculus Volume 1, section 6.1 Areas between Curves, Example 6.2.
2. f = x + 4, g = 3 - x/2, a = 1, b = 4 gives area = 14.25, exact = 57/4. Source: OpenStax (Strang and Herman, 2016), Calculus Volume 1, section 6.1 Areas between Curves, Example 6.1.

## FAQ

### How do I find the area between two curves?

Integrate the top curve minus the bottom curve: area = ∫ from a to b of (f(x) − g(x)) dx when f ≥ g on [a, b]. When the curves cross inside [a, b], split the interval at each crossing and integrate |f(x) − g(x)| on each piece, so no part counts as negative area.

### How do I find the limits of integration?

When the region is enclosed by the two curves, the limits are the x values where they meet: solve f(x) = g(x). For 9 − (x/2)² and 6 − x, 9 − x²/4 = 6 − x gives x² − 4x − 12 = 0, so x = −2 and x = 6. Leave a and b empty and the page does this.

### What if the curves cross more than twice?

With a and b empty, the page uses the first and the last crossing as the limits and splits the interval at the crossings in between. For x³ and x it integrates from −1 to 0 and from 0 to 1 and adds the two areas: 1/4 + 1/4 = 1/2.

### Why is the answer not the same as the integral of f − g?

The integral of f − g counts area where g is above f as negative, so the pieces can cancel: from −1 to 1, the integral of x³ − x is 0, while the area between the curves is 1/2. The page adds the size of each piece.

### Can I find the area between curves given as x = f(y)?

Swap the letters: the area between x = √y and x = 2 − y is the same as the area between y = √x and y = 2 − x. Type them in x.

### How is the answer checked?

Each piece is a definite integral from a computer algebra system, whose value is compared with a numeric integral of f − g. The crossings are found both by the algebra and by a sign scan on a fine grid, so none is missed.

## Sources

- OpenStax, Calculus Volume 1, section 6.1 Areas between Curves: https://openstax.org/books/calculus-volume-1/pages/6-1-areas-between-curves
