1 00:00:00,025 --> 00:00:10,419 [music] I want to be able to compute areas of curved regions. 2 00:00:10,420 --> 00:00:13,957 For instance, here I've got the graph of y equals x squared. 3 00:00:13,958 --> 00:00:20,528 And between 0 and 4, I could ask for some calculation. 4 00:00:20,529 --> 00:00:28,370 Some approximation, at least, of the area above the x axis and below the graph of y 5 00:00:28,370 --> 00:00:34,806 equals x squared, right. I want to approximate this area in here. 6 00:00:34,806 --> 00:00:39,684 Practically, the only thing that I actually know the area of is rectangles. 7 00:00:39,685 --> 00:00:44,755 So, I'm going to replace this curved region with an approximation by 8 00:00:44,755 --> 00:00:49,044 rectangles. The first step is to take that interval, 0 9 00:00:49,044 --> 00:00:52,514 to 4, and cut it up into some smaller pieces. 10 00:00:52,514 --> 00:00:58,540 I'll partition the interval from 0 to 4 into few pieces. 11 00:00:58,540 --> 00:01:03,207 I'll cut it into 3 pieces. Let's cut it into a piece from 0 to 2 and 12 00:01:03,207 --> 00:01:07,428 piece from 2 to 3. And then, one more piece from 3 to 4. 13 00:01:07,428 --> 00:01:11,498 So, I've partitioned the interval from 0 to 4 into some pieces. 14 00:01:11,498 --> 00:01:15,960 0 to 2, 2 to 3, 3 to 4. Now, I'll pick some points inside each of 15 00:01:15,960 --> 00:01:21,183 those sub intervals, points where I'm going to end up sampling the function. 16 00:01:21,183 --> 00:01:25,474 So, in this first interval, I'll pick the point 1. 17 00:01:25,474 --> 00:01:34,180 In this second interval from 2 to 3, I'll pick the point 2. 18 00:01:34,181 --> 00:01:35,472 And in the third interval from 3 to 4, I'll pick the point 3.5. 19 00:01:35,473 --> 00:01:39,965 Right? So, I'm picking some sample points in each 20 00:01:39,965 --> 00:01:45,535 of the pieces of my partition. Now, I'll build a skyscraper picture. 21 00:01:45,535 --> 00:01:49,417 A, a bunch of rectangles that approximates my curved region. 22 00:01:49,418 --> 00:01:54,712 So, I'll sample my function at these sample points. 23 00:01:54,712 --> 00:01:58,080 And I'm going to draw this sort of skyscraper picture. 24 00:01:58,080 --> 00:02:04,060 So, I'm going to draw a box over the first interval of height, whatever the sample 25 00:02:04,060 --> 00:02:06,692 was. So, there is the height is given by the 26 00:02:06,692 --> 00:02:11,410 function's value at the sample point. In my second interval from 2 to 3, I 27 00:02:11,410 --> 00:02:15,956 sampled the 2. And I'll draw a little rectangle there. 28 00:02:15,957 --> 00:02:21,544 And in my third interval from 3 to 4, I sampled at 3.5. 29 00:02:21,544 --> 00:02:28,182 And then, I'll draw one more rectangle right there. 30 00:02:28,182 --> 00:02:35,980 So now, my three sub intervals gave rise to three rectangles. 31 00:02:35,980 --> 00:02:42,175 Now, what's the area of those rectangles? Well, this first rectangle has a height of 32 00:02:42,175 --> 00:02:48,705 1 square and a width of 2. So, this first wide, but not very tall 33 00:02:48,705 --> 00:02:54,109 rectangle, has area 2. This rectangle here has a height of 2 34 00:02:54,109 --> 00:02:58,680 squared and a width of 1. So, this rectangle has area 4. 35 00:02:58,680 --> 00:03:04,783 And this last rectangle has a height of 3.5 squared and a width of 1. 36 00:03:04,783 --> 00:03:09,385 So, it has area 3.5 squared, which is 12.25 square units. 37 00:03:09,386 --> 00:03:21,431 And now, if I add 2 plus 4 plus 12.25, I get then an area of 18.25. 38 00:03:21,432 --> 00:03:27,725 And that's suppose to be an approximation to the area of the curved region. 39 00:03:27,726 --> 00:03:32,300 Right, I replaced this curved region by these three rectangles. 40 00:03:32,300 --> 00:03:35,851 And I can calculate the areas of these three rectangles. 41 00:03:35,851 --> 00:03:40,471 It's going to be about 18.25 and that should be not so far off from the true 42 00:03:40,471 --> 00:03:44,905 area of this curved region. So, that's an approximation, but we can do 43 00:03:44,905 --> 00:03:48,872 better. If we want a better approximation to the 44 00:03:48,872 --> 00:03:56,048 area under this curve, I'll just cut the interval between 0 and 4 up into smaller 45 00:03:56,048 --> 00:04:00,442 pieces. I could, in this case, consistently choose 46 00:04:00,442 --> 00:04:06,966 the left end point to sample that and I can draw a whole bunch of rectangles now. 47 00:04:06,966 --> 00:04:13,368 And I could approximate the area under the curve just by calculating the area of 48 00:04:13,368 --> 00:04:18,038 these rectangles. And by taking more and more rectangles 49 00:04:18,038 --> 00:04:24,086 thinner and thinner, I'll get an increasing good approximation to the true 50 00:04:24,086 --> 00:04:29,296 area under this curve. I can also over estimate the curved 51 00:04:29,296 --> 00:04:33,820 region's area. I could also try to over estimate this. 52 00:04:33,820 --> 00:04:39,940 I could cut this interval from 0 to 4 into a bunch of small intervals. 53 00:04:39,940 --> 00:04:46,372 And then, choose the right end point of each of each of these intervals to do my 54 00:04:46,372 --> 00:04:50,417 sampling at. And then, build the sort of skyscraper 55 00:04:50,417 --> 00:04:53,526 picture. Again, sampling at the right hand end 56 00:04:53,526 --> 00:04:58,010 point of each of my little tiny sub intervals and I can build this little 57 00:04:58,010 --> 00:05:02,110 skyscraper picture. And by computing the area of the 58 00:05:02,110 --> 00:05:06,984 rectangles. Alright, the areas of these rectangles are 59 00:05:06,984 --> 00:05:12,423 a pretty good over-approximation to the area under the curve. 60 00:05:12,424 --> 00:05:16,447 I'm going to give a name to all these kinds of approximations. 61 00:05:16,447 --> 00:05:20,003 The name that were given to these things is a Riemann Sum, right? 62 00:05:20,004 --> 00:05:24,840 Riemann was a mathematician. So, what's the procedure for setting up a 63 00:05:24,840 --> 00:05:27,719 Riemann Sum? Well it's really a multi-step process, 64 00:05:27,719 --> 00:05:29,820 right? Here's a picture that sort of summarizes 65 00:05:29,820 --> 00:05:32,730 the whole story. I'm trying to calculate the area under the 66 00:05:32,730 --> 00:05:37,008 curve between the points a and b and I'm doing that approximation by approximating 67 00:05:37,008 --> 00:05:41,274 the curved area with these rectangles. And I can, of course, calculate the areas 68 00:05:41,274 --> 00:05:44,960 of these rectangles and add them up. But what's the first step? 69 00:05:44,960 --> 00:05:49,559 Well, the first step is to partition this interval a to b, so that I can decide 70 00:05:49,559 --> 00:05:54,896 where to build my little skyscrapers. Alright, so the first step here is to 71 00:05:54,896 --> 00:06:01,106 partition the interval a to be and what that involves is choosing x not, which is 72 00:06:01,106 --> 00:06:04,794 just a. And x sub n which is b. 73 00:06:04,794 --> 00:06:12,395 And then, choosing x1, x2, and so forth in between a and b, alright?. 74 00:06:12,396 --> 00:06:19,106 In this picture, I've chosen x1, x2, x3, x4 And I've cut it up into one, two, 75 00:06:19,106 --> 00:06:23,340 three, four, five pieces. But, of course, you can choose how many 76 00:06:23,340 --> 00:06:26,180 pieces to cut it up into. The point is just to choose how many 77 00:06:26,180 --> 00:06:30,320 pieces to cut it up into, and then, choose where you're going to make those, those 78 00:06:30,320 --> 00:06:33,988 cuts in the partition. The next step is to choose sample points 79 00:06:33,988 --> 00:06:39,065 inside each of those sub intervals. Yeah, after I've decided where to cut up 80 00:06:39,065 --> 00:06:42,298 my interval a to b, I've chosen the x sub-I's. 81 00:06:42,299 --> 00:06:47,107 Then, I introduce these blue sample points, right, the x sub i stars. 82 00:06:47,108 --> 00:06:51,140 So, the next step is to choose sample points x sub i star, and those sample 83 00:06:51,140 --> 00:06:55,150 points will then be used to determine the heights of these rectangles. 84 00:06:55,150 --> 00:06:58,360 I'm going to be evaluating the function at those sample points. 85 00:06:58,360 --> 00:07:01,514 Now, I can write down a formula for the area. 86 00:07:01,514 --> 00:07:06,700 Well the area is approximately the areas of all these rectangles added up. 87 00:07:06,700 --> 00:07:12,136 Now, how big are each of these rectangles? The heights of these rectangles are coming 88 00:07:12,136 --> 00:07:17,726 from the function evaluated at these sample points and the width has to do with 89 00:07:17,726 --> 00:07:23,182 how far apart the red cut points are. So, we can write down a, a formula for 90 00:07:23,182 --> 00:07:26,669 that, right? I'm going to write down a formula for the 91 00:07:26,669 --> 00:07:29,918 area. So, the area is approximately, and this is 92 00:07:29,918 --> 00:07:35,070 really Riemann Sum, right? It's the sum, i goes from 1 to n. 93 00:07:35,070 --> 00:07:37,707 So, I'm going to add up all of the rectangles. 94 00:07:37,707 --> 00:07:42,747 And now, I've got to write down the area of the I for rectangle or the height of 95 00:07:42,747 --> 00:07:47,330 the I for rectangle, is the function evaluated at the sample point. 96 00:07:47,330 --> 00:07:53,819 And the width of the ith for rectangle is x sub i minus x sub i minus 1. 97 00:07:53,819 --> 00:07:56,503 Right? If I take the i cut point and subtract the 98 00:07:56,503 --> 00:08:01,476 previous cut point, the difference there will tell me the width of that rectangle. 99 00:08:01,476 --> 00:08:05,187 Let me show you on the picture again here. Alright. 100 00:08:05,187 --> 00:08:10,831 So, the height of these rectangles are coming from evaluating the function at the 101 00:08:10,831 --> 00:08:16,392 sample points and the width of, say, the 1th rectangle, the first rectangle, is x 102 00:08:16,392 --> 00:08:19,395 sub 1 minus x sub 0. That's the width times height, that gives 103 00:08:19,395 --> 00:08:22,257 me the area. And if I add up the areas of all of the 104 00:08:22,258 --> 00:08:27,147 green rectangles, then I get an approximation for the total area under the 105 00:08:27,147 --> 00:08:30,260 curve. And just to make it easy to talk about 106 00:08:30,260 --> 00:08:34,952 these things, there's some specific names that I want to give to particular kinds of 107 00:08:34,952 --> 00:08:38,654 Riemann Sums. For instance, if we pick our ith sample 108 00:08:38,654 --> 00:08:43,683 point, so x sub i star, to be the left hand endpoint, x sub i minus 1. 109 00:08:43,683 --> 00:08:46,070 Then, I can write down my Riemann Sum like this. 110 00:08:46,070 --> 00:08:50,806 It's the sum over all the rectangles of f evaluated at the left hand end point, 111 00:08:50,806 --> 00:08:55,100 that's sample point, times the width of that particular rectangle. 112 00:08:55,100 --> 00:08:58,651 This is called a left Riemann Sum, just because I've chosen my sample points to be 113 00:08:58,651 --> 00:09:01,819 in the left hand side of the interval. Similarly, right? 114 00:09:01,819 --> 00:09:05,460 There's a right Riemann Sum where I choose my sample point to be on the right hand 115 00:09:05,460 --> 00:09:08,308 side, right? So, this would normally be x sub i star, 116 00:09:08,308 --> 00:09:10,969 but my sample point is my right hand endpoint. 117 00:09:10,969 --> 00:09:19,895 So, it's just x sub i. I'm going to call this thing a right 118 00:09:19,895 --> 00:09:23,033 Riemann Sum.