SUNY at Stony Brook -- Mathematics Department

Slope fields on the Texas Instruments TI-82 and TI-83 Calculators

This program draws a 96-element (12 x 8) slope field in the rectangle [Xmin,Xmax]x[Ymin,Ymax]. The slopes are given by the function of X and Y stored as Y1.

General: To type an upper case letter, press ALPHA key, followed by the letter. To begin entering the program, press the PGRM key, and select NEW from the menu. The calculator will go into ALPHA mode and prompt you to enter the name. Type in (for example) SLOPE and press ENTER. The program now displays the colon : which must appear at the beginning of each command.
To enter the program commands (all the words in the program that start with a Capital Letter), press PRGM key, then select one of the two menus:

Select the command you need from the appropriate menu. After typing each command, press the ENTER key. (You may also stay on the same line by typing a colon : (ALPHA .)
When navigating menus, use CLEAR to return to where you were.
This program is more elaborate than the others because it must link the computational and graphing operations of the calculator.
COMMAND: 		Explanation and keying instructions:
:FnOff			Inactivates function graphing. Y-VARS
			(2nd VARS),5,2.
:ClDrw			Clears the screen. DRAW (2nd PRGM),1
:Prompt Xmin,Xmax,Ymin,
Ymax			Prompts for input of screen parameters. Prompt is
			PRGM, and 2 from the I/O menu. Xmin, etc. are 
			on the VARS,1 menu.
:7(Xmax - Xmin)/83->H	Calculates horizontal step-size. - is to the
			right of 6, / is the division key, which is under 
			the ^ key, -> is STO. 
:7(Ymax - Ymin)/55->K	Calculates vertical step-size.	
:1/(0.4H)^2->A		The numbers A and B are used in calculating
:1/(0.4K)^2->B		the how long the lines should be.
:Xmin+0.5H->X		Calculates position of lower left-hand slope line.
:Ymin+0.5K->Z		Use [X,T,theta] to get X.
:1->I			Initialize I: counts columns.
:Lbl P			Labels this program location. Lbl is PRGM, and 9
			from the CTL menu.
:1->J			Initialize J: counts rows.
:Z->Y			Initialize Y for the current column. 
:Lbl Q			Labels this program location.
:Y1->T			Program applies expression stored as Y1 to compute
			the current slope. To get Y1, press Y-VARS and
			select 1 twice.
:1/sqrt(A+B*T^2)->C	sqrt is the square-root (2nd x-squared, to the
			left of comma). * is the times key (next to 9). 
:T*C->S			These two instructions calculate the horizontal and
			vertical extent of the line segment to be drawn.
:X->U			Store current X,Y values as U and V.
:Y->V
:Line(U-C,V-S,U+C,V+S)	Draws a line segment through (X,Y). Line( is 2 on
                        the DRAW (2nd PGRM) menu. Comma is the key above 7.
:V+K->Y			Increment Y.
:IS>(J,8)		Add 1 to J and test. If less than or equal 8,
			go to the next instruction (i.e. proceed up
			the column). If greater, skip next instruction.
			For IS>(, PGRM, and select A from the CTL menu.
:Goto Q			For Goto: PGRM, 0 on the CTL menu.
:U+H->X			Increment X (i.e. move to next column).
:IS>(I,12)		Test if all columns are done.
:Goto P

Ending: After pressing the ENTER key for the last command, press the EXIT key.

Running the program: First enter the function giving the slope: Press Y= (below the screen) then type it in on the Y1 line as a function of the two variables X (use [X,T.theta]) and Y. (e.g. X+Y). Then QUIT (2nd MODE) to return to home screen. Now PRGM, select SLOPE from the EXEC menu, ENTER. Enter numbers at the question mark (?) prompts.

Check: For Y1 = -X/Y get circles centered at the origin. The circles will be round if your screen parameters have the correct aspect ratio.
Check: For Y1 = X+Y and window [-3,3]x[-2,2], calculator screen should have the image shown on the right.


Anthony Phillips
Math Dept SUNY Stony Brook
tony@math.sunysb.edu
September 12 1997