AREA UNDER A CURVE – NUMERICAL METHODS Consider the curve y x 2 2 , whose graph is given below: 22 20 18 16 14 12 10 8 6 4 2 2 2 4 6 8 10 2 Suppose we want to find the area under the curve and above the x-axis, from x 1 to x 3 . So far, we have no tools to find an exact answer, so the best we can do is an approximation. To do this, we need to divide the region into rectangles and find the area of each rectangle. The area under the curve is approximately equal to the sum of the areas of the rectangles. To see this, let’s divide the region above into two rectangles, one from x = 1 to x = 2 and the other from x = 2 to x = 3, where the top of each rectangle comes just under the curve. 18 16 14 12 10 8 6 4 2 2 2 2 4 6 8 Notice that the width of each rectangle is 1. The height of the left rectangle is found by plugging 1 into the equation y x 2 2 (yielding 3); the height of the right rectangle is found by plugging 2 into the same equation (yielding 6). The combined area of the two rectangles is 9, so we could say that the area under the curve is approximately 9 square units. This is a rough approximation that significantly underestimates the actual area. Look at how much of the area we missed by using two rectangles. To get a better approximation, we’ll use more, thinner rectangles. This time, cut up the region into four rectangles, each with width of ½. 18 16 14 12 10 8 6 4 2 2 2 4 6 8 2 Now find the height of each rectangle the same way as before. Notice that the values we use are the left endpoints of each rectangle. Calculate the heights below: Now multiply each height by ½ and add up the areas. This is a much better approximation of the area, but there’s still a lot of space that isn’t accounted for. We’re still underestimating the area. The rectangles need to be thinner. But before we do that, let’s do something else. Notice how each of the rectangles is inscribed in the region. Suppose we used circumscribed rectangles instead – that is, we could determine the height of each rectangle by the higher of the two y-values, not the lower. Then the region, divided into four rectangles would look like this: 18 16 14 12 10 8 6 4 2 2 2 4 6 8 2 To find the area, we could still use the width of ½, but the heights would change. The heights of each rectangle are now found by plugging in the right endpoint of each rectangle. Do that below: Once again, multiply each height by ½ and add up the areas. 43 , while the area under 4 59 51 the curve using four right endpoint rectangles is . Averaging the two will give , 4 4 which is actually a better approximation of the actual area than either of the two. The area under the curve using four left endpoint rectangles is Now that we’ve found the area using the rectangles a few times, let’s turn the method into a formula. Call the left endpoint of the interval a and the right endpoint of the interval b. Suppose we divide the region into n rectangles. Then the width of each ba rectangle is . The height of the first inscribed rectangle is y0 , the height of the n second inscribed rectangle is y1 , the height of the third is y2 , and so on, up to the last rectangle, which has a height of yn 1 . If we use the left endpoint of each rectangle, the area under the curve is this: ba A y0 y1 y2 y3 n yn 1 . If we use the right endpoint of each rectangle, the area under the curve is this: ba A y1 y2 y3 n yn . To get better approximations of the area, we make more, thinner rectangles. This is done by letting n approach infinity; that is, we create an infinite number of rectangles that are infinitesimally thin. The formula for “left-endpoint” rectangles becomes ba A lim y0 y1 y2 y3 n n yn 1 . For “right-endpoint” rectangles, the formula becomes ba A lim y1 y2 y3 n n yn . Note: sometimes these are called “inscribed” and “circumscribed” rectangles. We could also find the area using the midpoint of each interval. Let’s stick with the same example, dividing the region into four rectangles. However, let’s make the height of each rectangle touch the curve at the midpoint of each rectangle. (I’ve “stretched” the graph to make the visual easier to work with.) 16 14 12 10 8 6 4 2 1 0.5 0.5 1 1.5 2 2.5 3 2 4 To find the height of each rectangle, we would still use the width of ½, but the heights would now be found by plugging the midpoint of each interval into the equation. I’ve done the arithmetic for you: 2 2 2 2 81 9 113 11 57 7 153 5 , 2 , 2 , 2 2 16 4 16 16 4 16 4 4 Multiply each height by ½ to get the area of each such rectangle, and add them up: 1 57 1 81 1 113 1 153 404 101 12.625 . 8 2 16 2 16 2 16 2 16 32 The general formula for approximating the area under a curve using midpoints is b a A y1 y 3 y 5 y 2 n1 . Note the fractional subscript. It means to n 2 2 2 2 evaluate the function at the number halfway between each integral pair of values of n. 3.5 The Trapezoidal Rule Another method that’s even better than the rectangle method is the trapezoidal method. Basically, all you do is divide the region into trapezoids instead of rectangles. We’ll use the same problem and apply the trapezoidal rule. Remember from geometry that the area of a trapezoid is A 1 b1 b2 h . 2 Remember also that b1 and b2 are the two bases of the trapezoid. Finally, remember that the bases of a trapezoid are considered the two sides which are parallel. 14 12 10 8 6 4 2 2 2 4 6 8 2 Using one trapezoid, we can see that b1 f 1 1 2 3 , b2 f 3 3 2 11 , 2 and h 3 1 2 , so the area under the curve is approximately 1 1 h b1 b2 2 3 11 14 square units. 2 2 2 To get a better approximation, we divide the region into four trapezoids. Each shape is a trapezoid on its side. Therefore, the height of each trapezoid is the length of each interval, ½, and the bases are the y-values that correspond to each x-value. They are, in 17 33 , 11 . order, 3, , 6, 4 4 Find the area of each trapezoid and add them up: 1 2 17 1 1 3 4 2 2 17 1 1 6 4 2 2 33 1 1 6 4 2 2 33 1 51 11 12.75 . 4 2 4 14 12 10 8 6 4 2 1.5 1 0.5 0.5 1 1.5 2 2.5 3 3.5 2 Recall that the “midpoint” value of the area is 101 12.625 . The Trapezoid Rule gives a 8 similar approximation. Notice how each trapezoid shares a base with the trapezoid before it, except for the end ones. This enables us to simplify the formula for the Trapezoid Rule. Each trapezoid has a height equal to the length of the interval, divided by the number of trapezoids we use. If the interval is from x = a to x = b, and the number of trapezoids is n, then the height of ba each trapezoid is , and our formula becomes: n 1ba A y0 2 y1 2 y2 2 y3 2 n 2 yn 1 yn . Example Approximate the area under the curve y x 3 from x 2 to x 3 using each of the following: a) b) c) d) four left-endpoint rectangles. four right-endpoint rectangles. four midpoint rectangles. four inscribed trapezoids. Solution: DRAW A PRICTURE TO HELP VISUALIZE! 35 30 25 20 15 10 5 1 2 3 4 5 5 a) The width of each rectangle is 2 3 3 1 . The heights of the rectangles are: 4 3 3 9 729 5 125 11 1331 8, , , and 8 64 64 2 4 4 Therefore, the area is approximately: 1 1 729 1 125 1 1331 893 13.953 8 4 4 64 4 8 4 64 64 b) The width of each rectangle is still 3 3 1 . However, the heights of the rectangles are: 4 3 9 729 5 125 11 1331 , , , and 8 64 64 2 4 4 3 3 27 Therefore, the area is approximately: 1 729 1 125 1 1331 1 1197 18.703 27 4 64 4 8 4 64 4 64 c) The width of each rectangle is still 3 3 3 1 . However, the heights of the rectangles are: 4 17 19 21 23 , , , and 8 8 8 8 3 The area is now: 3 3 3 3 1 17 1 19 1 21 1 23 2075 16.211 4 8 4 8 4 8 4 8 128 d) First, find the height of each trapezoid by using ba 3 2 1 . . The height is 4 4 n Using the formula, we approximate the area: 3 3 3 1045 1 1 3 9 5 11 A 2 2 2 2 33 16.328 . 2 4 64 4 2 4 HOMEWORK 1. Approximate the area under the curve y 4 x 2 from x 2 to x 3 using leftendpoint rectangles. 2. Repeat problem 1 using four right-endpoint rectangles. 3. Repeat problem 1 using four midpoint rectangles. 4. Approximate the area under the curve y 4 x 2 from x 1 to x 1 with n 4 inscribed rectangles. 5. Approximate the area under the curve y 4 x 2 from x 1 to x 1 with n 4 circumscribed rectangles. 6. Approximate the area under the curve y 4 x 2 from x 1 to x 1 using the Trapezoid Rule with n 4 . 7. Approximate the area under the curve y 4 x 2 from x 1 to x 1 using the Midpoint Formula with n 4 . 8. Approximate the area under the curve y 2 x x 2 from x 1 to x 1 with n 4 inscribed rectangles. 9. Approximate the area under the curve y 2 x x 2 from x 1 to x 1 with n 4 circumscribed rectangles. 10. Approximate the area under the curve y 2 x x 2 from x 1 to x 1 using the Trapezoid Rule with n 4 . 11. Approximate the area under the curve y 2 x x 2 from x 1 to x 1 using the Midpoint Formula with n 4 . Answers: 1. 893 13.953 64 2. 1197 18.703 64 3. 2075 16.211 128 4. 27 6.75 4 5. 31 7.75 4 6. 29 7.25 4 7. 59 7.375 8 8. 17 0.53125 32 9. 25 0.78125 32 10. 21 0.65625 32 11. 43 0.671875 64