Books in black and white
 Books Biology Business Chemistry Computers Culture Economics Fiction Games Guide History Management Mathematical Medicine Mental Fitnes Physics Psychology Scince Sport Technics

# Elementary Differential Equations and Boundary Value Problems - Boyce W.E.

Boyce W.E. Elementary Differential Equations and Boundary Value Problems - John Wiley & Sons, 2001. - 1310 p.
Previous << 1 .. 239 240 241 242 243 244 < 245 > 246 247 248 249 250 251 .. 609 >> Next

TABLE 8.5.3 Numerical Approximations to the Solution of the Initial Value Problem Ó = —100ó + 100t + 1, y(0) = 1
t Exact Euler Euler Runge-Kutta Runge-Kutta Backward Euler
0.025 0.0166... 0.0333 ... 0.025 0.1
0.0 1.000000 1 . 000000 1 . 000000 1.000000 1 . 000000 1 . 000000
0.05 0.056738 2.300000 -0.246296 0.470471
0.1 0.100045 5.162500 0.187792 10.6527 0.276796 0.190909
0.2 0.200000 25.8289 0.207707 111.559 0.231257 0.208264
0.4 0.400000 657.241 0.400059 1.24 x 104 0.400977 0.400068
0.6 0.600000 1.68 x 104 0.600000 1.38 x 106 0.600031 0.600001
0.8 0.800000 4.31 x 105 0.800000 1.54 x 108 0.800001 0.800000
1.0 1.000000 1 . 11 x 107 1 . 000000 1.71 x 1010 1 . 000000 1 . 000000
As a final example, consider the problem of determining two linearly independent solutions of the second order linear equation
/- 10ï 2 ó = 0 (18)
for t > 0. The generalization of numerical techniques for the first order equations to higher order equations or to systems of equations is discussed in Section 8.6, but that is not needed for the present discussion. Two linearly independent solutions ofEq. (18) are ô() = coshAAGn t and ô2( t) = sinhyT0n t. The first solution, ô() = cosh t, is generated by the initial conditions ô1 (0) = 1, ô'1 (0) = 0; the second solution, ô2 (t) =
452
Chapter 8. Numerical Methods
sinhvT0nt, is generated by the initial conditions ô2(0) = 0, ô2(0) = ë/Øæ. While analytically we can tell the difference between cosh ë/Øï t and sinh ë/Ò0æ t, for large t we have cosh ë/Ã¯¯ï t ~ e'/10n72andsinhVT0n t ~ e'/10n/2; numerically these two functions look exactly the same if only a fixed number of digits are retained. For example, correct to eight significant figures, we find that for t = 1
sinhV70n = coshV70n = 10,315.894.
If the calculations are carried out on a machine that carries only eight digits, the two solutions ô1 and ô2 are identical at t = 1 and indeed for all t > 1. Thus, even though the solutions are linearly independent, their numerical tabulation would show that they are the same because we can retain only a finite number of digits. This phenomenon is called numerical dependence.
For the present problem we can partially circumvent this difficulty by computing, instead of sinhvT0nt and coshA,/10nt, the linearly independent solutions ô3^) = g-Ëîæt and ô4({) = e-^n 1 corresponding to the initial conditions ô3(0) = 1, ô3(0) = ë/Þï and ô4(0) = 1, ô4 (0) = — Ò¯¯¯æ, respectively. The solution ô3 grows exponentially while ô4 decays exponentially. Even so, we encounter difficulty in calculating ô4 correctly on a large interval. The reason is that at each step of the calculation for ô4 we introduce truncation and round-off errors. Thus at any point tn the data to be used in going to the next point are not precisely the values of ô4(^) and ô'4 (tn). The solution of the initial value problem with these data at tn involves not only e—'/10æ 1 but also e"^^n 1. Because the error in the data at tn is small, the latter function appears with
a very small coefficient. Nevertheless, since å~^æ 1 tends to zero and ^'/10æ 1 grows very rapidly, the latter eventually dominates, and the calculated solution is simply a multiple of e71^1 = ô().
To be specific, suppose that we use the Runge-Kutta method to calculate the solution y = ô() = e~"^n 1 of the initial value problem
Ó — 10æ2 y = 0, y (0) = 1, /(0) = —Ó¯0æ.
(The Runge-Kutta method for second order systems is described in Section 8.6.) Using single-precision (eight-digit) arithmetic with a step size h = 0.01, we obtain the results in Table 8.5.4. It is clearly evident from these results that the numerical solution begins to deviate significantly from the exact solution for t > 0.5, and soon differs from it by many orders of magnitude. The reason is the presence in the numerical solution of a small component of the exponentially growing solution ô3(0 = ^'/10æ 1. With eightdigit arithmetic we can expect a round-off error of the order of 10—8 at each step. Since º~Äîæt grows by a factor of 3.7 x 1021 from t = 0 to t = 5, an error of order 10—8 near t = 0 can produce an error of order 1013 at t = 5 even if no further errors are introduced in the intervening calculations. The results given in Table 8.5.4 demonstrate that this is exactly what happens.
Equation (18) is highly unstable and the behavior shown in this example is typical of unstable problems. One can track a solution accurately for a while, and the interval can be extended by using smaller step sizes or more accurate methods, but eventually the instability in the problem itself takes over and leads to large errors.
8.5 More on Errors; Stability
453
Previous << 1 .. 239 240 241 242 243 244 < 245 > 246 247 248 249 250 251 .. 609 >> Next