MathsCalculus

Area Between Curves
calculator.

Find the size of the region trapped between two graphs, split at every crossing.

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.

A\displaystyle A=∫ab[f(x)−g(x)]dx\displaystyle {}= \int_a^b \left[f(x) - g(x)\right]dx

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:

A\displaystyle A=∫ab|f(x)−g(x)|dx\displaystyle {}= \int_a^b \left|f(x) - g(x)\right|dx

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 16\frac{1}{6} or 323\frac{32}{3}, 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 y=2x+3y = 2x + 3 and y=x2y = x^2. Setting them equal gives x2−2x−3=0x^2 - 2x - 3 = 0, so the curves meet at x=−1x = -1 and x=3x = 3. A test point such as x=0x = 0 shows the line on top, since 3 is more than 0.

A\displaystyle A=∫−13(2x+3−x2)dx\displaystyle {}= \int_{-1}^{3} \left(2x + 3 - x^2\right)dx=323\displaystyle {}= \frac{32}{3}

That is about 10.6667, and it matches 323\frac{32}{3}. She can leave the search window wide, from −10 to 10, because the tool only uses it to look for the meeting points.

Open this example in the tool

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 x=π4x = \frac{\pi}{4}.

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 222\sqrt{2}. Dev's 2 is their difference, because the first piece counted as negative.

Open this example in the tool

Which pump moved more water

Over 4 hours, one pump runs at 3+sin⁡t3 + \sin t thousand liters per hour and another at 2+0.5t2 + 0.5t. Type t as x. The rates cross at about t=2.75t = 2.75, 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.

Open this example in the tool

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 y=xy = x. The area creeps toward 12\frac{1}{2}, the area under the line itself.

Area between y=xy = x and y=xny = x^n on [0, 1]
Lower curveArea
y=x2y = x^{2}0.1667
y=x3y = x^{3}0.25
y=x5y = x^{5}0.3333
y=x10y = x^{10}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 1x\frac{1}{x} 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.

Questions people ask

You integrated across a crossing, or you subtracted bottom minus top. A true area is never negative, and a zero usually means two parts cancelled. Split at each crossing and take top minus bottom on each piece.

Sources