Sharp EL-9900 Calculator User Manual


 
EL-9900 Graphing Calculator
20
Ordinary Differential Equations
Enter the initial conditions (X, Y) with the step H and interval T. Use Runge Kutta Gill method
to solve the ordinary differential equation of first order.
Calculation
FLOWCHART
PROGRAMME LIST
(REAL MODE)
Entry of data
Initial setting
Start
Gosub
Enter Data.
Data for calculation set.
Calculation executed.
Use the following four steps of Runge Kutta Gill method to find the
equation X
n + 1
and Y
n - 1
from X
n
and Y
n
. Input Q
o
= 0 at the
starting point X
0
.
MAIN
Calculation of step 1.
Judgment of calculation end.
If calculation result of I smaller
than value of increase of I,
calculation repeated again.
Z <= I
1. K
0
= Hf (X
n
, Y
n
), R1 = (1/2) (K
0
-2Q
0
), Y
(1)
= Y
n
+R
1
2. Q
1
= Q
0
+ 3R
1
- (1/2)K
0
K
1
= Hf (X
n
+ H/2, Y
(1)
), R
2
= (1 - 1/2) (K
1
-Q
1
), Y
(2)
=Y
(1)
+ R
2
3. Q
2
= Q
1
+ 3R
2
- (1 - 1/2) K
1
K
2
= Hf (Xn + H/2, Y
(2)
), R
3
= (1 + 1/2) (K
2
-Q
2
),Y
(3)
= Y
(2)
+ R
3
4. Q
3
= Q
2
+ 3R
3
- (1 + 1/2) K
2
K
3
= Hf (X
n+1
, Y
(3)
), R
4
= (1/6) (K
3
-2Q
3
), Y
n+1
= Y
(3)
+ R
4
Q
4
= Q
3
+ 3R
4
- (1/2)K
3
X
1
X
2
X
3
X
Y
1
Y
2
Y
3
Y
0
h
h
Initial coordinates (X, Y), step
of x (H), and interval of solutions (T)
Jumps to subroutine.
Gosub
Jumps to subroutine.
Calculation of step 2.
Gosub
Jumps to subroutine.
Calculation of step 3.
Gosub
Jumps to subroutine.
Calculation of step 4.
N
Y
S = I
O = J
Z I
N
Y
Processing
in case of
inequality
Following calculation
performed when calculation
result of x not equal to the
value of increase of X.
P =
(Z - S) (J - O)
+ O,
M = Z
N = P
Display of result
SUB1
Processing for
next calculation
Prior processing for next calculation
Z = Z + T, S = X, O = J
FORMULA
Subroutine
Subroutine for
calculating
built-in function
Subroutine for calculating
built-in function
f = -I J
(Another equation can be used.)
Return
SUB2
Rem INITIAL
Print " Input X0
Input X
Print " Input Y0
Input Y
X I
Y J
Print " Input H
Input H
Print " Input T
Input T
1+(2
-1
) A
1- (2
-1
) B
I+T Z
O Q
I S
Label MAIN
Rem 1
Gosub
FORMULA
H F K
(K-2 Q) /2 R
J+R J
Q+3 R-K/2 Q
I+H/2 I
Rem 2
Gosub
FORMULA
H F K
B (K-Q) R
J+R J
Q+3 R-B K Q
Rem 3
Gosub
FORMULA
H F K
A (K-Q) R
J+R J
Q+3 R - A K Q
I+H/2 I
Rem 4
Gosub
FORMULA
H F K
(K - 2 Q) /6 R
J+R J
Q+3 R - K/2 Q
If ZI Goto
NEXT
I S
J O
Goto MAIN
Label NEXT
If ZI Goto
SUB2
I M
J N
Label SUB1
ClrT
Print "XN=
Print M
Print "YN=
Print N
Wait
Z+T Z
I S
J O
Goto MAIN
Label SUB2
(Z-S) (J-O) /H+O
P
Z M
P N
Goto SUB1
Label
FORMULA
-I J F
Return
H
Title : RUNGE