Ordinary Differential Equations - Sharp EL-9900 Handbook Vol. 2 Operation Manual

Graphing calculator programmes
Hide thumbs Also See for EL-9900 Handbook Vol. 2:
Table of Contents

Advertisement

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

Advertisement

Table of Contents
loading

Table of Contents