(38G) Midpoint Rule
11-01-2019, 11:43 AM (This post was last modified: 11-01-2019 08:45 PM by SlideRule.)
Post: #1
 SlideRule Senior Member Posts: 1,101 Joined: Dec 2013
(38G) Midpoint Rule
An excerpt from Appendix E: Graphing Utility Programs, Applied Calculus 6e (Larson);

Programs for graphing calculators are referenced in several sections in the text. This appendix contains translations of these programs for the TI-82, TI-83, TI-85, TI-86, TI-89, TI-92, Casio CFX-9850G, HP 38G, and Sharp EL 9200/9300, arranged by calculator model. Similar programs can be written for other brands and models of graphing calculators.
Enter a program in your calculator, then refer to the text discussion and apply the program as appropriate.

Midpoint Rule

This program uses the Midpoint Rule to approximate the definite integral ab ƒ(x) dx. Enter both programs into the calculator. Store the expression ƒ(x) dx in the F1 function in the Function aplet. Be sure F1 is checked. The program itself will prompt you for the limits a and b and for the number of subintervals η.

MIDPOINT PROGRAM
INPUT A;“ENTER LOWER LIMIT”; “ENTER A”;“ ”; 1:
INPUT B;“ENTER UPPER LIMIT”; “ENTER B”;“ ”; 1:
INPUT N;“N DIVISIONS”; “ENTER N”; “ ”; 1:
0►S:
(B-A)/N►W:
1►J:
WHILE JN
REPEAT RUN “MDPTLOOP”
END:
ERASE:
DISP 3; “APPROXIMATION”:
DISP 5; S:
FREEZE:

MDPTLOOP PROGRAM
A+(J-1)*W►L:
A+J*W►R:
(L+R)/2►X:
S+W*F1(X) ►S:
J+1►J

BEST!
SlideRule
(fixed 'typo')
 « Next Oldest | Next Newest »

User(s) browsing this thread: 1 Guest(s)