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+Y1![]() ![]() |
{Y1 is in VAR under GPH, then followed by a 1} |
X+H
![]() ![]() |
|
M+Y1![]() ![]() |
|
X+H
![]() ![]() |
|
Dsz N | {Dsz is in PRGM under JMP} |
Goto 2 | {Goto is in PRGM under JMP} |
B![]() |
|
L+Y1![]() ![]() |
|
A![]() |
|
R-Y1![]() ![]() |
|
(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
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
To get each estimate hit EXE.