Algorithm  Calculator 
Given:
 the function y = f(x) = x^{2} + 3x
 the interval [1,3]
 the positive integer n = 100
we want to find Riemann Sums corresponding to
 lefthand endpoints
 righthand endpoints
 midpoints

C1. We enter the function on the calculator:

The algorithm is
 Subdivide [1,3] into 100 subintervals of equal length.
 The length of each of these subintervals is
which is (3 (1))/100 = 1/25.
 We will label the endpoints of the subintervals:
a_{0}, a_{1}, a_{2}, ..., a_{n}
where
which, in our example, is
a_{i} = 1 + i (1/25) = 1 + i/25


4. In each of the subintervals [a_{i1}, a_{i}], we
pick a number x_{i}:
depending upon whether we want to use lefthand endpoints, righthand
endpoints or midpoints, respectively. So
lefthand endpoints: 
x_{i} = 1 + (i1)/25 
righthand endpoints: 
x_{i} = 1 + i/25 
midpoints: 
x_{i} = 1 + (2i1)/50 
 C2. Form lists of the x_{i}'s:
Lefthand endpoints:

Righthand endpoints:

Midpoints:


5. We then form the Riemann Sum,
 C3. After we enter the commands in steps 1. and 2., the
calculator automatically makes y1 a list and so we can take the sum:
