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

**Download**(direct link)

**:**

**231**> 232 233 234 235 236 237 .. 609 >> Next

Another approach is to keep the local truncation error approximately constant throughout the interval by gradually reducing the step size as t increases. In the example problem we would need to reduce h by a factor of about 50 in going from t = 0 to t = 2. A method that provides for variations in the step size is called adaptive. All modern computer codes for solving differential equations have the capability of adjusting the step size as needed. We will return to this question in the next section.

In each of Problems 1 through 6 find approximate values of the solution of the given initial value problem at t = 0.1, 0.2, 0.3, and 0.4.

(a) Use the Euler method with h = 0.05.

(b) Use the Euler method with h = 0.025.

(c) Use the backward Euler method with h = 0.05.

(d) Use the backward Euler method with h = 0.025.

1. Ó = 3 + t - Ó, ó(0) = 1 > 2. Ó = 5t - 3Jy , ó(0) = 2

3. y = 2Ó - 3t, Ó(0) = 1 > 4. / = 2t + â-‘Ó, Ó(0) = 1

5. Ó = ^ ’ Ó(0) = 0.5 > 6. Ó = (t2 - Ó2) sin Ó, ó(0) = -1

428

Chapter 8. Numerical Methods

In each of Problems 7 through 12 find approximate values of the solution of the given initial value problem at t = 0.5, 1.0, 1.5, and 2.0.

(a) Use the Euler method with h = 0.025.

(b) Use the Euler method with h = 0.0125.

(c) Use the backward Euler method with h = 0.025.

(d) Use the backward Euler method with h = 0.0125.

> 7. / = 0.5 — t + 2y, y(0) = 1 > 8. Ó = 5t — 3Jy, y(0) = 2

> 9. Ó = ÓÒÒÓ, y(0) = 3 > 10. y = 2t + e-‘y, y(0) = 1

> 11. / = (4 — ty)/(\ + y2), y(0) = -2

> 12. Ó = (y2 + 2ty)/(3 + t2), y(0) = 0.5

> 13. Complete the calculations leading to the entries in columns three and four of Table 8.1.1.

> 14. Complete the calculations leading to the entries in columns three and four of Table 8.1.2.

15. Using three terms in the Taylor series given in Eq. (12) and taking h = 0.1, determine approximate values of the solution of the illustrative example Ó = 1 — t + 4y, y(0) = 1 at t = 0.1 and 0.2. Compare the results with those using the Euler method and with the exact values.

Hint: If Ó = f (t, y), what is y"?

In each of Problems 16 and 17 estimate the local truncation error for the Euler method in terms of the solution y = ô(). Obtain a bound for en+1 in terms of t and ô(´) that is valid on the interval 0 < t < 1. By using a formula for the solution obtain a more accurate error bound for e 1. For h = 0.1 compute a bound for e1 and compare it with the actual error at t = 0.1. Also compute a bound for the error e4 in the fourth step.

16. y = 2y — 1, y(0) = 1 17. y = 1 — t + 2y, y(0) = 1

In each of Problems 18 through 21 obtain a formula for the local truncation error for the Euler method in terms of t and the solution ô.

18. y = t2 + y2, y(0) = 1 19. y = 5t — 3Jy, y(0) = 2

20. Ó = ÓÒÒÓ, y(1) = 3 21. Ó = 2t + e-ty, y(0) = 1

> 22. Consider the initial value problem

Ó = cos 5n t, y (0) = 1.

(a) Determine the solution y = ô(´) and draw a graph of y = ô(¥) for 0 < t < 1.

(b) Determine approximate values of ô (t) at t = 0.2, 0.4, and 0.6 using the Euler method with h = 0.2. Draw a broken-line graph for the approximate solution and compare it with the graph of the exact solution.

(c) Repeat the computation of part (b) for 0 < t < 0. 4, but take h = 0. 1.

(d) Show by computing the local truncation error that neither of these step sizes is sufficiently small. Determine a value of h to ensure that the local truncation error is less than 0.05 throughout the interval 0 < t < 1. That such a small value of h is required results from the fact that max \ô" (t) \ is large.

23. In this problem we discuss the global truncation error associated with the Euler method for the initial value problem Ó = f (t, y), y(t0) = y0. Assuming that the functions f and fy are continuous in a region R of the ty-plane that includes the point (t0, y0), it can be shown that there exists a constant L such that \ f (t, y) — f (t, y\ < L \y — y\, where (t, y) and (t, y) are any two points in R with the same t coordinate (see Problem 15 of Section 2.8). Further, we assume that ft is continuous, so the solution ô has a continuous second derivative.

8.1 The Euler or Tangent Line Method

429

(a) Using Eq. (20) show that

|En+11 < |En| + h| f[tB,ô(Ï)] - f(tn, Óï)| + 1 h2W(In)l<alEn| + eh2, (i)

where a = 1 + hL and â = max ^"(t)I/2 on t0 < t < tn.

(b) Accepting without proof that if E0 = 0, and if | En | satisfies Eq. (i), then | En |< âh2(aB - 1)/(a - 1) for a = 1, showthat

**231**> 232 233 234 235 236 237 .. 609 >> Next