ALLSUMS - TI 85

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.


The Program
:Prompt A,B,N  {Prompt is in PRGM under I/O}
:(B-A)/N$\to$H {The arrow is STO}
:A$\to$ {x is x-VAR}
:0$\to$ {The 0 is a zero} 
:0$\to$ {The 0 is a zero} 
:1$\to$ {The 1 is a one}
:Lbl P  {Lbl is in PRGM under CTL}
:L+y1*H$\to$ {y1 is in VARS under EQU} {The * is the times sign}
:x+H/2$\to$
:M+y1*H$\to$
:x+H/2$\to$
:IS>(J,N)  {IS> is in PRGM under CTL}
:Goto P  {Goto is in PRGM under CTL}
:B$\to$
:L+y1*H$\to$
:A$\to$
:R-y1*H$\to$
:(L+R)/2$\to$
:(2*M+T)/3$\to$
:Disp "L R T M S"    {Disp and " are in PRGM under I/O}
:Disp L 
:Disp R 
:Disp T 
:Disp M 
:Disp S 


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