Graphics Programs Reference
In-Depth Information
=
Noting that y (0)
1, we may proceedwith the integrationas follows:
K 1 =
0
.
1 sin 1
.
0000
=
0
.
0841
1 sin 1
0
.
0841
2
K 2 =
0
.
.
0000
+
=
0
.
0863
y (0
.
1)
=
1
.
0
+
0
.
0863
=
1
.
0863
K 1
=
0
.
1 sin 1
.
0863
=
0
.
0885
1 sin 1
0
.
0885
2
K 2 =
0
.
.
0863
+
=
0
.
0905
y (0
.
2)
=
1
.
0863
+
0
.
0905
=
1
.
1768
and so on. A summary of the computations is shown in the table below.
x
y
K 1
K 2
0
.
0
1
.
0000
0
.
0841
0
.
0863
0
.
1
1
.
0863
0
.
0885
0
.
0905
0
.
2
1
.
1768
0
.
0923
0
.
0940
0
.
3
1
.
2708
0
.
0955
0
.
0968
0
.
4
1
.
3676
0
.
0979
0
.
0988
0
.
5
1
.
4664
The exact solution can be shown to be
=
+
.
x ( y )
ln(csc y
cot y )
0
604582
which yields x (1
5000. Therefore, up to this point the numerical solutionis
accurate to four decimal places. However, it is unlikely thatthis precisionwouldbe
maintainedif we weretocontinue the integration. Since the errors(duetotruncation
androundoff ) tend to accumulate, longerintegrationranges require betterintegration
formulas and moresignificant figures in the computations.
.
4664)
=
0
.
EXAMPLE 7.4
Solve
y =−
1 y
y (0)
0
.
x
y (0)
=
0
=
1
=
=
.
from x
25 with the fourth-order Runge-Kuttamethod.
(This problemwas solvedbythe Taylor series method in Example 7.2.)
0to2inincrements of h
0
Search WWH ::




Custom Search