Ordinary Differential Equations

Size: px
Start display at page:

Download "Ordinary Differential Equations"

Transcription

1 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 y(t) for t t 0,T such that y(t 0 ) y 0 initial condition y (t) f(t,y(t)) for t t 0,T ordinary differential equation (ODE) This is called an initial value problem (IVP). The partial derivative f y (t,y) f (t,y) is important for the behavior of the differential equation. y Theorem.. Assume that f(t,y) and f y (t,y) are continuous for t t 0,T, y R. For a given initial value y 0 there is a unique solution y(t) of the initial value problem. Either the solution exists for all t 0,T, or it only exists on a smaller interval t 0,t ) with t 0 < t < T. We can solve the IVP in Matlab with ode45: % define function f(t,y) ts,ys ode45(f,t0,t,y0); % find column vectors ts,ys with values of solution ys(end) % value y(t) of solution plot(ts,ys) % plot solution Example: Find a function y(t) for t, 3 such that Here we have t 0, y 0 0, f(t,y) t y. y (t) t y(t) y( ) 0 Numerical solution in Matlab: (using m-file dirfield.m from course web page) t-y^ % define function f(t,y) dirfield(f, -:.:3, -:.:.6); hold on % plot direction field ts,ys ode45(f,-,3,0); % solve IVP for t from - to 3, initial value 0 % this gives vectors ts,ys plot(ts,ys, b ); hold off % plot solution

2 What happens if we perturb the initial value y 0? Theorem.. Let y(t) denote the solution of the IVP with initial condition y(t 0 ) y 0, let ỹ(t) denote the solution of the IVP with initial condition ỹ(t 0 ) ỹ 0. Assume f y (t,y) M for t t 0,T, y R. Then ỹ(t) y(t) ỹ 0 y 0 e M(t t 0) for t t 0,T For M < 0 the difference ỹ(t) y(t) decays exponentially for increasing t. For M > 0 the difference may increase exponentially. We call the ODE unstable if we have f y (t,y) > 0 for all t t 0,T, y R. We call the ODE stable if we have f y (t,y) < 0 for all t t 0,T, y R. System of ODEs, higher order ODEs We want to find n functions y (t),...,y n (t) for t t 0,T satisfying the differential equations y (t) f (t,y (t),...,y n (t)). y n(t) f n (t,y (t),...,y n (t)) and the initial conditions y (t 0 ) y (0),...,y n(t 0 ) y (0) n. We use vector notation: E.g., for n we want to find y(t) y (t) y (t) f (t,y (t),y (t)) f (t,y (t),y (t)) y (t) f (t, y(t)), y(t 0 ) y (0), y (t) y (t) y (t 0 ) y (t 0 ) such that y (0) y (0)

3 We will omit the vector arrows from now on. We denote by D y f(t,y) the Jacobian of f(t,y) with respect to y: f y D y f(t,y). f n y It is important for the behavior of the differential equation. Theorem.. Assume that f(t,y) and D y f(t,y) are continuous for t t 0,T, y R n. For a given initial value y (0) there is a unique solution y(t) of the initial value problem. Either the solution exists for all t 0,T, or it only exists on a smaller interval t 0,t ) with t 0 < t < T. We can solve the IVP in Matlab with ode45: For n we use ;... % define function f(t,y) using t, y(), y() ts,ys ode45(f,t0,t,y0); % find column vector ts, array ys with values of solution ys(end,:) % values y, y at final time T plot(ts,ys(:,)) % plot solution y(t) f y n. f n y n nd order ODE So far the differential equations only contained the first derivative y (t). But in many applications (e.g. Newton s law) we have differential equations containing y (t). We then need initial conditions for y(t 0 ) and y (t 0 ). We can rewrite this as a first order system: Let y (t) : y(t) and y (t) : y (t). Then we have y y and y where we solve the nd order ODE for y. Example: Find a function y(t) for t 0, 4 such that y (t) y (t)+3y(t) t () y(0), y (0) () This gives the first order system y y y t+y 3y, y (0) y (0) (3) Numerical solution in Matlab: Print out y(t) and plot the function y(t) y(); t+y()-3*y(); % define function f(t,y) ts,ys ode45(f,0,4,-;); % solve IVP for t from 0 to 4, initial value -; finalval ys(end,) % value of y at final time T plot(ts,ys(:,)); % plot solution y(t) 3 Euler method Consider a first order system of ODEs: We want to find y(t) for t t 0,T such that y (t) f (t,y(t)), y(t 0 ) y (0) For the Euler method we divide the interval t 0,T into N subintervals of equal length h (T t 0 )/N (we can also use subintervals of different length). Let t j t 0 +jh. We then want to find approximations y (),...,y (N) for y(t j ). 3

