Numerical methods for first order differential equations 475
The percentage error in the Runge-Kutta method
when, say, x = 1.6 is:
5.348811636 − 5.348817
5.348811636
×100% = −0.0001%
From Problem 6, page 469, when x = 1.6, the percentage error for the Euler method was 0.688%, and
for the Euler-Cauchy method −0.048%. Clearly, the
Runge-Kutta method is the most accurate of the three
methods.
Now try the following exercise
Exercise 186 Further problems on the
Runge-Kutta method
1. Apply the Runge-Kutta method to solve the
differential equation:
d y
dx
= 3 −
y
x
for the range
1.0(0.1)1.5, given that the initial conditions
that x = 1 when y = 2.
[see Table 49.19]
Table 49.19
n
x n
y n
0
1.0
2.0
1
1.1
2.104545
2
1.2
2.216667
3
1.3
2.334615
4
1.4
2.457143
5
1.5
2.533333
2. Obtain a numerical solution of the differential
equation:
1
x
d y
dx
+ 2y = 1 using the RungeKutta method in the range x = 0(0.2)1.0, given
the initial conditions that x = 0 when y = 1.
[see Table 49.20]
Table 49.20
n
x n
y n
0
0
1.0
1
0.2
0.980395
2
0.4
0.926072
3
0.6
0.848838
4
0.8
0.763649
5
1.0
0.683952
3. (a) The differential equation:
d y
dx
+ 1 = −
y
x
has the initial conditions that y = 1 at
x = 2. Produce a numerical solution of the
differential equation, correct to 6 decimal
places, using the Runge-Kutta method in
the range x = 2.0(0.1)2.5
(b) If the solution of the differential equation by an analytical method is given by:
y =
4
x
−
x
2
determine the percentage error
at x = 2.2
[(a) see Table 49.21 (b) no error]
Table 49.21
n
x n
y n
0
2.0
1.0
1
2.1
0.854762
2
2.2
0.718182
3
2.3
0.589130
4
2.4
0.466667
5
2.5
0.340000
Précédent

- 494/705

Suivant