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.

 

Click here to go to the  WolframAlpha website.

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 Can You Format Numbers As Fractions In Google Sheets?

When carrying out row operations in Google Sheets, you may end up with cells whose entries are very long (repeating?) decimals. If you round these numbers, you are potentially changing the solution to the problem you are doing. It would be nice to be able to show the numbers in the lower right hand portion of the picture above as fractions.

Luckily this is possible by formatting those cells with a custom format. To do this, drag select the cells you want to format this way. With the cells selected, go to the Format menu and choose Number.

At the bottom of the this menu is submenu called More Formats. When you choose that option, another menu will appear.

Choose Custom Number Format. This will open a box in which you can customize how the number appears in the cell.

Enter the characters shown above and then press Apply. Make sure the characters start with an underscore ( _ ) and contain a space between the # and the ?.

All of the numbers in the selection will now be written as fractions.

A quick spot check show that cell D8 had contained the decimal -1.333333333. With the new formatting, it appears as the fraction -4/3.

By using the fraction in your solution, you can avoid rounding until the very last step of the calculation where it is more appropriate to round.

 

How Do You Solve for the Number of Years in the Compound Interest Formula?

In another MathFAQ, I looked at how you can find the rate in the compound interest formula. Now let’s look at an example where we solve for the number of years n. This problem is different because what we are looking for appears in a power.

Problem Suppose $5000 is deposited in an account that earns 2% compound interest that is done annually. In how many years will there be $6000 in the account.

Solution This problem requires the use of the compound interest formula,

compound_01

This formula applies when interest is earned on an annual basis and the interest is earned once a year.

Let’s look at the quantities in the problem statement:

  • $5000 is deposited in an account  >  P = 5000
  • that earns 2% compound interest that is done annually  >  r = 0.02
  • Will there be $6000 in the account  >  A = 6000

Putting these values into the formula above gives us

compound_02_01

Unlike other problems where we solve for P or r, here we need to solve for the power in the right hand side, n. Solving for a value in the power requires the property of logarithms, log(yx) = x logy. It allows us to move the n in the power and change it to a multiplier. But before we can apply this property, we isolate the factor containing the n:

compound_02_02

Now take the logarithm of both sides of the equation:

compound_02_03

This gives us

compound_02_04

or n ≈ 9.21 years.

In WolframAlpha, we could evaluate the logs as follows.

wolfram_log

How Do You Solve For The Rate In The Compound Interest Formula?

Problems that ask you to solve for the rate r in the compound interest formula require the use of roots or creative use of exponents. Let’s look at an example.

Problem Suppose 5000 dollars is deposited in an account that earns compound interest that is done annually. If there is 7000 dollars in the account after 2 years, what is the annual interest rate?

Solution The easiest way to approach this problem is to use the compound interest formula,

compound_01

This formula applies when interest is earned on an annual basis and the interest is earned once a year.

Let’s look at the quantities in the problem statement:

  • 5000 dollars is deposited in an account > P = 5000
  • If there is 7000 dollars in the account after 2 years > A = 7000 and n = 2

Putting these values into the formula above gives us

 

We need to find the annual interest rate r. Since the r is hidden in the parentheses, we start by isolating the parentheses.

 

To get at the r, we need to remove the square on the parentheses.

 

Using a calculator to do the square root, we get r ≈ 0.183 or 18.3%.

Although most calculators have a square root key, when removing powers it is often useful to raise both sides to a power. For instance, we could remove the square by raising both sides to the ½ power.

When you raise a power to another power, you multiply the exponents 2 ∙ ½ = 1. The right side simply becomes 1 + r. Now we can solve for r:

Using the power key on your calculator gives the same answer as before. Make sure the 1/2 power is entirely in the power. You can make sure this happens using parentheses: (7000/5000)^(1/2)-1.

Now what if the interest is earned over six years instead of two years? Instead of a square on the parentheses we now have a sixth power.

 

To solve for r in this equation, we follow similar steps.

 

The root can be computed on a graphing calculator using the MATH button or put into WolframAlpha:

 

Either method gives r ≈ 0.577 or 5.77%. Notice that the annual interest is lower when it is earned over a longer period of time.

If we use a 1/6 power to solve for r, we would carry out the steps below:

 

Using a 1/6 power on your calculator gives the same answer as above.