Finding the Area Between Two Curves

We have used integration to find the area under a single curve, but sometimes it more interesting or important to calculate the area between two curves.

Depending on the context, there are two different areas we can measure:

  • The signed area, where we want to assign the area a positive value if f(x)f(x) is the 'top' curve, and a negative value when g(x)g(x) is the 'top' curve.
  • The absolute area, where we want the area to be positive regardless of which function is the 'top' curve.

Calculating the signed area is the simpler of the two calculations. To calculate the signed area using the definition above, we calculate

abf(x)g(x)dx\int_{a}^{b} f(x) - g(x) dx

Notice that the term inside the integration is positive when f(x)>g(x)f(x) > g(x) and negative when f(x)<g(x)f(x) < g(x). The order of f(x)f(x) and g(x)g(x) in this equation is important, and if we switch these terms around we will instead be assigning a positive value when g(x)g(x) is the 'top' curve and a negative one when f(x)f(x) is.

In the absolute area calculation, the formula we use is

abf(x)g(x)dx\int_{a}^{b} \left|f(x) - g(x)\right| dx

In this calculation we need to be more careful to make sure the term inside the integral is always positive. To do this, we will need to identify any intersections between the two curves, and identify which curve is on top for all values of x[a,b]x \in [a, b]

A simple example where f(x)f(x) is always greater than g(x)g(x)

Let's start with a straightforward example where one function is always greater than the other within the interval we're interested in. Suppose we want to find the area between the curves f(x)=x2+2f(x) = x^2 + 2 and g(x)=xg(x) = x from x=0x = 0 to x=2x = 2.

The area between these two curves

We can sketch the graphs of f(x)f(x) and g(x)g(x) to see which function is greater on the given interval. In this case, we see that f(x)f(x) is above g(x)g(x) for all xx in [0,2][0,2].

If we want to calculate the signed area, we can set up the integral as

Asigned=02f(x)g(x)dxAsigned=02(x2+2)(x)dxAsigned=02x2x+2dxAsigned=[13x312x2+2x]x=0x=2Asigned=(13231222+2(2))(13031202+2(0))Asigned=(8342+4)(0)Asigned=143\begin{aligned} A_{signed} &= \int_0^2 f(x) - g(x) dx \\ A_{signed} &= \int_0^2 (x^2 + 2) - (x) dx \\ A_{signed} &= \int_0^2 x^2 - x + 2 dx \\ A_{signed} &= \left[\frac13 x^3 - \frac12 x^2 + 2x \right]^{x=2}_{x=0} \\ A_{signed} &= \left(\frac13 2^3 - \frac12 2^2 + 2(2) \right) - \left(\frac13 0^3 - \frac12 0^2 + 2(0) \right) \\ A_{signed} &= \left(\frac83 - \frac42 + 4 \right) - \left( 0 \right) \\ A_{signed} &= \frac{14}3 \end{aligned}

And if we want to calculate the absolute area, we would set up the integral as

Aabsolute=02f(x)g(x)dx\begin{aligned} A_{absolute} &= \int_0^2 \left|f(x) - g(x)\right| dx \\ \end{aligned}

Since f(x)g(x)f(x) \geq g(x) for all x[0,2]x \in [0, 2], we can assert that

f(x)g(x)=f(x)g(x)\left|f(x) - g(x)\right| = f(x) - g(x)

and so we find that

Aabsolute=02f(x)g(x)dxAabsolute=02f(x)g(x)dxAabsolute=AsignedAabsolute=143\begin{aligned} A_{absolute} &= \int_0^2 \left|f(x) - g(x)\right| dx \\ A_{absolute} &= \int_0^2 f(x) - g(x) dx \\ A_{absolute} &= A_{signed} \\ A_{absolute} &= \frac{14}3 \\ \end{aligned}

An example where the "Top" and "Bottom" curves switch

Now, let's consider a scenario where the curves intersect, and the "top" and "bottom" functions switch within the interval. Suppose we want to find the area between f(x)=x3f(x) = x^3 and g(x)=xg(x) = x from x=2x = -2 to x=2x = 2.

Again, we should sketch the curves over the interval [2,2][-2, 2] to understand which curve is the 'top' and 'bottom' curve at any point. Sketching the graphs reveals that the curves intersect at x=1x = -1, x=0x = 0, and x=1x = 1.

The signed area between these two curves

We can see that g(x)f(x)g(x) \geq f(x) on the intervals [2,1][-2, -1] and [0,1][0, 1], while f(x)g(x)f(x) \geq g(x) on the intervals [1,0][-1, 0] and [1,2][1, 2]. The changes between which curve is on top means we need to take more care when setting up our integral for the absolute area calculation.

We will start with calculating the signed area, where we set up our integral as:

