Finding the Area Between Curves

© 2005 by Karl Hahn
KCT logo (click for Home Page)

Your instructor will, at some point, ask you to find the area between two curves. Most of these problems are not that difficult, and once you understand the attack, you should be able to do them fairly easily. So let's just dive into a typical example. The problem is, find the area enclosed by the two curves,

        1
  y  =   
        5
 (x3 - 9x2 + 11x + 2)

and

        1
  y  =   
        5
 (-2x2 + 7)


A plot of these two functions appears on the right. The first curve is shown in blue, the second in green. The area to which the problem refers is pretty clear because there is only one enclosed area -- that narrow strip that runs diagonally down for a ways. Making even a crude plot of the functions in question is always a good preliminary step because it gets you visually in touch with what the problem is asking for.

So how do we establish the boundaries of the problem? Well, the area in question is bounded on the right and left by the intersections of the two curves. So a useful step would be to find where these two curves intersect. And that is the same as finding where their difference is zero (note that for the purpose of finding the intersections, we do not need to carry the 1/5 factor into the calculations below. BTW I put in 1/5 factor only so that the graphs of these functions would be manageable).

   x3  -  9x2  +  11x  +  2
 -      (-2x2  +   0x  +  7)
                           
   x3  -  7x2  +  11x  -  5
This is a cubic, but don't go rushing to look up the cubic formula. It can be factored easily. If you have forgotten the methods for factoring polynomials, then take a moment to review them now. You should see that if there are easy factors to this, the only choices for those factors are  (x ± 1)  and  (x ± 5).  From the plot you can see that the intersection points are to the right of the y axis, so the candidates are narrowed down to  (x - 1)  and  (x - 5).  And when you try polynomial long division with either of the candidates, you find that they both divide  x3 - 7x2 + 11x - 5  evenly. When you work it all out you find that

   1
    
   5
 (x3 - 7x2 + 11x - 5)  =
   1
    
   5
 (x - 1)(x - 1)(x - 5)

So the difference between the two polynomials is zero at  x = 1  and  x = 5.  This means the two polynomials,  y = (1/5)(x3 - 9x2 + 11x + 2)  and  y = (1/5)(-2x2 + 7)  are equal to each other at those same two values of x.

In the diagram on the right we have shown a vertical slice (in red) between the two polynomials. Although the slice in not quite rectangular -- its top and bottom edges are not horizontal straight lines -- as the width, dx, of the slice is made smaller and smaller, the area of the slice becomes closer and closer to dx times the difference between the two functions. Make sure you see why this is. If you add up all the areas of all the slices that constitute the area between the two curves, you will have the total area between the two polynomials. And with rectangular slices, you have a Riemann sum. Hence the area between the curves is the definite integral of the difference between the two polynomials taken from the left-hand point where they intersect to the right-hand point where they intersect.


   A  =

  5
  
  1
 1
  
 5
 
-2x2 + 7


  -

  1
   
  5
 
x3 - 9x2 + 11x + 2


 dx

Combining terms the above becomes


   A  =

  1
   
  5
 5
 
 1

 -x3 + 7x2 - 11x + 5 dx  =

  1
   
  5
 

-

 1
  
 4
 x4 +
 7
  
 3
 x3 -
 11
   
  2
 x2 + 5x
5

1


  =

  275
      -
   60
 19
     =
 60
  64
    
  15


From the above example you should see that problems like this one, where you are to find the area enclosed between  f(x)  and  g(x),  are solved in just two steps:

Step 1: Find the values of x where  f(x) - g(x) = 0

Step 2: If the solutions to step 1 are x1 and x2, then find the definite integral of the difference between  f(x)  and  g(x)  from x1 to x2.

Exercise: Find the area between  y = x2 - 3x + 3  and  y = x

See solution.


Here's a variation on this type of problem that you might also encounter. Find the area bounded by the following:

a) The x axis,   b) the line,  
 y  =
  3
    x -
  2
 1
    
 2
and c) the curve,   
 y  =  -x2 +
 17
    x -
  2
 21
   
  2

