Numerical Methods for Differential Equations

Size: px
Start display at page:

Download "Numerical Methods for Differential Equations"

Transcription

1 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 Numerical Analysis of Differential Equations, by Arieh Iserles and Introduction to Mathematical Modelling with Differential Equations, by Lennart Edsberg c Gustaf Söderlind, Numerical Analysis, Mathematical Sciences, Lund University, Numerical Methods for Differential Equations p. 1/63

2 Chapter 2: contents Solving nonlinear equations Fixed points Newton s method Quadrature Runge Kutta methods Embedded RK methods and adaptivity Implicit Runge Kutta methods Stability and the stability function Linear multistep methods Numerical Methods for Differential Equations p. 2/63

3 1. Solving nonlinear equations f(x) = 0 We can have a single equation x cos(x) = 0 or a system 4x 2 y 2 = 0 4xy 2 x = 1 Nonlinear equations may have no solution; one solution; any finite number of solutions; infinitely many solutions Numerical Methods for Differential Equations p. 3/63

4 Iteration and convergence Nonlinear equations are solved iteratively. One computes a sequence {x [k] } of approximations to the root x For f(x ) = 0, let e [k] = x [k] x Definition The method converges if lim k e [k] = 0 Definition The convergence is linear if e [k+1] c e [k] with 0 < c < 1 quadratic if e [k+1] c e [k] p with p = 2 superlinear if p > 1; cubic if p = 3, etc. Numerical Methods for Differential Equations p. 4/63

5 2. Fixed points Definition x is called a fixed point of the function g if x = g(x) Definition A function g is called contractive if g(x) g(y) L[g] x y with L[g] < 1 for all x,y in the domain of g Numerical Methods for Differential Equations p. 5/63

6 Fixed Point Theorem Theorem Assume that g is continuously differentiable on the compact interval I, i.e., g C 1 (I) If g : I I there exists an x I such that x = g(x ) If in addition L[g] < 1 on I, then x is unique, and the iteration x n+1 = g(x n ) converges to the fixed point x for all x 0 I Note Both conditions are absolutely essential! Numerical Methods for Differential Equations p. 6/63

7 Fixed Point Theorem. Existence and uniqueness Left Center Right No condition satisfied: maybe no x First condition satisfied: maybe multiple x Both conditions satisfied: unique x Numerical Methods for Differential Equations p. 7/63

8 Fixed point iteration. x = e x ; g(x) = e x x [k+1] = e x[k] ; x [0] = 0 g : [0,1] [0,1]; g (x) = e x < 1 for x > Numerical Methods for Differential Equations p. 8/63

9 Error estimation in fixed point iteration Assume g (x) L < 1 for all x I. x [k+1] = g(x [k] ) x = g(x ) By the mean value theorem, x [k+1] x = g(x [k] ) g(x ) = g(x [k] ) g(x [k+1] ) + g(x [k+1] ) g(x ) x [k+1] x L x [k] x [k+1] + L x [k+1] x Numerical Methods for Differential Equations p. 9/63

10 Error estimation... (1 L) x [k+1] x L x [k] x [k+1] Error estimate (computable error bound) x [k+1] x L 1 L x[k] x [k+1] Theorem If L[g] < 1, then the error in fixed point iteration is bounded by x [k+1] x L[g] 1 L[g] x[k] x [k+1] Numerical Methods for Differential Equations p. 10/63

11 Example: The trapezoidal rule Approximate the solution to y = y 2 cos t, y(0) = 1/2, t [0,8π]. Taking 96 steps, solve nonlinear equations with one (left) and four (right) fixed point iterations. Graphs show absolute error Numerical Methods for Differential Equations p. 11/63

12 3. Newton s method Newton s method solves f(x) = 0 using repeated linearizations. Linearize at the point (x [k],f(x [k] ))! Numerical Methods for Differential Equations p. 12/63

13 Straight line equation Newton s method... y f(x [k] ) = f (x [k] ) (x x [k] ) Define x = x [k+1] y = 0, so that f(x [k] ) = f (x [k] ) (x [k+1] x [k] ) Solve for x = x [k+1], to get Newton s method x [k+1] = x [k] f(x[k] ) f (x [k] ) Numerical Methods for Differential Equations p. 13/63

14 Newton s method. Alternative derivation Expand f(x [k+1] ) in a Taylor series around x [k] f(x [k+1] ) = f(x [k] + (x [k+1] x [k] )) f(x [k] ) + f (x [k] ) (x [k+1] x [k] ) := 0 Newton s method x [k+1] = x [k] f(x[k] ) f (x [k] ) Numerical Methods for Differential Equations p. 14/63

