WPCp  ,)2ܰb8BpLq/ '} 5eH,xL^`KxF_Zѫ:~PdVD;*U\ %J@PU\U\ D+Hs 0*9 0Jc AM  n 0  w@ 4\ $ [  `DDutch Roman 12ptASCII FW, PortX'  E:\WP51\MATH142\RSUM.PRG$TI-85 Program  0.TI-85 program to calculate Riemann sums (left, right, midpoint, trapezoidal, and Simpson).   $ [  `DDutch Roman 11ptASCII FW, Port$ [  `DDutch Roman 09ptASCII FW, Port'dxd Level 1 Level 2 Level 3 Level 4 Level 5(2`$  ;!XX  &O=&XX&O=&&&O=m#XL` X,d8x !(#%'0*,.8135@8:<H?AX  ("$ Figure     A<< c3|V$ [  `DDutch Roman 12ptASCII FW, PortXg [ PXP$ [  `DDutch Roman 11ptASCII FW, Port&^ [ P&P$ [  `DDutch Roman 09ptASCII FW, PortXM [ PP(;$XX  &O=&XX&O=&&&O=m#XL` X,d8x !(#%'0*,.8135@8:<H?AX  U D TYE@1y  ;!XX  &O=&XX&O=&&&O=m#XL` X,d8x !(#%'0*,.8135@8:<H?AX  XX&&O=XXXX@66,TI85ProgramforRiemannSums X XX@^^,Math142SpringSemester1997@6Dr.Carruth  0 &O=&XX&O=&&&O=̀1.0  :Disp"Enterf(x)" d    8 Displaytheprompttoenterthefunction.%% Ѐ2.0  :InpStFUNCTION d    8 CommandInpStforacceptingfunctioninputasastring.t%% Ѐ3.0  :StEq(FUNCTION,y50)   8 CommandStEqconvertsthe"string"functiontoa"real"function.L%% Ѐ4.0  :Disp"Entera"   d    8 Displaytheprompttoentertheleftendpointa.|$%% Ѐ5.0  :InputA     d    8 CommandInputacceptsthevalueaforthevariableA.T %% Ѐ6.0  :Disp"Enterb"   d    8 Displaytheprompttoentertherightendpointb.,  %% Ѐ7.0  :InputB     d    8 CommandInputacceptsthevaluebforthevariableB.  %% Ѐ8.0  :Disp"Entern"   d    8 Displaytheprompttoenterthenumberofsubintervalsn. %% Ѐ9.0  :InputN     d    8 CommandInputacceptsthevaluenforthevariableN. \ %% 10.0  :(BA)/ND   d    8 CalculatingthevalueofxandassigningittothevariableD. 4 %% 11.0  :Ax     d    8 Settingtheinitialvalueofxattheleftendpointa.d %% 12.0  :0L:0M:0R:0T:0S   8 InitializingthevaluesofL,M,R,T,andS.< %% 13.0  :1I       d    8 StartingtheIloopbysettingI=1(firstsubinterval). %% 14.0  :LblLOOP   d    8 Establishingalabelforthemainprogramloop(forGoto).%% 15.0  :L+y50*DL   d    8 Multiplyingf(leftendpoint)byxandaddingtopreviousLtotal.l%% 16.0  :x+D/2x     d    8 Changingthevalueofxtothemidpointofthesubinterval.D%% 17.0  :M+y50*DM   d    8 Multiplyingf(midpoint)byxandaddingtopreviousMtotal.t%% 18.0  :x+D/2x     d    8 Changingthevalueofxtotherightendpointofthesubinterval.L%% 19.0  :R+y50*DR   d    8 Multiplyingf(rightendpoint)byxandaddingtopreviousRtotal.$%% 20.0  :IfI==N     d    8 Testingtoseeifyoushouldstoptheloop(stopwhenI=N).%% 21.0  :GotoFINISH   d    8 IfI=N,thengotothe"endgame"anddisplayresults.|%% 22.0  :I+1I     d    8 Otherwise,incrementIby1togotothenextsubinterval.T%% 23.0  :GotoLOOP   d    8 Then,gobacktothebeginningoftheLOOP(ninestepsabove).,%% 24.0  :LblFINISH   d    8 Thisistheendgame,whereL,M,R,T,andSaredisplayed.\%% 25.0  :Disp"Left="   d    8 SimplyprintingonthescreenthefactthatyouwillprintL.4%% 26.0  :DispL     d    8 ActuallydisplayingthevalueofLcalculatedbytheprogram. %% 27.0  :Disp"Middle="   d    8 SimplyprintingonthescreenthefactthatyouwillprintM.%% 28.0  :DispM     d    8 ActuallydisplayingthevalueofMcalculatedbytheprogram.d%% 29.0  :Disp"Right="   d    8 SimplyprintingonthescreenthefactthatyouwillprintR.< %% 30.0  :DispR     d    8 ActuallydisplayingthevalueofRcalculatedbytheprogram.l!%% 31.0  :Pause     d    8 Stoppingtheprogram,becausetheHomeScreenisfull.D"%% 32.0  :CILCD     d    8 Commandtoclearthescreen(otherwiseRstaysonthescreen). #%% 33.0  :T=(L+R)/2   d    8 CalculationofthetrapezoidalruleapproximationT. $%% 34.0  :Disp"Trap="   d    8 SimplyprintingonthescreenthefactthatyouwillprintT.!t%%% 35.0  :DispT     d    8 ActuallydisplayingthevalueofTcalculatedbytheprogram."L &%% 36.0  :S=(2M+T)/3   d    8 CalculationoftheSimpson'sruleapproximationS.|#$!'%% 37.0  :DispS     d    8 ActuallydisplayingthevalueofScalculatedbytheprogram.T$!(%%  Note:  ThesymbolrepresentsSTOonthecalculator,butitappearsasontheeditscreen. &$+   Note:   Thisprogrammaybetransferredfrommycalculatortoyours!  '\%,   8&&O=88E:\WP51\MATH142\RSUM.PRG L/,5 01/21/199711:00A.M.  @   Thisskitewaslastupdatedon01/21/1997at11:00a.m.