TI 81 Simpson's Rule Program
:Prgm2:SIMPSON
:Input N
:Input A
:Input B
:(B - A)/N->1
:0->S
:A->X
:Lbl 1
:Y1+S->S
:X + I -> X
:4Y1+S->S
:X + I -> X
:Y1 + S -> S
:If X**S
:Disp S
Entering the Program:
Underlined words represent buttons to be pushed
# represents the cursor
Keystrokes Screen
Prgm
cursor across to edit
cursor down to next empty Prgm
ENTER Prgm2:#
SIMPSON ENTER Prgm2:SIMPSON
:#
Prgm
cursor across to I/O
cursor down to Input ENTER :Input #
N ENTER :Input N
(Repeat the above four lines twice, replacing N with A and then B)
(B - A)/N Sto I :(B-A)/N->I
0 Sto S :0 -> S
A Sto X :A -> X
Prgm
cursor across to CTL
cursor down to 1 ENTER :Lbl #
1 ENTER :Lbl 1
2nd YVARS
cursor down to 1 ENTER :Y1#
+S Sto S :Y1 + S -> S
X + I Sto X :X + I -> X
4 2nd YVARS
cursor down to 1 ENTER :4Y1#
+S Sto S :4Y1 + S -> S
X + I Sto X :X + I -> X
2nd YVARS
cursor down to 1 ENTER :Y1#
+ S Sto S :Y1 + S -> S
Prgm
cursor across to CTL
cursor down to 3 ENTER :If #
X :If X#
2nd TEST
cursor down to 5 ENTER :If x < #
B ENTER :If x < B
Prgm
cursor across to CTL
cursor down to 2 ENTER :Goto #
1 ENTER :Goto 1
S*I/3 Sto S ENTER :S*I/3 -> S
Prgm
cursor across to I/O
cursor down to 1 ENTER :Disp #
S ENTER :Disp S
To find the definite integral numerically, type in an equation in Y1
Now, hit Prgm, cursor to EXEC, cursor to Prgm2 SIMPSON
Prgm 1 will appear on the screen press ENTER
?# will appear on the screen Type in number of intervals ENTER
?# will appear on the screen Type in the lower bound ENTER
?# will appear on the screen Type in the upper bound ENTER
The program will think and then display the approximate definite integral
**