15 Newton s method. Alternative derivation... This holds also when f is vector valued (equation systems) f(x [k] ) + f (x [k] ) (x [k+1] x [k] ) := 0 x [k+1] = x [k] ( f (x [k] ) ) 1 f(x [k] ) Definition f (x [k] ) is the Jacobian matrix of f, defined by f (x) = { fi x j } Numerical Methods for Differential Equations p. 15/63

16 Newton s method. Convergence Write Newton s method as a fixed point iteration with iteration function g(x) := x f(x)/f (x) x [k+1] = g(x [k] ) Note Newton s method converges fast if f (x ) 0, as g (x ) = f(x )f (x )/f (x ) 2 = 0 Expand g(x) in a Taylor series around x g(x [k] ) g(x ) g (x )(x [k] x ) + g (x ) (x [k] x ) 2 2 x [k+1] x g (x ) (x [k] x ) 2 2 Numerical Methods for Differential Equations p. 16/63

17 Newton s method. Convergence... Define the error by ε [k] = x [k] x, then ε [k+1] ( ε [k]) 2 Newton s method is quadratically convergent! Fixed point iterations are typically only linearly convergent ε [k+1] ε [k] Numerical Methods for Differential Equations p. 17/63

18 Implicit Euler. Newton vs Fixed point As y n+1 = y n + hf(y n+1 ) we need to solve an equation y = hf(y) + ψ Note All implict methods lead to an equation of this form! Theorem Fixed point iterations converge if L[hf] < 1, restricting the step size to h < 1/L[f]! Stiff equations have L[hf] 1 so fixed point iterations will not converge; it is necessary to use Newton s method! Numerical Methods for Differential Equations p. 18/63

19 Convergence order and rate Definition The convergence order is p with (asymptotic) error constant C p, if 0 < lim k ε [k+1] ε [k] p = C p < Special cases: p = 1 p = 2 Linear convergence Example Fixed point iteration C p = g (x ) Quadratic convergence Example Newton iteration C p = f (x ) 2f (x ) Numerical Methods for Differential Equations p. 19/63

20 4. Quadrature (integration) formulas Numerical quadrature is the approximation of definite integrals I(f) = b a f(x)dx We substitute the infinite sum by a finite sum: the integrand is sampled at a finite number of points I(f) = n w i f(x i ) + R n i=1 R n = I(f) n i=1 w if(x i ) is the quadrature error. Numerical method n I(f) w i f(x i ) i=1 Numerical Methods for Differential Equations p. 20/63

21 5. Runge Kutta methods To solve the IVP y = f(t,y), t t 0, y(t 0 ) = y 0 we use a quadrature formula to approximate the integral in y(t n+1 ) = y(t n ) + y(t n+1 ) y(t n ) + h tn+1 t n f(τ,y(τ))dτ s b j f(t n + c j h,y(t n + c j h)) j=1 Let {Y j } denote the numerical approximations to {y(t n + c j h)} A Runge Kutta method then has the form y n+1 = y n + h s b j f(t n + c j h,y j ) j=1 Numerical Methods for Differential Equations p. 21/63

22 Stage values and stage derivatives The vectors Y j are called stage values The vectors Y j = f(t n + c j h,y j ) are called stage derivatives Stage values and stage derivatives are related through Y i = y n + h i 1 j=1 a i,j Y j and the method advances one step through y n+1 = y n + h s j=1 b j Y j Numerical Methods for Differential Equations p. 22/63

23 The RK matrix, weights, nodes and stages A = {a ij } is the RK matrix, b = [b 1 b 2 b s ] T is the weight vector, c = [c 1 c 2 c s ] T are the nodes, and the method has s stages The Butcher tableau of an explicit RK method is c 2 a c s a s1 a s2 0 or c A b T b 1 b 2 b s Simplifying assumption: c i = i a i,j i = 2,3,...,s j=1 Numerical Methods for Differential Equations p. 23/63

24 Simplest case: a 2-stage ERK Y 1 = f(t n,y n ) Y 2 = f(t n + c 2 h,y n + ha 21 Y 1) y n+1 = y n + h[b 1 Y 1 + b 2 Y 2] c 2 a 21 0 b 1 b 2 c 2 = a 21 Numerical Methods for Differential Equations p. 24/63

25 2-stage ERK... Using Y 1 = f(t n,y n ), expand in Taylor series around t n,y n : Y 2 = f(t n + c 2 h,y n + ha 21 f(t n,y n )) = f + h [c 2 f t + a 21 f y f] + O(h 2 ) Numerical Methods for Differential Equations p. 25/63

