Main content

## Calculus 2

### Course: Calculus 2 > Unit 1

Lesson 2: Approximation with Riemann sums- Riemann approximation introduction
- Over- and under-estimation of Riemann sums
- Left & right Riemann sums
- Worked example: finding a Riemann sum using a table
- Left & right Riemann sums
- Worked example: over- and under-estimation of Riemann sums
- Over- and under-estimation of Riemann sums
- Midpoint sums
- Trapezoidal sums
- Understanding the trapezoidal rule
- Midpoint & trapezoidal sums
- Riemann sums review
- Motion problem with Riemann sum approximation

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Trapezoidal sums

AP.CALC:

LIM‑5 (EU)

, LIM‑5.A (LO)

, LIM‑5.A.1 (EK)

, LIM‑5.A.2 (EK)

, LIM‑5.A.3 (EK)

, LIM‑5.A.4 (EK)

The area under a curve is commonly approximated using rectangles (e.g. left, right, and midpoint Riemann sums), but it can also be approximated by

*. Trapezoidal sums actually give a better approximation, in general, than rectangular sums that use the same number of subdivisions. Created by Sal Khan.***trapezoids**## Want to join the conversation?

- can you show how to find the exact area using limit approaching infinite?(30 votes)
- You would take the same fundamental concept, except apply it to a summation. As in the Limitation as N->Infinity, being apply the formula to the following:

1/2[f(x0) + 2f(x1) + 2f(x3) ... 2f(xn)]

You would apply this concept to a summation series:

∞

Σ 1/2[f(n)+ 2f(n+1) + 2f(n+2) + 2f(n+3)... f(n+n)]

n=0

Simple from here, you would evaluate using the function and determine if the sum diverges or converges. If it converges, that will be your area, if it diverges, well it then diverges.(2 votes)

- I feel like using middle boudaries for functions that are only concave upwards or only concave downwards do much better approximation. Is that right?(19 votes)
- Yes, you are right, middle boundaries are more accurate for functions of 1 concavity, but the trapezoidal method works a lot better for functions with many concavities.(27 votes)

- Does the Simpson rule has a similar geometrical explanation or is it a different concept?(12 votes)
- The trapezoid rule uses the average between points to approximate the line the graph makes between the two points.

Simpson's rule uses a quadratic parabolic arc.

Simpson's is usually more accurate and quicker computationally than the trapezoid rule since it converges faster - that is, it gives a better result with fewer subdivisions because it "hugs the curve" better.(16 votes)

- So is Simpson's Rule essentially the same process as this, in terms of the necessary solving equation?(8 votes)
- The processes are similar. The trapezoid rule joins f(n) and f(n+1) with a straight line (that is, it just uses 2 points) while Simpson's uses 3 points, f(n), f(n+1) PLUS a midpoint. These three points are used to describe a parabola, which is a closer approximation to the curve f than just the straight line approximation that the trapezoid rule gives.(20 votes)

- How do you calculate Riemann sums with unequal widths?(8 votes)
- You would just find the area of each section and then add them together. Since they are not equal widths, you have to find each area separately.(9 votes)

- I'm not certain if this question has already been asked or answered, but here goes:

Can a more accurate approximation for the area under the curve be reached by calculating the slope of the function at each midpoint [i.e. Fprime(Xsub1+Xsub2 / 2)] and using that line to define the heights of each trapezoid? Is it only more accurate if one uses sufficiently small (infinitesimal?) increments of delta X?

-Or-

Is that essentially what Sal is already doing at1:08?(9 votes)- What you're asking is not essentially the same as Sal does @1:08, but I do think it would yield more accurate results. I wouldn't know for sure and it might be more accurate for some functions and less for others. Try to find it out yourself, it is an interesting thought! Maybe other websites have info on Riemann sums with slopes of the midpoints.(5 votes)

- Do we have to split the curve into 5 trapizoids?(4 votes)
- ^To follow up with The Last Guy, like the RAM method, the greater the N value is the more accurate it is. An infinity amount of trapezoids with a minuscule base would make it more accurate.(10 votes)

- This is just a random question, but wouldn't the exact area of the space under x^2 from -3 to 3 be 18? It's just this is a rather round number for the area under a curve.

Note:

I did chose the constant C to be 0 just for simplicity.(5 votes)- The only reason that works is that you chose your limits to be -3 and 3. The antiderivative of x^2 is (x^3)/3 and when you are evaluating x=3, then the three in the denominator acts to reduce the power of the expression by 1 so you get back to x^2. If you try any other number as your limits of integration you will not get the same result as 2•x^2.

