Introduction
This program computes left, right, Trapezoid, Midpoint, and
Simpson's approximations for
.
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
| 'ALLSUMS' | {' is in ALPHA} {This is the name of the program} |
| Lbl 1 | {Lbl is in PRGM under JMP} |
| "A"? |
{" is in ALPHA} {? is in
PRGM} { |
| "B"? |
|
| "N"? |
|
| (B-A)
|
|
| A |
|
| 0 |
{The 0 is a zero} |
| 0 |
{The 0 is a zero} |
| Lbl 2 | |
|
L+f1 |
{f1 is in Fmem. Choose fn, then type a 1} |
| X+H
|
|
|
M+f1 |
|
| X+H
|
|
| Dsz N | {Dsz is in PRGM under JMP} |
| Goto 2 | {Goto is in PRGM under JMP} |
| B |
|
|
L+f1 |
|
| A |
|
|
R-f1 |
|
| (L+R)
|
|
|
(2 |
|
| "L R T M S" | |
| L |
{ |
| R | |
| T | |
| M | |
| S | |
| Goto 1 |
Running the Program
You will need to enter a function f(x) into
f1 before running
the program.
Store your function by hitting Fmem.
Store your equation in position 1. 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
To get each estimate hit EXE.