EULER'S METHOD PROGRAM

SHARP EL-9300C or EL-9200

This program applies Euler's method to the solution of the differential equation y'=f(x,y) on the x-interval [A,B]. The program prompts for input of A, B, an initial value ya = y(A) and the number N of steps. It displays the resulting approximate value for y(B).

General: To enter the program, press the programming key (middle upper key), then C key (which selects the NEW program option), then ENTER, then 1 (to select real mode), then the program name. The calculator will be in A-LOCK mode. Hit ALPHA at the end of the name, and then ENTER. After typing each command, press the ENTER key.
To enter a Capitalized Command hit COMMAND (2ndF MATH), then select one of the menus PROGram, BRaNCH, INEQualities, GRAPH, SCReeN, and select your instruction from that menu.

Commands:		Remarks and keying instructions

h=(-a + b)/n		Use the minus sign below 3 to enter "minus a";
			The = is ALPHA ENTER. The Sharp automatically 
			prompts for undefined variables. Here a is 
			the lower limit, b is the upper limit, and 
			n is the number of subdivisions. For /, press 
			the division key, under the the ) key.

x=a			These three commands initialize x, y (the
y=ya			running total for the final value) and 
i=1			the counter i.
Label 1			This spot in the program is labelled 1.
			Label is from the BRNCH menu.
f=y	                To change equations, edit this line.
 			This line defines the function f in
			terms of the current x and y.
y=y+f*h			The new y-value is computed using the current
			x and y values. For *, press the multiplica-
			tion key, under the ( key.
x=x+h			Update x.
i=i+1			Add 1 to the counter.
If i< =n Goto 1  	If i is less than or equal to
			n, the program recycles back to the spot
			labelled 1. If i is greater than n, (the
			job is over and) the program goes on to 
			the next command. 
			For If and Goto get to BRNCH menu as 
			before, then select If or Goto. For < = 
                        go to INEQ menu and select the third item. 
Print y			The calculator will display y=(value). 	Print 
			is 1 on the PROG menu.
End			(optional) End is 6 on the PROG menu.

Ending: After pressing the ENTER key for the last command (End), press the QUIT key.

Running the program: Remeber to re-edit when you switch equations. In the program menu (upper middle key) choose A (for RUN menu), then right arrow then down arrow to EULER, then ENTER. Enter numbers at the question mark (a=? etc.) prompts.

Check: for f = y, a = 0, b = 1, n = 10 and ya = 1 the approximate y(1) should be 2.59374246.


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