The area between two curves

So far we can determine the area between a curve and the xx-axis. Now we generalise this a bit, and determine the area between two curves.

Example 1

Consider the two functions

f(x)=3.5x2f(x)=3.5-x^2

and

g(x)=0.5x+1.5g(x)=0.5x+1.5

What is the area AA of the region that is enclosed by these two functions (shaded area in the figure below)?

The idea is straight forward, we simple determine the area under the upper curve (figure below, left) and subtract from it the area under the lower curve (figure below). Try yourself, then go to the solution for help.

Solution

To find the integration limits aa and bb, we have to determine the xx-coordinates of the intersection points between the graphs ff and gg. So, find xx with

f(x)=g(x)3.5x2=0.5x+1.5x20.5x+2=0\begin{array}{rll} f(x) & = &g(x) \\ 3.5-x^2 & =& 0.5x+1.5\\ -x^2-0.5x+2 & =& 0 \end{array}

Applying the midnight formula, we obtain a=1.686a=-1.686 and b=1.186b=1.186. We also need the antiderivative of

h(x)=f(x)g(x)=3.5x20.5x1.5h(x)=f(x)-g(x)=3.5-x^2-0.5x-1.5

and this is

H(x)=3.5x13x30.25x21.5xH(x)=3.5x-\frac{1}{3}x^3-0.25 x^2-1.5x

The area of the shaded region

A=AupperAlower=1.6861.186(f(x)g(x))dx=H(1.2)H(1.7))=3.94\begin{array}{lll} A &=& A_{upper}-A_{lower}\\[1em] &=&\int_{-1.686}^{1.186} (f(x)-g(x))\, dx\\[1em] &=& H(1.2)- H(-1.7))\\[1em] &=&\underline{3.94} \end{array}

But what if the region between the curves is given as in the example below, to the left? We cannot subtract anymore the area beneath the lower graph from the area beneath the upper graph. In principle we could just go ahead and divide the region into smaller subregions in such a way that we could determine their areas using integrals. While this works, it is normally time consuming. Luckily, there is a much simpler way (see the figure below):

Recipe 1

Shift the two graphs (and therefore the region) upwards by the same constant cc, where cc has to be large enough so that the whole region will be above the xx-axis. See the figure below (right). The area stays the same, but now we can work out the area as already discussed above.

The shifted functions are

f(x)=h(x)+cg(x)=k(x)+c\begin{array}{lll} f(x) &=& h(x)+c\\ g(x) &=& k(x)+c \end{array}

The shifted area is then:

Ashifted=abf(x)abg(x))dx=ab(f(x)g(x))dx=ab(h(x)+ck(x)c)dx=ab(h(x)k(x))dx\begin{array}{lll} A^{shifted} &=& \int_{a}^{b} f(x)- \int_a^b g(x))\, dx\\[1em] &=& \int_{a}^{b} (f(x)-g(x))\, dx\\[1em] &=& \int_{a}^{b} (h(x)+c-k(x)-c)\, dx\\[1em] &=& \int_{a}^{b} (h(x)-k(x))\, dx \end{array}

Note that we have used the theorem about weighted sums to get from the first line to the second line in the equation.

The constant cc has no influence on the result at all, as it cancels. So, we actually do not have to shift at all!

Let's summarise all these findings in a theorem.

Theorem 1

Consider two functions, where the graph of fupperf_{upper} is above the graph of flowerf_{lower} from aa to bb on the xx-axis. The (normal) area AA between the two graphs is

Equation 1
A=abfupper(x)dxabflower(x)dx=ab(fupper(x)flower(x))dx\begin{array}{ll} A&=&\int_a^b f_{upper}(x)\, dx - \int_a^b f_{lower}(x)\, dx\\[1em] &=&\int_a^b \left(f_{upper}(x)-f_{lower}(x)\right)\, dx\\[1em] \end{array}

Area between upper and lower curve.

