Numerical Methods - Initial Value Problems for ODEs

Size: px
Start display at page:

Download "Numerical Methods - Initial Value Problems for ODEs"

Transcription

1 Numerical Methods - Initial Value Problems for ODEs Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

2 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

3 Initial Value Problems & ODEs Definition (Ordinary Differential Equation (ODE)) An ordinary differential equation is an equation that involves one or more derivatives of an univariate function. The solutions for an ODE are differ from each other by a constant. Definition (Initial Value Problem) A solution to the initial value problem (IVP) dy dt = f(t, y), with y(t 0) = y 0 on an interval [t 0, b] is a differential function y = φ(t) such that φ(t 0 ) = y 0 and φ (t) = f(t, φ(t)) for all t [t 0, b] The solution of IVP is unique. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

4 Well-posed Problem Theorem (Well-posed problem) Suppose that D = {(t, y) a t b and < y < } and that f(t, y) is continuous on D. If f satisfies a Lipschitz condition on D, then the initial value problem y(t) = f(t, y), a t b, y(a) = y 0, has a unique solution. Definition (Lipschitz condition) A function f(t, y) is said to satisfy a Lipschitz condition in the variable y on a set D R 2 if there exist a constant L > 0 such that f(t, y 1 ) f(t, y 2 ) < L y 1 y 2, whenever (t, y 1 ) and (t, y 2 ) are in D. The constant L is called a Lipschitz constant for f. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

5 Well-posed Problem Theorem Suppose f(t, y) is defined on a convex set D R 2. If there exists a constant L > 0, such that f (t, y) L, for all (t, y) D, y then f satisfies a Lipschitz condition on D in the variable y with Lipschitz constant L. Example Show that there is a unique solution to the initial value problem y (t) = 1 + t sin(yt), 0 t 2, y(0) = 0. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

6 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

7 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

8 Euler s Method Euler s method is the simplest numerical method for solving well-posed IVP: dy dt = f(t, y), a t b, y(a) = α. First partition / discretise the interval into N + 1 equally spaced mesh points: a = t 0 < t 1 < t 2 < < t N = b, t i = t 0 + ih, i N and h = (b a)/n. Consider the two adjecent mesh points [t i, t i+1 ], from the Taylor s series, y(t i+1 ) = y(t i + h) = y(t i ) + hy (t i ) + h2 2 y (ξ), ξ [t i, t i+1 ]. Write y i as the approximation to the actual solution y(t i ) and substitute y (t i ) = f(t i, y(t i )), we have the Euler s method iteration rule: y i+1 = y i + hf(t i, y i ). The initial starting point of the Euler s method is given by the initial condition y 0 = y(a) = α. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

9 Euler s Method The local discretisation error ɛ i = y(t i + h) y(t i ) hf(t i, y(t i )) is O(h 2 ). However, the global discretisation error E i = y(t i ) y i is O(h). Example Solve the IVP y = (t y)/2 with y(0) = 1 over 0 t 3 with Euler method. ANSWER: MATLAB code : nm06_euler_driver.m (Analytic solution is 3e t/2 2 + t) Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

10 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

11 Taylor Series Method of Order n Theorem Suppose f(t, y) is continuous and satisfies a Lipschitz condition in variable y, and consider the IVP y = f(t, y), a t b, y(a) = α. For the mesh points t i+1 = t i + h, the Taylor series method approximate the solution y(t i+1 ) with the formula: y i+1 = y 0 + d 1 h + d 2 2! h2 + + d n n! hn, for i = 0, 1, 2,..., N, where d i = y (i) (t) evaluated at t i. Note that the global error for the Taylor series method is O(h n ). Example Solve the IVP y = (t y)/2 with y(0) = 1 over 0 t 3 with Taylor series method of order 2. ANSWER: MATLAB code : nm06_taylor2.m Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

12 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

13 Runge-Kutta Method of Order 2 The methods tried to imitate the Taylor series method without requiring analytic differentiation of the ODE. In Euler method: y i+1 = y i + hf(t i, y i ), the slope f(t, y) is evaluated at the start of the interval t i, ie a forward difference scheme. Intuitively, for better accuracy, we could evaluate f(t, y) at the midpoint by using the Euler method first to obtain y i+h/2, then evaluate f(t i+h/2, y i+h/2 ) to get a symmetrical scheme. Because of the symmetry, the local error is reduced by an order (in the step size) and the method is now a second-order method called Runge-Kutta Method of order 2 (RK2) or the midpoint method. The RK2 algorithm: k 1 = hf(t i, y i ) y i+1/2 = y i + k 1 /2 k 2 = hf(t i+1/2, y i+1/2 ) y i+1 = y i + k 2 Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

14 Runge-Kutta Method In general the Runge-Kutta method could be written in the form of y i+1 = y i + w 1 k 1 + w 2 k 2 + w 3 k 3 + w 4 k 4... k 1 = hf(t i, y i ) k 2 = hf(t i + a 1 h, y i + b 1 k 1 ) k 3 = hf(t i + a 2 h, y i + b 2 k 1 + b 3 k 2 ) k 4 = hf(t i + a 3 h, y i + b 4 k 2 + b 5 k 2 + b 6 k 3 ). =., where the constants a i and b i are determined by comparing with the corresponding order of Taylor series method. For example, the 2nd order Taylor series method gives: y(t i+1 ) = y(t i ) + hf(t i, y(t i )) + h2 2 f (t i, y(t i )) + h3 3! f (ξ i, y(ξ i )), and we wish to find the corresponding w 1, w 2, a 1 and b 1 for k 1, k 2 and y i+1 = y i + w 1 k 1 + w 2 k 2. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

