Hey, everyone, and welcome back. So, one of the concepts we're going to need to be very familiar with in this course is the process for finding the area underneath the curve of a function. Now, this might sound pretty simple since all we're trying to do is figure out what the area is underneath these functions that we've already seen before. However, here's where things get a bit difficult. Notice we don't usually have a simple shape that forms.
It's not like we're dealing with a triangle or a square where we know what the area of those shapes is. We're dealing with a shape that we don't really know. But that's what we're going to be talking about in this video is how we can estimate the area underneath these shapes. I think you're going to find this is pretty straightforward, a concept we've already learned, so let's just jump right into things. Now, the process for estimating the area under a curve of a function is to take whatever your function curve is and break it up into a certain number of rectangles.
Now, what you'll likely see in your textbooks or class is that n is going to represent the number of rectangles that you'll have. And this n, we also call the number of subintervals. So subintervals or the number of rectangles mean the same thing. And what we need to do is take whatever sheet that we have, fill it with these subintervals or rectangles, and then add all of their areas together. So let's say, for example, we're dealing with this case over here.
For this situation, what I want to do is fill this with rectangles. And it says in the example here that we're dealing with to approximate the area under the curve, which is this region r that we see. And what we want to do is we want to approximate this region for two rectangles and four rectangles. Now we'll start by putting only two rectangles underneath the curve of our function. And notice that we've had these rectangles so that the upper left corners are touching our function.
This is what we call left endpoints for our approximation here. So since we're focusing on the left endpoints, we're always going to be focusing on these values within our function. Now, I can see that I'm dealing with two rectangles, and I need to add up the areas for each of these rectangles. Now we know the area for a rectangle is width times height. So we need to find the width and height for each rectangle, and add it all up.
Now, thankfully, the width is going to be the same for each rectangle that we have. We can clearly see that on our graph here. We call this width delta x. So delta x, which I can see on our graph here, goes from zero to one. So we have that that's a width of one because one to two would also be a distance of one.
Delta x is going to be our width, and that's going to be multiplied by the heights. Now the way that we find these heights is by using the function values because the height of each rectangle is going to be the function value at the left endpoint. So if we go over to our left endpoint, I can see that that's zero for this first rectangle. So what that means is that I'm going to have f of zero as my first height. Now next, we're going to add up our next rectangle, which is going to be the width delta x times the next height, which is going to have one plugged into our function.
Because I can see that that's going to be the left side of the second rectangle, so that's the next input I need to plug in. Now we already figured out that delta x here is one. And then what I'm going to do is multiply that by our height f of zero. Now to find f of zero, there are two ways I could do this. One way is to just look at my graph and I can see when we're at an x value of zero, we're at a y value of four.
But another way that I can find these heights here is by simply plugging the function value in the function that I have. So I can see that the x value that we have is one. And if I put one into this function right here, well, that's going to give me three as an output. So our area is going to be one times four plus one times three, which all comes out to seven. And this right here is the approximate area underneath the curve of this function.
Now, this is not a truly accurate answer for the area, because notice we have some extra area that peeks over these curves. So using these rectangles is really just a way of estimating about what this area is. But this is the strategy we use for finding these regions where we're trying to estimate the area under a function. Now the question, of course, becomes, is there another way to do this? Are there other strategies we can use or possibly ways to get more accurate answers?
Well, what we could try doing is simply adding more rectangles. So we dealt with two rectangles or subintervals in this example, but let's try now doing four rectangles and see the result that we get. So if I add two more rectangles to this, giving us four rectangles underneath this curve, well, again, notice we're using these left endpoints here, and I'm going to use the exact same strategy for calculating this area. Now this one's going to be a little bit more tedious because notice there are four areas I have to add up since we're dealing with four rectangles. Now, each of these rectangles will be width times height that we're adding up.
And what I need to do is go through and figure out the function value to get the height, and then figure out the width, which is going to be the same for all these rectangles. And this is going to allow me to calculate or estimate the area under this curve. Now to find the width, what I could do is look at my graph here, but it turns out there is an equation you can use for calculating width. The equation that we use looks like this, it's going to be b minus a over n up here. So what I can do is use this and recognize that our b value is going to be this high point of two minus a, which is the low value of zero, all divided by the number of rectangles we have, which is four.
Now two minus zero over four is one half or 0.5, so that is going to be the width of each rectangle. So that's going to be our delta x value. And notice we can clearly see just looking at our graph that each rectangle has a distance of 0.5. Now next, what I need to do is figure out what the heights of these rectangles are. And to do this, well, I just plug in my left most endpoint for each rectangle and put it into this function.
So we're going to first have f of zero, that's this endpoint. Then we're going to have f of 0.5. Then we're going to have f of one, then we're going to have f of 1.5. So I've gone ahead and plugged in these values here, and now I need to just go ahead and write what these numbers are. So delta x, we calculated to be 0.5.
That's going to go on the outside here. I was able to factor this delta x out since we know that this width is always the same for each rectangle. Now next, we're going to have f of zero. Now f of zero, well, what you need to do is just take zero and plug it into this function, which is going to give you four. Then we're going to have plus f of 0.5, which you can plug into this function to give you 3.75.
Next, we'll add f of one, which if you plug one into this function, you'll get three. And then you will have f of 1.5, which if you plug 1.5 into this function, you're going to get 1.75. So this is what happens when you plug in all these x values into your function. And if you go ahead and multiply this out and add everything up, you should get 6.25 as your result. Now notice how we did get a different result even though we had the same function in both cases.
So we had the same function and we were going from zero to two in both situations. The only difference was the number of rectangles that we had. Now 6.25 is also not going to be an accurate answer since we have some extra area peeking over this curve. But the question becomes, which one of these is more accurate, the 6.25 or the seven? Well, it turns out the more rectangles or subintervals that we add, the more accurate our result is going to be.
And this is because notice how if we added more rectangles, we actually got a little bit less area peeking over this curve. We still got some, but it wasn't as much as when we had two rectangles. So this 6.25 is actually more accurate than the seven was. Now this still doesn't mean that you're going to get a perfectly accurate answer, but it does mean you will get a more accurate answer for the more rectangles. So if we were to add eight rectangles in here, then we would get an even more accurate answer than the 6.25.
However, if we only did one big rectangle, then we would get a much less accurate answer than either of the results we had here. So this is the process for estimating the area under a curve. As you can see, it is a little bit tedious, but hopefully, it makes sense that all we're trying to do is figure out what the area is for each rectangle that we put underneath the curve of our function, and we're just adding it all up. So hope you found this video helpful, and let's try getting some more practice with this concept. See you in the next video.