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.

# Riemann approximation introduction

Approximating the area under a curve using some rectangles.  This is called a "Riemann sum". Created by Sal Khan.

## Want to join the conversation?

• Hey Sal, I have a question. Are Riemann sums actually useful for anything once you know how to integrate? It seems a lot easier to just learn integration.
• Riemann sums are useful when we are dealing with real world data, but we don't know the exact pattern it is following. To integrate, you need to know the function, but you can use Riemann sums as an approximation whenever you know some of the data points.
• With my limited knowledge of calculus, the Riemann sums seem pretty inefficient, since you'll always have some space not covered by the rectangles. Is there a way that you can get an exact answer, or is this the best that has been come up with at this time? Of course, I don't know much in calculus yet, since I've only done Alg. 1&2, Geo., and PreCal, so there might be a construct that I don't know of that would answer my question. Thanks to any who will answer this! :)
• You need to do differential calculus before integral calculus.

But, to answer your question, yes there is a way to get an exact answer. It is what happens when you split the area up into infinitely many rectangles of infinitesimally small widths. That way, you have no error at all. It is called a definite integral.

But, you really do need to master differential calculus first or you will be lost.
• Why did Sal construct 4 rectangles? Why not 5, 6 etc... or is 4 rectangles given in the problem?
• Most of the practice problems of integral calculus asked for 4 equal subsections so I believe it was a choice made by him in this example. Just like you mentioned it is oftentimes already given in the problem. With more rectangles you get a better approximation of the function.
• How do you know how many pieces you're suppose to split it in? Like what number are you suppose to divide b-a by?
• The number of pieces you use is a function the accuracy (how close to the actual value of the area) you want.
While this technique has it's place in numerical analysis, you are going to see that as the number of pieces you split the interval into approaches infinity, the value of the result of the sum approaches the actual value of the area - and that this is the foundation for the concept of integration - which is the next section of this track.
• At seconds, how do you know that you need four rectangles?
• We can choose how many rectangles we like.

The approximation will improve with more rectangles.

The best approximation comes with infinite rectangles.

This can be done by using infinitesimal width on the rectangles.

I hope this was a little helpful!
• If the area under the curve is below the x-axis, would it have a negative value?
• Wouldn't finding the over-estimate and the under-estimate of the curve, adding them together, and dividing by two give a more accurate estimate of the area? Though it still wouldn't be completely accurate.
• Yes, that's equivalent to approximating the area with trapezoids, which is covered later.
• Are Riemann sums the ones using left endpoints because I asked this question in a different video and im not sure if this video is the one that has now answered my question.
• Riemann sums can have a left, right, middle, or trapezoidal approximations. The most accurate are usually the trapezoidal and middle rectangle approximations because they only give up a small amount of area. However, Riemann sums will usually give more accurate approximations based on the number of rectangles and trapezoids; for example, an approximation using 4500 left rectangles will be better than simply using four rectangles to express the area under a curve. Similarly, an infinite number of rectangles will have a more accurate approximation of the area instead of simply using 4500 rectangles.