15 Runge-Kutta Method From the 2nd order Taylor series method gives: y i+1 = y i + hf(t i, y i ) + h2 2 f (t i, y i ) + O(h 3 ) = y i + hf(t i, y i ) + h2 2 [f t(t i, y i ) + f(t i, y i )f y (t i, y i )] + O(h 3 ). Also, we know k 1 = hf(t i, y i ) and expand k 2 in term of Taylor series k 2 = hf(t i + a 1 h, y i + b 1 k 1 ) = h [f(t i, y i ) + a 1 hf t (t i, y i ) + b 1 k 1 f y (t i, y i )] + O(h 3 ) = h [f(t i, y i ) + a 1 hf t (t i, y i ) + b 1 hf(t i y i )f y (t i, y i )] + O(h 3 ) Substituting k 1 and k 2 into y i+1 = y i + w 1 k 1 + w 2 k 2 get y i+1 = y i + h(w 1 + w 2 )f(t i, y i ) + w 2 h 2 [a 1 f t (t i, y i ) + b 1 f(t i, y i )f y (t i, y i )] Comparing the coefficients we get: w 1 + w 2 = 1, a 1 w 2 = 1 2, b 1w 2 = 1 2. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

16 Runge-Kutta Method Note the there are 3 equations for the four unknown w 1, w 2, a 1 and b 1, therefore we have one degree of freedom in solving the coefficients. Choose w 1 = 0, w 2 = 1, a 1 = b 1 = 1 2 k 1 = hf(t i, y i ) we have the mid-point method: k 2 = hf(t i + h/2, y i + k 1 /2) y i+1 = y i + k 2 It is possible to choose an optimal value for a 1 such that the error O(h 3 ) is minimized. The value chosen is a 1 = 2 3 and thus w 1 = 1 4, w 2 = 3 4, b 1 = 2 3 : k 1 = hf(t i, y i ) k 2 = hf(t i h, y i k 1) y i+1 = y i k k 2 Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

17 Runge-Kutta Method of Order 4 Similarly, the Runge-Kutta Method of Order 4 (RK4) algorithm: k 1 = hf(t i, y i ) k 2 = hf(t i + h 2, y i + k 1 2 ) k 3 = hf(t i + h 2, y i + k 2 2 ) k 4 = hf(t i + h, y i + k 3 ) y i+1 = y i (k 1 + 2k 2 + 2k 3 + k 4 ) Note that RK2 has global truncation error of O(h 2 ), while RK4 has a global truncation error of O(h 4 ). RK4 is a common, optimal and reliable numerical integrator, especially if it is used together with an adaptive step-size control. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

18 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

19 Adaptive Runge-Kutta-Fehlberg (RKF45) Method The RKF45 algorithm: k 1 = hf(t i, y i ) k 2 = hf(t i h, y i k 1) k 3 = hf(t i h, y i k k 2) k 4 = hf(t i h, y i k k k 3) k 5 = hf(t i + h, y i k 1 8k k k 4) k 6 = hf(t i h, y i 8 27 k 1 + 2k k k k 5) ỹ i+1 = y i k k k k 5 y i+1 = y i k k k k k 6 Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

20 Adaptive Runge-Kutta-Fehlberg (RKF45) Method The RKF45 algorithm gives two estimates for y(t i ), ie: 4th order estimate : ỹ i+1; and 5th order estimate : y i+1. The difference between the two estimates gives the local truncation error. ie. ɛ = ỹ i+1 y i+1 O(h 5 ). A simple adaptive scheme: Choose an acceptable error ɛ 0. Suppse we did a calculation with step size h c and error ɛ c, then a new step-size that will produce error ɛ 0 is h 0 = h c(ɛ 0/ɛ c) 1/5. Hence, If ɛ c ɛ 0, accept the calculation with current step-size h c, but change the next step size to h 0. If ɛ c > ɛ 0, reject y i+1 and repeat the calculation with step-size h 0. The Matlab command ode45 implement a variant of RK45 with adaptive step control. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

21 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

22 Multistep Methods Multistep methods make use of the information from several previous mesh points to compute the value at the new mesh point. Consider y (t) = f(t, y), integrate over [t i, t i+1 ] and we have: y(t i+1 ) = y(t i ) + ti+1 t i f(t, y(t)) dt. As y(t i+1 ) is unknown, we cannot evaluate the integral explicitly. Instead, we rely on interpolating the integrand with a polynomial. For example, let say we know the value of (t i, y(t i )) and we are approximating f(t, y) with interpolating polynomial of degree 0 (ie a horizontal line), then f(t, y) = f(t i, y(t i )) + (t t i )f (τ i, y(τ i )) where τ i [t i, t i+1 ]. Integrating over [t i, t i+1 ] and let h = t i+1 t i, gives y(t i+1 ) = y(t i ) + hf(t i, y(t i )) + h2 2 f (ξ i, y(ξ)), Which is the one-step Euler method y i+1 = y i + hf(t i, y i ). Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

23 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

24 Adams-Bashforth Explicit Methods Continue along the idea, now we use interpolating polynomial through the two points (t i, y(t i )) and (t i 1, y(t i 1 )) for f(t, y): ti+1 { y(t i+1 ) = y(t i ) + f(t i, y(t i )) + (t t i ) f(t i, y(t i )) f(t i 1, y(t i 1 )) t i h + (t t } i)(t t i 1 ) f (τ i, y(τ i )) dt 2! = y(t i ) + h 2 {3f(t i, y(t i )) f(t i 1, y(t i 1 ))} h3 f (ξ i, y(ξ i )) Two-step Adams-Bashforth method: y i+1 = y i + h 2 [3f(t i, y i ) f(t i 1, y i 1 )] h3 f (ξ i, y(ξ i )) Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

25 Adams-Bashforth Explicit Methods One-step Adams-Bashforth: y i+1 = y i + hf(t i, y i ) + h2 2 f (ξ i, y(ξ i )) Two-step Adams-Bashforth: y i+1 = y i + h 2 [3f(t i, y i ) f(t i 1, y i 1 )] h3 f (ξ i, y(ξ i )) Three-step Adams-Bashforth: y i+1 = y i + h 12 [23f(t i, y i ) 16f(t i 1, y i 1 ) + 5f(t i 2, y i 2 )] h4 f (ξ i, y(ξ i )) Four-step Adams-Bashforth: y i+1 = y i + h 24 [55f(t i, y i ) 59f(t i 1, y i 1 ) + 37f(t i 2, y i 2 ) 9f(t i 3, y i 3 )] h5 f (4) (ξ i, y(ξ i )) Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

26 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

