Lecture 4: Numerical solution of ordinary differential equations

Size: px
Start display at page:

Download "Lecture 4: Numerical solution of ordinary differential equations"

Transcription

1 Lecture 4: Numerical solution of ordinary differential equations Department of Mathematics, ETH Zürich

2 General explicit one-step method: Consistency; Stability; Convergence. High-order methods: Taylor methods; Integral equation method; Runge-Kutta methods. Multi-step methods.

3 Stiff equations and systems. Perturbation theories for differential equations: Regular perturbation theory; Singular perturbation theory.

4 Consistency, stability and convergence Consider dx = f (t, x), t [0, T ], dt x(0) = x 0, x 0 R. f C 0 ([0, t] R): Lipschitz condition. Start at the initial time t = 0; Introduce successive discretization points t 0 = 0 < t 1 < t 2 <..., continuing on until we reach the final time T. Uniform step size: t := t k+1 t k > 0, does not dependent on k and assumed to be relatively small, with t k = k t. Suppose that K = T /( t): an integer.

5 General explicit one-step method: x k+1 = x k + t Φ(t k, x k, t), for some continuous function Φ(t, x, h). Taking in succession k = 0, 1,..., K 1, one-step at a time the approximate values x k of x at t k : obtained. Explicit scheme: x k+1 obtained from x k ; x k+1 appears only on the left-hand side.

6 Truncation error of the numerical scheme: T k ( t) = x(t k+1) x(t k ) t As t 0, k +, k t = t, DEFINITION: Consistency Φ(t k, x(t k ), t). T k ( t) dx Φ(t, x, 0). dt Numerical scheme consistent with the ODE if Φ(t, x, 0) = f (t, x) for all t [0, T ] and x R.

7 DEFINITION: Stability Numerical scheme stable if Φ: Lipschitz continuous in x, i.e., there exist positive constants C Φ and h 0 s.t. Φ(t, x, h) Φ(t, y, h) C Φ x y, t [0, T ], h [0, h 0 ], x, y R. Global error of the numerical scheme: DEFINITION: Convergence e k = x k x(t k ). Numerical scheme: convergent if e k 0 as t 0, k +, k t = t [0, T ].

8 THEOREM: Dahlquist-Lax equivalence theorem Numerical scheme: convergent iff consistent and stable.

9 PROOF: x(t k+1 ) x(t k ) = tk+1 t k f (s, x(s)) ds; x(t k+1 ) x(t k ) = ( t)f (t k, x(t k ))+ tk+1 t k [ f (s, x(s)) f (tk, x(t k )) ] ds. x(t k+1) x(t k ) ( t)f (t k, x(t k )) tk+1 [ = f (s, x(s)) f (tk, x(t k )) ] ds ( t) ω 1( t). t k

10 ω 1( t) : ω 1( t) := sup { f (t, x(t)) f (s, x(s)), 0 s, t T, t s t }. ω 1 ( t) 0 as t 0. If f : Lipschitz in t, then ω 1 ( t) = O( t).

11 From e k+1 e k = x k+1 x k (x(t k+1 ) x(t k )), e k+1 e k = t Φ(t k, x k, t) (x(t k+1 ) x(t k )). Or equivalently, e k+1 e k = t [ Φ(t k, x k, t) f (t k, x(t k )) ] [ x(t k+1 ) x(t k ) t f (t k, x(t k )) ]. Write e k+1 e k = t [ Φ(t k, x k, t) Φ(t k, x(t k ), t) + Φ(t k, x(t k ), t) f (t k, x(t k )) ] [ x(t k+1 ) x(t k ) t f (t k, x(t k )) ].

12 Let ω 2( t) := sup { Φ(t, x, h) f (t, x), t [0, T ], x R, 0 < h ( t) }. Consistency Φ(t k, x(t k ), t) f (t k, x(t k )) ω2( t) 0 as t 0. Stability condition Φ(t k, x k, t) Φ(t k, x(t k ), t) C Φ e k.

13 e k+1 ( 1 + C Φ t ) e k + tω 3( t), 0 k K 1; K = T /( t) and ω 3( t) := ω 1( t) + ω 2( t) 0 as t 0.

14 By induction, k 1 e k+1 (1 + C Φ t) k e 0 + ( t) ω 3( t) (1 + C Φ t) l, 0 k K. and l=0 k 1 (1 + C Φ t) l = (1 + C Φ t) k 1, C Φ t l=0 (1 + C Φ t) K (1 + C Φ T K )K e C ΦT. e k e CΦT e 0 + ec ΦT 1 ω 3( t). C Φ If e 0 = 0, then as t 0, k + s.t. k t = t [0, T ] lim e k = 0. k +

15 DEFINITION: An explicit one-step method: order p if there exist positive constants h 0 and C s.t. T k ( t) C( t) p, 0 < t h 0, k = 0,..., K 1; T k ( t): truncation error.

16 If the explicit one-step method: stable global error: bounded by the truncation error. PROPOSITION: Consider the explicit one-step scheme with Φ satisfying the stability condition. Suppose that e 0 = 0. Then e k+1 (ec ΦT 1) C Φ T l : truncation error and e k : global error. max T l( t) for k = 0,..., K 1; 0 l k

17 PROOF: [ ] e k+1 e k = ( t)t k ( t)+( t) Φ(t k, x k, t) Φ(t k, x(t k ), t). e k+1 (1 + C Φ ( t)) e k + ( t) T k ( t) (1 + C Φ ( t)) e k + ( t) max 0 l k T l( t).

18 Explicit Euler s method Φ(t, x, h) = f (t, x). Explicit Euler scheme: x k+1 = x k + ( t)f (t, x k ).

19 THEOREM: Suppose that f satisfies the Lipschitz condition; Suppose that f : Lipschitz with respect to t. Then the explicit Euler scheme: convergent and the global error e k : of order t. If f C 1, then the scheme: of order one.

20 PROOF: f satisfies the Lipschitz condition numerical scheme with Φ(t, x, h) = f (t, x): stable. Φ(t, x, 0) = f (t, x) for all t [0, T ] and x R numerical scheme: consistent. convergence. f : Lipschitz in t ω 1 ( t) = O( t). ω 2 ( t) = 0 ω 3 ( t) = O( t). e k = O( t) for 1 k K.

21 f C 1 x C 2. Mean-value theorem T k ( t) = 1 ( ) x(t k+1 ) x(t k ) f (t k, x(t k )) t = 1 ( x(t k ) + ( t) dx ) t dt (t k) + ( t)2 d 2 x 2 dt (τ) x(t k) f (t 2 k, x(t k )) = t 2 d 2 x dt 2 (τ), for some τ [t k, t k+1 ]. Scheme: first order.

