| Algorithm | Calculator |
Given:
- the function y = f(x) = x2 + 3x
- the interval [-1,3]
- the positive integer n = 100
we want to find Riemann Sums corresponding to
- left-hand endpoints
- right-hand 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:
a0, a1, a2, ..., an
where
which, in our example, is
ai = -1 + i (1/25) = -1 + i/25
|
|
|
4. In each of the subintervals [ai-1, ai], we
pick a number xi:
depending upon whether we want to use left-hand endpoints, right-hand
endpoints or midpoints, respectively. So
| left-hand endpoints: |
xi = -1 + (i-1)/25 |
| right-hand endpoints: |
xi = -1 + i/25 |
| midpoints: |
xi = -1 + (2i-1)/50 |
| C2. Form lists of the xi's:
| Left-hand endpoints:
 |
| Right-hand 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:
|