27 Adams-Moulton Implicit Methods Now we also include (t i+1, y(t i+1 )) as additional interpolation node, then we have the Implicit formula. For example, use (t i+1, y(t i+1 )) and (t i, y(t i )) ti+1 { y(t i+1 ) = y(t i ) + f(t i, y(t i )) t t i+1 t t i + f(t i+1, y(t i+1 )) t i t i t i+1 t i+1 t i + (t t } i)(t t i 1 ) f (τ i, y(τ i )) dt 2! = y(t i ) + h 2 {f(t i, y(t i )) f(t i+1, y(t i+1 ))} 1 12 h3 f (ξ i, y(ξ i )) One-step Adams-Moulton implicit method: y i+1 = y i + h 2 [f(t i, y i ) f(t i+1, y i+1 )] 1 12 h3 f (ξ i, y(ξ i )) Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

28 Adams-Moulton Implicit Methods One-step Adams-Moulton: y i+1 = y i + h 2 [f(t i+1, y i+1 ) + f(t i, y i )] 1 12 h3 f (ξ i, y(ξ i )) Two-step Adams-Moulton: y i+1 = y i + h 12 [5f(t i+1, y i+1 )+8f(t i, y i ) f(t i 1, y i 1 )] 1 24 h4 f (ξ i, y(ξ i )) Three-step Adams-Moulton: y i+1 = y i + h 24 [9f(t i+1, y i+1 ) + 19f(t i, y i ) 5f(t i 1, y i 1 ) +f(t i 2, y i 2 )] h5 f (4) (ξ i, y(ξ i )) Four-step Adams-Moulton: y i+1 = y i + h 720 [251f(t i+1, y i+1 ) + 646f(t i, y i ) 264f(t i 1, y i 1 ) +106f(t i 2, y i 2 ) 19f(t i 3, y i 3 )] h6 f (5) (ξ i, y(ξ i )) Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

29 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

30 Predictor-Corrector Methods One weakness the Adams-Moulton implicit formula is it not always possible to algebraically re-arrangethe formula to make y(t i+1 ) explicit. However, combine with Adams-Bashforth explicit formula to form a predictor-corrector pairs. The simplest example will be the so-called leapfrog algorithm: Predictor (1-step AB) : p i+1 = y i + hf(t i, y i) Corrector (1-step AM) : y i+1 = y i + h [f(ti+1, pi+1) + f(ti, yi)] 2 Another commonly used method will be the 4th Order Adams-Bashforth-Moulton methods: Predictor : p i+1 = y i + h [55fi 59fi fi 2 9fi 3] 24 Corrector : y i+1 = y i + h [9fi fi 5fi 1 + fi 2], where 2 f i+1 = f(t i+1, p i+1) Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

31 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

32 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

33 Convergence Stability of ODE scheme depends on the nature of IVP. Eg, Euler scheme diverges for y = λy, y(0) = α, but converges for y = λy. For convergent solution curves, the local errors at each step are reduced over t, and accumulative global error may be less than the sum of the local errors. Theorem For an initial value problem: y = f(t, y), y(0) = α if f y > δ for some positive δ, then the solution curve diverges. if f y < δ, then the solution curve converges. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

34 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

35 Stability Even if the IVP is convergent, it could still be unstable due to large h. Example Consider IVP y = (t y)/2, y(0) = 1. We know that f y (t) = 1/2 for all t [0, 50], thus the Euler method should be convergent. However, the numerical solution y(t) by using Euler method for for h = 2.5 is convergent but diverge for h = 5. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

36 Stability Consider a linear (or linearized) ODE: y = λy, and discretized, say by Euler method (of course could be other method). Then, we have y i+1 = y i hλy i. The absolute stability function is defined as Q(hλ) = y i+1 y i. In the case for Euler method, we have Q(hλ) = (1 hλ). If the amplification factor Q(hλ) < 1, then we are guaranteed that the sequence {y i } will not grow without bound, and hence stable. Assuming that λ is real, then for the Euler method to be stable we need 1 < 1 λh < 1 or 0 < λh < 2, ie h < 2/λ in order for the Euler method to be stable. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

37 Stability The following figure shows an IVP (y = 10y, y(0) = 1) solved by Euler method with different values of step size h. Note that the numerical solution curves become unstable when h 2/c = Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

38 Outline 1 Initial Value Problems & ODEs 2 Single Step Methods Euler s Method Taylor Series Method of Order n Runge-Kutta Method Adaptive Runge-Kutta-Fehlber Method 3 Multistep Methods Adams-Bashforth Explicit Methods Adams-Mouton Implicit Methods Predictor-Corrector Methods 4 Convergence and Stability Convergence Stability Function 5 Higher Order ODE Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

39 Higher Order ODE & System of ODEs Higher order ODE can be solved numerically by turning into a system of first order ODEs. Consider IVP of order n: y (n) = f(t, y, y,..., y (n 1) ), y(0) = α 0, y (0) = α 1,..., y (n 1) = α n 1. Define new variables x 1, x 2,..., x n : x 1 = y, x 2 = y,..., x n = y (n 1). Now the IVP is equivalent to x 1 = x 2, x 1 (0) = α 0 x 2 = x 3, x 2 (0) = α 1. x n = f(t, x 1, x 2,..., x n ), x n = α n 1 In vector notation: X = F(t, X), X(0) = A, where X = [x 1, x 2,..., x n ] T, F = [x 2, x 3,..., f] T and A = [α 0, α 1,..., α n 1 ]. Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

40 System of First Order ODEs Solve the system of first order ODEs numerically are very much like solving a single first order ODEs. For example, consider to solve X (t) = F(t, X), X(0) = A with a Runge-Kutta method of order 4, we have Discretise the time interval [a, b] into n subdivisions with h = (b a)/n. RK4 iteration formula: X i+1 = X i + h [k1 + 2k2 + 2k3 + k4], where 6 k 1 = hf(t, X) k 2 = hf(t h, X k1) k 3 = hf(t h, X k2) k 4 = hf(t + h, X + k 3) Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

41 System of ODEs (Example) Example Solve y = 4y, y(0) = 0, y (0) = 2. ANSWER: MATLAB code : nm06_system.m Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

