If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# Midpoint and trapezoidal sums in summation notation

## Video transcript

in the last few videos we've been approximating the area under the curve using rectangles where the height of each rectangle was defined by the left boundary of or the function evaluated at the left boundary so this would have been the first rectangle then the second rectangle would look something like this and then we'd go all the way to the nth rectangle would look something would look something like that and we saw so this is the first rectangle this is the second rectangle and we go all the way to the nth rectangle and so we saw that the way that you would take the sum of all of these rectangles in order to approximate the area is that you would get you would get the sum from I equals 1 to n and so I is essentially account of which rectangle we're dealing with and we're going to do is multiply the height times the base so the height of each rectangle the height of rectangle 1 in this case was the function evaluated at X naught the height of rectangle 2 was a function evaluated X 1 the height of function at the height of the of rectangle n was a function evaluated X X sub n minus 1 so the height of rectangle I is going to be the function evaluated X sub I minus 1 if we're dealing with if I is 2 then we're evaluating it at X 1 if I is 2 if I was 2 then this would be the function evaluated at X 1 so it's the left boundary and then we have to multiply it times the width and in the last few videos and in this video we will assume that all of the rectangles have equal width and we'll call that equal width Delta X and to find it we just have to take the total distance that we're going in the X direction so it's going to be B minus a divided by the number of rectangles we want so it's going to be times Delta X now you might imagine that this is not the only way to take the sum using rectangles or this is not the only way to take the sum or approximate the area using some type of geometric shape for example we could have created rectangles that where the height is defined by the rightmost boundary so let's define that so here's our first rectangle here's our first try tangle and we're defining the height by the right boundary of the rectangle the right boundary of the rectangle so this right over here is rectangle 1 and its height is f of X 1 f of X 1 and then for this one right over here we take the right boundary the right boundary defines that height if we go all the way to the this is rectangle 2 if we go all the way to the enth 1 we use the right boundary we use the right boundary to define the height of the rectangle so in this case this is the anthrax angle well how would we do how would we write this sum well it would be the sum the which is what remember we're just trying to approximate the area of the curve from I is equal to 1 to n so I is account of each of the rectangles and so the height of the first rectangle is f of X 1 the height of the nth rectangle is f of X sub n so this height right over here is f of X sub n so the height of the eighth rectangle is going to be f of X sub I whatever the rectangle number is we take the X sub that same number and evaluate the function there that gives us the height and we multiply that times Delta X so the difference between this and this here for the I threatened --gel we use X sub I minus 1 so the left boundary here we use the right boundary F - f of X sub I but that we don't have to stop there instead we could use maybe the midpoint between the two boundaries instead so for example over here we could we could use the midpoint between X naught and X 1 to define the height of the rectangle so this is right over here this is f of f of X naught plus X 1 over 2 just the midpoint between these two points to define the height of the rectangle so it would look something like that and the next one we would look at the midpoint to define the height midpoint to define the we go all the way to the nth one and we define the midpoint between its two sides of the rectangle so the function evaluated there tells us how high our rectangle should be how high our rectangle should be and it will look something like that and so what would this sum look like well once again we would count each of our rectangles so I equals one to I equals n Izar which rectangle we're working on so this is the first one this is the second one this is the nth one and the height isn't this is going to be f evaluated X sub I minus 1 or F evaluated X sub I it'll be the function evaluated at the midpoint between the two X sub I minus 1 plus X sub I all of that over 2 and then times Delta X the Delta X's are the same in every one of these every one of these scenarios now finally let's try to break out of approximating only with rectangles and get a little bit more creative why don't we try to approximate with trapezoids so let's try to do that so what we could have here is the left part of the trapezoid the height is f of X sub naught so this is f of X sub naught and then the right side of the trapezoid the right side of the trapezoid is f of X sub 1 f of X sub 1 and then what would be the air let me do that for all of them so that would be the first trapezoid then the second trapezoid would look like this this one looks almost like a rectangle but we assume that the top isn't completely flat and then we go all the way to the enth 1 and this should be clear that we're dealing with a trapezoid all the way to the ant 1 will look something would look something like that so how would we calculate how would we calculate this area the area of the trapezoids well you just have to remember that the area of a trapezoid is just the average of the heights of the two sides times the base so in this case let me write it out a little bit so the area right over there is going to be the it's going to be the average of the heights so it's going to be F of X sub naught plus f of X sub 1 all of that all of that over 2 and then we're going to multiply that times Delta X we're going to multiply that times Delta X so that would be the area just of this one right over here we took the average of the two heights and multiply that times the base now if we wanted the area the sum of the areas of all of these trapezoids and we wanted to write in general terms we could just write it's the sum once again we're going to count we're going to count the trapezoids though this is the first trapezoid this is the second all the way to the nth trapezoid so it's I equals 1 to I equals n and the height of each trapezoid we're going to use the left boundary the function evaluated the left boundary X sub I minus 1 the average of the function evaluated the left boundary and the function evaluated at the right boundary and we're going to take the average of that and then multiply that times the base so the whole reason why I wanted to do this to show you there's multiple multiple ways of doing this in fact if you want to get really general you could even have different widths but then that gets a little bit more a little bit more confusing but really just to show you that you might see some some of this fancy notation in your calculus book or in your precalculus book but all it's doing is summing up the areas of trapezoids and rectangles depending on whether they're using the right boundaries of the rectangle to define the height the left boundaries the midpoint of the left and the right boundaries or they could even construct trapezoids