(38G) Simpson's Rule - Printable Version +- HP Forums ( https://www.hpmuseum.org/forum)+-- Forum: HP Software Libraries ( /forum-10.html)+--- Forum: General Software Library ( /forum-13.html)+--- Thread: (38G) Simpson's Rule ( /thread-13919.html) |

(38G) Simpson's Rule - SlideRule - 11-01-2019 01:41 PM
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. Simpson's Rule This program uses Simpson's Rule to approximate the definite integral a∫b ƒ(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 half the number of subintervals you want to use. SIMPSON PROGRAM INPUT A;“ENTER LOWER LIMIT”; “ENTER A”;“ ”; 1: INPUT B;“ENTER UPPER LIMIT”; “ENTER B”;“ ”; 1: INPUT D;“N/2 DIVISIONS”; “ENTER D”; “ ”; 1: 0►S: (B-A)/(2D)►W: 1►J: WHILE J≤D REPEAT RUN “SIMPSONLOOP” END: ERASE: DISP 3; “APPROXIMATION”: DISP 5; S: FREEZE: SIMPSONLOOP PROGRAM A+2*(J-1)*W►L: A+2J*W►R: (L+R)/2►M: L►X: F1(X)►L: M►X: F1(X)►M: R►X: F1(X)►R: W*(L+4M+R)/3+S►S: J+1►J BEST! SlideRule |