42 System of ODEs (Example) Example (Lorenz system) Solve the Lorenz system: x = σ(y x) y = x(ρ z) y z = xy βz with the values σ = 3, ρ = 26.5 and β = 1. ANSWER: MATLAB code : nm06_lorenz.m Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

43 THE END Y. K. Goh (UTAR) Numerical Methods - Initial Value Problems for ODEs / 43

Fourth Order RK-Method

Fourth Order RK-Method Fourth Order RK-Method The most commonly used method is Runge-Kutta fourth order method. The fourth order RK-method is y i+1 = y i + 1 6 (k 1 + 2k 2 + 2k 3 + k 4 ), Ordinary Differential Equations (ODE)

More information

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations Initial value problems for ordinary differential equations Xiaojing Ye, Math & Stat, Georgia State University Spring 2019 Numerical Analysis II Xiaojing Ye, Math & Stat, Georgia State University 1 IVP

More information

Numerical Differential Equations: IVP

Numerical Differential Equations: IVP Chapter 11 Numerical Differential Equations: IVP **** 4/16/13 EC (Incomplete) 11.1 Initial Value Problem for Ordinary Differential Equations We consider the problem of numerically solving a differential

More information

Applied Math for Engineers

Applied Math for Engineers Applied Math for Engineers Ming Zhong Lecture 15 March 28, 2018 Ming Zhong (JHU) AMS Spring 2018 1 / 28 Recap Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method

More information

multistep methods Last modified: November 28, 2017 Recall that we are interested in the numerical solution of the initial value problem (IVP):

multistep methods Last modified: November 28, 2017 Recall that we are interested in the numerical solution of the initial value problem (IVP): MATH 351 Fall 217 multistep methods http://www.phys.uconn.edu/ rozman/courses/m351_17f/ Last modified: November 28, 217 Recall that we are interested in the numerical solution of the initial value problem

More information

Jim Lambers MAT 772 Fall Semester Lecture 21 Notes

Jim Lambers MAT 772 Fall Semester Lecture 21 Notes Jim Lambers MAT 772 Fall Semester 21-11 Lecture 21 Notes These notes correspond to Sections 12.6, 12.7 and 12.8 in the text. Multistep Methods All of the numerical methods that we have developed for solving

More information

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations ECE257 Numerical Methods and Scientific Computing Ordinary Differential Equations Today s s class: Stiffness Multistep Methods Stiff Equations Stiffness occurs in a problem where two or more independent

More information

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester

Review Higher Order methods Multistep methods Summary HIGHER ORDER METHODS. P.V. Johnson. School of Mathematics. Semester HIGHER ORDER METHODS School of Mathematics Semester 1 2008 OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE 1 REVIEW 2 HIGHER ORDER METHODS 3 MULTISTEP METHODS 4 SUMMARY OUTLINE

More information

Initial-Value Problems for ODEs. Introduction to Linear Multistep Methods

Initial-Value Problems for ODEs. Introduction to Linear Multistep Methods Initial-Value Problems for ODEs Introduction to Linear Multistep Methods Numerical Analysis (9th Edition) R L Burden & J D Faires Beamer Presentation Slides prepared by John Carroll Dublin City University

More information

Numerical Methods - Boundary Value Problems for ODEs

Numerical Methods - Boundary Value Problems for ODEs Numerical Methods - Boundary Value Problems for ODEs Y. K. Goh Universiti Tunku Abdul Rahman 2013 Y. K. Goh (UTAR) Numerical Methods - Boundary Value Problems for ODEs 2013 1 / 14 Outline 1 Boundary Value

More information

Math 128A Spring 2003 Week 12 Solutions

Math 128A Spring 2003 Week 12 Solutions Math 128A Spring 2003 Week 12 Solutions Burden & Faires 5.9: 1b, 2b, 3, 5, 6, 7 Burden & Faires 5.10: 4, 5, 8 Burden & Faires 5.11: 1c, 2, 5, 6, 8 Burden & Faires 5.9. Higher-Order Equations and Systems

More information

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9

Lecture Notes to Accompany. Scientific Computing An Introductory Survey. by Michael T. Heath. Chapter 9 Lecture Notes to Accompany Scientific Computing An Introductory Survey Second Edition by Michael T. Heath Chapter 9 Initial Value Problems for Ordinary Differential Equations Copyright c 2001. Reproduction

More information

Lecture Notes on Numerical Differential Equations: IVP

Lecture Notes on Numerical Differential Equations: IVP Lecture Notes on Numerical Differential Equations: IVP Professor Biswa Nath Datta Department of Mathematical Sciences Northern Illinois University DeKalb, IL. 60115 USA E mail: dattab@math.niu.edu URL:

More information

Scientific Computing: An Introductory Survey

Scientific Computing: An Introductory Survey Scientific Computing: An Introductory Survey Chapter 9 Initial Value Problems for Ordinary Differential Equations Prof. Michael T. Heath Department of Computer Science University of Illinois at Urbana-Champaign

More information

Ordinary Differential Equations

Ordinary Differential Equations CHAPTER 8 Ordinary Differential Equations 8.1. Introduction My section 8.1 will cover the material in sections 8.1 and 8.2 in the book. Read the book sections on your own. I don t like the order of things

More information

8.1 Introduction. Consider the initial value problem (IVP):

8.1 Introduction. Consider the initial value problem (IVP): 8.1 Introduction Consider the initial value problem (IVP): y dy dt = f(t, y), y(t 0)=y 0, t 0 t T. Geometrically: solutions are a one parameter family of curves y = y(t) in(t, y)-plane. Assume solution

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 6 Chapter 20 Initial-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Multistep Methods Gustaf Söderlind Numerical Analysis, Lund University Contents V4.16 1. Runge Kutta methods 2. Embedded RK methods

More information

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations

CS 450 Numerical Analysis. Chapter 9: Initial Value Problems for Ordinary Differential Equations Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

COSC 3361 Numerical Analysis I Ordinary Differential Equations (II) - Multistep methods

COSC 3361 Numerical Analysis I Ordinary Differential Equations (II) - Multistep methods COSC 336 Numerical Analysis I Ordinary Differential Equations (II) - Multistep methods Fall 2005 Repetition from the last lecture (I) Initial value problems: dy = f ( t, y) dt y ( a) = y 0 a t b Goal:

