Download Print this page

Sharp PC-1500 Applications Manual page 29

Hide thumbs Also See for PC-1500:

Advertisement

All
and
more
about Sharp PC-1500
at http:/lwww.PC-1500.info
SHARP
PROGRAM
T
I
TL E
I
Outline
I
FIRST
ORDER
DIFFERENTIA
L
EQUAT
ION
PROGRAM
NO.
PS-
A-7
CE-I
SO
required
This
program solves
a
first order
differential
equa tion
by using
the Rungc-Kutta-
Gill
method.
[ Operating
Guide
]
<
Input>
Initial
conditions
x
0
Yo
x
value
increment
h
Solution interval
T
<Output
>
Xo
Yo
h
x=x,
,
x
2 ,
......
y
value
for
x
Write
the
equation
as a subroutine on line 500.
<
Key
Operation
>
I
E•rE•
I
key is used
for
the
x
value
progression.
In
PRO
mode,
modify the 500 line
equation
as
required.
Note:
Except
for
x
=
nh+x
0
(n=O,
I
,
2.
---)a
proportional allocation
is
made
for
they value between x
0
+(n
-
l)h
and
x
0
+nh.
[
Example]
I. Equation
y'
=
-
x.y
is solvecl
uncler
the
initial condition of
x
0
=
0,
provided
Yo
=
I
0.
However,
assuming h
=
0.0
I
,
T
=
0.03,
y
is
obtained
with
x
=
0.03
,
0
.06 and
so
on.
[
Contents] (Formulas)
Assume
that the equation is
y'
=
f
(x,
y), with its
initial condition of
(x
0 ,
y
0 )
.
With
the
x
value
taken in h
incremen
ts,
sequentially
determine
Yn
of they value in
Xn
=
xo
+
nh
(n=I,
2, ---)
.
The
formulas
for
dete
m1ining
Xn+ 1
and
Yn+
1
from
X
n
and
Yn
are
written
as
foll
ows,
according to
th
e Rungc·Kutta-Gill
method.
y
'
1
'=
y.
+
r
1,
(j.1
=
<t
••
3r1-
(.l1)
k.
.
k1
=
fi
j
(
r
.
+
li/
2
,y
'
11
)
r
2=
(
I
- /J?)(
k1
- <11),
y(2)
~
y
'
1
'+
r
z,
q,
2
=
q.
,+
3
r,-
(
J
- ,/,l?)
k
1 •
k
z=
hf
(
x
.
+
11/
2 .y
'
" )
r,•
(
I
-/J?) (
k,-
q
,)
y
)
=
y
1
+
,
,
.
q.,
=q,,+
3r,
-(
J
-
/
R)
kt,
k
,
=
hj
(
r
.
+
J ,y
'
)
,
,
_
(
l/
6
)(
k,
-
2
q,)
Jl•
-
1
=
y
' -
r._
q,=
q,,+
3
r,
-
(1/
2}
k
,
Thus
Yn•
I
has been determined from Yn
.
Here,
n
= 0,
I
, 2,
-----
The value of
q
0
is
0
(zero)
at
the
start poin
t
x
0
,
and
q
4
is thereafter taken
as
a
new
q
0
.
Do not
sale
this PDF
!!!
-
23
-
I

Advertisement

loading