4 start at the initial value t 0,y (0) for k 0,...,N do s : f(t k,y (k) ) y (k+) : y (k) +hs t k+ : t k +h Example: Consider the Initial Value Problem (), (). Use steps of the Euler method with h to find approximations for y() and y (). We use y (t) : y(t) and y (t) ( y (t)) and obtain the first order ODE (3). Step : s f(t 0,y (0) ) f 0,, y () y (0) +h s ( ) Step : s f(t,y () ) f, 0 4.5, y () y () 0 +h s This gives y().5 and y () 7. Errors for Euler method We consider the case n. At time t k the Euler method gives an approximation y k for the exact value y(t k ). We denote the error by e k : y k y(t k ) By Taylor s theorem we have with a remainder term r k y (τ k )h y (t k ) {}}{ y(t k+ ) y(t k )+h f (t k,y(t k ))+r k y k+ y k + h f(t k,y k ) The second equation is just the definition of the Euler approximation y k+. Subtracting the first from the second equation gives e k+ e k +h f(t k,y k ) f(t k,y(t k )) r k Using the mean value theorem for g(y) : f(t k,y) f(t k,y k ) f(t k,y(t k )) f y (t k,η k ) y k y(t k ), hence the new error is e k+ +hf y (t k,η k ) e k r k }{{} a k with the amplification factor a k +hf y (t k,η k ) and the local truncation error r k y (τ k )h. For an unstable ODE we have f y (t,y) > 0 and hence a k >. For a stable ODE we have f y (t,y) < 0 and hence a k <. However, in this case we want a k <, i.e., < +hf y (t,y) < The right inequality is true for any h > 0. The left inequality is true if the following stability condition holds: h < f y 4

5 () General case: We assume f y (t,y) C fort t 0,T, y R y (t) C fort t 0,T Then we get bounds a k A for the amplification factor and r k R for the local truncation error: a k +hf y (t k,η k ) +hc : A r k y (τ k )h C h : R yielding Since e 0 0 we obtain e k+ A e k +R e R e AR+R (+A)R e 3 A(+A)R+R ( +A+A ) R. e k ( +A+ +A k ) R (4) We have for the geometric series +A+ +A k Ak A Ak A (+hc ) k hc The function e x satisfies + x e x, hence with x hc we get + hc e hc. Using this and R C h in (4) gives the error bound This shows: y k y(t k ) C C e C (t k t 0 ) h if we keep taking Euler steps with a fixed value h for t the error can increase exponentially. This is not surprising: For an unstable ODE any tiny initial error can cause an exponentially increasing error for t. if we only want to find the solution for t t 0,T: We use h T t 0 N ch c N : The Euler method is a method of order. Example: The initial value problem y y sint cost, y(0) has the solution y(t) cost. Here f y (t,y) > 0. We use the Euler method with h 0.: y-sin(t)-cos(t) tv 0:.:5; plot(tv,cos(tv), b ); hold on % plot exact solution dirfield(f,0:.3:5,-:.:3); ts,ys Euler(f,0,5,,50); % use 50 steps of size 5/50 plot(ts,ys, r.- ); hold off and obtain errors bounded by 5

6 We see that the Euler values go exponentially to + as t gets larger than 4, whereas the exact solution y(t) cos t stays bounded. () Special case: Stable ODE where h satisfies stability condition: We assume f y (t,y) < 0: We have C C 0 > 0 such that C f y (t,y) C 0 fort t 0,T, y R y (t) C fort t 0,T We now want to have an amplification factor with a k C 0 h, i.e., ( C 0 h) +hf y (t k,η k ) C 0 h The right inequality holds for any h > 0. We have hc +hf y (t k,η k ), therefore the left inequality holds if ( C 0 h) hc or h (5) C 0 +C If h satisfies this stability condition we have a k C 0 h : A <, hence and (4) now gives This shows: +A+ +A k Ak A A y k y(t k ) C C 0 h if we keep taking Euler steps with a fixed value h for t the error is bounded by Ch with a fixed constant C. Example: The initial value problem y y sint+cost, y(0) has the solution y(t) cost. Here f y (t,y) < 0. We use the Euler method with h 0.: 6

7 -y-sin(t)+cos(t) tv 0:.:0; plot(tv,cos(tv), b ); hold on % plot exact solution dirfield(f,0:.3:0,-.:.:.); ts,ys Euler(f,0,0,,50); % use 50 steps of size 0/50 plot(ts,ys, r.- ); hold off Here we have an error of size Ch, but the error stays bounded as t. 4 Improved Euler method (aka RK method) For the Euler method we obtained a local truncation error r k satisfying r k ch. Since we use N (T t 0 )/h steps to get from t 0 to the final time T, we obtained the error at time T was bounded by Ch : The Euler method is a method of order. This means that in order to improve the error by a factor of 0, we need to use 0 times as many steps. If we want to achieve an error of size 0 8 we may need of the order of 0 8 steps (assuming e.g. a stable problem with C and C 0 of about ). We would like to have a method of order, i.e., the error at time T is bounded by Ch. This means that the local truncation error should satisfy r k ch 3. How can we do this? We need more than one evaluation of the direction field per step. We start at the initial point (t 0,y 0 ). We take a step of size h to t h and want to find an approximation y for y(t ). We know that y (t) f (t,y(t)), so by the fundamental theorem of calculus we have y(t ) y 0 + t t 0 f (t,y(t))dt Let g(t) : f (t,y(t)). Then we have to approximate the integral I g(t)dt with an error ch 3. One way t 0 to do this is to use the trapezoid rule: Recall that on an interval of size h we have Q Trap I h 3 max g. Therefore we want to use I Q Trap h g(t 0)+g(t ) h f(t 0,y 0 )+f(t,y(t )) }{{}? But we cannot evaluate the second term f(t,y(t )) since we don t know y(t ). So we use the best approximation we have: the Euler approximation y Euler y 0 +h f(t 0,y 0 ). Since y Euler y(t ) Ch we get from the mean value theorem f(t,y Euler ) f(t,y(t )) f y (t,η) (y Euler y(t ) ) C Ch t 7

8 We now approximate y(t ) by y : y 0 + h f(t 0,y 0 )+f(t,y Euler ) (6) and obtain for the local truncation error y y(t ) Ch 3 since the error of the trapezoid rule is bounded by ch 3, and replacing y(t ) by y Euler causes an additional error h C Ch. The iteration (6) gives the Improved Euler method: we divide the interval t 0,T into N subintervals of equal length h (T t 0 )/N (we can also use subintervals of different length). Let t j t 0 +jh. We then want to find approximations y (),...,y (N) for y(t j ). start at the initial value t 0,y (0) for k 0,...,N do s () : f(t k,y (k) ) y E : y (k) +hs () s () : f(t k +h,y E ) y (k+) : y (k) + s () +s () t k+ : t k +h The local truncation error of the improved Euler method is of order O(h 3 ). Hence the error at a time t T is of order O(h ) O(N ): The improved Euler method is a method of order. Note that we use two evaluations of the function f per step: s () f(t k,y (k) ) and s () f(t k +h,y E ). Example: Consider the Initial Value Problem (), (). Use step of the Improved Euler method with h to find approximations for y( ) and y ( ). We use y (t) : y(t) and y (t) y (t) and obtain the first order ODE (3). s () f(t 0,y (0) ) f ( 0, ) 5, y E y (0) +h s s () f(t,y E ) f (, ) 4.5 5, y() y (0) + h This gives y( ) 0.65 and y ( ) 4.5. ( s () +s ()) + 4 ( ) Stiff ODE and ode5s Consider a very stable ODE where f y (t,y) is very negative. Then the Euler method only works if the step size h satisfies the stability condition h < f y. This can force use to use very tiny steps even if the solution y(t) is almost constant. This is called a stiff ODE. In this case ode45 uses many tiny steps and takes a long time. Example: A flame propagation model gives the following IVP: y y y 3 fort 0, δ y(0) δ Here δ is very small, e.g., δ 0 4. In this case we want to solve the problem for t 0, δ 0, 04. The solution approaches y. But there the problem becomes stiff: We have near y that f y (t,y) y 3y, so the stability condition for the Euler method requires h < f y. This means that we need N 0 4 steps of size h to get from t 0 0 to T /δ, despite the fact that the solution is almost constant for most of 0,T. The adaptive method ode45 (with default settings) also requires about 0 4 steps: 8

9 delta e-4; y^-y^3; y0 delta; t0 0; T /delta; ts,ys ode45(f,0,t,y0); length(ts) % print number of steps This prints out 3 for the number of steps. Matlab has a special ode solver ode5s for stiff ODEs: We try this for our problem ts,ys ode5s(f,0,t,y0); length(ts) and get 08 for the number of steps. % print number of steps 6 Backward Euler method (aka implicit Euler method) For stable problems the Euler method gives magnification factors a k +hf y < for small h, but a k +hf y > for large h. If I look at a problem with f y < 0 from right to left with decreasing t, then an Euler method in decreasing t direction always has a magnification factor a >, for any step size h > 0. This suggests to use a backward Euler step : At time t k we have the value y (k). For time t k+ t k +h we want to find a value y (k+) such that an Euler step to the left takes us to t k and y (k) : Find y (k+) such that y (k+) h f ( t k+,y (k+)) y (k) (7) Note that the unknown vector y (k+) occurs also inside the function f. If the function f(t,y) is linear in y this gives linear equations for y. If the function f(t,y) is nonlinear in y this gives nonlinear equations for y. We can e.g. use or steps of the Newton method (note that we have a local truncation error of size O(h ) ). Example: Consider the Initial Value Problem (), (). Use step of the backward Euler method with h to find approximations for y( ) and y ( ). We use y (t) : y(t) and y (t) y (t) and obtain the first order ODE (3). Note that the function f(t,y) y t+y 3y depends linearly on y,y. We want to find a vector y () y y such that y y h f(t, y y ) y (0) y y y +y 3y This gives the linear system y y 3 y + y.5 which has the solution y () gives y( ) 0.5 and y ( ) 3. y y 3. This Claim: Let n. For a stable problem with f y (t,y) < 0 the nonlinear equation has a unique solution. Proof: The left hand side F(y k+ ) : y k+ h f(t k+,y k+ ) is strictly increasing for increasing y k+, with F(y) for y and F(y) for y. 9

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

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

Lecture 5: Single Step Methods

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

More information

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

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

Ordinary Differential Equations I

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

More information

Ordinary Differential Equations

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

More information

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

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS LECTURE 10 APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS Ordinary Differential Equations Initial Value Problems For Initial Value problems (IVP s), conditions are specified

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 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 Chapter 13 Ordinary Differential Equations We motivated the problem of interpolation in Chapter 11 by transitioning from analzying to finding functions. That is, in problems like interpolation and regression,

More information

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

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

More information

Ordinary differential equation II

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

More information

Chapter 6 - Ordinary Differential Equations

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

More information

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

Ordinary Differential Equations I

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

More information

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

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

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

More information

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

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

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

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

Numerical Methods for Initial Value Problems; Harmonic Oscillators

Numerical Methods for Initial Value Problems; Harmonic Oscillators 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

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

primary means of representing, understanding, and predicting systems that are changing with time. In the form y (t) = f(t,y(t)),

primary means of representing, understanding, and predicting systems that are changing with time. In the form y (t) = f(t,y(t)), CHAPTER 6 Ordinary Differential Equations FRONT NOTES [Photos: Tacoma narrows bridge] On the morning of November 7, 940, the Tacoma Narrows Bridge, the third longest suspension bridge in the world at the

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

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

The Plan. Initial value problems (ivps) for ordinary differential equations (odes) Review of basic methods You are here: Hamiltonian systems

The Plan. Initial value problems (ivps) for ordinary differential equations (odes) Review of basic methods You are here: Hamiltonian systems 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 2 Dianne P. O Leary c 2008 The Plan

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

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

Scientific Computing: An Introductory Survey

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

More information

Ordinary differential equations - 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

MATH 100 Introduction to the Profession

MATH 100 Introduction to the Profession MATH 100 Introduction to the Profession Differential Equations in MATLAB Greg Fasshauer Department of Applied Mathematics Illinois Institute of Technology Fall 2012 fasshauer@iit.edu MATH 100 ITP 1 What

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

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

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

More information

Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations

Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations Sunyoung Bu University of North Carolina Department of Mathematics CB # 325, Chapel Hill USA agatha@email.unc.edu Jingfang

More information

Initial value problems for ordinary differential equations

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

More information

Ordinary Differential Equations I

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

More information

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

FORTRAN 77 Lesson 7. Reese Haywood Ayan Paul

FORTRAN 77 Lesson 7. Reese Haywood Ayan Paul FORTRAN 77 Lesson 7 Reese Haywood Ayan Paul 1 Numerical Integration A general all purpose Numerical Integration technique is the Trapezoidal Method. For most functions, this method is fast and accurate.

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

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

First Order Differential Equations

First Order Differential Equations First Order Differential Equations 1 Finding Solutions 1.1 Linear Equations + p(t)y = g(t), y() = y. First Step: Compute the Integrating Factor. We want the integrating factor to satisfy µ (t) = p(t)µ(t).

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

Introduction to Initial Value Problems

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

More information

On linear and non-linear equations. (Sect. 1.6).

On linear and non-linear equations. (Sect. 1.6). On linear and non-linear equations. (Sect. 1.6). Review: Linear differential equations. Non-linear differential equations. The Picard-Lindelöf Theorem. Properties of solutions to non-linear ODE. The Proof

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

Higher Order Taylor Methods

Higher Order Taylor Methods Higher Order Taylor Methods Marcelo Julio Alvisio & Lisa Marie Danz May 6, 2007 Introduction Differential equations are one of the building blocks in science or engineering. Scientists aim to obtain numerical

More information

Runge-Kutta and Collocation Methods Florian Landis

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

More information

Numerical Methods for Differential Equations

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

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

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

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

ODE Homework 1. Due Wed. 19 August 2009; At the beginning of the class

ODE Homework 1. Due Wed. 19 August 2009; At the beginning of the class ODE Homework Due Wed. 9 August 2009; At the beginning of the class. (a) Solve Lẏ + Ry = E sin(ωt) with y(0) = k () L, R, E, ω are positive constants. (b) What is the limit of the solution as ω 0? (c) Is

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

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP 2. Use MATLAB solvers for solving higher order ODEs and

More information

Section 7.4 Runge-Kutta Methods

Section 7.4 Runge-Kutta Methods Section 7.4 Runge-Kutta Methods Key terms: Taylor methods Taylor series Runge-Kutta; methods linear combinations of function values at intermediate points Alternatives to second order Taylor methods Fourth

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

Review for Exam 2 Ben Wang and Mark Styczynski

Review for Exam 2 Ben Wang and Mark Styczynski Review for Exam Ben Wang and Mark Styczynski This is a rough approximation of what we went over in the review session. This is actually more detailed in portions than what we went over. Also, please note

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

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

Solution Manual for: Numerical Computing with MATLAB by Cleve B. Moler

Solution Manual for: Numerical Computing with MATLAB by Cleve B. Moler Solution Manual for: Numerical Computing with MATLAB by Cleve B. Moler John L. Weatherwax July 5, 007 Chapter 7 (Ordinary Differential Equations) Problem 7.1 Defining the vector y as y Then we have for

More information

Lecture Notes on Numerical Differential Equations: IVP

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

More information

Simple ODE Solvers - Derivation

Simple ODE Solvers - Derivation Simple ODE Solvers - Derivation These notes provide derivations of some simple algorithms for generating, numerically, approximate solutions to the initial value problem y (t =f ( t, y(t y(t 0 =y 0 Here

More information

MA108 ODE: Picard s Theorem

MA108 ODE: Picard s Theorem MA18 ODE: Picard s Theorem Preeti Raman IIT Bombay MA18 Existence and Uniqueness The IVP s that we have considered usually have unique solutions. This need not always be the case. MA18 Example Example:

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

INTRODUCTION TO COMPUTER METHODS FOR O.D.E.

INTRODUCTION TO COMPUTER METHODS FOR O.D.E. INTRODUCTION TO COMPUTER METHODS FOR O.D.E. 0. Introduction. The goal of this handout is to introduce some of the ideas behind the basic computer algorithms to approximate solutions to differential equations.

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

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

Initial Value Problems

Initial Value Problems Numerical Analysis, lecture 13: Initial Value Problems (textbook sections 10.1-4, 10.7) differential equations standard form existence & uniqueness y 0 y 2 solution methods x 0 x 1 h h x 2 y1 Euler, Heun,

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

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

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

Lecture 42 Determining Internal Node Values

Lecture 42 Determining Internal Node Values Lecture 42 Determining Internal Node Values As seen in the previous section, a finite element solution of a boundary value problem boils down to finding the best values of the constants {C j } n, which

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

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MATLAB sessions: Laboratory 4 MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP 2. Use MATLAB solvers for

More information

ORDINARY DIFFERENTIAL EQUATIONS

ORDINARY DIFFERENTIAL EQUATIONS ORDINARY DIFFERENTIAL EQUATIONS GABRIEL NAGY Mathematics Department, Michigan State University, East Lansing, MI, 4884 NOVEMBER 9, 7 Summary This is an introduction to ordinary differential equations We

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

Differential equations. Differential equations

Differential equations. Differential equations Differential equations A differential equation (DE) describes ow a quantity canges (as a function of time, position, ) d - A ball dropped from a building: t gt () dt d S qx - Uniformly loaded beam: wx

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

Ordinary Differential Equations

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

More information

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

Solutions for homework 1. 1 Introduction to Differential Equations

Solutions for homework 1. 1 Introduction to Differential Equations Solutions for homework 1 1 Introduction to Differential Equations 1.1 Differential Equation Models The phrase y is proportional to x implies that y is related to x via the equation y = kx, where k is a

More information

Math 2a Prac Lectures on Differential Equations

Math 2a Prac Lectures on Differential Equations Math 2a Prac Lectures on Differential Equations Prof. Dinakar Ramakrishnan 272 Sloan, 253-37 Caltech Office Hours: Fridays 4 5 PM Based on notes taken in class by Stephanie Laga, with a few added comments

More information

Ordinary Differential Equations: Initial Value problems (IVP)

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

More information

Lecture Notes in Mathematics. Arkansas Tech University Department of Mathematics

Lecture Notes in Mathematics. Arkansas Tech University Department of Mathematics Lecture Notes in Mathematics Arkansas Tech University Department of Mathematics Introductory Notes in Ordinary Differential Equations for Physical Sciences and Engineering Marcel B. Finan c All Rights

More information

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP

MAT 275 Laboratory 4 MATLAB solvers for First-Order IVP MAT 75 Laboratory 4 MATLAB solvers for First-Order IVP In this laboratory session we will learn how to. Use MATLAB solvers for solving scalar IVP. Use MATLAB solvers for solving higher order ODEs and systems

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

Notation Nodes are data points at which functional values are available or at which you wish to compute functional values At the nodes fx i

Notation Nodes are data points at which functional values are available or at which you wish to compute functional values At the nodes fx i LECTURE 6 NUMERICAL DIFFERENTIATION To find discrete approximations to differentiation (since computers can only deal with functional values at discrete points) Uses of numerical differentiation To represent

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

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

Lectures in Differential Equations

Lectures in Differential Equations Lectures in Differential Equations David M. McClendon Department of Mathematics Ferris State University last revised December 2016 1 Contents Contents 2 1 First-order linear equations 4 1.1 What is a differential

More information

Math 256: Applied Differential Equations: Final Review

Math 256: Applied Differential Equations: Final Review Math 256: Applied Differential Equations: Final Review Chapter 1: Introduction, Sec 1.1, 1.2, 1.3 (a) Differential Equation, Mathematical Model (b) Direction (Slope) Field, Equilibrium Solution (c) Rate

More information

Exponentially Fitted Error Correction Methods for Solving Initial Value Problems

Exponentially Fitted Error Correction Methods for Solving Initial Value Problems KYUNGPOOK Math. J. 52(2012), 167-177 http://dx.doi.org/10.5666/kmj.2012.52.2.167 Exponentially Fitted Error Correction Methods for Solving Initial Value Problems Sangdong Kim and Philsu Kim Department

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

Numerical Solution of ODE IVPs

Numerical Solution of ODE IVPs L.G. de Pillis and A.E. Radunskaya July 30, 2002 This work was supported in part by a grant from the W.M. Keck Foundation 0-0 NUMERICAL SOLUTION OF ODE IVPs Overview 1. Quick review of direction fields.

More information

Ordinary Differential Equations (ODEs)

Ordinary Differential Equations (ODEs) Ordinary Differential Equations (ODEs) 1 Computer Simulations Why is computation becoming so important in physics? One reason is that most of our analytical tools such as differential calculus are best

More information