Exercise 1
  1. Determine the area enclosed by the functions f(x)=x20.5f(x)=x^2-0.5 and g(x)=1.5x2g(x)=1.5-x^2.
  2. Determine the area enclosed by the functions sin(x)\sin(x) and cos(x)\cos(x) (see figure).
  3. Consider two polynomials of degree 22 (shown below). Determine the area enclosed by these two functions.
  4. Find the area enclosed by the two polynomials ff and gg of degree 22, where
    • ff has the xx-intercepts 1-1 and 22, and the yy-intercept 11

    • gg has the xx-intercepts 00 and 22, and the graph passes through the point (12)(1|-2).

Solution
  1. It is fupper(x)=1.5x2f_{upper}(x)=1.5-x^2 and flower(x)=x20.5f_{lower}(x)=x^2-0.5, and they intersect at a=1a=-1 and b=1b=1. We have to determine the antiderivative of

    h(x)=fupper(x)flower(x)=1.5x2x2+0.5=22x2h(x)=f_{upper}(x)-f_{lower}(x)=1.5-x^2-x^2+0.5=2-2x^2

    which is

    H(x)=2x23x3H(x)=2x-\frac{2}{3}x^3

    Thus, we have

    A=11(fupper(x)flower(x))dx=11(22x2)dx=H(1)H(1)=(223)(2+23)=83\begin{array}{lll} A &=& \int_{-1}^1 (f_{upper}(x)-f_{lower}(x))\, dx \\ &=& \int_{-1}^1 (2-2x^2)\, dx\\ &=& H(1)-H(-1)\\ &=&(2-\frac{2}{3})-(-2+\frac{2}{3})\\ &=&\underline{\frac{8}{3}} \end{array}
  2. Find the point of intersection between the graphs. First the left one: Find xx with

    sin(x)=cos(x):cos(x)sin(x)cos(x)=1tan(x)=1x=tan1(1)=π4\begin{array}{lll} \sin(x) &=&\cos(x) \quad \vert :\cos(x)\\ \frac{\sin(x)}{\cos(x)} &=& 1\\ \tan(x) &=& 1\\ x &=& \tan^{-1}(1)=\frac{\pi}{4} \end{array}

    We guess the right one: x=5π4x=\frac{5\pi}{4} (symmetry argument). Verify that this is correct: Indeed: sin(5π4)=cos(5π4)\sin(\frac{5\pi}{4})=\cos(\frac{5\pi}{4}).

    We have to find the antiderivative of

    h(x)=fupper(x)flower(x)=sin(x)cos(x)h(x)=f_{upper}(x)-f_{lower}(x)=\sin(x)-\cos(x)

    which is

    H(x)=cos(x)sin(x)H(x)=-\cos(x)-\sin(x)

    Thus we have

    A=π45π4(sin(x)cos(x))dx=H(5π4)H(π4)==cos(5π4)sin(5π4)+cos(π4)+sin(π4)=22\begin{array}{lll} A &=&\int_{\frac{\pi}{4}}^{\frac{5\pi}{4}} (\sin(x)-\cos(x))\, dx \\ &=& H(\frac{5\pi}{4})-H(\frac{\pi}{4})\\ &=&=-\cos(\frac{5\pi}{4})-\sin(\frac{5\pi}{4})+\cos(\frac{\pi}{4})+\sin(\frac{\pi}{4})\\ &=&\underline{2\sqrt{2}} \end{array}
    1. We first need to find the function equations of ff and gg. As ff is a polynomial of degree 22 and has the xx-intercepts 1-1 and 33, we write

      f(x)=a(x(1))(x3)=a(x+1)(x3)f(x)=a(x-(-1))(x-3)=a(x+1)(x-3)

      Because of f(1)=2f(1)=2 it follows a(2)(2)=4a=2a(2)(-2)=-4a=2 and thus a=12a=-\frac{1}{2}. Thus, we have

      f(x)=12(x+1)(x3)=12x2+x+1.5\begin{array}{lll} f(x) &=& -\frac{1}{2}(x+1)(x-3)\\ &=&\underline{-\frac{1}{2}x^2+x+1.5} \end{array}

      As gg is also a polynomial of degree 22 with the xx-intercepts 2-2 and 33, we write

      g(x)=a(x(2))(x3)=a(x+2)(x3)g(x)=a(x-(-2))(x-3)=a(x+2)(x-3)

      Because of g(1)=1g(1)=-1 it follows a(3)(2)=6a=1a(3)(-2)=6a=1 and thus a=16a=\frac{1}{6}. Thus, we have

      g(x)=16(x+2)(x3)=16x216x1\begin{array}{lll} g(x) &=& \frac{1}{6}(x+2)(x-3)\\ &=&\underline{\frac{1}{6}x^2-\frac{1}{6}x-1} \end{array}
    2. We need to find the point of intersections between ff and gg. So find xx with

      f(x)=g(x)12x2+x+1.5=16x216x146x2+76x+2.5=0(6)4x27x15=0\begin{array}{lll} f(x) &=& g(x)\\ -\frac{1}{2}x^2+x+1.5 &=& \frac{1}{6}x^2-\frac{1}{6}x-1\\ -\frac{4}{6}x^2+\frac{7}{6}x+2.5 &=& 0 \quad \vert \cdot(-6)\\ 4x^2-7x-15 &=& 0 \end{array}

      Using the midnight formula, we get x1=1.25x_1=-1.25 and x2=3x_2=3.

    3. With

      fupper(x)=f(x)=12x2+x+1.5f_{upper}(x)=f(x)=-\frac{1}{2}x^2+x+1.5

      and

      flower(x)=g(x)=16x216x1f_{lower}(x)=g(x)=\frac{1}{6}x^2-\frac{1}{6}x-1

      we get

      h(x)=fupper(x)flower(x)=12x2+x+1.516x2+16x+1=23x2+76x+2.5\begin{array}{lll} h(x)&=&f_{upper}(x)-f_{lower}(x)\\ &= & -\frac{1}{2}x^2+x+1.5-\frac{1}{6}x^2+\frac{1}{6}x+1\\ &=& -\frac{2}{3}x^2+\frac{7}{6}x+2.5 \end{array}

      The antiderivative is

      H(x)=29x3+712x2+2.5xH(x)=-\frac{2}{9}x^3+\frac{7}{12}x^2+2.5x

      The area is therefore

      A=1.253(fupper(x)flower(x))dx=1.253(23x2+76x+2.5)dx=H(3)H(1.25)=6.75(1.779)=8.5295\begin{array}{lll} A &=& \int_{-1.25}^{3} (f_{upper}(x)-f_{lower}(x))\, dx\\ &=& \int_{-1.25}^{3} (-\frac{2}{3}x^2+\frac{7}{6}x+2.5)\, dx\\ &=& H(3)-H(-1.25)\\ &=&6.75-(-1.779)\\ &=&\underline{8.5295}\\ \end{array}
  3. Draw the figure. For a change, we do not use the formula, but solve it directly by moving the region up by e.g. 33, so that the region will be above the xx-axis. But first, find the equations of ff and gg:

    • Find ff: f(x)=a(x+1)(x2)f(x)=a(x+1)(x-2) and because of f(0)=1f(0)=1 it follows a=0.5a=-0.5.
    • Find gg: g(x)=b(x0)(x2)g(x)=b(x-0)(x-2) and because of g(1)=2g(1)=-2, we get b=2b=2

    Moving the region up by 33, we thus get

    • fupper(x)=0.5(x+1)(x2)+3f_{upper}(x)=-0.5(x+1)(x-2)+3
    • flower(x)=2x(x2)+3f_{lower}(x)=2x(x-2)+3

    We need to find the point of intersection between fupperf_{upper} and gupperg_{upper} (or between ff and gg). So find xx with fupper(x)=flower(x)f_{upper}(x)=f_{lower}(x):

    0.5(x+1)(x2)+3=2x(x2)+3-0.5(x+1)(x-2)+3 = 2x(x-2)+3

    Expanding and using the midnight formula, we get two intersection points with xx-coordinates x1=0.2x_1=-0.2 and x2=2x_2=2. Thus, the area AA of the region is

    A=0.22fupper(x)dx0.22flower(x)dx=8.454.01=4.44\begin{array}{lll} A &=& \int_{-0.2}^2 f_{upper}(x) dx - \int_{-0.2}^2 f_{lower}(x) dx\\ &=& 8.45 - 4.01\\ &=& \underline{4.44} \end{array}