26 2-stage ERK... Using Y 1 = f(t n,y n ), expand in Taylor series around t n,y n : Y 2 = f(t n + c 2 h,y n + ha 21 f(t n,y n )) = f + h [c 2 f t + a 21 f y f] + O(h 2 ) Inserting into y n+1 = y n + h[b 1 Y 1 + b 2Y ], we get y n+1 = y n + h(b 1 + b 2 )f + h 2 b 2 (c 2 f t + a 21 f y f) + O(h 3 ) 2 Numerical Methods for Differential Equations p. 25/63

27 2-stage ERK... Using Y 1 = f(t n,y n ), expand in Taylor series around t n,y n : Y 2 = f(t n + c 2 h,y n + ha 21 f(t n,y n )) = f + h [c 2 f t + a 21 f y f] + O(h 2 ) Inserting into y n+1 = y n + h[b 1 Y 1 + b 2Y ], we get y n+1 = y n + h(b 1 + b 2 )f + h 2 b 2 (c 2 f t + a 21 f y f) + O(h 3 ) Taylor expansion of the exact solution: y y = f = f t + f y y = f t + f y f y(t + h) = y + hf h2 (f t + f y f) + O(h 3 ) 2 Numerical Methods for Differential Equations p. 25/63

28 2-stage ERK... Matching terms in y n+1 = y n + h(b 1 + b 2 )f + h 2 b 2 (c 2 f t + a 21 f y f) + O(h 3 ) y(t + h) = y + hf h2 (f t + f y f) + O(h 3 ) and taking c 2 = a 21 we get the conditions for order 2: b 1 + b 2 = 1 (consistency) b 2 c 2 = 1/2 Note All consistent RK methods are convergent! Second order, 2-stage ERK methods have a Butcher tableau b 1 2b 0 1 b b Numerical Methods for Differential Equations p. 26/63

29 Example 1. The modified Euler method Put b = 1 to get Y 1 = f(t n,y n ) Y 2 = f(t n + h/2,y n + hy 1/2) y n+1 = y n + hy 2 Second order explicit Runge Kutta (ERK) method Numerical Methods for Differential Equations p. 27/63

30 Example 2. Heun s method Put b = 1/2 to get /2 1/2 Y 1 = f(t n,y n ) Y 2 = f(t n + h,y n + hy 1) y n+1 = y n + h (Y 1 + Y 2)/2 Second order ERK, compare to the trapezoidal rule! Numerical Methods for Differential Equations p. 28/63

31 Third order 3-stage ERK Conditions for 3rd order: a 21 = c 2 ; a 31 + a 32 = c 3 b 1 + b 2 + b 3 = 1 b 2 c 2 + b 3 c 3 = 1/2 b 2 c b 3 c 2 3 = 1/3 b 3 a 32 c 2 = 1/6 Classical RK /2 1/ /6 2/3 1/6 Nyström scheme /3 2/ /3 0 2/3 0 1/4 3/8 3/8 Numerical Methods for Differential Equations p. 29/63

32 Exercise Construct the Butcher tableau for the 3-stage Heun method. Y 1 = f(t n,y n ) Y 2 = f(t n + h/3,y n + hy 1/3) Y 3 = f(t n + 2h/3,y n + 2hY 2/3) y n+1 = y n + h (Y 1 + 3Y 3)/4 Is it of order 3? Numerical Methods for Differential Equations p. 30/63

33 Classic RK4: 4th order, 4-stage ERK The original RK method (1895): Y 1 = f(t n,y n ) Y 2 = f(t n + h/2,y n + hy 1 /2) Y 3 = f(t n + h/2,y n + hy 2/2) Y 4 = f(t n + h,y n + hy 3) y n+1 = y n + h 6 (Y 1 + 2Y 2 + 2Y 3 + Y 4). Numerical Methods for Differential Equations p. 31/63

34 Classic 4th order RK4... Butcher tableau 0 1/2 1/2 1/2 0 1/ /6 1/3 1/3 1/6 s-stage ERK methods of order p = s exist only for s 4 (i.e. there is no 5-stage ERK of order 5) Numerical Methods for Differential Equations p. 32/63

35 Order conditions An s-stage ERK method has s + s(s 1)/2 coefficients to choose, but the order conditions are many Numerical Methods for Differential Equations p. 33/63

36 Order conditions An s-stage ERK method has s + s(s 1)/2 coefficients to choose, but the order conditions are many Number of coefficients stages s # coefficients Numerical Methods for Differential Equations p. 33/63

37 Order conditions An s-stage ERK method has s + s(s 1)/2 coefficients to choose, but the order conditions are many Number of coefficients stages s # coefficients Number of order conditions order p # conditions Numerical Methods for Differential Equations p. 33/63

