# Using Riemann Sums to Calculate Definite Integrals

Instructor: Bob Bruner

Bob is a software professional with 24 years in the industry. He has a bachelor's degree in Geology, and also has extensive experience in the Oil and Gas industry.

Riemann sums provide a way to calculate definite integrals. The definite integral represents the area under a function, and has a wide variety of applications in math and science.

## Calculating Areas

Calculating the area of a planar shape that has straight sides is fairly simple: Cut the area up into rectangles and triangles, apply some basic math to calculate the size of the individual shapes, and then add all the pieces together.

But what can be done when we introduce curvature to our shape? The example below resembles the first shape, but its top is quite curvilinear. Is there a generalized method we can use to compute the area contained within this figure?

## Definite Integrals

Upon inspection you may recognize that the image resembles a graph in X-Y coordinate space, where the curved line across the top represents a relatively complex numerical function. Using calculus, we can compute the area under the curve for just such a function using a definite integral. A definite integral explicitly defines the area under a curve between fixed endpoints.

However, we don't need calculus to derive a reasonably good estimate for the area contained within a bounded function. In fact, we can use a form of our previous method of calculation, using basic planar shapes, to give a reasonably accurate approximation of the area found under any function.

## Riemann Sums

In order to make this approximation we can make use of Riemann sums. In this approach the space between the endpoints underneath the curve is divided into a number of shapes, typically simple rectangles. These rectangles usually have the same width, but each will have differing heights. The number of rectangles we choose to use for the summation determines the width of the rectangles, while a representative point on the function associated with each rectangle determines the individual heights.

Mathematically, the Riemann sums approximation looks like this:

The representative point used for the height can be taken from either side of the rectangle, or the midpoint, or even from some arbitrary distance along the rectangles' widths. Each calculation will be slightly different, but all methods are essentially correct, as we are only approximating the areal value.

Here we have an illustration of this approach where we want to measure the area under the curve from point a to point b. In this example we are using only four rectangles across the width, as well as the left-side height for each rectangle.

Using only four rectangles we see that the approximation is fairly crude. The area below the function is not represented all that well by our rectangles, and we see that there are some fairly significant errors of both under- and over-approximation. In order to address this issue we can increase the number of rectangles used in the summation.

Here is the same approximation using about 4 times as many rectangles.

To unlock this lesson you must be a Study.com Member.

### Register to view this lesson

Are you a student or a teacher?

### Unlock Your Education

#### See for yourself why 30 million people use Study.com

##### Become a Study.com member and start learning now.
Back
What teachers are saying about Study.com

### Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.