More information

Consistency and Convergence

Consistency and Convergence Jim Lambers MAT 77 Fall Semester 010-11 Lecture 0 Notes These notes correspond to Sections 1.3, 1.4 and 1.5 in the text. Consistency and Convergence We have learned that the numerical solution obtained

More information

Ordinary differential equations - Initial value problems

Ordinary differential equations - Initial value problems Education has produced a vast population able to read but unable to distinguish what is worth reading. G.M. TREVELYAN Chapter 6 Ordinary differential equations - Initial value problems In this chapter

More information

9.6 Predictor-Corrector Methods

9.6 Predictor-Corrector Methods SEC. 9.6 PREDICTOR-CORRECTOR METHODS 505 Adams-Bashforth-Moulton Method 9.6 Predictor-Corrector Methods The methods of Euler, Heun, Taylor, and Runge-Kutta are called single-step methods because they use

More information

Euler s Method, cont d

Euler s Method, cont d Jim Lambers MAT 461/561 Spring Semester 009-10 Lecture 3 Notes These notes correspond to Sections 5. and 5.4 in the text. Euler s Method, cont d We conclude our discussion of Euler s method with an example

More information

Mathematics for chemical engineers. Numerical solution of ordinary differential equations

Mathematics for chemical engineers. Numerical solution of ordinary differential equations Mathematics for chemical engineers Drahoslava Janovská Numerical solution of ordinary differential equations Initial value problem Winter Semester 2015-2016 Outline 1 Introduction 2 One step methods Euler

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 6 Chapter 20 Initial-Value Problems PowerPoints organized by Dr. Michael R. Gustafson II, Duke University All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

CS520: numerical ODEs (Ch.2)

CS520: numerical ODEs (Ch.2) .. CS520: numerical ODEs (Ch.2) Uri Ascher Department of Computer Science University of British Columbia ascher@cs.ubc.ca people.cs.ubc.ca/ ascher/520.html Uri Ascher (UBC) CPSC 520: ODEs (Ch. 2) Fall

More information

1 Error Analysis for Solving IVP

1 Error Analysis for Solving IVP cs412: introduction to numerical analysis 12/9/10 Lecture 25: Numerical Solution of Differential Equations Error Analysis Instructor: Professor Amos Ron Scribes: Yunpeng Li, Mark Cowlishaw, Nathanael Fillmore

More information

NUMERICAL SOLUTION OF ODE IVPs. Overview

NUMERICAL SOLUTION OF ODE IVPs. Overview NUMERICAL SOLUTION OF ODE IVPs 1 Quick review of direction fields Overview 2 A reminder about and 3 Important test: Is the ODE initial value problem? 4 Fundamental concepts: Euler s Method 5 Fundamental

More information

Module 4: Numerical Methods for ODE. Michael Bader. Winter 2007/2008

Module 4: Numerical Methods for ODE. Michael Bader. Winter 2007/2008 Outlines Module 4: for ODE Part I: Basic Part II: Advanced Lehrstuhl Informatik V Winter 2007/2008 Part I: Basic 1 Direction Fields 2 Euler s Method Outlines Part I: Basic Part II: Advanced 3 Discretized

More information

Lecture 5: Single Step Methods

Lecture 5: Single Step Methods Lecture 5: Single Step Methods J.K. Ryan@tudelft.nl WI3097TU Delft Institute of Applied Mathematics Delft University of Technology 1 October 2012 () Single Step Methods 1 October 2012 1 / 44 Outline 1

More information

Part IB Numerical Analysis

Part IB Numerical Analysis Part IB Numerical Analysis Definitions Based on lectures by G. Moore Notes taken by Dexter Chua Lent 206 These notes are not endorsed by the lecturers, and I have modified them (often significantly) after

More information

Ordinary Differential Equations: Initial Value problems (IVP)

Ordinary Differential Equations: Initial Value problems (IVP) Chapter Ordinary Differential Equations: Initial Value problems (IVP) Many engineering applications can be modeled as differential equations (DE) In this book, our emphasis is about how to use computer

More information

2 Numerical Methods for Initial Value Problems

2 Numerical Methods for Initial Value Problems Numerical Analysis of Differential Equations 44 2 Numerical Methods for Initial Value Problems Contents 2.1 Some Simple Methods 2.2 One-Step Methods Definition and Properties 2.3 Runge-Kutta-Methods 2.4

More information

You may not use your books, notes; calculators are highly recommended.

You may not use your books, notes; calculators are highly recommended. Math 301 Winter 2013-14 Midterm 1 02/06/2014 Time Limit: 60 Minutes Name (Print): Instructor This exam contains 8 pages (including this cover page) and 6 problems. Check to see if any pages are missing.

More information

Multistep Methods for IVPs. t 0 < t < T

Multistep Methods for IVPs. t 0 < t < T Multistep Methods for IVPs We are still considering the IVP dy dt = f(t,y) t 0 < t < T y(t 0 ) = y 0 So far we have looked at Euler s method, which was a first order method and Runge Kutta (RK) methods

More information

Ordinary differential equation II

Ordinary differential equation II Ordinary Differential Equations ISC-5315 1 Ordinary differential equation II 1 Some Basic Methods 1.1 Backward Euler method (implicit method) The algorithm looks like this: y n = y n 1 + hf n (1) In contrast

More information

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS The general form of a first order differential equations is = f(x, y) with initial condition y(a) = y a We seek the solution y = y(x) for x > a This is shown

More information

AN OVERVIEW. Numerical Methods for ODE Initial Value Problems. 1. One-step methods (Taylor series, Runge-Kutta)

AN OVERVIEW. Numerical Methods for ODE Initial Value Problems. 1. One-step methods (Taylor series, Runge-Kutta) AN OVERVIEW Numerical Methods for ODE Initial Value Problems 1. One-step methods (Taylor series, Runge-Kutta) 2. Multistep methods (Predictor-Corrector, Adams methods) Both of these types of methods are

More information

Numerical solution of ODEs

