300 CHAPTER 9. INITIAL VALUE PROBLEMS FOR ODES Source FMM HSL IMSL KMN MATLAB NAG netlib NR NUMAL ODEPACK SLATEC TOMS TOMS 9.8 Table 9.2: Software for ODE initial value problems Runge-Kutta Adams Stiff rkf45 da02 dc03 ivprk ivpag ivpag sdriv2 sdriv2 ode23/ode45 ode113 ode15s/ode23s d02baf d02caf d02eaf dverk ode vode/vodpk odeint stiff rke multistep gms lsode lsode derkf deabm/sdriv1 debdf/sdriv2 gerk(#504) stint(#534) brk45(#669)/rkn(#670) mebdf(#703) Historical Notes and Further Reading Euler proposed his method for initial value problems in 1768. Much of the early impetus for the numerical solution of ordinary differential equations was from celestial mechanics. For example, in 1846 Adams—for whom the classical linear multistep methods are named— finished in a dead heat with Le Verrier in accurately predicting the location at which the planet Neptune would be discovered. Their orbital calculations were based on known but previously unexplained perturbations in the orbit of Uranus. Runge-Kutta methods were developed independently by Runge and Kutta around 1900. Fehlberg’s implementation, which permitted an efficient error estimate, was developed in the 1960s. A practical method based on extrapolation was published by Bulirsch and Stoer in 1966. Gear’s method for solving stiff ODEs was published in 1971, along with a very influential computer program difsub (TOMS #407) implementing the method. Another influential code for solving ODEs was developed at about the same time by Krogh. Multivalue methods were first proposed by Nordsieck in 1962 to address the implementation difficulties of multistep methods. For the equivalence of multistep and multivalue methods, see Skeel [230]. Recent books on the numerical solution of initial value problems for ODEs include [66, 133, 156, 224]. Earlier textbooks and monographs on this topic include [31, 77, 91, 123, 155, 160, 227]. In addition, see the surveys [32, 58, 92, 111, 226, 228, 238]. Practical advice on using ODE software can be found in [223]. For solving differential-algebraic systems, see [22]. Review Questions 9.1 True or false: An ODE whose solution curves are unbounded as time increases is necessarily unstable. 9.2 True or false: In the numerical solution of an ODE, the global error grows only if the equation is unstable. REVIEW QUESTIONS 9.3 True or false: In solving an ODE numerically, the roundoff error and the truncation error are independent of each other. 9.4 True or false: In numerically solving an initial value problem for an ODE, the global truncation error is always at least as large as the sum of the local truncation errors. 9.5 True or false: For solving a stable differential equation numerically, an implicit method is always stable. 9.6 True or false: With an unconditionally stable method, one can take arbitrarily large time steps in numerically solving a stable ODE to achieve a given accuracy. 9.7 True or false: Stiff ODEs are always difficult and expensive to solve. 9.8 (a) In general, does a differential equation, by itself, determine a unique solution? (b) If so, why, and if not, what additional information must be specified to determine a solution uniquely? 9.9 (a) What is meant by a first-order ODE? (b) Why are higher-order ODEs usually transformed into equivalent first-order ODEs before solving them numerically? 9.10 (a) Describe in words the distinction between a stable ODE and an unstable ODE. (b) What is a mathematical criterion for determining the stability of a system of ODEs y 0 = f (t, y)? (c) Can the stability or instability of a system of ODEs change with time? 9.11 Which of the following types of firstorder ODEs are stable? (a) An equation whose solution curves converge toward each other (b) An equation whose Jacobian is negative (c) A stiff equation (d ) An equation with exponentially decaying solutions 9.12 Classify each of the following ODEs as stable, unstable, or neutrally stable. (a) y 0 = y + t. (b) y 0 = y − t. 301 (c) y 0 = t − y. (d ) y 0 = 1. 9.13 How does a typical numerical solution of an ODE differ from an analytical solution? 9.14 (a) What is Euler’s method for solving an ODE? (b) Show how it is derived. 9.15 Describe in words the difference between the local truncation error and the global truncation error in solving an initial value problem for an ODE numerically. 9.16 Under what condition is the global error in solving an initial value problem for an ODE likely to be smaller than the sum of the local errors at each step? 9.17 In solving an ODE numerically, which is usually more significant, rounding error or truncation error? 9.18 (a) Define in words the error amplification factor for one step of a numerical method for solving an initial value problem for an ODE. (b) Does the amplification factor depend only on the equation, only on the method of solution, or on both? (c) What is the value of the amplification factor for one step of Euler’s method? (d ) What stability region does this imply for Euler’s method? 9.19 (a) What is the basic difference between an explicit method and an implicit method for solving an ODE numerically? (b) Comparing these two types of methods, list one relative advantage for each. (c) Name a specific example of a method (or family of methods) of each type. 9.20 The use of an implicit method for solving a nonlinear ODE requires the iterative solution of a nonlinear equation. How can one get a good starting guess for this iteration? 9.21 Is it possible for a numerical solution method to be unstable when applied to a stable ODE? 9.22 What does it mean for a numerical ODE method to be of order p? 302 CHAPTER 9. INITIAL VALUE PROBLEMS FOR ODES 9.23 (a) For solving ODEs, what is the highest-order accuracy that a linear multistep method can have and still be unconditionally stable? (b) Give an example of a method having these properties (by name or by formula). 9.24 Compare the stability regions (i.e., the stability constraints on the stepsize) for the Euler and backward Euler methods for solving a scalar ODE. 9.25 For the backward Euler method, which factor places a stronger restriction on the choice of stepsize: stability or accuracy? 9.26 Which of the following numerical methods for solving a stable ODE numerically are unconditionally stable? (a) Euler’s method (b) Backward Euler method (c) Trapezoid rule 9.27 (a) What is meant by a stiff ODE? (b) Why may a stiff ODE be difficult to solve numerically? 9.33 (a) What is the basic difference between a single-step method and a multistep method for solving an ODE numerically? (b) Comparing these two types of methods, list one relative advantage for each. (c) Name a specific example of a method (or family of methods) of each type. 9.34 List two advantages and two disadvantages of multistep methods compared with classical Runge-Kutta methods for solving ODEs numerically. 9.35 What is the principal drawback of a Taylor series method compared with a RungeKutta method for solving ODEs? 9.36 (a) What is the principal advantage of extrapolation methods for solving ODEs numerically? (b) What are the disadvantages of such methods? 9.37 In using a multistep method to solve an ODE numerically, why might one still need to have a single-step method available? (c) What type of method is appropriate for solving stiff ODEs? 9.38 Why are multistep methods for solving ODEs numerically often used in predictorcorrector pairs? 9.28 Suppose one is using the backward Euler method to solve a nonlinear ODE numerically. The resulting nonlinear algebraic equation at each step must be solved iteratively. If a fixed number of iterations are performed at each step, is the resulting method unconditionally stable? 9.39 If a predictor-corrector method for solving an ODE is implemented as a PECE scheme, does the second evaluation affect the value obtained for the solution at the point being computed? If so, what is the effect, and if not, then why is the second evaluation done? 9.29 Explain why implicit methods are better than explicit methods for solving stiff systems of ODEs numerically. 9.40 List two reasons why multivalue methods are easier to implement than multistep methods for solving ODEs adaptively with automatic error control. 9.30 What is the simplest numerical method that is stable for integrating a stiff ODE? 9.31 For solving ODEs numerically, why is it usually impractical to generate methods of very high accuracy by using many terms in a Taylor series expansion? 9.32 In solving an ODE numerically, with which type of method, Runge-Kutta or multistep, is it easier to supply values for the numerical solution at arbitrary output points within each step? 9.41 For each of the following properties, state which type of ODE method, multistep or classical Runge-Kutta, more accurately fits the description: (a) Self starting (b) More efficient in attaining high accuracy (c) Can be efficient for stiff problems (d ) Easier to program (e) Easier to change stepsize (f ) Easier to obtain a local error estimate EXERCISES 303 (g) Easier to produce output at arbitrary intermediate points within each step 9.42 Give two approaches to starting a multistep method initially when past solution history is not yet available. Exercises 9.1 Write each of the following ODEs as an equivalent first-order system of ODEs: (a) y 00 = t + y + y 0 . (b) y 000 = y 00 + ty. (c) y 000 = y 00 − 2y 0 + y − t + 1. 9.2 Write each of the following ODEs as an equivalent first-order system of ODEs: (a) Van der Pol equation: 00 0 2 y = y (1 − y ) − y. (b) Blasius equation: y 000 = −y y 00 . (c) Newton’s Second Law of Motion for twobody problem: y100 y200 = −GM y1 /(y12 + y22 )3/2 , = −GM y2 /(y12 + y22 )3/2 . 9.3 Is the following system of ODEs stable? y10 y20 = −y1 + y2 , = −2y2 . Explain your answer. 9.4 Consider the ODE y 0 = −5y with initial condition y(0) = 1. We will solve this ODE numerically using a stepsize of h = 0.5. (a) Is this ODE stable? (b) Is Euler’s method stable for this ODE using this stepsize? (c) Compute the numerical value for the approximate solution at t = 0.5 given by Euler’s method. (d ) Is the backward Euler method stable for this ODE using this stepsize? (e) Compute the numerical value for the approximate solution at t = 0.5 given by the backward Euler method. 9.5 With an initial value of y0 = 1 at t0 = 0 and a time step of h = 1, compute the approximate solution value y1 at time t1 = 1 for the ODE y 0 = −y using each of the following two numerical methods. (Your answers should be numbers, not formulas.) (a) Euler’s method (b) Backward Euler method 9.6 For the ODE, initial value, and stepsize given in Example 9.10, prove that fixed-point iteration for solving the implicit equation for y1 is in fact convergent. What is the convergence rate? 9.7 Consider the initial value problem y 00 = y for t ≥ 0, with initial values y(0) = 1 and y 0 (0) = 2. (a) Express this second-order ODE as an equivalent system of two first-order ODEs. (b) What are the corresponding initial conditions for the system of ODEs in part a? (c) Is this a stable system of ODEs? (d ) Perform one step of Euler’s method for this ODE system using a stepsize of h = 0.5. (e) Is Euler’s method stable for this problem using this stepsize? (f ) Is the backward Euler method stable for this problem using this stepsize? 9.8 Consider the initial value problem for the ODE y 0 = −y 2 with the initial condition y(0) = 1. We will use the backward Euler method to compute the approximate value of the solution y1 at time t1 = 0.1 (i.e., take one step using the backward Euler method with stepsize h = 0.1 starting from y0 = 1 at t0 = 0). Since the backward Euler method is implicit, and the ODE is nonlinear, we will need to solve a nonlinear algebraic equation for y1 . 304 CHAPTER 9. INITIAL VALUE PROBLEMS FOR ODES (a) Write out that nonlinear algebraic equation for y1 . (b) Write out the Newton iteration for solving the nonlinear algebraic equation. (c) Obtain a starting guess for the Newton iteration by using one step of Euler’s method for the ODE. (d ) Finally, compute an approximate value for the solution y1 by using one iteration of Newton’s method for the nonlinear algebraic equation. (c) Self-starting 9.9 For solving an ODE y 0 = f (t, y) numerically, each of the following methods, (1) 9.11 The centered difference approximation yk+1 1 = yk + [f (tk , yk ) 2 +f (tk+1 , yk + f (tk , yk )h)]h, (2) yk+1 1 = yk + [3f (tk , yk ) 2 −f (tk−1 , yk−1 )]h, (3) yk+1 1 = yk + [f (tk , yk ) 2 +f (tk+1 , yk+1 )]h is of second order, but the methods also have important differences. For each property listed, state which of the three methods has or have the given property. (a) Single-step method (b) Implicit method (d ) Unconditionally stable (e) Runge-Kutta type method (f ) Good for solving a stiff ODE 9.10 Use the linear ODE y 0 = λy to analyze the accuracy and stability of Heun’s method (see Section 9.6.2). In particular, verify that this method is second-order accurate, and describe or plot its stability region in the complex plane. y0 ≈ yk+1 − yk−1 2h leads to the two-step leapfrog method yk+1 = yk−1 + f (tk , yk )2h for solving the ODE y 0 = f (t, y). Determine the order of accuracy and the stability region of this method. 9.12 Let A be an n × n matrix. Compare and contrast the behavior of the linear difference equation xk+1 = Axk with that of the linear differential equation x0 = Ax. What is the general solution in each case? In each case, what property of the matrix A would imply that the solution remains bounded for any starting vector x0 ? You may assume that the matrix A is diagonalizable. Computer Problems 9.1 The populations of two species, a prey denoted by y1 and predator denoted by y2 , can be modeled by a system of ODEs y10 y20 = by1 − cy1 y2 , = −dy2 + cy1 y2 due to Lotka and Volterra. The parameters b and d govern the birth rate of prey and death rate of predators, respectively, and the param- eter c governs the interaction of the two populations. With the parameter values b = 1, d = 10, and c = 1, and initial conditions y1 (0) = 0.5 and y2 (0) = 1 (the populations are normalized, and we treat them as continuous variables), use a library routine to solve this system numerically, integrating to t = 10. Plot each of the two populations as a function of time, and on a separate graph plot the tra-
© Copyright 2026 Paperzz