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

**Download**(direct link)

**:**

**246**> 247 248 249 250 251 252 .. 609 >> Next

TABLE 8.5.4 Exact Solution of y" — 10n2y = 0, y(0) = 1, Ó(0) = —^/\0ÿ and Numerical Solution Using the Runge-Kutta Method with h = 0.01

Ó

t Numerical Exact

0.0 1.0 1.0

0.25 8.3439 X 10---2 8.3438 X 10 2

0.5 6.9631 X 10---3 6.9620 X 10 3

0.75 5.9390 X 10---4 5.8089 X 10 4

1.0 2.0437 X 10---4 4.8469 X 10 -5

1.5 2.2394 X 10---2 3.3744 X 10 -7

2.0 3.2166 2.3492 X 10 -9

2.5 4.6202 X 102 1 .6356 X 10 11

3.0 6.6363 X 104 1.1386 X 10 13

3.5 9.5322 X 106 7.9272 X 10 16

4.0 1.3692 X 109 5.5189 X 10 -18

4.5 1.9667 X 1011 3.8422 X 10 -20

5.0 2.8249 X 1013 2.6750 X 10 22

Some Comments on Numerical Methods. In this chapter we have introduced several numerical methods for approximating the solution of an initial value problem. We have tried to emphasize some important ideas while maintaining a reasonable level of complexity. For one thing, we have always used a uniform step size, whereas production codes currently in use provide for varying the step size as the calculation proceeds.

There are several considerations that must be taken into account in choosing step sizes. Of course, one is accuracy; too large a step size leads to an inaccurate result. Normally, an error tolerance is prescribed in advance and the step size at each step must be consistent with this requirement. As we have seen, the step size must also be chosen so that the method is stable. Otherwise, small errors will grow and soon render the results worthless. Finally, for implicit methods an equation must be solved at each step and the method used to solve the equation may impose additional restrictions on the step size.

In choosing a method one must also balance the considerations of accuracy and stability against the amount of time required to execute each step. An implicit method, such as the Adams-Moulton method, requires more calculations for each step, but if its accuracy and stability permit a larger step size (and consequently fewer steps), then this may more than compensate for the additional calculations. The backward differentiation formulas of moderate order, say, four, are highly stable and are therefore indicated for stiff problems, for which stability is the controlling factor.

Some current production codes also permit the order of the method to be varied, as well as the step size, as the calculation proceeds. The error is estimated at each step and the order and step size are chosen to satisfy the prescribed error tolerance. In practice, Adams methods up to order twelve and backward differentiation formulas up to order five are in use. Higher order backward differentiation formulas are unsuitable due to a lack of stability.

Finally, we note that the smoothness of the function f, that is, the number of continuous derivatives that it possesses, is a factor in choosing the order of the method

454

Chapter 8. Numerical Methods

PROBLEMS

to be used. High order methods lose some of their accuracy if f is not smooth to a corresponding order.

1. To obtain some idea of the possible dangers of small errors in the initial conditions, such as those due to round-off, consider the initial value problem

Ó = t + y - 3, y(0) = 2.

(a) Show that the solution is y = ô1 (t) = 2 — t.

(b) Suppose that in the initial condition a mistake is made and 2.001 is used instead of 2. Determine the solution y = ô2(t) in this case, and compare the difference ô2(¥) — ô1 (t) at t = 1 and as t ^ro.

2. Consider the initial value problem

/ = t2 + ey, y(0) = 0. (i)

Using the Runge-Kutta method with step size h, we obtain the results in Table 8.5.5. These results suggest that the solution has a vertical asymptote between t = 0.9 and t = 1.0.

(a) Show that for 0 < t < 1 the solution y = ô( ¥) of the problem (i) satisfies

Ô2(t) < ô() < ô(), (ii)

where y = ô1 (t) is the solution of

y = 1 + ey, y (0) = 0 (iii)

and y = ô2(t) is the solution of

y = ey, y(0) = 0. (iv)

(b) Determine ô1(´) and ô2(´). Then showthat ô(´) ^ ro for some tbetween t = ln2 = 0.69315 and t = 1.

(c) Solve the differential equations y = ey and y = 1 + ey, respectively, with the initial condition y(0.9) = 3.4298. Use the results to show that ô(¥) when t = 0.932.

TABLE 8.5.5 Calculation of the Solution of the Initial Value Problem / = t2 + ey, y(0) = 0 Using the Runge-Kutta Method

h t = 0.90 t = 1.0

0.02 3.42985 > 1038

0.01 3.42982 > 1038

3. Consider again the initial value problem (16) from Example 2. Investigate how small a step size h must be chosen in order that the error at t = 0.05 and at t = 0.1 is less than 0.0005.

**246**> 247 248 249 250 251 252 .. 609 >> Next