 Hello and welcome to the screencast where we're going to do a simple example of a Riemann sum. We're going to use a Riemann sum to estimate the area that is underneath the blue graph that you see in front of you above the x-axis and in this case I'm going to look between x equals 0 and x equals 6. So we're going to estimate the area underneath this function and the function is g of x equals 10 times x times e to the minus x plus 2. Now when we use a Riemann sum we have to declare two pieces of information at the very outset. How many rectangles do I want to use in the Riemann sum? And how am I going to choose the sample points that will determine the heights of those rectangles? That is do I want to choose the left-hand endpoints to construct the rectangles? Do I want to use the right-hand endpoints to construct the rectangles? Or do I want to use the midpoints to construct the rectangles? Or do I want to use something else? So I'm going to make those declarations right now. We're going to do this Riemann sum using three rectangles to keep it short and we're going to use the left-hand endpoints to construct the rectangles. So in the language of the section we're going to be computing the sum L3. That's a left-handed Riemann sum with three rectangles. Now let's do some calculations to set ourselves up and we'll be drawing on the graph as we do the calculations. So we've chosen n equal to 3 and that means that the delta x, which is the width of each of these rectangles, is, that's the width of each of the rectangles. Well, the whole, how wide is that? Well, the entire interval, its length is 6 minus 0. We start, our ending point here is at 6 and our starting point here is at 0. That's 6 units wide and I'm chopping that up into three equal pieces. And so I am going to have a width or delta x of 2 each time. Let me go and draw these subdivisions that I'm making with the delta x equal to 2. The first subdivision is going to go from 0 to 2, like so. The second one is going to go from 2 to 4, like so. And then the final one is going to go from 4 to 6. So there's my three subdivisions, n equals 3 with a delta x of 2. Now let's draw the rectangles and then we'll do some calculations and compute this L3 sum. We're using the left-hand endpoints of each of these subintervals to construct the rectangles. So I'm going to circle those endpoints. Here's the first one. Here's the second one. Here's the third one. Okay, this final endpoint down here on the end of x equals 6 is not an endpoint. It's not a left-hand endpoint. So we are not going to be considering that in any way in this calculation. In the language of our section, this point here is what we're calling x0 star, the first endpoint that I'm using, although we start counting at 0. This would be x1 star, and this here would be x2 star. Just to put some numerical values on those, as you can see from the graph, x0 star is equal to 0, x1 star is equal to 2, and x2 star is equal to 4. Those are the x values that we're going to use to construct our rectangles. Now let's draw the rectangles and then we're going to go compute their areas. So the first rectangle is going to look like this. I'm going to take my x0 star and go up to the curve and make a rectangle that covers the entire sub-interval. So there's the first rectangle. The second rectangle is going to start at x1 star right here and go up to the curve wherever that is and stay at that height for the entire sub-interval to here. So that's the second rectangle. And the third rectangle is going to start at x2 star, or 4, and go up to the curve and then stay at that height all throughout that sub-interval. And there's the third rectangle. Now, the L3 calculation is really just going to be the areas of each of these rectangles added together. Okay, so let's see how that works. Well, the area of each of these rectangles is just going to be the length of its base times its height. The length of the base here, of course, is just going to be delta x, or 2. And you can see that from the picture that we're going to have a length of 2 on each of these little bases here. Now what really matters here is the height values. And that's going to be here, here, and here for these three left-handed rectangles. Now, what are those height values? Well, I got them by taking the x star values here on the x-axis and just plugging them into g. So let's write this down. The y value here would just be g of 0. And that is equal to, if you use the formula, I can calculate the g values of anything using my formula. That's going to be 10 times 0 times e to the 0 plus 2. And so that, of course, is just equal to 2. The second rectangle goes up to here. And let's write down what that's height value is going to be. It's going to be g of the endpoint, which is g of 2. And in this case, that is 10 times 2 times e to the minus 2, all that plus 2. That works out to be approximately to four decimal places. You can use a calculator and see that it will be 4.7067. Finally, this third rectangle right here, the height of it is g of x2 star. That's g of 4. And that's going to be 10 times 4 times e to the minus 4 plus 2. And again, that works out to be approximately to four decimal places, 2.7326. What I'm doing here is I'm taking each of these endpoints that I've chosen here on the left. There's x0 star, or here is x0 star, and I put it into my function and got this height. And that height is g of 0, and I use my formula to calculate the actual height values. Now those are the height values, and I'm going to multiply each of those by 2 to get the area values. Okay? So let's go do this calculation on a separate page, or on the next slide, and actually come up with the area sum that will give us l3. So l3 is just going to be the sum of the areas that we had here. That's going to be the height of the first rectangle. That was g of x0 star times delta x plus the height of the second rectangle, which was x1 star times delta x plus the height of the third rectangle, g of x2 star times delta x. And we've made some of these calculations already. This of course is g of 0. All the delta x's are equal to 2, so I'm going to write that again, times 2 plus g of the second x1, the x1 star value was 2. The height, or I'm sorry, the base width of that rectangle was 2 as well. The third and final end point was equal to 4, and I'm again multiplying that by 2. Now let's just copy in our estimates from the g function that we calculated on the previous page. So g of 0 was equal to 2 times 2 from the width. g of 2, we said, was equal to 4.7067, or approximately equal to that, times 2. Plus g of 4, we came, that came out to be about 2.7326 times 2. So now when you do all the math that's in front of you here, this will give you a value of about 18.8787. That's the value of l3, and that is approximately equal to the area under the curve, the blue curve, between 0 and 6. You might well ask, is this an overestimate, is it an underestimate? It looks like it might be a little bit short because we have a lot of room in this area that is not picked up by our rectangle. We have some area over here that is picked up by our rectangle that shouldn't have been, and it will be extra area, but there's more that's left out. So when I look at this l3 sum of 18.8787, I'm thinking that's probably less than the actual area that's under the curve. So to recap the process here, if I want to do a Riemann sum calculation for a particular curve to estimate the area under it, I need to choose a number of rectangles to begin with, and then make a choice for how I'm going to sample the points that create the heights of the rectangles. I could choose an n as large as I want, and I can choose left-handed, right-handed, or middle points for the rectangles. The next screencast is going to walk you through another couple of Riemann sums that use the middle points for sample points, and then the right-handed n points for sample points. Whatever choice you make, it's simply a matter of calculating the areas of these rectangles, which we do simply by computing base times height over, and over, and over again, and adding up all the results. Thanks for watching!