A plot of this problem is shown to the right. You can see that the area in question has two straight-line sides on the top and bottom and two curved sides on the right and left. There are two ways you can work this. One is to do three separate integrals and add the resulting areas. Starting from the left, you would integrate the curve from its left-hand intersection with the x axis to its left-hand intersection with the sloped line. Next you would integrate the sloped line from its left-hand intersection with the curve to its right-hand intersection with the curve. Finally you would integrate the curve from its right-hand intersection with the sloped line to its right-hand intersection with the x axis. The other way of doing it is to use the method we've already discussed to establish the area enclosed by the sloped line and the curve and subtract that area from the area enclosed by the curve and the x axis. Either of the two ways you do it, you must know both points of intersection between the sloped line and the curve and both points where the curve intersects the x axis.

You find the points where the curve intersects the x axis simply by applying the quadratic formula to the quadratic equation given for the curve. You find that these points are at  x = 3/2  and at  x = 7.  To find the points where the curve intersects the sloped line, take the equation of the curve minus the equation of the line, which is  -x2 + 7x - 10.  When you apply the quadratic formula to that you get  x = 2  and  x = 5

Using the second method outlined above:

  A  =
  7
  
 3/2
-x2 +
 17
   
  2
 x -
 21
   
  2
 dx  -
  5
  
  2
 -x2 + 7x - 10 dx

  A  =
  
 -
 x3
    +
  3
 17x2
     
   4
 -
 21x
    
  2
 7
 
3/2
  -
  
 -
 x3
    +
  3
 7x2
    
  2
 - 10x
 5
 
 2

  =
  1331
      
   48
 -
 9
  
 2
  =
  1115
      
   48

I leave it as an exercise to you to use the first method outlined for this problem and come up with the same answer.


Now here's an example of one last variation on this that you might encounter. Find the area between the curves  y = x  and  y = sin(2x). This is done exactly the same as finding the area between the parabola and the line except for one new wrinkle. Finding one of the points of intersection is not as easy. Clearly the left-hand point of intersection is  x = 0.  But when you go trying to solve  sin(2x) - x = 0,  you find that no matter how much algebra and trig manipulations you do, you cannot get a closed form solution to this equation other than  x = 0.  The right-hand solution does exist. You just can't solve for it. Because of that we say that the right-hand intersection point is transcendental (math-speak for you-can't-solve-for-it). So instead we do Newton-Raphson iteration to approximate the solution.

Recall that Newton-Raphson finds the solution to  f(x) = 0  by iterating  xn+1 = xn - f(xn)/f'(xn).  In this case  f(x) = sin(2x) - x  and  f'(x) = 2cos(2x) - 1.  So we iterate

  xn+1  =  xn -
 sin(2xn) - xn
              
 2cos(2xn) - 1

The only question is what do we use for our first guess, x0? Since this equation does have two solutions, we don't want the iteration to converge on the solution we already know, that is we don't want it converging to  x = 0.  So let's start with x0 past the "hump" in  sin(2x).  Since the hump happens at  x = π/4 ≈ 0.785,  let's start with  x0 = 1.  Using a 15-digit calculator, I find:

  x0 = 1.000000000000000
  x1 = 0.950497797101954
  x2 = 0.947755822689797
  x3 = 0.947747133604357
  x4 = 0.947747133516990
  x5 = 0.947747133516990
So you would find

  A  =
0.947747133516990
        
        0
 sin(2x) - x dx

  =
  
 -
 1
  
 2
 cos(2x) -
 1
  
 2
 x2
 0.947747133516990
 
 0

The evaluation of the above is left as an exercise.


Exercises

1) Find the area between the curve  y = x4 - 3x3 + 3x2 - 2x + 2  and the line,  y = x.  (Note that the difference between the line and the fourth degree polynomial is easily factored).

See solution to exercise 1

2) Find the area bounded by the y-axis, the curve,  y = ex,  and the curve,  y = 2e-x.  (Note that you do not need to use Newton-Raphson to find where the two curves intersect. Just set the function for one of the curves equal to the function for the other, take the natural log of both sides -- remembering the log identity,  ln(ab) = ln(a) + ln(b),  and solve for x).

See solution to exercise 2

3) Find the area bounded by the y-axis, the curve,  y = cos(x),  and the line,  y = x.  (Note that you will have to use Newton-Raphson to find the intersection point for this).

See solution to exercise 3

4) Find the total area enclosed between the curves,

  y  =
   9
    
  x2
          and          
y  =
  13 
     -
   4
 x2
   
  4

Note that two curves can enclose more than one area.

See solution to exercise 4


Return to Table of Contents

You can email me by clicking this button:

  Use your own emailer     Use form