Applied Math for Engineers

Size: px
Start display at page:

Download "Applied Math for Engineers"

Transcription

1 Applied Math for Engineers Ming Zhong Lecture 15 March 28, 2018 Ming Zhong (JHU) AMS Spring / 28

2 Recap Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method for Systems and Higher Order ODEs 5 Homework Ming Zhong (JHU) AMS Spring / 28

3 Recap Summary We have discussed: How to solve non-homogeneous linear First Order ODE system. Method of Undetermined Coefficients. Method of Variation of Parameters, u = Y 1 g. How to solve linear ODEs with power series. y + p(x)y + q(x)y = 0, p, q analytic, then y = m=0 a mx m. y + b(x) x y + c(x) x y = 0, b, c analytic at x = 0, then 2 y = x r m=0 a mx m. Ming Zhong (JHU) AMS Spring / 28

4 Numerical ODEs: Single Step Methods Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method for Systems and Higher Order ODEs 5 Homework Ming Zhong (JHU) AMS Spring / 28

5 Numerical ODEs: Single Step Methods Why Numerical Methods? Not all ODEs can be solved analytically. Consider, x i = N φ( xj x )(xj i x i ), for 1 i N. j=1 Here, φ(r) = 1 if 0 r < 1 2 and φ(r) = 0.1 if 1 2 r < 1 and φ(r) = 0 otherwise. Ming Zhong (JHU) AMS Spring / 28

6 Numerical ODEs: Single Step Methods Notations Consider the Initial Value Problem (IVP) for (f is nice for the IVP to have unique solution), y = f (x, y), y(x 0 ) = y 0. We will try to obtain a numerical solution for x (a, b) containing x 0 : We consider some equidistant mesh points: x 1 = x 0 + h, x 2 = x 0 + 2h,, x n = x 0 + nh. h is called the step size, it is fixed. It is derived from Taylor Series expansion (step by step): y(x + h) = y(x) + hy (x) + h2 2 y + The Euler method (or Euler-Cauchy method) uses only the first derivative: y(x + h) y(x) + hy (x), y n+1 = y n + hf (x n, y n ). Ming Zhong (JHU) AMS Spring / 28

7 Numerical ODEs: Single Step Methods Error of the Euler Method Local Truncation Error By Taylor series expansion, y(x n ) y n O(h 2 ), assuming y n 1 = y(x n 1 ), called the Local Truncation Error. The number of steps is proportional to 1 h. The total error (global error) is proportional to h 2 1 h = h. The Euler method is a first-order method. There are roundoff errors in computer arithmetics, might accumulate in y 1, y 2,. Ming Zhong (JHU) AMS Spring / 28

8 Numerical ODEs: Single Step Methods Varaible Step Size Selection Since y = f, y = f = f x + f y y = f x + f y f. We can use it to esimate y, given a certain Tolerance τ, we want 1 y (ɛ n ) 2τ τ, thus h n y (ɛ n ). h 2 n y must not be zero on the interval. We can take the maximum of y over the whole solution interval. Ming Zhong (JHU) AMS Spring / 28

9 Numerical ODEs: Single Step Methods Improved Euler Method (Heun s Method) Predictor and Corrector Consider the Taylor series expansion of y, y(x + h) = y(x) + hy + h2 2 y + h3 3! y +. Repalcing y with f and y(x + h) = y(x) + hf + h2 2 f + h3 3! f +. However, f requires partial derivatives. The general strategy is to avoid computing f s directly, which brings us the improved Euler method. First, we preditc yn+1 = y n + hf (x n, y n ); use yn+1 to correct, y n+1 = y n + h 2 (f (x n, y n ) + f (x n+1, y n+1)). Ming Zhong (JHU) AMS Spring / 28

10 Numerical ODEs: Single Step Methods Local Truncation Error of Heun s Method Theorem The local truncation error of the Heun s method is of order h 3. Can we go beyound second order? The Runge-Kutta Methods (RK4 methods) k 1 = hf (x n, y n ). k 2 = f (x n + h 2, y n + k 1 2 ). k 3 = f (x n + h 2, y n + k 2 2 ). k 4 = f (x n + h, y n + k 3 ). y n+1 = y n (k 1 + 2k 2 + 2k 3 + k 4 ). It is a 4 th order method. Ming Zhong (JHU) AMS Spring / 28