Also you only use the constant C for the indefinite integral of a function. When you are evaluating the definite integral you are evaluating the antiderivative of the integrand at the upper limit and subtracting by the antiderivative of the integrand evaluated at the lower limit. Since you are evaluating the same function, just at different points, you will have the same constant and subtracting it from the other results in Zero anyway. By convention when you show the result of integration of a definite integral you show your function without the + C, but you put a bracket ] after the function and write your limits of integration after it, indicating that you will be evaluating the function in this range.(5 votes)

- what is importance of knowing the area under the curve?(4 votes)
- Finding the area under the curve is just the first, most intuitive way to think about the process of integration, which is where these Riemann sums are leading. Another immediate use of area under the curve, acronymed as AUC by pharmacologists, plots the concentration of a drug in the blood plasma over time - that is, the AUC represents the total drug exposure over time.

Later, when you get into double and triple integrals, you can calculate volumes, centers of mass, moments of inertia, vector field divergence and curl. They also have extensive use in probability theory, especially when you get into quantum mechanics to describe probability distributions of two or more random variables. Finally, but not exhaustively, integration provides a way to convolve functions. Convolution essentially shows how the properties "shape" one function are modified by another function.

I take acoustical impulse responses in an area, like the inside of a car, or from behind a door, and convolve them with a spoken voice or other sound to make it sound like the sounds were actually recorded in the area where the impulse response was taken. This is a very common technique in film and music post-production, in which I work, from time to time.

In the end, area under the curve is just one way of thinking about what the process of integration represents, but you will find there are*many*ways of interpreting the results of integration, depending on the function(s) being integrated.(5 votes)

- Why did you multiply by delta x at2:22while finding the area of the triangle?(2 votes)
- We're actually treating this triangle as if it were a trapezoid, but with one of the vertical sides having zero length. The formula for area of a trapezoid is average height times width, so the first part of the calculation gives us average height and we multiply by delta x because that's the width. The formula for the area of a trapezoid provides the same answer as the formula for the area of a triangle, and we use the trapezoid formula here because that's the formula we're for the overall calculation. Note that in this case delta x = 1 so multiplying by delta x doesn't change the result, but if we had chosen to divide the area into, say, 10 segments instead of 5, we would get the wrong result if we didn't multiply by delta x (which would be 1/2 in that case).(7 votes)

## Video transcript