Numerical solution of ODEs Numerical solution of ODEs Arne Morten Kvarving Department of Mathematical Sciences Norwegian University of Science and Technology November 5 2007 Problem and solution strategy We want to find an approximation

More information

Initial value problems for ordinary differential equations

Initial value problems for ordinary differential equations AMSC/CMSC 660 Scientific Computing I Fall 2008 UNIT 5: Numerical Solution of Ordinary Differential Equations Part 1 Dianne P. O Leary c 2008 The Plan Initial value problems (ivps) for ordinary differential

More information

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of Scientific Computing with Case Studies SIAM Press, 2009 http://www.cs.umd.edu/users/oleary/sccswebpage Lecture Notes for Unit V Solution of Differential Equations Part 1 Dianne P. O Leary c 2008 1 The

More information

4 Stability analysis of finite-difference methods for ODEs

4 Stability analysis of finite-difference methods for ODEs MATH 337, by T. Lakoba, University of Vermont 36 4 Stability analysis of finite-difference methods for ODEs 4.1 Consistency, stability, and convergence of a numerical method; Main Theorem In this Lecture

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations Numerical Methods for Differential Equations Chapter 2: Runge Kutta and Linear Multistep methods Gustaf Söderlind and Carmen Arévalo Numerical Analysis, Lund University Textbooks: A First Course in the

More information

Chap. 20: Initial-Value Problems

Chap. 20: Initial-Value Problems Chap. 20: Initial-Value Problems Ordinary Differential Equations Goal: to solve differential equations of the form: dy dt f t, y The methods in this chapter are all one-step methods and have the general

More information

Physics 584 Computational Methods

Physics 584 Computational Methods Physics 584 Computational Methods Introduction to Matlab and Numerical Solutions to Ordinary Differential Equations Ryan Ogliore April 18 th, 2016 Lecture Outline Introduction to Matlab Numerical Solutions

More information

Chapter 10. Initial value Ordinary Differential Equations

Chapter 10. Initial value Ordinary Differential Equations Chapter 10 Initial value Ordinary Differential Equations Consider the problem of finding a function y(t) that satisfies the following ordinary differential equation (ODE): dy dt = f(t, y), a t b. The function

More information

Ordinary Differential Equations I

Ordinary Differential Equations I Ordinary Differential Equations I CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations I 1 / 32 Theme of Last Few

More information

5.6 Multistep Methods

5.6 Multistep Methods 5.6 Multistep Methods 1 Motivation: Consider IVP: yy = ff(tt, yy), aa tt bb, yy(aa) = αα. To compute solution at tt ii+1, approximate solutions at mesh points tt 0, tt 1, tt 2, tt ii are already obtained.

More information

Linear Multistep Methods I: Adams and BDF Methods

Linear Multistep Methods I: Adams and BDF Methods Linear Multistep Methods I: Adams and BDF Methods Varun Shankar January 1, 016 1 Introduction In our review of 5610 material, we have discussed polynomial interpolation and its application to generating

More information

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations

Finite Differences for Differential Equations 28 PART II. Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 28 PART II Finite Difference Methods for Differential Equations Finite Differences for Differential Equations 29 BOUNDARY VALUE PROBLEMS (I) Solving a TWO

More information

MTH 452/552 Homework 3

MTH 452/552 Homework 3 MTH 452/552 Homework 3 Do either 1 or 2. 1. (40 points) [Use of ode113 and ode45] This problem can be solved by a modifying the m-files odesample.m and odesampletest.m available from the author s webpage.

More information

Math 128A Spring 2003 Week 11 Solutions Burden & Faires 5.6: 1b, 3b, 7, 9, 12 Burden & Faires 5.7: 1b, 3b, 5 Burden & Faires 5.

Math 128A Spring 2003 Week 11 Solutions Burden & Faires 5.6: 1b, 3b, 7, 9, 12 Burden & Faires 5.7: 1b, 3b, 5 Burden & Faires 5. Math 128A Spring 2003 Week 11 Solutions Burden & Faires 5.6: 1b, 3b, 7, 9, 12 Burden & Faires 5.7: 1b, 3b, 5 Burden & Faires 5.8: 1b, 3b, 4 Burden & Faires 5.6. Multistep Methods 1. Use all the Adams-Bashforth

More information

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 2. Predictor-Corrector Methods

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 2. Predictor-Corrector Methods Numerical Analysis by Dr. Anita Pal Assistant Professor Department of Matematics National Institute of Tecnology Durgapur Durgapur-7109 email: anita.buie@gmail.com 1 . Capter 8 Numerical Solution of Ordinary

More information

Math Numerical Analysis Homework #4 Due End of term. y = 2y t 3y2 t 3, 1 t 2, y(1) = 1. n=(b-a)/h+1; % the number of steps we need to take

Math Numerical Analysis Homework #4 Due End of term. y = 2y t 3y2 t 3, 1 t 2, y(1) = 1. n=(b-a)/h+1; % the number of steps we need to take Math 32 - Numerical Analysis Homework #4 Due End of term Note: In the following y i is approximation of y(t i ) and f i is f(t i,y i ).. Consider the initial value problem, y = 2y t 3y2 t 3, t 2, y() =.

More information

Do not turn over until you are told to do so by the Invigilator.

Do not turn over until you are told to do so by the Invigilator. UNIVERSITY OF EAST ANGLIA School of Mathematics Main Series UG Examination 216 17 INTRODUCTION TO NUMERICAL ANALYSIS MTHE612B Time allowed: 3 Hours Attempt QUESTIONS 1 and 2, and THREE other questions.

More information

Lecture 4: Numerical solution of ordinary differential equations

Lecture 4: Numerical solution of ordinary differential equations Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor

More information

Introduction to the Numerical Solution of IVP for ODE

Introduction to the Numerical Solution of IVP for ODE Introduction to the Numerical Solution of IVP for ODE 45 Introduction to the Numerical Solution of IVP for ODE Consider the IVP: DE x = f(t, x), IC x(a) = x a. For simplicity, we will assume here that

More information

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods

Chapter 8. Numerical Solution of Ordinary Differential Equations. Module No. 1. Runge-Kutta Methods Numerical Analysis by Dr. Anita Pal Assistant Professor Department of Mathematics National Institute of Technology Durgapur Durgapur-71309 email: anita.buie@gmail.com 1 . Chapter 8 Numerical Solution of

