## 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 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,

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

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:

Now take the logarithm of both sides of the equation:

This gives us

or n ≈ 9.21 years.

In WolframAlpha, we could evaluate the logs as follows.

## 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,

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.

## How To Graph a Piecewise Function in WolframAlpha?

In an earlier post, I showed you how to find a piecewise function for Alabama state income taxes.  Often you need a quick graph of the function…maybe something that WolframAlpha can do.

## How Do You Solve a Linear System with WolframAlpha?

Many of you may already be familiar with using a graphing calculator to put a matrix in reduced row echelon form. Did you know that you can do the same thing with WolframAlpha?

To see how this is done, let’s start from the system of linear equations

Convert this system into a 3 x 4 augmented matrix:

WolframAlpha understands several commands for putting an augmented matrix into reduced row echelon form. You can use the command rref { }or the command row reduce { }. The matrix goes inside the curly brackets. However, the matrix must be put in carefully. Each row needs to be typed in inside of curly brackets with the entries separated by a commas. In this case, you would type

on the command line in WolframAlpha.

After you press Enter, the reduced row echelon form is computed,

This indicates that the solution to the system is

x = 65,000, y = 45,000, z = 40,000.