193
18.7 a Euler’s method:
t y z dydt dzdt
0 2 4 16
-16 0.1 3.6 2.4
3.658049 -10.368
0.2 3.965805 1.3632 -2.35114
-3.68486 0.3 3.730691 0.994714 -3.77687
-1.84568 0.4 3.353004 0.810147 -3.99072
-1.10035
1 2
3 4
5
0.1 0.2
0.3 0.4
y z
b
4
th
-order RK method:
16 4
5 2
2 4
, 2
,
1 1
, 1
= +
− =
=
−
e f
k
16 2
4 2
4 ,
2 ,
2 2
2 ,
1
− =
− =
= f k
2 .
3 05
. 16
4 05
. 8
. 2
05 .
16 2
05 .
= −
= =
+ =
z y
194 336
. 14
2 2
. 3
8 .
2 2
. 3
, 8
. 2
, 05
. 619671
. 9
2 .
3 5
8 .
2 2
2 .
3 ,
8 .
2 ,
05 .
2 2
2 ,
2 05
. 1
1 ,
2
− =
− =
= =
+ −
= =
−
f k
e f
k
2832 .
3 05
. 336
. 14
4 05
. 480984
. 2
05 .
619671 .
9 2
05 .
= −
= =
+ =
z y
3718 .
13 2
2832 .
3 480984
. 2
2832 .
3 ,
480984 .
2 ,
05 .
65342 .
10 2832
. 3
5 480984
. 2
2 2832
. 3
, 480984
. 2
, 05
.
2 2
2 ,
3 05
. 1
1 ,
3
− =
− =
= =
+ −
= =
−
f k
e f
k
662824 .
2 1
. 3718
. 13
4 1
. 065342
. 3
1 .
65342 .
10 2
1 .
= −
= =
+ =
z y
8676 .
10 2
662824 .
2 065342
. 3
662824 .
2 ,
065342 .
3 ,
1 .
916431 .
5 2832
. 3
5 065342
. 3
2 662824
. 2
, 065342
. 3
, 1
.
2 2
2 ,
4 1
. 1
1 ,
4
− =
− =
= =
+ −
= =
−
f k
e f
k
The k’s can then be used to compute the increment functions,
7139 .
13 6
8676 .
10 3718
. 13
336 .
14 2
16 41043
. 10
6 916431
. 5
65342 .
10 619671
. 9
2 16
2 1
− =
− −
− +
− =
= +
+ +
=
φ φ
These slope estimates can then be used to make the prediction for the first step
2.628615 1
. 7139
. 13
4 1
. 3.041043
1 .
41043 .
10 2
1 .
= −
= =
+ =
z y
The remaining steps can be taken in a similar fashion and the results summarized as t y z
0 2 4
0.1 3.041043 2.628615
0.2 3.342571 1.845308
0.3 3.301983 1.410581
0.4 3.107758 1.149986
A plot of these values can be developed.
195
1 2
3 4
5
0.1 0.2
0.3 0.4
y z
18.8 The second-order van der Pol equation can be reexpressed as a system of 2 first-order
ODEs,
y z
y dt
dz z
dt dy
− −
= =
1
2
a
Euler h = 0.2. Here are the first few steps. The remainder of the computation would be implemented in a similar fashion and the results displayed in the plot below.
t y h = 0.2
z h = 0.2 dydt
dzdt 0 1
1 1
-1 0.2 1.2
0.8 0.8
-1.552 0.4 1.36
0.4896 0.4896
-1.77596 0.6 1.45792
0.1344072 0.134407
-1.6092 0.8 1.4848014 -0.187433
-0.18743 -1.25901
b
Euler h = 0.1. Here are the first few steps. The remainder of the computation would be implemented in a similar fashion and the results displayed in the plot below.
t y h = 0.1
z h = 0.1 dydt
dzdt 0 1
1 1
-1 0.1 1.1
0.9 0.9
-1.289 0.2 1.19
0.7711 0.7711
-1.51085 0.3 1.26711
0.6200145 0.620015
-1.64257 0.4 1.3291115
0.4557574 0.455757
-1.67847
196
-4 -3
-2 -1
1 2
3 4
2 4
6 8
10 y h = 0.1
z h = 0.1 y h = 0.2
z h = 0.2
18.9 The second-order equation can be reexpressed as a system of two first-order ODEs,