LEFT-HAND SUM PROGRAM

WITH EXTENSION TO RIGHT-HAND SUMS AND THE TRAPEZOID RULE

Texas Instruments TI-85

General: To type an upper case letter, press ALPHA key, followed by the letter. To type a lower case letter, press 2nd key, then ALPHA key, followed by the letter. To type a space, press the ALPHA key, followed by the (-) key. To enter the program commands, press PRGM key, then F2 key (which selects the EDIT box), then the program name (i.e. LSUM) followed by the ENTER key. The calculator will go to a new line and display the colon : which must appear at the beginning of each command. After typing each command, press the ENTER key. Calculator will go to a new line and diplay the colon.
Commands:			Remarks and keying instructions:

:Prompt A,B,N                    Program will ask you to key in A (initial
				x-value), B (final x-value) and N (the
				number of equal subdivisions). To get
				Prompt, press PRGM, F3, F2.
:A->x				 For ->, press STO key.  For x, Press
				x-VAR key. 
:0->S				 This 0 is zero! These 3 commands
				initialize x, S, and the counter I.
:1->I
:(B-A)/N->H			 Calculate subdivision length.
				- is the key to the right of the 6 key.
				For /, press the division key, 
				which is under the ^ key.
:Lbl P				 This spot in the program is labelled P.
				To get Lbl, press F4 (CTL menu), MORE
				(to scroll the CTL menu) and F4.
:S+y1*H->S			 Add H times the current value of y1
				(the function being summed) to S.
				For y (lower case!) use 2nd ALPHA; for
				*, press the multiplication key,
				which is to the right of the 9 key.
:x+H->x				 Update x.
:IS>(I,N)			 IS> increments I by 1 and tests if the 
				new I is larger than N. If so, the program
				skips the next step (and displays the sum);
				Otherwise it cycles back to P.
				For IS>(, press F4 key (chooses CTL
				menu), then twice the MORE key, then F1.
				Note: the comma is the key  to the left
				of the 4 key.
:Goto P				 For Goto, press F4, MORE, F5
:Disp "LSUM",S			 For Disp, press F3,F3; for " F3,MORE,F5
Ending: After pressing the ENTER key for the last command, press the EXIT key.

Running the program: Press GRAPH key, then F1 key, then key in the expression for the function you want to sum (e.g. x-VAR, then ^, then 3 for f(x)=x^3). Use x-VAR for your variable. Then EXIT, EXIT.
Now press PRGM, then F1, then the F-key under the word LSUM in the screen, then the ENTER key. Enter numbers at the question mark (?) prompts.

Check: for y1=f(x)=x^3, lower limit 1, upper limit 3, and 100 subdivisions, left-hand sum should be 19.7408.

Exercise: Modify this program to do right-hand sums.

RIGHT HAND SUMS AND THE TRAPEZOID RULE

Add these instructions to the end of the program:


:A->x                           For ->,x,Disp," follow the keying
:S-y1*H->R                      instructions above.
:B->x
:R+y1*H->R
:Disp "RSUM",R
:(S+R)/2->T
:Disp "TRAP",T
Check: For y1=f(X)=sin X, lower limit 0, upper limit pi/2, and N = 10, LSUM = .919403170015, RSUM = 1.07648280269, TRAP = .997942986354.
Anthony Phillips
Math Dept SUNY Stony Brook
tony@math.sunysb.edu
September 8 1997