ALLSUMS - TI 89 or TI 92

Introduction
This program computes left, right, Trapezoid, Midpoint, and Simpson's approximations for  $\int\limits_a^bf(x)dx$.
 
If you have not used one of the programs posted on this website before, you should read through the information in the Intro to Programming section first.


If you have a TI Connectivity Cable, you can download the program main.allsums.89p


The Program   is STO}
:allsums( ) {This will already appear if you named the program allsums}
:Prgm {This will already appear}
:Clr IO {Clr IO is in the CATALOG menu}
:Lbl p {Lbl is in the CATALOG menu}
:Local a,b,n {Local is in the F4 menu}
:Input "a=", a {Input is in the F3 menu}
:Input "b=", b
:Input "n=", n
:(b-a)/n$\to$
:a$\to$x
:0$\to$l {The 0 is a zero}{The l is a lowercase L} 
:0$\to$ {The 0 is a zero} 
:For j,1,n {For EndFor is in the F2 menu}{The 1 is a one}
:l+y1(x)*h$\to$ (The l is a lowercase L} {y1 is the Y button followed by a 1}
:m+y1(x+h/2)*h$\to$ {* is the times button}
:x+h$\to$
:EndFor
:l+y1(b)*h$\to$ {The l is a lowercase L}
:r-y1(a)*h$\to$
:(l+r)/2$\to$ {The l is a lowercase L}
:(2*m+t)/3$\to$
:Disp "L R T M S" {Disp is in the F3 menu}
:Disp l  (The l is a lowercase L}
:Disp r 
:Disp t 
:Disp m 
:Disp s 
:Pause {Pause is in the CATALOG menu}
:Goto p {Goto is in the CATALOG menu}
:EndPrgm {This will already appear}


Running the Program
 
You will need to enter a function f(x) into y1 before running the program. The program will ask for values of A, B, and N (number of subdivisions).
 
To test the program try the following:
  f(x)  =  x2+ 3,   A=1,   B=4,   N=20.
 
Your answer will be
L R T M S
28.88625
31.13625
30.01125
29.994375
30