For fun, let's try to
approximate the area under the curve y is
equal to the square root, the principal root, of x minus
1, between x is equal to 1 and x is equal to 6. So I want to find
this entire area. Or I want to at least
approximate this entire area. And the way I'll do
it is by setting up five trapezoids of equal width. So this will be
the left boundary of the first trapezoid. This will be its right
boundary, which will also be the left boundary of
the second trapezoid. This will be the right boundary
of the second trapezoid. This is the right boundary
of the third trapezoid. This'll be the right boundary
of the fourth trapezoid. And then finally, this
will be the right boundary of the fifth trapezoid. And since we're going from 1 to
6, so we're traveling 6 minus 1 in the x direction, and I want
to split it into five sections, the width of each trapezoid is
just going to be equal to 1. And so if we say that the width
of a trapezoid is delta x, we just can now say the
delta x is equal to 1. So let's set up our trapezoids. So the first trapezoid is
going to look like that. It's going to go like that. Actually, it's going to
be a triangle, not really a trapezoid. Then the second trapezoid
is going to look like this. I guess you could
say a trapezoid where one of the sides has length
0 turns into a triangle. And then the third trapezoid
is going to look like this. And then the fourth trapezoid
is going to look like that. And then finally, you
have the fifth trapezoid. So let's calculate the
area of each of these, and then we will have our
approximation for the area under the curve. So let's do trapezoid--
or I really should say triangle-- this first shape,
whatever you want to call it. What is the area of
that going to be? Well, the area of a
trapezoid-- and you'll see this will just turn into
the area of a triangle-- it's the average of the
heights of the two sides of the trapezoid, the
way we've looked at it-- or you could say the average
of the heights of the two parallel sides, I guess
is the best way to say it. So f of 1-- that's the
height here-- plus f of 2, all of that over
2, and then we're going to multiply it
times our delta x. Actually, let me do that
in that same red color to show you that this is the
area of that first trapezoid, so times delta x. And as you see right over here,
if you look at it, the f of 1 is just going to be 0. So you're going to
have f of 2 times-- so it's going to be this height
times this base times 1/2, which is just the
area of a triangle. Let's look at the
second trapezoid, trapezoid two right over here. What is its area going to be? Well, it's going to
be f of 2 plus f of 3. f of 2 is this height. f of 3 is this height. So we're taking the average
of those two heights-- divided by 2; that's the
average of those two heights-- times the
base, times delta x. And then let's do
trapezoid three. I think you're
getting the idea here. Trapezoid three is
going to be f of 3 plus f of 4 divided
by 2 times delta x. And then-- let's see. I'm running out of colors. This is trapezoid
four right over here. So plus f of 4 plus f of 5, all
of that over 2, times delta x. And then we have
our last trapezoid, which I will do in yellow. So this is trapezoid
number five. I'll scroll down a little bit,
get some more real estate. So it's going to be plus-- I'll
just write the plus over here-- plus f of 5 plus f of 6
over 2 times our delta x. So let's see how we can
simplify this a little bit. All of these terms,
we have a 1/2 delta x, so let's actually
factor that out. So remember, this is our
approximation of our area. So area is
approximately-- remember, this is just a
rough approximation. It's very clear--
actually, you might say, this is pretty good
using the trapezoids, but it is pretty
clear that we are letting go of some of the area. We're letting go of that area. We're letting go of some
of this right over here. You can barely see it. Some of this right over
here, you can barely see it. But we are-- this is going
to be, it looks like, an underestimate, but it
is a decent approximation. But let's see if we can
simplify this expression. So it's approximately
going to be equal to, I'm going to factor
out a delta x over 2. And then what I'm
left with-- and I will switch to a neutral
color-- if I factor out a delta x over 2, then
I have just an f of 1. And then I have two f of
2's, so plus 2 times f of 2. And I'm doing this because
you might see a formula that looks something like this
in your calculus book, and it's not some
mysterious thing. They just really summed up
the areas of the trapezoids. And then we're going to have
two f of 3's-- plus 2 times f of 3's. Plus we're going to have two f
of 4's-- plus 2 times f of 4. And then we're going to have two
f of 5's-- plus 2 times f of 5. And then finally, we're going to
have one f of 6-- plus f of 6. If you were to
generalize it, you have one of the first
endpoint, the function evaluated at the first
endpoint, one of it at the very last endpoint, and then two
of all of the rest of them. But this is just the
area of trapezoids. I'm not actually a big fan
of when textbooks write this. Because when you see this,
it's hard to visualize the trapezoids. When you see this,
it's much clearer how you might visualize that. But with that out of the way,
let's actually evaluate this. Lucky for us, the
math is simple. Our delta x is just 1. And then we just have to
evaluate all of this business. f of 1, let's just
remind ourselves what our original function was. Our original function was
the square root of x minus 1. So f of 1 is the square
root of 1 minus 1, so that is just going to be 0. This expression
right over here is going to be 2 times the
square root of 2 minus 1. The square root of
2 minus 1 is just 1, so this is just going to be 2. Actually, let me do it
in that same-- well, I'm now using the purple
for a different purpose than just the first trapezoid. Hopefully, you realized that. I was just sticking
with that pen color. Then f of 3. 3 minus 1 is 2--
square root of 2. So the function evaluated at
3 is the square root of 2. So this is going to be 2
times the square root of 2. Then the function
evaluated at 4. When you evaluate it at 4,
you get the square root of 3. So this is going to be 2
times the square root of 3. And then you get 2 times the
square root of 4-- 5 minus 1 is 4. 2 times the square
root of 4 is just four. And then finally, you get f of
6 is square root of 6 minus 1, is the square root of 5. And I think we're now
ready to evaluate. So let me get my handy TI-85
out and calculate this. So it's going to
be-- well I'm just going to calculate--
well, I'll just multiply. So 0.5 times open
parentheses-- well, it's a 0. I'll just write it, just
so you know what I'm doing. 0 plus 2 plus-- whoops. Lost my calculator. Plus 2 times the square root of
2 plus 2 times the square root of 3 plus 4-- I'm almost done--
plus the square root of 5-- so let me write
that-- gives me-- now we are ready for our
drum roll-- it gives me-- and I'll just round it-- 7.26. So the area is
approximately equal to 7.26 under the curve y is equal
to the square root of x minus 1 between x
equals 1 and x equals 6. And we did this
using trapezoids.