38 Order conditions An s-stage ERK method has s + s(s 1)/2 coefficients to choose, but the order conditions are many Number of coefficients stages s # coefficients Number of order conditions order p # conditions Maximum order, min stages order p min stages Numerical Methods for Differential Equations p. 33/63

39 6. Embedded RK methods Two methods in one Butcher tableau (RK34) Y 1 = f(t n,y n ) Y 2 = f(t n + h/2,y n + hy 1/2) Y 3 = f(t n + h/2,y n + hy 2/2) Z 3 = f(t n + h,y n hy 1 + 2hY 2) Y 4 = f(t n + h,y n + hy 3) y n+1 = y n + h 6 (Y 1 + 2Y 2 + 2Y 3 + Y 4) order 4 z n+1 = y n + h 6 (Y 1 + 4Y 2 + Z 3) order 3 The difference y n+1 z n+1 can be used as an error estimate Numerical Methods for Differential Equations p. 34/63

40 Adaptive RK methods Example Use an embedded pair, e.g. RK34 Local error estimate r n+1 := y n+1 z n+1 = O(h 4 ) Adjust the step size h so that the local error estimate equals a prescribed tolerance TOL Simplest step size change scheme h n+1 = ( TOL r n+1 ) 1/p h n makes r n TOL Adaptivity using local error control Numerical Methods for Differential Equations p. 35/63

41 7. Implicit Runge Kutta methods (IRK) Y 1 Y 2 Y s y n+1 = y n + h = y n + h. = y n + h = y n + h s a 1,j f(t n + c j h,y j ) j=1 s a 2,j f(t n + c j h,y j ) j=1 s a s,j f(t n + c j h,y j ) j=1 s b j f(t n + c j h,y j ) j=1 Numerical Methods for Differential Equations p. 36/63

42 Implicit Runge Kutta methods... In stage value stage derivative form Y i = y n + h s j=1 a i,j Y j Y j = f(t n + c j h,y j ) y n+1 = y n + h s j=1 b j Y j Numerical Methods for Differential Equations p. 37/63

43 1-stage IRK method Implicit Euler (order 1) Implicit midpoint method (order 2) Y 1 = f(t n + c 1 h,y n + ha 11 Y 1) y n+1 = y n + hb 1 Y 1 may be written as 1/2 1/2 y n+1 = y n + hb 1 f(t n + c 1 h,( b 1 a 11 b 1 y n + a 11 b 1 y n+1 )) Taylor expansion: y n+1 = y + hb 1 f(t n + c 1 h,y + a 11 hf + a 11 h 2 b 1 b 1 2 (f t + f y f) + O(h 2 )) = y + hb 1 hf + h 2 (b 1 c 1 f t + a 11 f y f) + O(h 3 ) 1 Numerical Methods for Differential Equations p. 38/63

44 Taylor expansions for 1-stage IRK y(t n+1 ) = y + hf + h2 2 (f t + f y f) + O(h 3 ) y n+1 = y + hb 1 f + h 2 (b 1 c 1 f t + a 11 f y f) + O(h 3 ) Condition for order 1 (consistency) b 1 = 1 Conditions for order 2 c 1 = a 11 = 1/2 Conclusion Implicit Euler is of order 1 and implicit midpoint method is the only 1-stage IRK of order 2 Numerical Methods for Differential Equations p. 39/63

45 8. The stability function Applying an IRK to the test equation, we get hy i = hλ (y n + s j=1 a i,j hy j ), i = 1,...,s Let hy = [hy 1 hy s ]T and 1 = [1 1 1] T R s, then (I hλa)hy = hλ1y n so hy = hλ(i hλa) 1 1y n y n+1 = y n + s j=1 b j hy j = [1 + hλb T (I hλa) 1 1]y n Numerical Methods for Differential Equations p. 40/63

46 The stability function Theorem For every Runge-Kutta method applied to the linear test equation y = λy we have y n+1 = R(hλ)y n where the rational function R(z) = 1 + zb T (I za) 1 1. If the method is explicit, then R(z) is a polynomial of degree s The function R(z) is called the method s stability function Numerical Methods for Differential Equations p. 41/63

47 A-stability of RK methods Definition The method s stability region is the set D = {z C : R(z) 1} Theorem If R(z) maps all of C into the unit circle, then the method is A-stable Corollary No explicit RK method is A-stable (For ERK R(z) is a polynomial, and P(z) as z ) Numerical Methods for Differential Equations p. 42/63

