Area Under Curves
Suppose we would like to find the area under a curve, that is, the area between the x-axis, some function f(x), on an interval from x = a to x = b. We will begin by approximaing the area, and then move towards a fundamental concept of Calculus called the definite integral.
For example, suppose we would like to approximate the area under
f(x) = x2 - 4x + 5 from x = 0
to x = 3. Graphically, that is
the area of the green regions in the figure below.
We know how to calculate the area of a polygon, but it is not so easy to calculate area of a region with curved sides. One method for approximating the area under a curved region is to approximate the region with rectangles.
We'll divide the interval along the x-axis into subintervals of equal lengths and consider the rectangles whose bases are these subintervals and whose heights are the values of the function at the right-hand endpoints of those subintervals. Then we'll calculate the sum of the areas of the rectangles by the rectangle area formula we all know, A = base * height.
For example, let's approximate the area of f(x) = x2 - 4x + 5, from x = 0 to x = 3, by splitting the interval into 6 subintervals, which serve as bases for the rectangles, and we'll take the height of each rectangle at the left enpoint of the subinterval, as pictured. We then approximate the area under the curve by calculating the sum of the areas of the rectangles.
The width of each rectangle is 3/6 = 1/2, and the heights are:
f(0.5) = 3.25
f(1) = 2
f(1.5) = 1.25
f(2) = 1
f(2.5) = 1.25
Letting Δx be the width of each rectangle and f(xi) be the height of each rectangle, we have
For more information on summations, see Additional Information About Summations
Now, suppose we take smaller subintervals, i.e., more rectangles, each with a smaller width. For example, let's split the interval from x = 0 to x = 3 into 15 subintervals this time.
The width of each rectangle is 3/15 = 1/5, and the heights are:
f(.2) = 4.24
f(.4) = 3.56
f(.6) = 2.96
f(.8) = 2.44
f(1) = 2
f(1.2) = 1.64
f(1.4) = 1.36
f(1.6) = 1.16
f(1.8) = 1.04
f(2) = 1
f(2.2) = 1.04
f(2.4) = 1.16
f(2.6) = 1.36
f(2.8) = 1.64
This is a better approximation than the first, but it could still be better.
Here is an interactive .m file for Matlab that allows you to input the number of rectangles that you would like to approximate the area by.
As you can see, the more rectangles we take, the better the approximation becomes, which begs the question, "What if we take an infinite number of rectangles, each with an infinitely small, equal width?" Then we should be able to calculate the exact area under the curve. To do this we take the limit as n → ∞, where n is the number of rectangles taken. For more information about limits, see Additional Information About Limits.
Thus, the exact area of under the curve of f(x) = x2 - 4x + 5 is 6 units2!
We could have just as well chosen to take the height of each rectangle at the right-hand side, or at the center of each subinterval. As the width of each rectangle approaches zero, it would make no difference.
This is a preview of what is called "Definite Integrals." You will soon learn simpler ways of computing the area under a curve by using definite integrals and their properties.