What Kind Of Tools Can Help Me To Calculate Riemann Sums?

In Sections 13.2 and 13.3, you will be calculating areas using an approximate methods called Riemann Sums. For small numbers of data points or small numbers of rectangles, we can easily calculate a Riemann Sum by hand. However, as the number of rectangles gets larger (like more than 8 rectangles) the task becomes overwhelming. Luckily, there are online calculators that make the task trivial.

To be able to use this calculator, you need to know the formula for the function f (x), where the sums will run, the number of rectangles, and whether the rectangle will touch the function on the left or right hand side.

In the image above, the function we are finding the Riemann sum for is f (x) = 2x+1 and we are forming rectangles from x = 1 to x = 4. In this case we have chosen to use 3 rectangles that touch on the right side of the rectangles. This type of Riemann Sum would be referred to as a Right Hand Sum (RHS).

If we were to have the rectangles touch on the left hand side, we would have a Left Hand Sum (LHS). In this case we would change the “taking the samples at the Right” to “taking the samples at the Left”

Make sure you choose Replot after you make any changes.

We can double the number of rectangles to 6 to get

If you continue to increase the number of rectangles with LHS or RHS, the estimate of the area will get closer and closer to the actual area (which we can find using geometry).

Use this tool in your homework to help relieve the drudgery of adding up all of the sums. Keep in mind that if you are given data points or a graph, you will have to work out the sums by hand.

How Is Area Related To A Definite Integral?

You might have seen the marketing campaign for the Super Bass-o-Matic 76.

Let’s look at some options for finding the increased costs when changing production of Super Bass-o-Matic blenders  from 200 blenders to 800 blenders. Suppose the marginal cost is given by

$\displaystyle {C}'(x)=30-0.02x {\text{ dollars per blender}}$

By finding the area of rectangles, we get values that indicate an increase in cost. For instance, the first term of the left hand sum below,

$\displaystyle \left( 26\frac{\}{\text{blender}} \right)\left( 100\text{ blenders} \right)=\2600$

This means that if we estimate the cost per blender as 26 dollars per blender for all 100 blenders from 200 to 300 blenders, the increased cost is $2600. If we continue this for more rectangles until 800, the sum of the areas give an estimate for the increased cost from increasing production from 200 to 800. In this case the left hand sum is$11400 and the right hand sum is $12600…the difference between these estimates is$1200.

If we do the the same process for 60 rectangles (each being 10 wide), we get additional estimates.

In this case, the left hand sum is $11940 and the right hand sum is 12060. The difference between the estimate for 60 rectangles is$120. Ten times as many rectangles leads to a tenth of the difference.

We get a similar picture for 600 rectangles.

The left hand sum is $11994 and the right hand sum is$12006. In this case the difference between the estimates is $12. Also notice that as the number of rectangles gets larger, the area in the rectangles looks more and more like the area under the function and above the horizontal axis. Let’s summarize what happens as the number of rectangles increases.  Number of Rectangles LHS RHS Difference 6 11400 12600 1200 60 11940 12060 120 600 11994 12006 12 You might guess that 6000 rectangles would lead to a difference of$1.2 and you would be correct. The left hand sum is $11999.4 and the right hand sum is$12000.6.

In fact, as the number of rectangles gets larger and larger (each rectangle getting narrower and narrower) each estimate gets closer and closer to \$12000.

This is the exact area in the blue shaded region under the function, above the horizontal axis, and between 200 and 800. To convince yourself that this is the case, we can this area by breaking the region up into a rectangle and triangle.

The area is

$\displaystyle 14\cdot 600+\frac{1}{2}\cdot 12\cdot 60=12000$

The exact area under the function is represented with a definite integral,

$\displaystyle \int\limits_{200}^{800}{(30-0.02x)\,dx}=12000$

How Do You Undo A Rate Given By A Graph?

When a rate ´(t) is given by the function’s formula, we can undo the rate by taking the antiderivative of ´(t) to get N(t). The approach is not so clear cut if the function is given only by a graph. We could try to determine the formula for the function’s graph. This could be tedious and result in an estimate if we cannot find the formula perfectly. In this case, we might simply try to find the area geometrically.

Suppose the graph above gives the average  rate at which new employees produce electronics components (in components per day) as a function of the number days of on the job training. As you might expect, employees initially produce a low number of components per day and produce more components per day as the training goes on (moves to the right on the graph).

Estimate the number of components produced by a new employee over the first 30 days of training.

Since we are given the rate in components per day, we need to find the area under the function from 0 days to 30 days to find the estimate. Let’s estimate the area using left and right hand estimates where each rectangle is 5 days wide.

Let’s start with a left hand estimate. The base of the first rectangle must extend from 0 to 5 days. Since we need this rectangle to touch the curve on the left hand side, it must look like the one below.

If the function were given by a formula, we could use that formula to get the height of the rectangle at 0 days. Since we do not have a formula, we can use the scale along the vertical axis to estimate the height as 10 components per day. This means the area of this rectangle is

(10 components per day)(5 days) = 50 components

This means that on average the worker would produce 50 components over the first five days (as a left hand estimate). If we continue constructing rectangles of width 5 from 0 days to 5 days, we get the graph below.

The sum of these areas is

LHS = (10)(5)+(52)(5)+(70)(5)+(83)(5)+(95)(5)+(105)(5) = 2075

If we follow the same procedure with rectangles that touch the function on the right of the rectangle, we get the rectangles below.

The sum of these rectangles is

RHS = (52)(5)+(70)(5)+(83)(5)+(95)(5)+(105)(5)+(115)(5) = 2600

Based on these estimates, the number of components produced in 30 days is between 2075 and 2600.

If we want these estimates closer together, we would to reduce the width of the rectangles (increase the number of rectangles). If the rectangles were 2.5 days wide (12 rectangles), we would expect the estimates be be about half  as close. If the estimates are needed to be that close, then we could carry out the calculation with 12 rectangles.

How is Area Approximated Using Sums?

Problem 1 Approximate the area under $displaystyle f(x)=5x+2$ with 4 rectangles using a) right hand rectangles, b) left hand rectangles, and c) midpoint rectangles.

a) Right hand rectangles

b) Left hand rectangles
c) Midpoint Rectangles

Notice that each of these parts does essentially the same thing…multiply an f(x) value for the height of a rectangle by a width. Notationally, we can write this as

$displaystyle f({{x}_{i}})cdot Delta x$

where $displaystyle {{x}_{i}}$ is the x value where the rectangle touches the curve and $displaystyle Delta x$ is the width of the rectangle. So we can use summation notation for the sum,

$displaystyle sumlimits_{i=1}^{n}{f({{x}_{i}})cdot Delta x}$

where there are n rectangles. The sigma indicates that we are adding up terms with a particular format…in this case, function values time a width.