48 A-stable methods and the Maximum Principle Theorem R(z) 1 for all z C if and only if all the poles of R have positive real parts and R(iω) 1 for all ω R This is the Maximum Principle in complex analysis Example 0 1/4 1/4 Y 1 = f(y n + hy 1 /4 hy 2 /4) 2/3 1/4 5/12 Y 2 = f(y n + hy 1 /4 + 5hY 2 /12) 1/4 3/4 y n+1 = y n + h(y 1 + 3Y 2 )/4 Numerical Methods for Differential Equations p. 43/63

49 Example... Applied to the test equation, we get y n+1 = hλ hλ (hλ)2 y n with poles 2 ± i 2 C +, and R(iω) 2 = ω ω ω4 1 Conclusion R(z) 1 z C. The method is A-stable Numerical Methods for Differential Equations p. 44/63

50 9. Linear Multistep Methods A multistep method is a method of the type y n+1 = Φ(f,h,y 0,y 1,...,y n ) using values from several previous steps Explicit Euler y n+1 = y n + hf(t n,y n ) Trapezoidal rule y n+1 = y n + h( f(t n,y n )+f(t n+1,y n+1 ) 2 ) Implicit Euler y n+1 = y n + hf(t n+1,y n+1 ) are all one-step methods, but also LM methods Numerical Methods for Differential Equations p. 45/63

51 Multistep methods and difference equations A k-step multistep method replaces the ODE y = f(t,y) by a (finite) difference equation k a k j y n j = h j=0 k b k j f(t n j,y n j ) j=0 Generating (characteristic) polynomials k ρ(w) = a m w m σ(w) = m=0 k m=0 b m w m Normalization a k = 1 or σ(1) = 1 (choose your preference) If b k = 0, the method is explicit ; if b k 0, it is implicit EE: ρ(w) = w 1, σ(w) = 1; IE: ρ(w) = w 1, σ(w) = w Numerical Methods for Differential Equations p. 46/63

52 Lagrange interpolation Given a grid {t 0,t 1,...,t k } construct a degree k polynomial basis Φ i (t) i = 0,1,...,k such that Φ i (t j ) = δ ij (the Kronecker delta) If the values z j = z(t j ) are known for the function z(t), then P(t) = k Φ j (t)z j j=0 interpolates z(t) on the grid: P(t j ) = z j ; P(t) z(t) for all t Numerical Methods for Differential Equations p. 47/63

53 Adams methods (J.C. Adams, 1880s) Suppose we have the first n + k approximations y m = y(t m ), m = 0, 1,...,n + k 1 Rewrite y = f(t,y) by integration y(t n+k ) y(t n+k 1 ) = tn+k t n+k 1 f(τ,y(τ)) dτ Adams methods approximate the integrand by an interpolation polynomial on t n,t n 1,... f(τ,y(τ)) P(τ) Numerical Methods for Differential Equations p. 48/63

54 Adams Bashforth methods (explicit) Interpolate f values with polynomial of degree k 1: P(t n+j ) = f(t n+j,y(t n+j )) j = 0,...,k 1 Then P(τ) = f(τ,y(τ)) + O(h k ) for t [t n,t n+k ] y(t n+k ) = y(t n+k 1 ) + tn+k t n+k 1 P(τ)dτ + O(h k+1 ) The k-step Adams-Bashforth method is the order k method y n+k = y n+k 1 + h k 1 j=0 b j f(t n+j,y n+j ) where b j = h 1 t n+k t n+k 1 Φ j (τ)dτ Numerical Methods for Differential Equations p. 49/63

55 Coefficients of AB1 AB1: for k = 1 y n+1 = y n + hb 0 f(t n,y n ) where b 0 = h 1 tn+1 t n Φ 0 (τ)dτ = h 1 tn+1 t n 1dτ = 1 y n+1 = y n + hf(t n,y n ) Conclusion AB1 is the explicit Euler method Numerical Methods for Differential Equations p. 50/63

56 Coefficients of AB2 Here Φ 1 (t) = t t n t n+1 t n ; Φ 0 (t) = t t n+1 t n t n+1 AB2: for k = 2 y n+2 = y n+1 + h [b 1 f(t n+1,y n+1 ) + b 0 f(t n,y n )] b 0 b 1 y n+2 = h 1 tn+2 t n+1 Φ 0 (τ)dτ = 1/2 tn+2 = h 1 Φ 1 (τ)dτ = 3/2 t n+1 [ 3 = y n+1 + h 2 f(t n+1,y n+1 ) 1 ] 2 f(t n,y n ) Numerical Methods for Differential Equations p. 51/63

