Two graphs enclose a region between the points where they cross. Subtract the lower one from the upper one before integrating, and if they swap places partway through, split at the crossing point.
10 min read3 worked examples
The area trapped between two graphs
The last lesson found the area between a curve and the $x$-axis — really just a special case, since the $x$-axis is the line $y = 0$. The same idea works for any pair of graphs: two straight lines, a line and a curve, or two curves. Wherever they cross, they enclose a region, and its area comes from integrating the gap between them.
The general rule
If $y = f(x)$ lies above $y = g(x)$ for every $x$ between $a$ and $b$, the area enclosed between them is
Subtracting the lower graph from the upper one first means each thin vertical strip already has the right height — the vertical gap between the two curves — so a single integral gives the enclosed area directly.
Two things have to happen before that formula can be used. First, the limits $a$ and $b$ are hardly ever given outright — they're the $x$-coordinates where the graphs intersect, found by setting the two expressions equal and solving. Second, you have to know which graph is on top, since integrating the wrong way round just flips the sign. A quick sketch usually settles it; failing that, substitute a value of $x$ strictly between the intersections into both expressions and compare.
Worked example 1
A straight line and a curve
Find the area of the region enclosed between the line $y = 2x + 3$ and the curve $y = x^2$.
The line lies above the curve for the whole interval $-1 \le x \le 3$, so a single integral of (line − curve) gives the shaded area.
MethodFind the intersections, check which graph is on top, then integrate the difference
1
Set the expressions equal: $x^2 = 2x+3 \Rightarrow x^2-2x-3=0 \Rightarrow (x-3)(x+1)=0$.
Find where they cross.
2
So $x=-1$ or $x=3$ — the region runs from $x=-1$ to $x=3$.
These are the limits $a$ and $b$.
3
Test $x=1$: line gives $y=5$; curve gives $y=1$. The line is above the curve throughout the interval.
Confirms which to subtract.
4
Area $= \displaystyle\int_{-1}^{3} \big[(2x+3) - x^2\big]\,\mathrm{d}x = \Big[x^2+3x-\tfrac13x^3\Big]_{-1}^{3}$.
Area $= 9-\left(-\tfrac53\right)=\dfrac{32}{3}$ square units.
About $10.67$.
▪ solved
Two curves at once
Nothing about the method changes when both boundaries are curves rather than one being a straight line — the formula $\int_a^b[f(x)-g(x)]\,\mathrm{d}x$ never cared which graph was "the line" and which was "the curve", only which one sits on top.
Worked example 2
Curve and curve
Find the area of the region enclosed between the curves $y = x^2$ and $y = 8 - x^2$.
The two parabolas enclose a lens-shaped region between $x=-2$ and $x=2$, where $y=8-x^2$ stays above $y=x^2$.
MethodSame method — neither boundary has to be a straight line
1
Set the expressions equal: $x^2 = 8-x^2 \Rightarrow 2x^2=8 \Rightarrow x^2=4 \Rightarrow x=\pm2$.
Find where they cross.
2
Test $x=0$: $y=x^2$ gives $0$; $y=8-x^2$ gives $8$. So $y=8-x^2$ is on top throughout $-2<x<2$.
Confirms which to subtract.
3
Area $= \displaystyle\int_{-2}^{2}\big[(8-x^2)-x^2\big]\,\mathrm{d}x = \int_{-2}^{2}(8-2x^2)\,\mathrm{d}x = \Big[8x-\tfrac23x^3\Big]_{-2}^{2}$.
Area $= \tfrac{32}{3}-\left(-\tfrac{32}{3}\right)=\dfrac{64}{3}$ square units.
About $21.33$.
▪ solved
When the graphs swap places
Both examples so far had exactly two intersection points, with one graph staying on top the whole way between them. If the graphs cross a third time inside the region you're interested in, they swap which one is "on top" at that crossing point. Integrating straight across it would let a positive and a negative contribution start cancelling, in exactly the same way a region below the $x$-axis could — so, just as before, the fix is to split the integral at every crossing point and treat each piece with the correct graph on top.
Splitting between curves works the same way as splitting at a root
Find every intersection, not just the outer two. Between each consecutive pair, test a value to see which graph is on top there, integrate $(\text{top}-\text{bottom})$ over just that piece, and add the pieces together. A sketch — even a rough one — is the fastest way to see how many pieces there are and where the split points fall.
Worked example 3
Three intersections — split the region
Find the total area enclosed between the line $y = x$ and the curve $y = x^3 - 2x$.
Three crossings make two enclosed regions. The curve is on top for Piece 1 (left of the origin); the line is on top for Piece 2 (right of the origin) — so each piece needs its own integral.
Setting the expressions equal gives $x^3-2x=x$, i.e. $x^3-3x=0$, i.e. $x(x^2-3)=0$ — three solutions: $x=-\sqrt3$, $x=0$, $x=\sqrt3$. With three crossings there are two enclosed regions, and testing a point in each shows they swap which graph is on top.
MethodSplit at x = 0, integrate each piece with the correct graph on top
1
Test $x=-1$ (in $-\sqrt3<x<0$): line gives $-1$; curve gives $(-1)^3-2(-1)=1$. The curve is above the line here.
Total area $=\tfrac94+\tfrac94=\dfrac92$ square units.
Add the two pieces. $=4.5$.
▪ solved
Why not just integrate straight from $-\sqrt3$ to $\sqrt3$?
$\displaystyle\int_{-\sqrt3}^{\sqrt3}\big[(x^3-2x)-x\big]\,\mathrm{d}x=\int_{-\sqrt3}^{\sqrt3}(x^3-3x)\,\mathrm{d}x=0$, because $x^3-3x$ is an odd function and the interval is symmetric about $0$ — the two enclosed regions are equal in size but land with opposite sign, so a single integral makes them cancel exactly. The true total area is $\tfrac92$, not $0$; splitting at the middle crossing point is what recovers it.
Common mistake
Two errors show up again and again here. Subtracting the wrong way round (bottom minus top) flips the sign of the whole answer — always test a value strictly between the limits to confirm which graph is really on top, rather than assuming from the shapes of the equations. And missing an intersection point in the middle of the interval — as in Worked Example 3 — lets a positive piece and a negative piece cancel, giving an answer that's too small, or even zero. Find every solution to $f(x) = g(x)$ before deciding how many pieces to integrate.
Check yourself
Find the area of the region enclosed between the curve $y = 5x - x^2$ and the line $y = x + 3$. (Hint: find the intersections first, then test a point between them to see which graph is on top.)
Method
1
Set equal: $5x-x^2=x+3 \Rightarrow -x^2+4x-3=0 \Rightarrow x^2-4x+3=0 \Rightarrow (x-1)(x-3)=0$.
Intersections at $x=1$ and $x=3$.
2
Test $x=2$: curve gives $10-4=6$; line gives $5$. The curve is above the line throughout.
Confirms which to subtract.
3
Area $= \displaystyle\int_1^3\big[(5x-x^2)-(x+3)\big]\,\mathrm{d}x = \int_1^3(4x-x^2-3)\,\mathrm{d}x = \Big[2x^2-\tfrac13x^3-3x\Big]_1^3$.