11 Numerical ODEs: Single Step Methods General Explicit RK Methods Consider a s stage RK method of the following, y n+1 = y n + h s i=1 b ik i, where k 1 = f (x n, y n ) k 2 = f (x n + c 2 h, y n + h(a 21 k 1 )) k 3 = f (x n + c 3 h, y n + h(a 31 k 1 + a 32 k 2 )). k s = f (x n + c s h, y n + h(a s1 k 1 + a s2 k 2 + a s,s 1 k s 1 )) To specify a particular method, one needs to provide the integer s (the number of stages), the coefficients a ij (for 1 j < i s), b i (for i = 1,, s), and c i (for i = 2, s). The matrix A = [a ij ] is called the Runge-Kutta matrix, b i s are known as the weights and the nodes. Ming Zhong (JHU) AMS Spring / 28

12 Numerical ODEs: Single Step Methods Butcher Tableau 0 c 2 a 21 c 3 a 31 a c s a s1 a s2 a s,s 1 b 1 b 2 b s 1 b s The Runge-Kutta method is consistent if i 1 j=1 a ij = c i for i = 2,, s. order min s Ming Zhong (JHU) AMS Spring / 28

13 Numerical ODEs: Single Step Methods Step Size Control Runge-Kutta-Fehlberg Consider any first order method, and two approximations, y h and y 2h, at the same x n obtained from two different step sizes, h and 2h. Then, y yh e h and y y2h e 2h. Moreover, e 2h 2 1 e h, then, y h y 2h e 2h e h e h. So we can estimate e h by taking the difference of y h and y 2h. And, If y h y 2h τ (a given tolerance), we keep y 2h and move on. Otherwise, we calculate y h 2 and compare. Ming Zhong (JHU) AMS Spring / 28

14 Numerical ODEs: Single Step Methods The RKF Method However the RKF method can do it better. RKF is an embedded RK method. The Fehlberg s fifth-order method, y n+1 = y n + γ 1 k γ 5 k 5 + γ 6 k 6. [γ 1,, γ 6 ] = [ The Fehlberg s fourth-order method,, 0, , , 9 50, 2 55 ] yn+1 = y n + γ1 k 1 + γ5 k 5. [γ1,, γ 5 ] = [ , 0, 2565, , 1 5 ] They use the same k i s. Ming Zhong (JHU) AMS Spring / 28

15 Numerical ODEs: Single Step Methods RKF Method, Cont. It also comes with an error estimator, These are explicit methods, where the evaluation of f s depend on previous information, (x n, y n ). Some problems are very sensitive to step size (explicitly). We need to consider implicit method for stiff problems, the implicit Euler method (Backward Euler), y n+1 = y n + hf (x n+1, y n+1 ). Each step, we need to solve an equation, y n+1 hf (x n+1, y n+1 ) = y n. Use Newton s method (if it is non-linear). It gives only first order accuracy however allows for bigger step size. Ming Zhong (JHU) AMS Spring / 28

16 Numerical ODEs: Single Step Methods Example Example Numerically solve the IVP, y = 20y + 20x 2 + 2x, y(0) = 1. The true solution is: y = e 20x + x 2, e 20x decays too fast. Using Backward Euler: y n+1 = y n + hf (x n+1, y n1 ). Solve for y n+1, we obtain y n+1 = yn+h(20(xn+h)2 +2(x n+h)) 1+20h. Solution is stable for Backward Euler with h = 0.2. Solution is stable for Euler with h = 0.05 but unstable for h = 0.1. Solution is stable for RK4 with h = 0.1 but unstable for h = 0.2. Ming Zhong (JHU) AMS Spring / 28

17 Multistep Methods Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method for Systems and Higher Order ODEs 5 Homework Ming Zhong (JHU) AMS Spring / 28

18 Multistep Methods Multistep Methods We have discussed, A family of Single Step Methods: they are all part of the Runge-Kutta family (of different orders). They are self-starting, they only need y n 1 to get to y n. The Adams-Bashforth Methods, Consider the IVP, y = f (x, y) with y(x 0 ) = y 0. By integration, y(x n+1 ) y(x n ) = x n+1 x=x n y (x)(= f (x, y)) dx. We only know f at (x 0, y 0 ), (we do have expression for f, but y is unknown). We approximate f using polynomial at unknown (x, y). So y(x n+1 ) y(x n ) x n+1 x=x n p(x) dx. Ming Zhong (JHU) AMS Spring / 28