57 Initializing an Adams method The first step of AB2 is y 2 = y 1 + h [ 3 2 f(t 1,y 1 ) 1 ] 2 f(t 0,y 0 ) so we need the values of y 0 and y 1 to start. y 0 is obtained from the initial value, but y 1 has to be computed with a one-step method. Implementing AB2: we may use AB1 for the first step, y n+2 y 1 = y 0 + hf(t 0,y 0 ) [ 3 = y n+1 + h 2 f(t n+1,y n+1 ) 1 ] 2 f(t n,y n ), n 0 Numerical Methods for Differential Equations p. 52/63

58 Example: AB1 vs AB2 Approximate the solution to y = y 2 cos t, y(0) = 1/2, t [0,8π] with h = π/6 and h = π/60 AB1: Solutions Errors AB2: Solutions Errors Numerical Methods for Differential Equations p. 53/63

59 How do we check the order of a multistep method? A multistep method is of order of consistency p if the local error is k a j y(t n+j ) h j=0 k b j y (t n+j ) = O(h p+1 ) j=0 Try if the formula holds exactly for polynomials y(t) = 1, t, t 2, t 3,... Insert y = t m and y = mt m 1 into the formula, take t n+j = jh: k a j (jh) m h j=0 k k b j m(jh) m 1 = h m (a j j m b j mj m 1 ) j=0 j=0 Numerical Methods for Differential Equations p. 54/63

60 Order conditions for multistep methods Theorem A k-step method is of consistency order p if and only if it satisfies the following conditions: k j m a j = m j=0 k j m 1 b j, m = 0,1,...,p j=0 k j p+1 a j (p + 1) j=0 k j p b j j=0 Then the multistep formula holds exactly for all polynomials of degree p or less. (Problems with y = P(t) are solved exactly) Numerical Methods for Differential Equations p. 55/63

61 The root condition Definition A polynomial ρ satisfies the root condition if all of its zeros have moduli less than or equal to one and the zeros of unit modulus are simple Examples ρ(w) = (w 1)(w 0.5)(w + 0.9) ρ(w) = (w 1)(w + 1) ρ(w) = (w 1) 2 (w 0.5) ρ(w) = (w 1)(w 2)(w + 2) ρ(w) = (w 1)(w ) All Adams methods have ρ(w) = w k 1 (w 1) Numerical Methods for Differential Equations p. 56/63

62 The Dahlquist equivalence theorem Definiton A method is zero-stable if ρ satisfies the root condition Theorem A multistep method is convergent if and only if it is zero-stable and consistent of order p 1 (without proof) Example k-step Adams-Bashforth methods are of order k and have ρ(w) = w k 1 (w 1) they are convergent Numerical Methods for Differential Equations p. 57/63

63 Dahlquist s first barrier Theorem The maximal order of a zero-stable k-step method is k for explicit methods p = k + 1 if k is odd for implicit methods k + 2 if k is even Numerical Methods for Differential Equations p. 58/63

64 Backward differentiation formula of order 2 Construct a 2-step method of order 2 of the form α 2 y n+2 + α 1 y n+1 + α 0 y n = h f(t n+2,y n+2 ) Order conditions for p = 2: α 2 + α 1 + α 0 = 0; 2α 2 + α 1 = 1; 4α 2 + α 1 = 4 α 2 = 3/2; α 1 = 2; α 0 = 1/2; ρ(w) = 3 2 (w 1)(w 1 ) BDF2 is convergent 3 Numerical Methods for Differential Equations p. 59/63

65 Backward differentiation formulas The backward difference operator is defined as 0 y n+k = y n+k and j y n+k = j 1 y n+k j 1 y n+k 1, j 1 Theorem (without proof): The k-step BDF method k j=1 j j y n+k = hf(t n+k,y n+k ) is convergent of order p = k if and only if 1 k 6 Note BDF methods are suitable for stiff problems Numerical Methods for Differential Equations p. 60/63

66 BDF1-6 stability regions The methods are stable outside the indicated area 20 Stability regions of BDF1 6 methods Numerical Methods for Differential Equations p. 61/63

67 A-stability of multistep methods Applying a multistep method to the linear test equation y = λy produces a difference equation k j=0 a j y n+j = hλ k j=0 b j y n+j The characteristic equation (with z := hλ) ρ(w) zσ(w) = 0 has k roots w j (z). The method is A-stable iff Rez 0 w j (z) 1, with simple unit modulus roots (root condition) Numerical Methods for Differential Equations p. 62/63

68 Dahlquist s second barrier Theorem (without proof): The highest order of an A-stable multistep method is p = 2. Of all 2nd order A-stable multistep methods, the trapezoidal rule has the smallest error Note There is no such order restriction for Runge Kutta methods, which can be A-stable for arbitrarily high orders A multistep method can be useful although it isn t A-stable Numerical Methods for Differential Equations p. 63/63

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo

Graded Project #1. Part 1. Explicit Runge Kutta methods. Goals Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo 2008-11-07 Graded Project #1 Differential Equations FMN130 Gustaf Söderlind and Carmen Arévalo This homework is due to be handed in on Wednesday 12 November 2008 before 13:00 in the post box of the numerical

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

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

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

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

Exam in TMA4215 December 7th 2012

Exam in TMA4215 December 7th 2012 Norwegian University of Science and Technology Department of Mathematical Sciences Page of 9 Contact during the exam: Elena Celledoni, tlf. 7359354, cell phone 48238584 Exam in TMA425 December 7th 22 Allowed

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Ordinary Differential Equations

Ordinary Differential Equations Ordinary Differential Equations Introduction: first order ODE We are given a function f(t,y) which describes a direction field in the (t,y) plane an initial point (t 0,y 0 ) We want to find a function

More information

TMA4215: Lecture notes on numerical solution of ordinary differential equations.

TMA4215: Lecture notes on numerical solution of ordinary differential equations. TMA45: Lecture notes on numerical solution of ordinary differential equations. Anne Kværnø November, 6 Contents Eulers method. 3 Some background on ODEs. 6 3 Numerical solution of ODEs. 8 3. Some examples

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

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

Examination paper for TMA4215 Numerical Mathematics

Examination paper for TMA4215 Numerical Mathematics Department of Mathematical Sciences Examination paper for TMA425 Numerical Mathematics Academic contact during examination: Trond Kvamsdal Phone: 93058702 Examination date: 6th of December 207 Examination

More information

Explicit One-Step Methods

Explicit One-Step Methods Chapter 1 Explicit One-Step Methods Remark 11 Contents This class presents methods for the numerical solution of explicit systems of initial value problems for ordinary differential equations of first

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

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

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

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

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

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam

Jim Lambers MAT 460/560 Fall Semester Practice Final Exam Jim Lambers MAT 460/560 Fall Semester 2009-10 Practice Final Exam 1. Let f(x) = sin 2x + cos 2x. (a) Write down the 2nd Taylor polynomial P 2 (x) of f(x) centered around x 0 = 0. (b) Write down the corresponding

More information

Numerical Methods in Physics and Astrophysics

Numerical Methods in Physics and Astrophysics Kostas Kokkotas 2 October 17, 2017 2 http://www.tat.physik.uni-tuebingen.de/ kokkotas Kostas Kokkotas 3 TOPICS 1. Solving nonlinear equations 2. Solving linear systems of equations 3. Interpolation, approximation

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

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

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

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

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

Solving scalar IVP s : Runge-Kutta Methods

Solving scalar IVP s : Runge-Kutta Methods Solving scalar IVP s : Runge-Kutta Methods Josh Engwer Texas Tech University March 7, NOTATION: h step size x n xt) t n+ t + h x n+ xt n+ ) xt + h) dx = ft, x) SCALAR IVP ASSUMED THROUGHOUT: dt xt ) =

More information

Modeling & Simulation 2018 Lecture 12. Simulations

Modeling & Simulation 2018 Lecture 12. Simulations Modeling & Simulation 2018 Lecture 12. Simulations Claudio Altafini Automatic Control, ISY Linköping University, Sweden Summary of lecture 7-11 1 / 32 Models of complex systems physical interconnections,

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

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

Numerical Methods in Physics and Astrophysics

Numerical Methods in Physics and Astrophysics Kostas Kokkotas 2 October 20, 2014 2 http://www.tat.physik.uni-tuebingen.de/ kokkotas Kostas Kokkotas 3 TOPICS 1. Solving nonlinear equations 2. Solving linear systems of equations 3. Interpolation, approximation

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