More information

Solving Ordinary Differential equations

Solving Ordinary Differential equations Solving Ordinary Differential equations Taylor methods can be used to build explicit methods with higher order of convergence than Euler s method. The main difficult of these methods is the computation

More information

Ordinary Differential Equations I

Ordinary Differential Equations I Ordinary Differential Equations I CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Doug James (and Justin Solomon) CS 205A: Mathematical Methods Ordinary Differential Equations I 1 / 35

More information

Ordinary Differential Equations II

Ordinary Differential Equations II Ordinary Differential Equations II CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations II 1 / 33 Almost Done! Last

More information

Solving PDEs with PGI CUDA Fortran Part 4: Initial value problems for ordinary differential equations

Solving PDEs with PGI CUDA Fortran Part 4: Initial value problems for ordinary differential equations Solving PDEs with PGI CUDA Fortran Part 4: Initial value problems for ordinary differential equations Outline ODEs and initial conditions. Explicit and implicit Euler methods. Runge-Kutta methods. Multistep

More information

Solving Ordinary Differential Equations

Solving Ordinary Differential Equations Solving Ordinary Differential Equations Sanzheng Qiao Department of Computing and Software McMaster University March, 2014 Outline 1 Initial Value Problem Euler s Method Runge-Kutta Methods Multistep Methods

More information

CHAPTER 5: Linear Multistep Methods

CHAPTER 5: Linear Multistep Methods CHAPTER 5: Linear Multistep Methods Multistep: use information from many steps Higher order possible with fewer function evaluations than with RK. Convenient error estimates. Changing stepsize or order

More information

Ordinary Differential Equations II

Ordinary Differential Equations II Ordinary Differential Equations II CS 205A: Mathematical Methods for Robotics, Vision, and Graphics Justin Solomon CS 205A: Mathematical Methods Ordinary Differential Equations II 1 / 29 Almost Done! No

More information

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University

PowerPoints organized by Dr. Michael R. Gustafson II, Duke University Part 5 Chapter 21 Numerical Differentiation PowerPoints organized by Dr. Michael R. Gustafson II, Duke University 1 All images copyright The McGraw-Hill Companies, Inc. Permission required for reproduction

More information

Integration of Ordinary Differential Equations

Integration of Ordinary Differential Equations Integration of Ordinary Differential Equations Com S 477/577 Nov 7, 00 1 Introduction The solution of differential equations is an important problem that arises in a host of areas. Many differential equations

More information

Notes for Numerical Analysis Math 5466 by S. Adjerid Virginia Polytechnic Institute and State University (A Rough Draft) Contents Numerical Methods for ODEs 5. Introduction............................

More information

Chapter 6 - Ordinary Differential Equations

Chapter 6 - Ordinary Differential Equations Chapter 6 - Ordinary Differential Equations 7.1 Solving Initial-Value Problems In this chapter, we will be interested in the solution of ordinary differential equations. Ordinary differential equations

More information

Numerical Methods for the Solution of Differential Equations

Numerical Methods for the Solution of Differential Equations Numerical Methods for the Solution of Differential Equations Markus Grasmair Vienna, winter term 2011 2012 Analytical Solutions of Ordinary Differential Equations 1. Find the general solution of the differential

More information

The family of Runge Kutta methods with two intermediate evaluations is defined by

The family of Runge Kutta methods with two intermediate evaluations is defined by AM 205: lecture 13 Last time: Numerical solution of ordinary differential equations Today: Additional ODE methods, boundary value problems Thursday s lecture will be given by Thomas Fai Assignment 3 will

More information

1 Ordinary Differential Equations

1 Ordinary Differential Equations Ordinary Differential Equations.0 Mathematical Background.0. Smoothness Definition. A function f defined on [a, b] is continuous at ξ [a, b] if lim x ξ f(x) = f(ξ). Remark Note that this implies existence

More information

Numerical methods for solving ODEs

Numerical methods for solving ODEs Chapter 2 Numerical methods for solving ODEs We will study two methods for finding approximate solutions of ODEs. Such methods may be used for (at least) two reasons the ODE does not have an exact solution

More information

HIGHER ORDER METHODS. There are two principal means to derive higher order methods. b j f(x n j,y n j )

HIGHER ORDER METHODS. There are two principal means to derive higher order methods. b j f(x n j,y n j ) HIGHER ORDER METHODS There are two principal means to derive higher order methods y n+1 = p j=0 a j y n j + h p j= 1 b j f(x n j,y n j ) (a) Method of Undetermined Coefficients (b) Numerical Integration

More information

Ordinary Differential Equations

Ordinary Differential Equations Chapter 7 Ordinary Differential Equations Differential equations are an extremely important tool in various science and engineering disciplines. Laws of nature are most often expressed as different equations.

More information

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations Professor Dr. E F Toro Laboratory of Applied Mathematics University of Trento, Italy eleuterio.toro@unitn.it http://www.ing.unitn.it/toro September 19, 2014 1 / 55 Motivation

More information

Lecture IV: Time Discretization

Lecture IV: Time Discretization Lecture IV: Time Discretization Motivation Kinematics: continuous motion in continuous time Computer simulation: Discrete time steps t Discrete Space (mesh particles) Updating Position Force induces acceleration.

More information

Ordinary Differential Equations

Ordinary Differential Equations Chapter 13 Ordinary Differential Equations We motivated the problem of interpolation in Chapter 11 by transitioning from analzying to finding functions. That is, in problems like interpolation and regression,

More information

Differential Equations

Differential Equations Differential Equations Definitions Finite Differences Taylor Series based Methods: Euler Method Runge-Kutta Methods Improved Euler, Midpoint methods Runge Kutta (2nd, 4th order) methods Predictor-Corrector

More information

Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers

Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers Consider the ODE u (t) = f(t, u(t)), u(0) = u 0, where u could be a vector valued function. Any ODE can be reduced to a first order system,

More information

Runge-Kutta methods. With orders of Taylor methods yet without derivatives of f (t, y(t))