22 High-order methods: In general, the order of a numerical solution method governs both the accuracy of its approximations and the speed of convergence to the true solution as the step size t 0. Explicit Euler method: only a first order scheme; Devise simple numerical methods that enjoy a higher order of accuracy. The higher the order, the more accurate the numerical scheme, and hence the larger the step size that can be used to produce the solution to a desired accuracy. However, this should be balanced with the fact that higher order methods inevitably require more computational effort at each step.

23 High-order methods: Taylor methods; Integral equation method; Runge-Kutta methods.

24 Taylor methods Explicit Euler scheme: based on a first order Taylor approximation to the solution. Taylor expansion of the solution x(t) at the discretization points t k+1 : x(t k+1 ) = x(t k ) + ( t) dx dt (t k) + ( t)2 d 2 x 2 dt (t k) + ( t)3 d 3 x 2 6 dt (t k) Evaluate the first derivative term by using the differential equation dx dt = f (t, x).

25 Second derivative can be found by differentiating the equation with respect to t: d 2 x dt 2 Second order Taylor method ( ) = d f f dx f (t, x) = (t, x) + (t, x) dt t x dt. x k+1 = x k + ( t)f (t k, x k ) + ( t)2 2 ( f t (t k, x k ) + f ) x (t k, x k )f (t k, x k ).

26 Proposition: Suppose that f C 2. Then ( ): of second order.

27 Proof: f C 2 x C 3. truncation error T k given by T k ( t) = ( t)2 6 d 3 x dt 3 (τ), for some τ [t k, t k+1 ] and so, ( ): of second order.

28 Drawbacks of higher order Taylor methods: (i) Owing to their dependence upon the partial derivatives of f, f needs to be smooth; (ii) Efficient evaluation of the terms in the Taylor approximation and avoidance of round off errors.

29 Integral equation method Avoid the complications inherent in a direct Taylor expansion. x(t) coincides with the solution to the integral equation x(t) = x 0 + t 0 f (s, x(s)) ds, t [0, T ]. Starting at the discretization point t k instead of 0, and integrating until time t = t k+1 gives ( ) x(t k+1 ) = x(t k ) + tk+1 t k f (s, x(s)) ds. Implicitly computes the value of the solution at the subsequent discretization point.

30 Compare formula ( ) with the explicit Euler method Approximation of the integral by tk+1 x k+1 = x k + ( t)f (t k, x k ). t k f (s, x(s)) ds ( t)f (t k, x(t k )). Left endpoint rule for numerical integration.

31 Left endpoint rule for numerical integration: Left endpoint rule: not an especially accurate method of numerical integration. Better methods include the Trapezoid rule:

32 Numerical integration formulas for continuous functions. (i) Trapezoidal rule: tk+1 t k (ii) Simpson s rule: tk+1 t k g(s) ds t ( ) g(t k+1 ) + g(t k ) ; 2 g(s) ds t ( g(t k+1 ) + 4g( t ) k + t k+1 ) + g(t k ) ; 6 2 (iii) Trapezoidal rule: exact for polynomials of order one; Simpson s rule: exact for polynomials of second order.

33 Use the more accurate Trapezoidal approximation tk+1 t k Trapezoidal scheme: f (s, x(s)) ds ( t) 2 x k+1 = x k + ( t) 2 [ f (t k, x(t k )) + f (t k+1, x(t k+1 )) [ ] f (t k, x k ) + f (t k+1, x k+1 ). Trapezoidal scheme: implicit numerical method. ].

34 Proposition: Suppose that f C 2 and ( ) ( t)c f 2 < 1; C f : Lipschitz constant for f in x. Trapezoidal scheme: convergent and of second order.

35 Proof: Consistency: Φ(t, x, t) := 1 2 [ ] f (t, x) + f (t + t, x + ( t)φ(t, x, t)). t = 0.

36 Stability: Φ(t, x, t) Φ(t, y, t) Cf x y + t 2 C f Φ(t, x, t) Φ(t, y, t). ( 1 ( t)c f 2 Stability holds with ) Φ(t, x, t) Φ(t, y, t) C f x y. C Φ = C f 1 ( t)c f 2 provided that t satisfies ( ).,

37 Second order scheme: By the mean-value theorem, T k ( t) = x(t k+1) x(t k ) t 1 [ ] f (t k, x(t k )) + f (t k+1, x(t k+1 )) 2 = 1 12 ( t)2 d 3 x dt 3 (τ), for some τ [t k, t k+1 ] second order scheme, provided that f C 2 (and consequently x C 3 ).

38 An alternative scheme: replace x k+1 by x k + ( t)f (t k, x k ). Improved Euler scheme: x k+1 = x k + ( t) 2 [ f (t k, x k ) + f (t k+1, x k + ( t)f(t k, x k )) Proposition: Improved Euler scheme: convergent and of second order. Improved Euler scheme: performs comparably to the Trapezoidal scheme, and significantly better than the Euler scheme. Alternative numerical approximations to the integral equation a range of numerical solution schemes. ].

39 Midpoint rule: tk+1 t k f (s, x(s)) ds ( t)f (t k + t 2, x(t k + t 2 )). Midpoint rule: same order of accuracy as the trapezoid rule. Midpoint scheme: approximate x(t k + t 2 ) by x k + t 2 f (t k, x k ), x k+1 = x k + ( t)f ( t k + t 2, x k + t 2 f (t k, x k ) ). Midpoint scheme: of second order.