(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

Advanced methods for ODEs and DAEs

Advanced methods for ODEs and DAEs Advanced methods for ODEs and DAEs Lecture 8: Dirk and Rosenbrock Wanner methods Bojana Rosic, 14 Juni 2016 General implicit Runge Kutta method Runge Kutta method is presented by Butcher table: c1 a11

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

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

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

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

Numerical Methods for Ordinary Differential Equations

Numerical Methods for Ordinary Differential Equations Numerical Methods for Ordinary Differential Equations Answers of the exercises C Vuik, S van Veldhuizen and S van Loenhout 08 Delft University of Technology Faculty Electrical Engineering, Mathematics

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

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

Validated Explicit and Implicit Runge-Kutta Methods

Validated Explicit and Implicit Runge-Kutta Methods Validated Explicit and Implicit Runge-Kutta Methods Alexandre Chapoutot joint work with Julien Alexandre dit Sandretto and Olivier Mullier U2IS, ENSTA ParisTech 8th Small Workshop on Interval Methods,

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 Analysis II. Problem Sheet 9

Numerical Analysis II. Problem Sheet 9 H. Ammari W. Wu S. Yu Spring Term 08 Numerical Analysis II ETH Zürich D-MATH Problem Sheet 9 Problem 9. Extrapolation of the Implicit Mid-Point Rule. Taking the implicit mid-point rule as a basis method,

More information

Parallel Methods for ODEs

Parallel Methods for ODEs Parallel Methods for ODEs Levels of parallelism There are a number of levels of parallelism that are possible within a program to numerically solve ODEs. An obvious place to start is with manual code restructuring

More information

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients AM 205: lecture 13 Last time: ODE convergence and stability, Runge Kutta methods Today: the Butcher tableau, multi-step methods, boundary value problems Butcher tableau Can summarize an s + 1 stage Runge

More information

Advanced methods for ODEs and DAEs

Advanced methods for ODEs and DAEs Lecture : Implicit Runge Kutta method Bojana Roić, 9. April 7 What you need to know before thi lecture numerical integration: Lecture from ODE iterative olver: Lecture 5-8 from ODE 9. April 7 Bojana Roić

More information

Examination paper for TMA4125 Matematikk 4N

Examination paper for TMA4125 Matematikk 4N Department of Mathematical Sciences Examination paper for TMA45 Matematikk 4N Academic contact during examination: Anne Kværnø a, Louis-Philippe Thibault b Phone: a 9 66 38 4, b 9 3 0 95 Examination date:

More information

The Direct Transcription Method For Optimal Control. Part 2: Optimal Control

The Direct Transcription Method For Optimal Control. Part 2: Optimal Control The Direct Transcription Method For Optimal Control Part 2: Optimal Control John T Betts Partner, Applied Mathematical Analysis, LLC 1 Fundamental Principle of Transcription Methods Transcription Method

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

AM205: Assignment 3 (due 5 PM, October 20)

AM205: Assignment 3 (due 5 PM, October 20) AM25: Assignment 3 (due 5 PM, October 2) For this assignment, first complete problems 1, 2, 3, and 4, and then complete either problem 5 (on theory) or problem 6 (on an application). If you submit answers

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

x 2 x n r n J(x + t(x x ))(x x )dt. For warming-up we start with methods for solving a single equation of one variable.

x 2 x n r n J(x + t(x x ))(x x )dt. For warming-up we start with methods for solving a single equation of one variable. Maria Cameron 1. Fixed point methods for solving nonlinear equations We address the problem of solving an equation of the form (1) r(x) = 0, where F (x) : R n R n is a vector-function. Eq. (1) can be written

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

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

Lecture 6. Numerical Solution of Differential Equations B21/B1. Lecture 6. Lecture 6. Initial value problem. Initial value problem

Lecture 6. Numerical Solution of Differential Equations B21/B1. Lecture 6. Lecture 6. Initial value problem. Initial value problem Lecture 6 Numerical Solution of Differential Equations B2/B Initial value problem y = f(x,y), x [x,x M ] y(x ) = y Professor Endre Süli Numerical Solution of Differential Equations p./45 Numerical Solution

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

Southern Methodist University.

Southern Methodist University. Title: Continuous extensions Name: Lawrence F. Shampine 1, Laurent O. Jay 2 Affil./Addr. 1: Department of Mathematics Southern Methodist University Dallas, TX 75275 USA Phone: +1 (972) 690-8439 E-mail:

More information

Numerical Methods for Initial Value Problems; Harmonic Oscillators

Numerical Methods for Initial Value Problems; Harmonic Oscillators Lab 1 Numerical Methods for Initial Value Problems; Harmonic Oscillators Lab Objective: Implement several basic numerical methods for initial value problems (IVPs), and use them to study harmonic oscillators.

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 MTHE712B Time allowed: 3 Hours Attempt QUESTIONS 1 and 2, and THREE other questions.

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

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

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ).

(0, 0), (1, ), (2, ), (3, ), (4, ), (5, ), (6, ). 1 Interpolation: The method of constructing new data points within the range of a finite set of known data points That is if (x i, y i ), i = 1, N are known, with y i the dependent variable and x i [x

More information

Backward error analysis

Backward error analysis Backward error analysis Brynjulf Owren July 28, 2015 Introduction. The main source for these notes is the monograph by Hairer, Lubich and Wanner [2]. Consider ODEs in R d of the form ẏ = f(y), y(0) = y

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