Asigned=22f(x)g(x)dxAsigned=22x3xdxAsigned=[14x412x2]x=2x=2Asigned=(14(2)412(2)2)(14(2)412(2)2)Asigned=(16442)(16442)Asigned=22Asigned=0\begin{aligned} A_{signed} &= \int_{-2}^2 f(x) - g(x) dx \\ A_{signed} &= \int_{-2}^2 x^3 - x dx \\ A_{signed} &= \left[ \frac14 x^4 - \frac12 x^2 \right]^{x=2}_{x=-2} \\ A_{signed} &= \left( \frac14 (2)^4 - \frac12 (2)^2 \right) - \left( \frac14 (-2)^4 - \frac12 (-2)^2 \right) \\ A_{signed} &= \left( \frac{16}4 - \frac42 \right) - \left( \frac{16}4 - \frac42 \right) \\ A_{signed} &= 2 - 2 \\ A_{signed} &= 0 \\ \end{aligned}

In this case, we find that the signed area is zero. If we recall our sketch, this should not be a surprise, as the region we are integrating over is symmetrical and so we can imagine the areas 'cancelling out' as they get added up.

The area between these two curves

Now we will calculate the absolute area, and when we set up our integral we will need to break it up across each interval

Aabsolute=22f(x)g(x)dxAabsolute=21(g(x)f(x))dx+10(f(x)g(x))dx+01(g(x)f(x))dx+12(f(x)g(x))dxAabsolute=21(xx3)dx+10(x3x)dx+01(xx3)dx+12(x3x)dxAabsolute=[12x214x4]x=2x=1+[14x412x2]x=1x=0+[12x214x4]x=0x=1+[14x412x2]x=1x=2Aabsolute=((12(1)214(1)4)(12(2)214(2)4))+((14(0)412(0)2)(14(1)412(1)2))+((12(1)214(1)4)(12(0)214(0)4))+((14(2)412(2)2)(14(1)412(1)2))Aabsolute=((1214)(42164))+((00)(1412))+((1214)(00))+((16442)(1412))Aabsolute=(14(2))+(0(14))+(140)+(2(14))Aabsolute=94+14+14+94Aabsolute=204Aabsolute=5\begin{aligned} A_{absolute} &= \int_{-2}^2 \left|f(x) - g(x) \right| dx \\ A_{absolute} &= \int_{-2}^{-1} (g(x) - f(x)) dx + \int_{-1}^{0} (f(x) - g(x)) dx + \int_{0}^{1} (g(x) - f(x)) dx + \int_{1}^{2} (f(x) - g(x)) dx \\ A_{absolute} &= \int_{-2}^{-1} (x - x^3) dx + \int_{-1}^{0} (x^3 - x) dx + \int_{0}^{1} (x - x^3) dx + \int_{1}^{2} (x^3 - x) dx \\ A_{absolute} &= \left[\frac12 x^2 - \frac14 x^4\right]_{x=-2}^{x=-1} + \left[\frac14 x^4 - \frac12 x^2\right]_{x=-1}^{x=0} + \left[\frac12 x^2 - \frac14 x^4\right]_{x=0}^{x=1} + \left[\frac14 x^4 - \frac12 x^2\right]_{x=1}^{x=2} \\ A_{absolute} &= \left(\left(\frac12 (-1)^2 - \frac14 (-1)^4\right) - \left(\frac12 (-2)^2 - \frac14 (-2)^4\right)\right) \\ &+ \left(\left(\frac14 (0)^4 - \frac12 (0)^2\right) - \left(\frac14 (-1)^4 - \frac12 (-1)^2\right)\right) \\ &+ \left(\left(\frac12 (1)^2 - \frac14 (1)^4\right) - \left(\frac12 (0)^2 - \frac14 (0)^4\right)\right) \\ &+ \left(\left(\frac14 (2)^4 - \frac12 (2)^2\right) - \left(\frac14 (1)^4 - \frac12 (1)^2\right)\right) \\ A_{absolute} &= \left(\left(\frac12 - \frac14\right) - \left(\frac42 - \frac{16}4\right)\right) \\ &+ \left(\left(0 - 0\right) - \left(\frac14 - \frac12\right)\right) \\ &+ \left(\left(\frac12 - \frac14\right) - \left(0 - 0\right)\right) \\ &+ \left(\left(\frac{16}4 - \frac42\right) - \left(\frac14 - \frac12\right)\right) \\ A_{absolute} &= \left(\frac14 - \left(-2\right)\right) + \left(0 - \left(-\frac14\right)\right) + \left(\frac14 - 0\right) + \left(2 - \left(- \frac14\right)\right) \\ A_{absolute} &= \frac94 + \frac14 + \frac14 + \frac94 \\ A_{absolute} &= \frac{20}4 \\ A_{absolute} &= 5 \\ \end{aligned}

