Program for Riemann Sums on TI-85 and 86

(Copied from Nicolas Baeth)


Program for left and right hand sums:


Disp "LOWER LIMIT"
Input A
Disp "UPPER LIMIT"
Input B
Disp "DIVISIONS"
Input N
A -> x
0 -> S
1 -> I
(B-A)/N -> H
Lbl P
S+y1*H -> S
x+H -> x
IS>(I,N)
Goto P
Disp "LEFT SUM"
Disp S
S+y1*H -> S
Disp "RIGHT SUM"
Disp S


(Make sure that you enter the function into the value for y1 before you run the program or else it will not know what function you wish to estimate for.)


Program for left/right hand sums plus simpsons/midpoint/trapezoid estimates:


Disp "LOWER LIMIT"
Input A
Disp "UPPER LIMIT"
Input B
Disp "DIVISIONS"
Input N
(B-A)/N -> H
A -> x
0 -> L
0 -> M
1 -> I
Lbl P
L+H*y1 -> L
x+0.5H -> x
M+H*y1 -> M
x+0.5H -> x
IS>(I,N)
Goto P
Disp "LEFT/RIGHT"
Disp L
L+H*y1 -> R
A -> x
R-H*y1 -> R
Disp R
(L+R)/2 -> T
Disp "TRAP/MID/SIMP"
Disp T
Disp M
(2*M+T)/3 -> S
Disp S
(Pause)


(This last line is optional, but without it I find that part of the output leaves the screen before it can be read.)