Runge-Kutta methods. With orders of Taylor methods yet without derivatives of f (t, y(t)) Runge-Kutta metods Wit orders of Taylor metods yet witout derivatives of f (t, y(t)) First order Taylor expansion in two variables Teorem: Suppose tat f (t, y) and all its partial derivatives are continuous

More information

Astrodynamics (AERO0024)

Astrodynamics (AERO0024) Astrodynamics (AERO0024) 5. Numerical Methods Gaëtan Kerschen Space Structures & Systems Lab (S3L) Why Different Propagators? Analytic propagation: Better understanding of the perturbing forces. Useful

More information

On interval predictor-corrector methods

On interval predictor-corrector methods DOI 10.1007/s11075-016-0220-x ORIGINAL PAPER On interval predictor-corrector methods Andrzej Marcinia 1,2 Malgorzata A. Janowsa 3 Tomasz Hoffmann 4 Received: 26 March 2016 / Accepted: 3 October 2016 The

More information

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2.

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2. Chapter 5 Exercises From: Finite Difference Methods for Ordinary and Partial Differential Equations by R. J. LeVeque, SIAM, 2007. http://www.amath.washington.edu/ rjl/fdmbook Exercise 5. (Uniqueness for

More information

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science ANSWERS OF THE TEST NUMERICAL METHODS FOR DIFFERENTIAL EQUATIONS (WI097 TU) Thursday January 014, 18:0-1:0

More information

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20 2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20 REVIEW Lecture 19: Finite Volume Methods Review: Basic elements of a FV scheme and steps to step-up a FV scheme One Dimensional examples d x j x j 1/2

More information

Lecture V: The game-engine loop & Time Integration

Lecture V: The game-engine loop & Time Integration Lecture V: The game-engine loop & Time Integration The Basic Game-Engine Loop Previous state: " #, %(#) ( #, )(#) Forces -(#) Integrate velocities and positions Resolve Interpenetrations Per-body change

More information

The Definition and Numerical Method of Final Value Problem and Arbitrary Value Problem Shixiong Wang 1*, Jianhua He 1, Chen Wang 2, Xitong Li 1

The Definition and Numerical Method of Final Value Problem and Arbitrary Value Problem Shixiong Wang 1*, Jianhua He 1, Chen Wang 2, Xitong Li 1 The Definition and Numerical Method of Final Value Problem and Arbitrary Value Problem Shixiong Wang 1*, Jianhua He 1, Chen Wang 2, Xitong Li 1 1 School of Electronics and Information, Northwestern Polytechnical

More information

Introduction to standard and non-standard Numerical Methods

Introduction to standard and non-standard Numerical Methods Introduction to standard and non-standard Numerical Methods Dr. Mountaga LAM AMS : African Mathematic School 2018 May 23, 2018 One-step methods Runge-Kutta Methods Nonstandard Finite Difference Scheme

More information

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25.

Bindel, Fall 2011 Intro to Scientific Computing (CS 3220) Week 12: Monday, Apr 18. HW 7 is posted, and will be due in class on 4/25. Logistics Week 12: Monday, Apr 18 HW 6 is due at 11:59 tonight. HW 7 is posted, and will be due in class on 4/25. The prelim is graded. An analysis and rubric are on CMS. Problem du jour For implicit methods

More information

5. Ordinary Differential Equations. Indispensable for many technical applications!

5. Ordinary Differential Equations. Indispensable for many technical applications! Indispensable for many technical applications! Numerisches Programmieren, Hans-Joachim Bungartz page 1 of 30 5.1. Introduction Differential Equations One of the most important fields of application of

More information

Differential Equations

Differential Equations Differential Equations Overview of differential equation! Initial value problem! Explicit numeric methods! Implicit numeric methods! Modular implementation Physics-based simulation An algorithm that

More information

Stability Ordinates of Adams Predictor-Corrector Methods

Stability Ordinates of Adams Predictor-Corrector Methods BIT manuscript No. will be inserted by the editor) Stability Ordinates of Adams Predictor-Corrector Methods Michelle L. Ghrist Bengt Fornberg Jonah A. Reeger Received: date / Accepted: date Abstract How

More information

Computational Methods CMSC/AMSC/MAPL 460. Ordinary differential equations

Computational Methods CMSC/AMSC/MAPL 460. Ordinary differential equations Computational Methods CMSC/AMSC/MAPL 460 Ordinar differential equations Ramani Duraiswami, Dept. of Computer Science Several slides adapted from Prof. ERIC SANDT, TAMU ODE: Previous class Standard form

More information

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science

DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science DELFT UNIVERSITY OF TECHNOLOGY Faculty of Electrical Engineering, Mathematics and Computer Science ANSWERS OF THE TEST NUMERICAL METHODS FOR DIFFERENTIAL EQUATIONS ( WI3097 TU AESB0 ) Thursday April 6

More information

Mini project ODE, TANA22

Mini project ODE, TANA22 Mini project ODE, TANA22 Filip Berglund (filbe882) Linh Nguyen (linng299) Amanda Åkesson (amaak531) October 2018 1 1 Introduction Carl David Tohmé Runge (1856 1927) was a German mathematician and a prominent

More information

Linear Multistep Methods

Linear Multistep Methods Linear Multistep Methods Linear Multistep Methods (LMM) A LMM has the form α j x i+j = h β j f i+j, α k = 1 i 0 for the approximate solution of the IVP x = f (t, x), x(a) = x a. We approximate x(t) on

More information

What we ll do: Lecture 21. Ordinary Differential Equations (ODEs) Differential Equations. Ordinary Differential Equations

What we ll do: Lecture 21. Ordinary Differential Equations (ODEs) Differential Equations. Ordinary Differential Equations What we ll do: Lecture Ordinary Differential Equations J. Chaudhry Department of Mathematics and Statistics University of New Mexico Review ODEs Single Step Methods Euler s method (st order accurate) Runge-Kutta

More information

Section 7.2 Euler s Method

Section 7.2 Euler s Method Section 7.2 Euler s Method Key terms Scalar first order IVP (one step method) Euler s Method Derivation Error analysis Computational procedure Difference equation Slope field or Direction field Error Euler's

More information