19 Multistep Methods Adams-Bashforth Methods, Cont. Continue on, Suppose we are given (x n 3, y n 3 ), (x n 2, y n 2 ), (x n 1, y n 1 ), and (x n, y n ). Let f n = f (x n, y n ) and f n s = f (x n s, y n s ), for s = 1, 2, 3. Suppose also x n 3, x n 2, x n 1, x n, are equidistant points. We will approximate f at the 4 pairs of points using cubic polynomial, p 3 (x), defined as p 3 (x) = f n + r f n + r(r + 1) 2 f n + 2 r(r + 1)(r + 2) 3 f n. 6 Here, r = x xn h, and is the Newton s backward difference formula, f n = f n f n 1, and k f n = k 1 f n k 1 f n 1. y n+1 = y n + h 24 (55f n 59f n f n 2 9f n 3 ), Adams-Bahsforth method of fourth order. Ming Zhong (JHU) AMS Spring / 28

20 Multistep Methods Adams-Moulton Formula The Adams-Bashforth method uses all past information, we can also include the information at (x n+1, y n+1 ). p 3 (x) = f n+1 + r f n+1 + r(r+1) 2 2 f n+1 + r(r+1)(r+2) 6 3 f n+1. y n+1 = y n + h 24 (9f n f n 5f n 1 + f n 2 ). It is an implicit method. In order to avoid solving an equation, we can use the predictor-corrector of AB4. Predict: y n+1 = y n + h 24 (55f n 59f n f n 2 9f n 3 ). Correct: y n+1 = y n + h 24 (9f (x n+1, y n+1 ) + 19f n 5f n 1 + f n 2 ). This is called the Adams-Moulton s method of fourth order. How do we get started? We are only given (x 0, y 0 ), but we will need (x 1, y 1 ), (x 2, y 2 ), and (x 3, y 2 ) to start the method. Just use any method to come up with those points. Ming Zhong (JHU) AMS Spring / 28

21 Method for Systems and Higher Order ODEs Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method for Systems and Higher Order ODEs 5 Homework Ming Zhong (JHU) AMS Spring / 28

22 Method for Systems and Higher Order ODEs First Order System of ODEs Let us consider the IVP: y = f ( x, y) with y( x 0 ) = y 0. x is of size n 1 and y is of size m 1. f and y have to have the same size, but not necessarily x and y. f is nice so that the IVP has a unique solution on some open interval containing x 0. We only focus on first order ODEs or system of ODEs. For any higher order, y (m) = f (x, y, y, y,, y (m 1) ). Conversion: y 1 = y, y 2 = y y m = y (m 1). Then, y 1 = y 2,, y m 1 = y m, and y m = f (x, y 1, y 2,, y m 1 ). Ming Zhong (JHU) AMS Spring / 28

23 Method for Systems and Higher Order ODEs Single Step Methods The Euler method, The RK4 method, y n+1 = y n + h f ( x n, y n ). k1 = h f ( x n, y n ) k2 = h f ( x n + h 2, y n + k 1 2 ) k3 = h f ( x n + h 2, y n + k 2 2 ) k4 = h f ( x n + h, y n + k 3 ) y n+1 = y n ( k k k 3 + k 4 ) Ming Zhong (JHU) AMS Spring / 28

24 Method for Systems and Higher Order ODEs Runge-Kutta-Nystrom Methods The RKN methods, RKN methods are direct extensions of RK methods for second order ODEs: y = f (x, y, y ). k 1 = h 2 f (x n, y n, y n) k 2 = h 2 f (x n + h 2, y n + K, y n + k 1 ), K = h 2 (y n k 1) k 3 = h 2 f (x n + h 2, y n + K, y n + k 2 ) k 4 = h 2 f (x n + h, y n + K, y n + L), L = h(y n + k 3 ) y n+1 = y n + h(y n (k 1 + k 2 + k 3 )) y n+1 = y n (k 1 + 2k 2 + 2k 3 + k 4 ) Ming Zhong (JHU) AMS Spring / 28

