Area Between Curves
calculator.
Find the size of the region trapped between two graphs, split at every crossing.
- Closed form match
- 2√2
- Signed ∫(f − g) dx
- 2
- Regions
- 2
The curves cross once inside the interval, so the region comes in 2 parts. Skipping the split would give the signed 2, not the area of 2.8284.
The region
- f(x) = sin(x), shaded where f is on top
- g(x) = cos(x)
- Dots mark crossings; this tone shades where g is on top
y = sin(x) and y = cos(x) from x = 0 to x = 3.142. The shaded region has total area 2.8284 in 2 parts, and the curves meet at x = 0.785.
Working
- 1Top curve minus bottom curve, as a sizeA = ∫3.1420|f(x) − g(x)| dx, with f(x) = sin(x) and g(x) = cos(x)
- 2Find where the curves crossf(x) = g(x) at x = 0.785398
- 3From x = 0 to x = 0.785, g is on top∫0.7850(g − f) dx = 0.414214
- 4From x = 0.785 to x = 3.142, f is on top∫3.1420.785(f − g) dx = 2.414214
- 5Add the pieces, then match a simple formA = 0.414214 + 2.414214 = 2.828427, which matches 2√2
- 6Check: 20,000 thin strips of |f − g|, with no crossings used≈ 2.828427, which agrees with A
Each region on its own
| From x | To x | On top | Area |
|---|---|---|---|
| 0 | 0.7854 | g(x) | 0.414214 |
| 0.7854 | 3.1416 | f(x) | 2.414214 |
Crossings come from sampling f − g at 2,001 points, so two crossings closer than one sampling step can be missed. Narrow the interval if you expect that.
How it's worked out
Picture the region as a stack of thin upright strips. Each strip reaches from the lower curve to the upper one, so its height is the gap between them and its width is dx. Adding the strips gives an integral of top minus bottom.
That only works while f stays above g. Once the curves swap places, the gap turns negative and starts to cancel what you have already added. The absolute value fixes that:
You cannot integrate an absolute value directly, so you split the interval wherever the curves cross and integrate each piece with the right curve on top. To find the crossings, the tool samples f minus g at 2,001 points and narrows each sign change by bisection to about 15 digits. Each piece then goes to adaptive Simpson quadrature, which keeps halving any panel whose estimate has not settled. Curves that touch without crossing need no split, since the gap keeps its sign.
Exact values. If the area matches a simple form to about 12 digits, such as or , you see that form beside the decimal. It is a match on the number and not a proof, so show your own integral if a teacher asks for one.
The check. Thin strips of the absolute gap give a second value that never looks for a crossing. If the two disagree, a crossing was probably missed.
Worked examples
Nina finds a region with no interval given
Nina's question asks for the area enclosed by and . Setting them equal gives , so the curves meet at and . A test point such as shows the line on top, since 3 is more than 0.
That is about 10.6667, and it matches . She can leave the search window wide, from −10 to 10, because the tool only uses it to look for the meeting points.
Dev finds out why his integral came up short
Dev integrated sin x minus cos x from 0 to π in one go and got 2. OpenStax works this same pair and gets more, because the curves cross at .
Before the crossing, cos x is on top, and that piece holds 0.4142. After it, sin x is on top, and that piece holds 2.4142. The area is their sum, 2.8284, which matches . Dev's 2 is their difference, because the first piece counted as negative.
Which pump moved more water
Over 4 hours, one pump runs at thousand liters per hour and another at . Type t as x. The rates cross at about , so neither pump leads the whole time.
The first pump pulls ahead by 2.78 thousand liters, and the second then wins back 1.13 thousand. Here the signed integral, 1.65, is the number that matters, since it gives the net lead. The area of 3.91 measures how far apart the two ran in total.
Reading your result
Area or signed integral. The area counts every strip as positive. The signed integral lets a strip go negative wherever g is on top. So x³ and x on [−1, 1] have an area of 0.5 and a signed integral of 0. Use the area for the size of a shape, and the signed integral for a net amount.
A blank second curve means the x-axis, so you get the total area between one curve and the axis. Parts below the axis still count as positive.
Sizes of region. With the same ends, a curve that hugs the axis for longer leaves a bigger gap under the line . The area creeps toward , the area under the line itself.
| Lower curve | Area |
|---|---|
| 0.1667 | |
| 0.25 | |
| 0.3333 | |
| 0.4091 |
Moving both curves up or down changes nothing. Add 5 to both x and x² and the area stays 0.1667, because only the gap counts. That also means a region below the x-axis needs no special care.
Common mistakes
- Not splitting at a crossing. One integral across a crossing gives a net amount. For sin x on its own from 0 to 2π, that is 0 even though the region has an area of 4.
- Guessing which curve is on top. Being larger at one end says nothing about the middle. Test a point between each pair of crossings.
- Using the search window as the limits. In Between crossings mode, the limits are the first and last meeting points, not the ends of the window you typed.
- Crossing a vertical asymptote. With across 0, the area may be infinite. The tool stops and says where the function has no value, and the improper integral calculator handles that case.