Computing Left and Right Hand Riemann Sums Using a TI-83

Using sum(seq())

To compute left and right hand sums using the TI-83 calculator, you can use the sum() and seq() operations in combination to do simple examples. We have that for n subdivisions of the interval [a,b],
\begin{displaymath}
\Delta x=\frac{b-a}{n}
\end{displaymath} (1)

so that

\begin{displaymath}
x_i=a+i\Delta x.
\end{displaymath} (2)

In this notation, the LHS for a function f(x) is

\begin{displaymath}
LHS=\sum_{i=0}^{n-1} f(x_i)\Delta x = \sum_{i=0}^{n-1} f(a+i\Delta x)\Delta x
\end{displaymath} (3)

and the RHS is

\begin{displaymath}
RHS =\sum_{i=1}^{n} f(x_i)\Delta x = \sum_{i=1}^{n} f(a+i\Delta x)\Delta x
\end{displaymath} (4)

In a specific case (where f(x), n, a, and b are fixed), it is a simple matter to translate this to TI-83 notation. For example,Ex:Let f(x)=2x3+4 and compute the LHS and RHS for $\int_{-1}^{1}f(x)dx$ using n=500.Solution:For the LHS, enter the expression


sum(seq( (2*(-1+I*(2/500))^3+4)*(2/500), I, 0, 499, 1))
For the RHS, enter the expression

sum(seq( (2*(-1+I*(2/500))^3+4)*(2/500), I, 1, 500, 1))

The programs LEFT, RIGHT and BOTH

Obviously, this becomes tedious to enter over and over for various values of n and different limits or functions. It would help to have a program that asked you for a function, n, a and b and then computed either the LHS or the RHS. In what follows, we will create two such programs: RIGHT and LEFT.To construct the LEFT function, first enter PROGRAM mode by hitting the PRGM key. Select NEW to create a new program and name it LEFT. Enter the following commands at the : prompts and choose QUIT when done.


Prompt A,B,N 
(B-A)/N -> D 
A->X 
0->S 
For (I,0,N-1) 
S+Y1*D->S 
X+D->X 
End 
Disp "LEFT SUM IS",S
Please note that the Y1 is a reference to a function residing in the function list, and not a variable "Y1". To insert it into the program, hit the VARS key, choose Y-VARS and then Function... and select Y1. To use the program, hit the PRGM key and choose LEFT. Hit ENTER and respond to the A, B and N prompts. The LHS will be displayed for the function in the Y1 spot on the function list.Similarly, to create the RIGHT function, enter the commands

Prompt A,B,N 
(B-A)/N -> D 
A->X 
0->S 
For (I,1,N) 
X+D->X 
S+Y1*D->S 
End 
Disp "RIGHT SUM IS",S
at the prompts after creating a new program named RIGHT. You can combine these and print both the RHS and LHS using the following program, named BOTH:

Prompt A,B,N 
(B-A)/N -> D 
A->X 
0->S 
For (I,0,N-1) 
S+Y1*D->S 
X+D->X 
End  
S->L 
S+Y1*D->S 
A->X 
S-Y1*D->R 
Disp "RIGHT SUM IS",R 
Disp "LEFT SUM IS",L 
Disp "RIGHT-LEFT IS",R-L

Better Approximations: Mid, Trap, and Simp

Here is a program to compute the Midpoint, Trapezoidal and Simpson's approximations. Remember that -> means the STO key on your calculator and keywords like ``Prompt", ``Disp", and ``Goto" can be found in the PRGM and VARS sections while in program mode.
Prompt A, B, N
(B-A)/N->H
A->X
0->L
0->R
0->S
0->M
For(I,0,N-1)
A+I*H->X
S+H*Y1->S
A+(I+0.5)*H->X
M+H*Y1->M
End
Disp "Left/Right"
S->L
X+.5*H->X
S+H*Y1->S
A->X
S-H*Y1->R
Disp L
Disp R
Pause
(L+R)/2->T
Disp "Trap/Mid/Simp"
Disp T
Disp M
(2*M+T)/3->S
Disp S

About this document ...

This document was generated using the LaTeX2HTML translator Version 97.1 (release) (July 13th, 1997)

Copyright © 1993, 1994, 1995, 1996, 1997, Nikos Drakos, Computer Based Learning Unit, University of Leeds.

The command line arguments were:
latex2html -split 0 -link 0 -no_navigation -t TI83Progs ti83sums.tex.

The translation was initiated by Eddie Fuller on 3/30/2001


Eddie Fuller
3/30/2001