 Hello and welcome to another screencast about Riemann sums. So we're going to be looking at the same curve as last time, and that is 10x times e to the negative x plus 2. And we're going to be estimating the area under the curve using Riemann sums. Okay, so we are going to use three rectangles, just like last time. And we're going to be using right-hand endpoints though this time. We want to estimate the area under the curve from x equals zero to x equals six. Okay, so let's figure out what our delta x is, and that'll tell us the width of each of our rectangles. So that's gonna be b minus a over n, which is gonna give us six minus zero all over three, which gives us two. Okay, so basically then I need to take and figure out then. So here's a two. Here's another two, and then here's another two. So those are gonna be my three rectangles. And again, I'm gonna be going from the right-hand endpoints. So I'm gonna be using six for my function value. So this is g of six. I'm also gonna be using my function value at four, g of four. And then I'm gonna be using my function value at two. Okay, and again, I tend to work backwards with these right-hand Riemann sums only so that way I know I end up with the right-hand endpoints. For whatever reason, my brain doesn't work well when I start at the left and go right when I'm doing right. I'd prefer to start at the right and go left. But as long as we end up at the same place, that's all that matters. Okay, so my rectangle here at g of six is going to look like about that. Okay, so that'll be one of my rectangles. Then I'm gonna pop up here at g of four, and that will be my other rectangle. These are actually straight. Okay, so there's one here, and then this is going to be my last rectangle here. Okay, so it looks like I'm a little bit above the curve here, but otherwise I'm below. This is below, this is below, and this is below. So this is probably gonna be an underestimate. And we'll have to see too what we got last time versus what we got this time. But again, it doesn't really matter for that stuff. Okay, so I need to add up the area of each of these rectangles. So this is gonna end up giving us g of two times two, plus g of four times two, plus g of six times two. Okay, and then now you just gotta plug these values into this lovely function back up here, okay, which I had to deal with just an approximation of my calculator because that e function's gonna spit out some pretty crazy numbers. I'm gonna go and factor that two out of everything, just because it's a little bit easier than to mess with. So g of two, I got a value of 4.7067, okay, so that's my g of two. G of four, I got 2.7326, so that was my g of four. And g of six is 2.1487, so that's my g of six. So when I crunch out all these values, and this gives me my r sub three, so that just means a right-hand endpoint with three subintervals, I get a grand total of, let's see, 19.176. So if you watch the previous video, or I can just fill you with numbers here, we got a left-hand endpoint with three to be about 18.8787, okay? So this is the right and this is the left, so we could say a good estimate would be the average of the two, right? Because it's somewhere between a right and a left, although I think we both, we decided that both of them were under-estimates, if I remember the last video correctly, so yeah, this may not be as good of an estimate as we think. But if we were to average these two, so let me take out that word good, just in case it's not as good as I think it might be. If we look at the average of them, that's L3 and R3 divided by two. That gives us about, let's see, 19.027, or thereabouts. Okay, so let's keep that number in mind, because as we go to the midpoint, you may think the midpoint should be pretty darn close to this average, but it's actually not, okay? All right, so speaking of midpoint, I went ahead and drew a new graph here for us. And now we're going to be doing the midpoints of these endpoints. So how that works, let me switch colors here, just so you have a different visualization to look at. We're still going to be doing the same thing with our delta x, so we're still going to do b minus a over n. So that's still going to be 6 minus 0 over 3, which gives us a width of 2. Okay, so let me go ahead and circle those 2s again, so we got 2, 4, and 6. Now the midpoint, though, so basically we have this interval here from 0 to 2, we circle 0, 2, and then we have the interval from 2 to 4, then we have the interval from 4 to 6. We're going to pick the midpoints of them instead this time. Okay, so let me go back to my blue. So this time I'm going to use 1, so I'm going to be using g of 1, then I'm going to be using 3 because that's the midpoint between 2 and 4. So that's g of 3, and then I'm going to be using 5 because that's the midpoint of 4 and 6. Okay, so let me drop my rectangles here, and then again, you know, so remember we're really going from 0 to 2, but we're using this midpoint value. So my rectangle up here is going to have a width of 2, oops, I'm pretending like I actually hit that function value, but it's going to have a height of g of 1. Okay, so there's that rectangle. Here's my next one, so that's g of 3, and again, it's got a width of 2, but it's not going through either of these two endpoints, it's going through the midpoint. And then we're going to do g of 5, so that's going to be about here. And again, that's going to have a width of 2, but it's not going to go through either of them. So hopefully you can see that this one's probably going to be our best estimate yet, because yeah, I've got a little bit above here, but well, I've also got some over here. Or no, I'm sorry, these are both over. Yeah, never mind, these are both over. So maybe this one isn't so good for that one. But here you can tell that this one's a little bit under, this one's a little bit over. They kind of cancel each other out, right? So yeah, so maybe this first one isn't so good, because they're both over on that one. But the other two, like this little bit here and this little bit here, those come pretty darn close, okay? All right, so anyway, we're going to calculate this the exact same way. So our m sub 3 is going to be, let me bring that back up here. So we're going to do g of 1 times 2. And then we're going to do g of 3 times 2. And then we're going to do g of 5 times 2. Because again, this is the height of our rectangle times the width of our rectangle. The height of our rectangle and the width of our rectangle. So that's the nice thing about doing these is we're really just doing a lot of geometry, right? We're just multiplying links and widths together. Okay, so again, I'm going to go ahead and factor out that 2 just so I don't have quite as many messy calculations here. G of 1, I estimated to be 5.6788, okay? So that's my g of 1. G of 3, I estimated to be 3.4936. And then g of 5, I estimated to be 2.3369, okay? Then when you crunch all those numbers out, let's see, I got a grand total of 23.0186, okay? Oops, although I wonder now if I didn't even do that calculation correctly. There may be an addition on this one, so maybe this number isn't totally correct. But anyway, you get the gist of things here. So that's how you go about and do the midpoint estimation as well as the right hand estimation. Thank you for watching.