40 Example of linear systems Consider the linear system of ODEs dx dt = Ax(t), t [0, + [, x(0) = x 0 R d. A M d (C): independent of t. DEFINITION: A one-step numerical scheme for solving the linear system of ODEs: stable if there exists a positive constant C 0 s.t. x k+1 C 0 x 0 for all k N.

41 Consider the following schemes: (i) Explicit Euler s scheme: (ii) Implicit Euler s scheme: (iii) Trapezoidal scheme: x k+1 = x k + ( t)ax k ; x k+1 = x k + ( t)ax k+1 ; x k+1 = x k + ( t) 2 with k N, and x 0 = x 0. [Ax k + Ax k+1 ],

42 Proposition: Suppose that Rλ j < 0 for all j. The following results hold: (i) Explicit Euler scheme: stable for t small enough; (ii) Implicit Euler scheme: unconditionally stable; (iii) Trapezoidal scheme: unconditionally stable.

43 Proof: Consider the explicit Euler scheme. By a change of basis, where x k = Cx k. If x 0 E j, then x k = x k+1 = (I + t(d + N)) k x 0, min{k,d} l=0 Ck l : binomial coefficient. C l k(1 + tλ j ) k l ( t) l N l x 0,

44 If 1 + ( t)λ j < 1, then x k : bounded. If 1 + ( t)λ j > 1, then one can find x 0 s.t. x k + (exponentially) as k +. If 1 + ( t)λ j = 1 and N 0, then for all x 0 s.t. N x 0 0, N 2 x 0 = 0, x k = (1 + ( t)λ j ) k x 0 + (1 + ( t)λ j ) k 1 k tn x 0 goes to infinity as k +. Stability condition 1 + ( t)λ j < 1 holds for t small enough. t < 2 Rλ j λ j 2,

45 Implicit Euler scheme: x k+1 = (I t(d + N)) k x 0. All the eigenvalues of the matrix (I t(d + N)) 1 : of modulus strictly smaller than 1. Implicit Euler scheme: unconditionally stable. Trapezoidal scheme: Stability condition: x k+1 = (I ( t) 2 (D + N)) k (I + ( t) 2 (D + N))k x 0. holds for all t > 0 since Rλ j < ( t) 2 λ j < 1 ( t) 2 λ j,

46 REMARK: Explicit and implicit Euler schemes: of order one; Trapezoidal scheme: of order two.

47 Runge-Kutta methods: By far the most popular and powerful general-purpose numerical methods for integrating ODEs. Idea behind: evaluate f at carefully chosen values of its arguments, t and x, in order to create an accurate approximation (as accurate as a higher-order Taylor expansion) of x(t + t) without evaluating derivatives of f.

48 Runge-Kutta schemes: derived by matching multivariable Taylor series expansions of f (t, x) with the Taylor series expansion of x(t + t). To find the right values of t and x at which to evaluate f : Take a Taylor expansion of f evaluated at these (unknown) values; Match the resulting numerical scheme to a Taylor series expansion of x(t + t) around t.

49 Generalization of Taylor s theorem to functions of two variables: THEOREM: f (t, x) C n+1 ([0, T ] R). Let (t 0, x 0 ) [0, T ] R. There exist t 0 τ t, x 0 ξ x, s.t. f (t, x) = P n (t, x) + R n (t, x), P n (t, x): nth Taylor polynomial of f around (t 0, x 0 ); R n (t, x): remainder term associated with P n (t, x).

50 [ P n(t, x) = f (t 0, x 0) + (t t f 0) t [ (t t0) 2 2 f + 2 (x x0)2 + 2 [ 1 n... + n! ] f (t0, x0) + (x x0) (t0, x0) x t (t0, x0) + (t t0)(x x0) 2 f (t0, x0) 2 t x ] 2 f (t0, x0) x 2 j=0 j (t t 0) n j (x x 0) j n f t n j x C n j=0 ] (t0, x0) ; j 1 n+1 R n(t, x) = C n+1 j (t t 0) n+1 j (x x 0) j n+1 f (τ, ξ). (n + 1)! t n+1 j x j

51 Illustration: obtain a second-order accurate method (truncation error O(( t) 2 )). Match x + tf (t, x) + ( t)2 [ f f (t, x) + 2 t x (t, x)f (t, x)] + ( t)3 d 2 [f (τ, x)] 6 dt2 to x + ( t)f (t + α 1, x + β 1), τ [t, t + t] and α 1 and β 1: to be found. Match f (t, x) + ( t) [ f f (t, x) + 2 t x (t, x)f (t, x)] + ( t)2 d 2 [f (t, x)] 6 dt2 with f (t + α 1, x + β 1) at least up to terms of the order of O( t).

52 Multivariable version of Taylor s theorem to f, f f (t + α 1, x + β 1) = f (t, x) + α 1 t (t, x) + f β1 x (t, x) + α2 1 2 f (τ, ξ) 2 t2 2 f +α 1β 1 t x (τ, ξ) + β2 1 2 f (τ, ξ), 2 x 2 t τ t + α 1 and x ξ x + β 1. α 1 = t 2 and β 1 = t f (t, x). 2 Resulting numerical scheme: explicit midpoint method: the simplest example of a Runge-Kutta method of second order. Improved Euler method: also another often-used Runge-Kutta method.

53 General Runge-Kutta method: x k+1 = x k + t m: number of terms in the method. Each t i,k denotes a point in [t k, t k+1 ]. m c i f (t i,k, x i,k ), Second argument x i,k x(t i,k ) can be viewed as an approximation to the solution at the point t i,k. To construct an nth order Runge-Kutta method, we need to take at least m n terms. i=1

54 Best-known Runge-Kutta method: fourth-order Runge-Kutta method, which uses four evaluations of f during each step. κ 1 := f (t k, x k ), κ 2 := f (t k + t 2, x k + t κ1), 2 κ 3 := f (t k + t, x k + t κ2), 2 2 κ 4 := f (t k+1, x k + tκ 3), x k+1 = x k + ( t) (κ1 + 2κ2 + 2κ3 + κ4). 6 Values of f at the midpoint in time: given four times as much weight as values at the endpoints t k and t k+1 (similar to Simpson s rule from numerical integration).

55 Construction of Runge-Kutta methods: Construct Runge-Kutta methods by generalizing collocation methods. Discuss their consistency, stability, and order.

56 Collocation methods: P m: space of real polynomials of degree m. Interpolating polynomial: Given a set of m distinct quadrature points c 1 < c 2 <... < c m in R, and corresponding data g 1,..., g m ; There exists a unique polynomial, P(t) P m 1 s.t. P(c i ) = g i, i = 1,..., m.

57 DEFINITION: Define the ith Lagrange interpolating polynomial l i (t), i = 1,..., m, for the set of quadrature points {c j } by l i (t) := m j i,j=1 t c j c i c j. Set of Lagrange interpolating polynomials: form a basis of P m 1; Interpolating polynomial P corresponding to the data {g j } given by P(t) := m g i l i (t). i=1

58 Consider a smooth function g on [0, 1]. Approximate the integral of g on [0, 1] by exactly integrating the Lagrange interpolating polynomial of order m 1 based on m quadrature points 0 c 1 < c 2 <... < c m 1. Data: values of g at the quadrature points g i = g(c i ), i = 1,..., m.

59 Define the weights Quadrature formula: b i = 1 0 l i (s) ds. 1 g(s) ds i=1 m g i l i (s) ds = m b i g(c i ). i=1

60 f : smooth function on [0, T ]; t k = k t for k = 0,..., K = T /( t): discretization points in [0, T ]. tk+1 f (s) ds can be approximated by t k tk+1 t k f (s) ds = ( t) 1 f (t k + tτ) dτ ( t) 0 i=1 m b i f (t k + ( t)c i ).

61 x: polynomial of degree m satisfying x(0) = x 0, F i R, i = 1,..., m. dx dt (c i t) = F i, Lagrange interpolation formula for t in the first time-step interval [0, t], m dx dt (t) = F i l i ( t t ). i=1

62 Integrating over the intervals [0, c i t] m ci m x(c i t) = x 0 + ( t) F j l j (s) ds = x 0 + ( t) a ij F j, j=1 0 j=1 for i = 1,..., m, with Integrating over [0, t] a ij := ci 0 l j (s) ds. m 1 m x( t) = x 0 + ( t) F i l i (s) ds = x 0 + ( t) b i F i. i=1 0 i=1

63 Writing dx/dt = f (x(t)), on the first time step interval [0, t], m F i = f (x 0 + ( t) a ij F j ), i = 1,..., m, x( t) = x 0 + ( t) Similarly, we have on [t k, t k+1 ] F i,k = f (x(t k ) + ( t) j=1 x(t k+1 ) = x(t k ) + ( t) m b i F i. i=1 m a ij F j,k ), i = 1,..., m, j=1 m b i F i,k. In the collocation method: one first solves the coupled nonlinear system to obtain F i,k, i = 1,..., m, and then computes x(t k+1 ) from x(t k ). i=1

64 REMARK: and t l 1 = m i=1 m i=1 m j=1 c l 1 i l i (t), t [0, 1], l = 1,..., m, b i c l 1 i = 1, l = 1,..., m, l a ij c l 1 j = cl i l, i, l = 1,..., m.

65 Runge-Kutta methods as generalized collocation methods In the collocation method, the coefficients b i and a ij : defined by certain integrals of the Lagrange interpolating polynomials associated with a chosen set of quadrature nodes c i, i = 1,..., m. Natural generalization of collocation methods: obtained by allowing the coefficients c i, b i, and a ij to take arbitrary values, not necessary related to quadrature formulas.

66 No longer assume the c i to be distinct. However, assume that m c i = a ij, i = 1,..., m. Class of Runge-Kutta methods for solving the ODE, m F i,k = f (t i,k, x k + ( t) a ij F j,k ), j=1 x k+1 = x k + ( t) t i,k = t k + c i t, or equivalently, x i,k = x k + ( t) x k+1 = x k + ( t) j=1 m b i F i,k, i=1 m a ij f (t j,k, x j,k ), j=1 m b i f (t i,k, x i,k ). i=1

67 Let Define Φ by κ j := f (t + c j t, x j ); m x i = x + ( t) a ij κ j, j=1 m Φ(t, x, t) = b i f (t + c i t, x i ). i=1 One step method. If a ij = 0 for j i scheme: explicit.

68 EXAMPLES: Explicit Euler s method and Trapezoidal scheme: Runge-Kutta methods. Explicit Euler s method: m = 1, b 1 = 1, a 11 = 0.

69 Trapezoidal scheme: m = 2, b 1 = b 2 = 1/2, a 11 = a 12 = 0, a 21 = a 22 = 1/2.

70 Fourth-order Runge-Kutta method: m = 4, c 1 = 0, c 2 = c 3 = 1/2, c 4 = 1, b 1 = 1/6, b 2 = b 3 = 1/3, b 4 = 1/6, a 21 = a 32 = 1/2, a 43 = 1, and all the other a ij entries are zero.

71 Consistency, stability, convergence, and order of Runge-Kutta methods Runge-Kutta scheme: consistent iff m b j = 1. j=1

72 Stability: A = ( a ij ) m i,j=1. Spectral radius ρ( A ) of the matrix A : ρ( A ) := max{ λ j, λ j : eigenvalue of A }.

73 THEOREM: C f : Lipschitz constant for f. Suppose ( t)c f ρ( A ) < 1. Then the Runge-Kutta method: stable.

74 PROOF: Φ(t, x, t) Φ(t, y, t) = m i=1 ] b i [f (t+c i t, x i ) f (t+c i t, y i ), with and m x i = x + ( t) a ij f (t + c j t, x j ), j=1 m y i = y + ( t) a ij f (t + c j t, y j ). j=1

75 x i y i = x y + ( t) m j=1 ] a ij [f (t + c j t, x j ) f (t + c j t, y j ). For i = 1,..., m, m x i y i x y + ( t)c f a ij x j y j. j=1

76 X and Y : X = X Y + ( t)c f A X, x 1 y 1. x m y m provided that ( t)c f ρ( A ) < 1. and Y = X (I ( t)c f A ) 1 Y, stability of the Runge-Kutta scheme. x y.. x y

77 Dahlquist-Lax equivalence theorem Runge-Kutta scheme: convergent provided that m j=1 b j = 1 and ( t)c f ρ( A ) < 1 hold.

78 Order of the Runge-Kutta scheme: compute the order as t 0 of the truncation error Write T k ( t) = x(t k+1) x(t k ) t T k ( t) = x(t k+1) x(t k ) t i=1 Suppose that f : smooth enough f (t k + c i t, x(t k ) + t Φ(t k, x(t k ), t). m m b i f (t k + c i t, x(t k ) + t a ij κ j ). m a ij κ j ) j=1 [ f = f (t k, x(t k )) + t c i t (t k, x(t k )) + ( a ij κ j ) f ] x (t k, x(t k )) j=1 +O(( t) 2 ). j=1

79 a ij κ j = ( a ij )f (t k, x(t k )) + O( t) = c i f (t k, x(t k )) + O( t). j=1 j=1

80 f (t k + c i t, x(t k ) + t m a ij κ j ) j=1 [ f = f (t k, x(t k )) + tc i t (t k, x(t k )) + f ] x (t k, x(t k ))f (t k, x(t k )) +O(( t) 2 ).

81 THEOREM: Assume that f : smooth enough. Then the Runge-Kutta scheme: of order 2 provided that the conditions m b j = 1 and j=1 m hold. i=1 b i c i = 1 2

82 Higher-order Taylor expansions THEOREM: Assume that f : smooth enough. Then the Runge-Kutta scheme: of order 3 provided that the conditions m b j = 1, and hold. i=1 j=1 m b i c i = 1 2, i=1 m b i ci 2 = 1 m 3, m b i a ij c j = 1 6 i=1 j=1

83 Of Order 4 provided that in addition m b i ci 3 = 1 m 4, m b i c i a ij c j = 1 8, i=1 i=1 j=1 m m m m i=1 j=1 m b i c i a ij cj 2 = 1 12, i=1 j=1 l=1 b i a ij a jl c l = 1 24 hold. The (fourth-order) Runge-Kutta scheme: of order 4.

84 Multi-step methods Runge-Kutta methods: improvement over Euler s methods in terms of accuracy, but achieved by investing additional computational effort. The fourth-order Runge-Kutta method involves four function evaluations per step.

85 For comparison, by considering three consecutive points t k 1, t k, t k+1, integrating the differential equation between t k 1 and t k+1, and applying Simpson s rule to approximate the resulting integral yields x(t k+1 ) = x(t k 1 ) + x(t k 1 ) + ( t) 3 tk+1 t k 1 f (s, x(s)) ds [ f (t k 1, x(t k 1 )) + 4f (t k, x(t k )) + f (t k+1, x(t k+1 )) x k+1 = x k 1 + ( t) [ ] f (t k 1, x k 1 ) + 4f (t k, x k ) + f (t k+1, x k+1 ). 3 Need two preceding values, x k and x k 1 in order to calculate x k+1 : two-step method. In contrast with the one-step methods: only a single value of x k required to compute the next approximation x k+1. ],

86 General n-step method: n n α j x k+j = ( t) β j f (t k+j, x k+j ), j=0 α j and β j : real constants and α n 0. If β n = 0, then x k+n : obtained explicitly from previous values of x j and f (t j, x j ) n-step method: explicit. Otherwise, the n-step method: implicit. j=0

87 EXAMPLE: (i) Two-step Adams-Bashforth method: explicit two-step method x k+2 = x k+1 + ( t) [ ] 3f (t k+1, x k+1 ) f (t k, x k ) ; 2 (ii) Three-step Adams-Bashforth method: explicit three-step method x k+3 = x k+2 + ( t) 12 [ ] 23f (t k+2, x k+2 ) 16f (t k+1, x k+1 )+f (t k, x k ) ;

88 (iii) Four-step Adams-Bashforth method: explicit four-step method [ x k+4 = x k+3 + ( t) 55f (t 24 k+3, x k+3 ) 59f (t k+2, x k+2 ) ] +37f (t k+1, x k+1 ) 9f (t k, x k ) ; (iv) Two-step Adams-Moulton method: implicit two-step method x k+2 = x k+1 + ( t) [ ] 5f (t k+2, x k+2 ) + 8f (t k+1, x k+1 ) + f (t k, x k ) ; 12 (v) Three-step Adams-Moulton method: implicit three-step method x k+3 = x k+2 + ( t) 24 [ 9f (t k+3, x k+3 )+19f (t k+2, x k+2 ) 5f (t k+1, x k+1 ) 9f (t k, x k ) ].

89 Construction of linear multi-step methods Suppose that x k, k N: sequence of real numbers. Shift operator E, forward difference operator + and backward difference operator : E : x k x k+1, + : x k x k+1 x k, : x k x k x k 1. + = E I and = I E 1 for any n N, (E I ) n = n ( 1) j Cj n E n j j=0 and (I E 1 ) n = n ( 1) j Cj n E j. j=0

90 and n +x k = n x k = n ( 1) j Cj n x k+n j j=0 n ( 1) j Cj n x k j. j=0

91 y(t) C (R); t k = k t, t > 0. Taylor series for any s N, ( + E s 1 y(t k ) = y(t k + s t) = l! (s t ) t )l y (t k ) = ( e s( t) t ) y (tk ), l=0 E s = e s( t) t. Formally, ( t) t = ln E = ln(i ) =

92 x(t): solution of ODE: ( t)f (t k, x(t k )) = ( ) x(t k ). Successive truncation of the infinite series and so on. x k x k 1 = ( t)f (t k, x k ), 3 2 x k 2x k x k 2 = ( t)f (t k, x k ), 11 6 x k 3x k x k x k 3 = ( t)f (t k, x k ), Class of implicit multi-step methods: backward differentiation formulas.

93 Similarly, E 1 (( t) t ) = ( t) t E 1 = (I ) ln(i ). (( t) ) = E(I ) ln(i ) = (I ) ln(i )E. t ( t)f (t k, x(t k )) = ( ) x(t k+1 ).

94 Successive truncation of the infinite series explicit numerical schemes: x k+1 x k = ( t)f (t k, x k ), 1 2 x k x k 1 = ( t)f (t k, x k ), 1 3 x k x k x k x k 2 = ( t)f (t k, x k ),. The first of these numerical scheme: explicit Euler method, while the second: explicit mid-point method.

95 Construct further classes of multi-step methods: For y C, and tk D 1 y(t k ) = y(t 0) + y(s) ds, t 0 (E I )D 1 y(t k ) = tk+1 t k y(s) ds. (E I )D 1 = +D 1 = E D 1 = ( t)e (( t)d) 1,

96 (E I )D 1 = ( t)e ( ln(i ) ) 1.

97 (E I )D 1 = E D 1 = ED 1 = (DE 1 ) 1 = ( t) ( ( t)de 1 ) 1. (E I )D 1 = ( t) ((I ) ln(i )) 1.

98 tk+1 x(t k+1 ) x(t k ) = f (s, x(s)) ds = (E I )D 1 f (t k, x(t k )), t k ( ( t) (I ) ln(i ) ) 1 f (t k, x(t k )) x(t k+1 ) x(t k ) = ( ( t)e ) ln(i ) 1 f (t k, x(t k )).

99 Expand ln(i ) into a Taylor series on the right-hand side [ x(t k+1 ) x(t k ) = ( t) I ] f (t k, x(t k )) and [ x(t k+1 ) x(t k ) = ( t) I ] f (t k+1, x(t k+1 )). Successive truncations families of (explicit) Adams-Bashforth methods and of (implicit) Adams-Moulton methods.

100 Consistency, stability, and convergence Introduce the concepts of consistency, stability, and convergence for analyzing linear multi-step methods.

101 DEFINITION: Consistency The n-step method: consistent with the ODE if the truncation error defined by n [ dx j=0 αj x(t k+j ) ( t)β j dt T k = (t k+j) ] ( t) n j=0 β j is s.t. for any ɛ > 0 there exists h 0 for which T k ɛ for 0 < t h 0 and any (n + 1) points ( (t j, x(t j )),..., (t j+n, x(t j+n )) ) on any solution x(t).

102 DEFINITION: Stability The n-step method: stable if there exists a constant C s.t., for any two sequences (x k ) and ( x k ) which have been generated by the same formulas but different initial data x 0, x 1,..., x k 1 and x 0, x 1,..., x k 1, respectively, x k x k C max{ x 0 x 0, x 1 x 1,..., x k 1 x k 1 } as t 0.

103 THEOREM: Convergence Suppose that the n-step method: consistent with the ODE. Stability condition: necessary and sufficient for the convergence. If x C p+1 and the truncation error O(( t) p ), then the global error e k = x(t k ) x k : O(( t) p ).

104 Stiff equations and systems: Let ɛ > 0: small parameter. Consider the initial value problem dx(t) = 1 x(t), t [0, T ], dt ɛ x(0) = 1, Exponential solution x(t) = e t/ɛ. Explicit Euler method with step size t: with solution x k+1 = (1 t ɛ )x k, x 0 = 1, x k = (1 t ɛ )k.

105 ɛ > 0 exact solution: exponentially decaying and positive. If 1 t ɛ < 1, then the iterates grow exponentially fast in magnitude, with alternating signs. Numerical solution: nowhere close to the true solution. If 1 < 1 t < 0, then the numerical solution decays in magnitude, but ɛ continue to alternate between positive and negative values. To correctly model the qualitative features of the solution and obtain a numerically accurate solution: choose the step size t so as to ensure that 1 t > 0, and hence t < ɛ. ɛ stiff differential equation.

106 In general, an equation or system: stiff if it has one or more very rapidly decaying solutions. In the case of the autonomous constant coefficient linear system: stiffness occurs whenever the coefficient matrix A has an eigenvalues λ j0 with large negative real part: Rλ j0 0, resulting in a very rapidly decaying eigensolution. It only takes one such eigensolution to render the equation stiff, and ruin the numerical computation of even well behaved solutions. Even though the component of the actual solution corresponding to λ j0 : almost irrelevant, its presence continues to render the numerical solution to the system very difficult. Most of the numerical methods: suffer from instability due to stiffness for sufficiently small positive ɛ. Stiff equations require more sophisticated numerical schemes to integrate.

107 Perturbation theories for differential equations Regular perturbation theory; Singular perturbation theory.

108 Regular perturbation theory: ɛ > 0: small parameter and consider dx = f (t, x, ɛ), t [0, T ], dt x(0) = x 0, x 0 R. f C 1 regular perturbation problem. Taylor expansion of x(t, ɛ) C 1 : x(t, ɛ) = x (0) (t) + ɛx (1) (t) + o(ɛ) with respect to ɛ in a neighborhood of 0.

109 x (0) : f 0(t, x) := f (t, x, 0). x (1) (t) = x (t, 0) : ɛ dx (1) dt x (1) (0) = 0. Compute numerically x (0) and x (1). dx (0) = f 0(t, x (0) ), t [0, T ], dt x (0) (0) = x 0, x 0 R, = f x (t, x (0), 0)x (1) + f ɛ (t, x (0), 0), t [0, T ],

110 Singular perturbation theory: Consider ɛ d 2 x dt 2 dx = f (t, x, ), t [0, T ], dt x(0) = x 0, x(t ) = x 1. Singular perturbation problem: order reduction when ɛ = 0.

111 Consider the linear, scalar and of second-order ODE: ɛ d 2 x dt dx + x = 0, t [0, 1], dt x(0) = 0, x(1) = 1. α(ɛ) := 1 1 ɛ ɛ and β(ɛ) := ɛ. x(t, ɛ) = e αt e βt/ɛ, t [0, 1]. e α e β/ɛ x(t, ɛ): involves two terms which vary on widely different length-scales.

112 Behavior of x(t, ɛ) as ɛ 0 +. Asymptotic behavior: nonuniform; There are two cases matching outer and inner solutions.

113 (i) Outer limit: t > 0 fixed and ɛ 0 +. Then x(t, ɛ) x (0) (t), x (0) (t) := e (1 t)/2. Leading-order outer solution satisfies the boundary condition at t = 1 but not the boundary condition at t = 0. Indeed, x (0) (0) = e 1/2. (ii) Inner limit: t/ɛ = τ fixed and ɛ 0 +. Then x(ɛτ, ɛ) X (0) (τ) := e 1/2 (1 e 2τ ). Leading-order inner solution satisfies the boundary condition at t = 0 but not the one at t = 1, which corresponds to τ = 1/ɛ. Indeed, lim τ + X (0) (τ) = e 1/2. (iii) Matching: Both the inner and outer expansions: valid in the region ɛ t 1, corresponding to t 0 and τ + as ɛ 0 +. They satisfy the matching condition lim x (0) (t) = lim X (0) (τ). t 0 + τ +

114 Construct an asymptotic solution without relying on the fact that we can solve it exactly. Outer solution: x(t, ɛ) = x (0) (t) + ɛx (1) (t) + O(ɛ 2 ). Use this expansion and equate the coefficients of the leading-order terms to zero. (0) dx 2 + x (0) = 0, t [0, 1], dt x (0) (1) = 1.

115 Inner solution. Suppose that there is a boundary layer at t = 0 of width δ(ɛ), and introduce a stretched variable τ = t/δ. Look for an inner solution X (τ, ɛ) = x(t, ɛ).

116 X satisfies d dt = 1 d δ dτ, ɛ d 2 X δ 2 dτ + 2 dx 2 δ dτ + X = 0. Two possible dominant balances: (i) δ = 1, leading to the outer solution; (ii) δ = ɛ, leading to the inner solution. Boundary layer thickness: of the order of ɛ, and the appropriate inner variable: τ = t/ɛ.

117 Equation for X : d 2 X dτ dx dτ X (0, ɛ) = 0. + ɛx = 0, Impose only the boundary condition at τ = 0, since we do not expect the inner expansion to be valid outside the boundary layer where t = O(ɛ). Seek an inner expansion X (τ, ɛ) = X (0) (τ) + ɛx (1) (τ) + O(ɛ 2 ) and find that d 2 X (0) (0) dx + 2 = 0, dτ 2 dτ X (0) (0) = 0.

118 General solution: c: arbitrary constant of integration. X (0) (τ) = c(1 e 2τ ), Determine the unknown constant c by requiring that the inner solution matches with the outer solution. Matching condition: c = e 1/2. lim x (0) (t) = lim X (0) (τ), t 0 + τ +

119 Asymptotic solution as ɛ 0 + : { e 1/2 (1 e 2τ ) as ɛ 0 + with t/ɛ fixed, x(t, ɛ) = e (1 t)/2 as ɛ 0 + with t fixed.

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

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

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

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

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

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

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

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

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

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

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1

2tdt 1 y = t2 + C y = which implies C = 1 and the solution is y = 1 Lectures - Week 11 General First Order ODEs & Numerical Methods for IVPs In general, nonlinear problems are much more difficult to solve than linear ones. Unfortunately many phenomena exhibit nonlinear

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

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

Numerical Methods - Initial Value Problems for ODEs

Numerical Methods - Initial Value Problems for ODEs 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 2013 1 / 43 Outline 1 Initial Value

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

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

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by

(f(x) P 3 (x)) dx. (a) The Lagrange formula for the error is given by 1. QUESTION (a) Given a nth degree Taylor polynomial P n (x) of a function f(x), expanded about x = x 0, write down the Lagrange formula for the truncation error, carefully defining all its elements. How

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

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 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

Multistage Methods I: Runge-Kutta Methods

Multistage Methods I: Runge-Kutta Methods Multistage Methods I: Runge-Kutta Methods Varun Shankar January, 0 Introduction Previously, we saw that explicit multistep methods (AB methods) have shrinking stability regions as their orders are increased.

More information

Runge-Kutta and Collocation Methods Florian Landis

Runge-Kutta and Collocation Methods Florian Landis Runge-Kutta and Collocation Methods Florian Landis Geometrical Numetric Integration p.1 Overview Define Runge-Kutta methods. Introduce collocation methods. Identify collocation methods as Runge-Kutta methods.

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

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

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

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation

CS 450 Numerical Analysis. Chapter 8: Numerical Integration and Differentiation 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

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

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

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

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

Math Ordinary Differential Equations

Math Ordinary Differential Equations Math 411 - Ordinary Differential Equations Review Notes - 1 1 - Basic Theory A first order ordinary differential equation has the form x = f(t, x) (11) Here x = dx/dt Given an initial data x(t 0 ) = x

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

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

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

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

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

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

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

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

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

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

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

An introduction to Birkhoff normal form

An introduction to Birkhoff normal form An introduction to Birkhoff normal form Dario Bambusi Dipartimento di Matematica, Universitá di Milano via Saldini 50, 0133 Milano (Italy) 19.11.14 1 Introduction The aim of this note is to present an

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

Mathematics for Engineers. Numerical mathematics

Mathematics for Engineers. Numerical mathematics Mathematics for Engineers Numerical mathematics Integers Determine the largest representable integer with the intmax command. intmax ans = int32 2147483647 2147483647+1 ans = 2.1475e+09 Remark The set

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

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

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

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

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

Numerical Methods. King Saud University

Numerical Methods. King Saud University Numerical Methods King Saud University Aims In this lecture, we will... find the approximate solutions of derivative (first- and second-order) and antiderivative (definite integral only). Numerical Differentiation

More information

Fixed point iteration and root finding

Fixed point iteration and root finding Fixed point iteration and root finding The sign function is defined as x > 0 sign(x) = 0 x = 0 x < 0. It can be evaluated via an iteration which is useful for some problems. One such iteration is given

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

Introduction to Initial Value Problems

Introduction to Initial Value Problems Chapter 2 Introduction to Initial Value Problems The purpose of this chapter is to study the simplest numerical methods for approximating the solution to a first order initial value problem (IVP). Because

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

Calculus C (ordinary differential equations)

Calculus C (ordinary differential equations) Calculus C (ordinary differential equations) Lesson 9: Matrix exponential of a symmetric matrix Coefficient matrices with a full set of eigenvectors Solving linear ODE s by power series Solutions to linear

More information

Cyber-Physical Systems Modeling and Simulation of Continuous Systems

Cyber-Physical Systems Modeling and Simulation of Continuous Systems Cyber-Physical Systems Modeling and Simulation of Continuous Systems Matthias Althoff TU München 29. May 2015 Matthias Althoff Modeling and Simulation of Cont. Systems 29. May 2015 1 / 38 Ordinary Differential

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

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form

you expect to encounter difficulties when trying to solve A x = b? 4. A composite quadrature rule has error associated with it in the following form Qualifying exam for numerical analysis (Spring 2017) Show your work for full credit. If you are unable to solve some part, attempt the subsequent parts. 1. Consider the following finite difference: f (0)

More information

Exact and Approximate Numbers:

Exact and Approximate Numbers: Eact and Approimate Numbers: The numbers that arise in technical applications are better described as eact numbers because there is not the sort of uncertainty in their values that was described above.

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

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

Theory, Solution Techniques and Applications of Singular Boundary Value Problems

Theory, Solution Techniques and Applications of Singular Boundary Value Problems Theory, Solution Techniques and Applications of Singular Boundary Value Problems W. Auzinger O. Koch E. Weinmüller Vienna University of Technology, Austria Problem Class z (t) = M(t) z(t) + f(t, z(t)),

More information

Lecture 2: Computing functions of dense matrices

Lecture 2: Computing functions of dense matrices Lecture 2: Computing functions of dense matrices Paola Boito and Federico Poloni Università di Pisa Pisa - Hokkaido - Roma2 Summer School Pisa, August 27 - September 8, 2018 Introduction In this lecture

More information

The Initial Value Problem for Ordinary Differential Equations

The Initial Value Problem for Ordinary Differential Equations Chapter 5 The Initial Value Problem for Ordinary Differential Equations In this chapter we begin a study of time-dependent differential equations, beginning with the initial value problem (IVP) for a time-dependent

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 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

Introductory Numerical Analysis

Introductory Numerical Analysis Introductory Numerical Analysis Lecture Notes December 16, 017 Contents 1 Introduction to 1 11 Floating Point Numbers 1 1 Computational Errors 13 Algorithm 3 14 Calculus Review 3 Root Finding 5 1 Bisection

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

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

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations We call Ordinary Differential Equation (ODE) of nth order in the variable x, a relation of the kind: where L is an operator. If it is a linear operator, we call the equation

More information

A brief introduction to ordinary differential equations

A brief introduction to ordinary differential equations Chapter 1 A brief introduction to ordinary differential equations 1.1 Introduction An ordinary differential equation (ode) is an equation that relates a function of one variable, y(t), with its derivative(s)

More information

Numerical Solutions to Partial Differential Equations

Numerical Solutions to Partial Differential Equations Numerical Solutions to Partial Differential Equations Zhiping Li LMAM and School of Mathematical Sciences Peking University The Implicit Schemes for the Model Problem The Crank-Nicolson scheme and θ-scheme

More information

NUMERICAL ANALYSIS 2 - FINAL EXAM Summer Term 2006 Matrikelnummer:

NUMERICAL ANALYSIS 2 - FINAL EXAM Summer Term 2006 Matrikelnummer: Prof. Dr. O. Junge, T. März Scientific Computing - M3 Center for Mathematical Sciences Munich University of Technology Name: NUMERICAL ANALYSIS 2 - FINAL EXAM Summer Term 2006 Matrikelnummer: I agree to

More information

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF MATHEMATICS ACADEMIC YEAR / EVEN SEMESTER QUESTION BANK KINGS COLLEGE OF ENGINEERING MA5-NUMERICAL METHODS DEPARTMENT OF MATHEMATICS ACADEMIC YEAR 00-0 / EVEN SEMESTER QUESTION BANK SUBJECT NAME: NUMERICAL METHODS YEAR/SEM: II / IV UNIT - I SOLUTION OF EQUATIONS

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

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004

Department of Applied Mathematics and Theoretical Physics. AMA 204 Numerical analysis. Exam Winter 2004 Department of Applied Mathematics and Theoretical Physics AMA 204 Numerical analysis Exam Winter 2004 The best six answers will be credited All questions carry equal marks Answer all parts of each question

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

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

CS 257: Numerical Methods

CS 257: Numerical Methods CS 57: Numerical Methods Final Exam Study Guide Version 1.00 Created by Charles Feng http://www.fenguin.net CS 57: Numerical Methods Final Exam Study Guide 1 Contents 1 Introductory Matter 3 1.1 Calculus

More information

Evolution equations with spectral methods: the case of the wave equation

Evolution equations with spectral methods: the case of the wave equation Evolution equations with spectral methods: the case of the wave equation Jerome.Novak@obspm.fr Laboratoire de l Univers et de ses Théories (LUTH) CNRS / Observatoire de Paris, France in collaboration with

More information

3.1 Interpolation and the Lagrange Polynomial

3.1 Interpolation and the Lagrange Polynomial MATH 4073 Chapter 3 Interpolation and Polynomial Approximation Fall 2003 1 Consider a sample x x 0 x 1 x n y y 0 y 1 y n. Can we get a function out of discrete data above that gives a reasonable estimate

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

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

Non-linear wave equations. Hans Ringström. Department of Mathematics, KTH, Stockholm, Sweden

Non-linear wave equations. Hans Ringström. Department of Mathematics, KTH, Stockholm, Sweden Non-linear wave equations Hans Ringström Department of Mathematics, KTH, 144 Stockholm, Sweden Contents Chapter 1. Introduction 5 Chapter 2. Local existence and uniqueness for ODE:s 9 1. Background material

More information

Numerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by

Numerical Analysis. A Comprehensive Introduction. H. R. Schwarz University of Zürich Switzerland. with a contribution by Numerical Analysis A Comprehensive Introduction H. R. Schwarz University of Zürich Switzerland with a contribution by J. Waldvogel Swiss Federal Institute of Technology, Zürich JOHN WILEY & SONS Chichester

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

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

Numerical Algorithms as Dynamical Systems

Numerical Algorithms as Dynamical Systems A Study on Numerical Algorithms as Dynamical Systems Moody Chu North Carolina State University What This Study Is About? To recast many numerical algorithms as special dynamical systems, whence to derive

More information

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018

Numerical Analysis Preliminary Exam 10 am to 1 pm, August 20, 2018 Numerical Analysis Preliminary Exam 1 am to 1 pm, August 2, 218 Instructions. You have three hours to complete this exam. Submit solutions to four (and no more) of the following six problems. Please start

More information

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems

Index. higher order methods, 52 nonlinear, 36 with variable coefficients, 34 Burgers equation, 234 BVP, see boundary value problems Index A-conjugate directions, 83 A-stability, 171 A( )-stability, 171 absolute error, 243 absolute stability, 149 for systems of equations, 154 absorbing boundary conditions, 228 Adams Bashforth methods,

More information

Numerical Methods for Differential Equations Mathematical and Computational Tools

Numerical Methods for Differential Equations Mathematical and Computational Tools Numerical Methods for Differential Equations Mathematical and Computational Tools Gustaf Söderlind Numerical Analysis, Lund University Contents V4.16 Part 1. Vector norms, matrix norms and logarithmic

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

Exponential Integrators

Exponential Integrators Exponential Integrators John C. Bowman (University of Alberta) May 22, 2007 www.math.ualberta.ca/ bowman/talks 1 Exponential Integrators Outline Exponential Euler History Generalizations Stationary Green

More information

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9

TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1. Chapter Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 TABLE OF CONTENTS INTRODUCTION, APPROXIMATION & ERRORS 1 Chapter 01.01 Introduction to numerical methods 1 Multiple-choice test 7 Problem set 9 Chapter 01.02 Measuring errors 11 True error 11 Relative

More information

CHAPTER 10: Numerical Methods for DAEs

CHAPTER 10: Numerical Methods for DAEs CHAPTER 10: Numerical Methods for DAEs Numerical approaches for the solution of DAEs divide roughly into two classes: 1. direct discretization 2. reformulation (index reduction) plus discretization Direct

More information

8.5 Taylor Polynomials and Taylor Series

8.5 Taylor Polynomials and Taylor Series 8.5. TAYLOR POLYNOMIALS AND TAYLOR SERIES 50 8.5 Taylor Polynomials and Taylor Series Motivating Questions In this section, we strive to understand the ideas generated by the following important questions:

More information

1. The Transition Matrix (Hint: Recall that the solution to the linear equation ẋ = Ax + Bu is

1. The Transition Matrix (Hint: Recall that the solution to the linear equation ẋ = Ax + Bu is ECE 55, Fall 2007 Problem Set #4 Solution The Transition Matrix (Hint: Recall that the solution to the linear equation ẋ Ax + Bu is x(t) e A(t ) x( ) + e A(t τ) Bu(τ)dτ () This formula is extremely important

More information

Higher Order Averaging : periodic solutions, linear systems and an application

Higher Order Averaging : periodic solutions, linear systems and an application Higher Order Averaging : periodic solutions, linear systems and an application Hartono and A.H.P. van der Burgh Faculty of Information Technology and Systems, Department of Applied Mathematical Analysis,

More information

LMI Methods in Optimal and Robust Control

LMI Methods in Optimal and Robust Control LMI Methods in Optimal and Robust Control Matthew M. Peet Arizona State University Lecture 15: Nonlinear Systems and Lyapunov Functions Overview Our next goal is to extend LMI s and optimization to nonlinear

More information