25 Method for Systems and Higher Order ODEs RKN without y If y = f (x, y) not containing y, we have a simplify RNK formulas k 1 = h 2 f (x n, y n ) k 2 = h 2 f (x n + h 2, y n + h 2 (y n + k 1 2 ) = k 3 k 4 = h 2 f (x n + h, y n + h(y n + k 2 ) y n+1 = y n + h(y n (k 1 + 2k 2 )) y n+1 = y n (k 1 + 4k 2 + k 4 ) Backward Euler method for stiff systems, y n+1 = y n + h f ( x n+1, y n+1 ). At each step, we will have to solve a (possible) non-linear system for y n+1. Ming Zhong (JHU) AMS Spring / 28

26 Homework Table of Contents 1 Recap 2 Numerical ODEs: Single Step Methods 3 Multistep Methods 4 Method for Systems and Higher Order ODEs 5 Homework Ming Zhong (JHU) AMS Spring / 28

27 Homework Homework 7 Please do the following: Chapter 4 Review Questions: 20, 21, 22, 23. Chapter 5 Review Questions: 12, 14, 16, 18. Ming Zhong (JHU) AMS Spring / 28

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

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

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

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

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

More information

Initial value problems for ordinary differential equations

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

More information

Numerical 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

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

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

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

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

9.6 Predictor-Corrector Methods

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

More information

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Mini project ODE, TANA22

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

More information

5.6 Multistep Methods

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

More information

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

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

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

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

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

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

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

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

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

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

More information

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

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

MB4018 Differential equations

MB4018 Differential equations MB4018 Differential equations Part II http://www.staff.ul.ie/natalia/mb4018.html Prof. Natalia Kopteva Spring 2015 MB4018 (Spring 2015) Differential equations Part II 0 / 69 Section 1 Second-Order Linear

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

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

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

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

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

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

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

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

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

1 Error Analysis for Solving IVP

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

More information

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

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

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

More information

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

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

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

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

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

More information

MATH 350: Introduction to Computational Mathematics

MATH 350: Introduction to Computational Mathematics MATH 350: Introduction to Computational Mathematics Chapter VII: Numerical Differentiation and Solution of Ordinary Differential Equations Greg Fasshauer Department of Applied Mathematics Illinois Institute

More information

Chap. 20: Initial-Value Problems

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

More information

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

ODE Runge-Kutta methods

ODE Runge-Kutta methods ODE Runge-Kutta methods The theory (very short excerpts from lectures) First-order initial value problem We want to approximate the solution Y(x) of a system of first-order ordinary differential equations

More information

Lecture 10 Polynomial interpolation

Lecture 10 Polynomial interpolation Lecture 10 Polynomial interpolation Weinan E 1,2 and Tiejun Li 2 1 Department of Mathematics, Princeton University, weinan@princeton.edu 2 School of Mathematical Sciences, Peking University, tieli@pku.edu.cn

More information

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

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

More information

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

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

More information

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

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

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

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

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

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

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

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20

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

More information

Lecture 8: Calculus and Differential Equations

Lecture 8: Calculus and Differential Equations Lecture 8: Calculus and Differential Equations Dr. Mohammed Hawa Electrical Engineering Department University of Jordan EE201: Computer Applications. See Textbook Chapter 9. Numerical Methods MATLAB provides

More information

Lecture 8: Calculus and Differential Equations

Lecture 8: Calculus and Differential Equations Lecture 8: Calculus and Differential Equations Dr. Mohammed Hawa Electrical Engineering Department University of Jordan EE21: Computer Applications. See Textbook Chapter 9. Numerical Methods MATLAB provides

More information

Generalized RK Integrators for Solving Ordinary Differential Equations: A Survey & Comparison Study

Generalized RK Integrators for Solving Ordinary Differential Equations: A Survey & Comparison Study Global Journal of Pure and Applied Mathematics. ISSN 7-78 Volume, Number 7 (7), pp. Research India Publications http://www.ripublication.com/gjpam.htm Generalized RK Integrators for Solving Ordinary Differential

More information

Numerical Methods for Differential Equations

Numerical Methods for Differential Equations CHAPTER 5 Numerical Methods for Differential Equations In this chapter we will discuss a few of the many numerical methods which can be used to solve initial value problems and one-dimensional boundary

More information

Math 411 Preliminaries

Math 411 Preliminaries Math 411 Preliminaries Provide a list of preliminary vocabulary and concepts Preliminary Basic Netwon's method, Taylor series expansion (for single and multiple variables), Eigenvalue, Eigenvector, Vector

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

4.4 Computing π, ln 2 and e

4.4 Computing π, ln 2 and e 252 4.4 Computing π, ln 2 and e The approximations π 3.1415927, ln 2 0.69314718, e 2.7182818 can be obtained by numerical methods applied to the following initial value problems: (1) y = 4, 1 + x2 y(0)

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

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

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

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

Numerical Methods for Partial Differential Equations

Numerical Methods for Partial Differential Equations Numerical Methods for Partial Differential Equations Seongjai Kim Department of Mathematics and Statistics Mississippi State University Mississippi State, MS 39762 USA Email: skim@math.msstate.edu September

More information

Selected HW Solutions

Selected HW Solutions Selected HW Solutions HW1 1 & See web page notes Derivative Approximations. For example: df f i+1 f i 1 = dx h i 1 f i + hf i + h h f i + h3 6 f i + f i + h 6 f i + 3 a realmax 17 1.7014 10 38 b realmin

More information

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

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

More information

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

Efficient Simulation of Physical System Models Using Inlined Implicit Runge Kutta Algorithms

Efficient Simulation of Physical System Models Using Inlined Implicit Runge Kutta Algorithms Efficient Simulation of Physical System Models Using Inlined Implicit Runge Kutta Algorithms by Vicha Treeaporn A Thesis Submitted to the Faculty of the Department of Electrical and Computer Engineering

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

EXAMPLE OF ONE-STEP METHOD

EXAMPLE OF ONE-STEP METHOD EXAMPLE OF ONE-STEP METHOD Consider solving y = y cos x, y(0) = 1 Imagine writing a Taylor series for the solution Y (x), say initially about x = 0. Then Y (h) = Y (0) + hy (0) + h2 2 Y (0) + h3 6 Y (0)

More information

Embedded 5(4) Pair Trigonometrically-Fitted Two Derivative Runge- Kutta Method with FSAL Property for Numerical Solution of Oscillatory Problems

Embedded 5(4) Pair Trigonometrically-Fitted Two Derivative Runge- Kutta Method with FSAL Property for Numerical Solution of Oscillatory Problems Embedded 5(4) Pair Trigonometrically-Fitted Two Derivative Runge- Kutta Method with FSAL Property for Numerical Solution of Oscillatory Problems N. SENU, N. A. AHMAD, F. ISMAIL & N. BACHOK Institute for

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

Numerical Methods for Partial Differential Equations

Numerical Methods for Partial Differential Equations Numerical Methods for Partial Differential Equations Seongjai Kim Department of Mathematics and Statistics Mississippi State University Mississippi State, MS 39762 USA Email: skim@math.msstate.edu September

More information

Second Order ODEs. CSCC51H- Numerical Approx, Int and ODEs p.130/177

Second Order ODEs. CSCC51H- Numerical Approx, Int and ODEs p.130/177 Second Order ODEs Often physical or biological systems are best described by second or higher-order ODEs. That is, second or higher order derivatives appear in the mathematical model of the system. For

More information

Solving Delay Differential Equations (DDEs) using Nakashima s 2 Stages 4 th Order Pseudo-Runge-Kutta Method

Solving Delay Differential Equations (DDEs) using Nakashima s 2 Stages 4 th Order Pseudo-Runge-Kutta Method World Applied Sciences Journal (Special Issue of Applied Math): 8-86, 3 ISSN 88-495; IDOSI Publications, 3 DOI:.589/idosi.wasj.3..am.43 Solving Delay Differential Equations (DDEs) using Naashima s Stages

More information

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University

Lecture Note 3: Interpolation and Polynomial Approximation. Xiaoqun Zhang Shanghai Jiao Tong University Lecture Note 3: Interpolation and Polynomial Approximation Xiaoqun Zhang Shanghai Jiao Tong University Last updated: October 10, 2015 2 Contents 1.1 Introduction................................ 3 1.1.1

More information