There was a lot of arithmetic that we had to do to compute the absolute area. We need to be careful when setting up the integral, to make sure we are performing the correct calculations and don't need to redo anything. Fortunately, we can do a sanity check to make sure that we haven't made any catastrophic errors when we get to the line

Aabsolute=94+14+14+94A_{absolute} = \frac94 + \frac14 + \frac14 + \frac94

The four terms in this sum are the areas for each region in our interval. We expect that all of these values should be positive (since we were taking the absolute value), so if we see any negative signs in here that should prompt us to check our working out.

The other thing we can see is that the 1st and 4th terms are equal in area, as are the 2nd and 3rd terms. If we recall our sketch, we did see that the areas are symmetric, so this is another indication that we have not made any errors.

Using symmetry to reduce the amount of arithmetic needed

As you can see in the example above, these problems sometimes cause us to do a lot of working out. If we were being very clever when we were working on the previous example, we would have used the symmetry we noticed in our sketch to halve the amount of work needed.

For example, when we got to the line

Aabsolute=21(xx3)dx+10(x3x)dx+01(xx3)dx+12(x3x)dxA_{absolute} = \int_{-2}^{-1} (x - x^3) dx + \int_{-1}^{0} (x^3 - x) dx + \int_{0}^{1} (x - x^3) dx + \int_{1}^{2} (x^3 - x) dx

We could have made the observation that

21(xx3)dx=12(x3x)dx\int_{-2}^{-1} (x - x^3) dx = \int_{1}^{2} (x^3 - x) dx

and

10(x3x)dx=01(xx3)dx\int_{-1}^{0} (x^3 - x) dx = \int_{0}^{1} (x - x^3) dx

Then we would have been able to write

Aabsolute=21(xx3)dx+10(x3x)dx+01(xx3)dx+12(x3x)dxAabsolute=12(x3x)dx+01(xx3)dx+01(xx3)dx+12(x3x)dxAabsolute=2(01(xx3)dx+12(x3x)dx)\begin{aligned} A_{absolute} &= \int_{-2}^{-1} (x - x^3) dx + \int_{-1}^{0} (x^3 - x) dx + \int_{0}^{1} (x - x^3) dx + \int_{1}^{2} (x^3 - x) dx \\ A_{absolute} &= \int_{1}^{2} (x^3 - x) dx + \int_{0}^{1} (x - x^3) dx + \int_{0}^{1} (x - x^3) dx + \int_{1}^{2} (x^3 - x) dx \\ A_{absolute} &= 2\left(\int_{0}^{1} (x - x^3) dx + \int_{1}^{2} (x^3 - x) dx\right) \\ \end{aligned}

Then we could continue as we did previously:

Aabsolute=2(01(xx3)dx+12(x3x)dx)Aabsolute=2([12x214x4]x=0x=1+[14x412x2]x=1x=2)Aabsolute=2(((12(1)214(1)4)(12(0)214(0)4))+((14(2)412(2)2)(14(1)412(1)2)))Aabsolute=2(((1214)(00))+((16442)(1412)))Aabsolute=2((140)+(2(14)))Aabsolute=2(14+94)Aabsolute=204Aabsolute=5\begin{aligned} A_{absolute} &= 2\left(\int_{0}^{1} (x - x^3) dx + \int_{1}^{2} (x^3 - x) dx\right) \\ A_{absolute} &= 2\left( \left[\frac12 x^2 - \frac14 x^4\right]_{x=0}^{x=1} + \left[\frac14 x^4 - \frac12 x^2\right]_{x=1}^{x=2} \right) \\ A_{absolute} &= 2\left( \left(\left(\frac12 (1)^2 - \frac14 (1)^4\right) - \left(\frac12 (0)^2 - \frac14 (0)^4\right)\right) + \left(\left(\frac14 (2)^4 - \frac12 (2)^2\right) - \left(\frac14 (1)^4 - \frac12 (1)^2\right)\right) \right) \\ A_{absolute} &= 2\left( \left(\left(\frac12 - \frac14\right) - \left(0 - 0\right)\right) + \left(\left(\frac{16}4 - \frac42\right) - \left(\frac14 - \frac12\right)\right) \right) \\ A_{absolute} &= 2\left(\left(\frac14 - 0\right) + \left(2 - \left(- \frac14\right)\right) \right)\\ A_{absolute} &= 2\left(\frac14 + \frac94\right)\\ A_{absolute} &= \frac{20}4 \\ A_{absolute} &= 5 \\ \end{aligned}

That was still a lot of arithmetic, but it does make our workload a bit more manageable.

...

Log in or sign up to see more