Chap. 20: Initial-Value Problems

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

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

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

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

Fourth Order RK-Method

Differential Equations

9.6 Predictor-Corrector Methods

Ordinary Differential Equations (ODE)

Numerical Methods - Initial Value Problems for ODEs

Ordinary Differential Equations. Monday, October 10, 11

Ordinary Differential Equations

Ordinary Differential Equations II

Ordinary Differential Equations II

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS

NUMERICAL SOLUTION OF ODE IVPs. Overview

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

Solving Zhou Chaotic System Using Fourth-Order Runge-Kutta Method

Numerical Differential Equations: IVP

Euler s Method, cont d

Ordinary Differential Equations (ODEs)

Section 7.4 Runge-Kutta Methods

Lecture IV: Time Discretization

Math 128A Spring 2003 Week 12 Solutions

Applied Math for Engineers

ODE Runge-Kutta methods

Numerical Methods for the Solution of Differential Equations

SME 3023 Applied Numerical Methods

Integration of Ordinary Differential Equations

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

Review. Numerical Methods Lecture 22. Prof. Jinbo Bi CSE, UConn

Chapter 6 - Ordinary Differential Equations

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

Solution: (a) Before opening the parachute, the differential equation is given by: dv dt. = v. v(0) = 0

SKMM 3023 Applied Numerical Methods

CS520: numerical ODEs (Ch.2)

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

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

Numerical Integration of Ordinary Differential Equations for Initial Value Problems

Ordinary differential equation II

Solving Ordinary Differential Equations

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20

Initial value problems for ordinary differential equations

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

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

Physics 584 Computational Methods

Scientific Computing: An Introductory Survey

Ordinary Differential Equations

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

Physics 299: Computational Physics II Project II

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

Introduction to standard and non-standard Numerical Methods

Lecture 1. Scott Pauls 1 3/28/07. Dartmouth College. Math 23, Spring Scott Pauls. Administrivia. Today s material.

Ordinary Differential Equations (ode)

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

Ordinary differential equations - Initial value problems

Numerical Solution of Differential Equations

Introduction to the Numerical Solution of IVP for ODE

Numerical solution of ODEs

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

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

Jim Lambers MAT 772 Fall Semester Lecture 21 Notes

Solving scalar IVP s : Runge-Kutta Methods

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

Lecture V: The game-engine loop & Time Integration

Initial Value Problems

Virtual University of Pakistan

Numerical Methods for Initial Value Problems; Harmonic Oscillators

551614:Advanced Mathematics for Mechatronics. Numerical solution for ODEs School of Mechanical Engineering

1. Consider the initial value problem: find y(t) such that. y = y 2 t, y(0) = 1.

Ordinary Differential Equations (ODEs)

Multistep Methods for IVPs. t 0 < t < T

Lecture Notes on Numerical Differential Equations: IVP

Chapter 9b: Numerical Methods for Calculus and Differential Equations. Initial-Value Problems Euler Method Time-Step Independence MATLAB ODE Solvers

1 Error Analysis for Solving IVP

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

Ordinary Differential Equations

Boyce/DiPrima/Meade 11 th ed, Ch 1.1: Basic Mathematical Models; Direction Fields

Ordinary differential equations. Phys 420/580 Lecture 8

Consistency and Convergence

Numerical methods for solving ODEs

A Brief Introduction to Numerical Methods for Differential Equations

13 Numerical Solution of ODE s

On the Application of the Multistage Differential Transform Method to the Rabinovich-Fabrikant System

Computational Techniques Prof. Dr. Niket Kaisare Department of Chemical Engineering Indian Institute of Technology, Madras

MTH 452/552 Homework 3

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

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

EAD 115. Numerical Solution of Engineering and Scientific Problems. David M. Rocke Department of Applied Science

SYSTEMS OF ODES. mg sin ( (x)) dx 2 =

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

A Verified ODE solver and Smale s 14th Problem

Maths III - Numerical Methods

Lesson 4: Population, Taylor and Runge-Kutta Methods

Differential Equations

Ordinary Differential Equations

Chapter 10. Initial value Ordinary Differential Equations

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.

Scientific Computing II

Mathematics for chemical engineers. Numerical solution of ordinary differential equations

Numerical Analysis MTH603. dy dt = = (0) , y n+1. We obtain yn. Therefore. and. Copyright Virtual University of Pakistan 1

Transcription:

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 format: where is called an increment function, and is used to extrapolate from an old value y i to a new value y i+1. y i1 y i h 2

Euler s Method The first derivative provides a direct estimate of the slope at t i : dy dt ti f t i, y i and the Euler method uses that estimate as the increment function: f t i, y i y i1 y i f t i, y i h 3

Example 20.1 Solve y =4e 0.8t -0.5y with y(0)=2. Analytical solution: y=4/1.3 (e 0.8t -e -0.5t )+2e -0.5t 4

Error Analysis for Euler s Method The numerical solution of ODEs involves two types of error: Truncation errors, caused by the nature of the techniques employed Roundoff errors, caused by the limited numbers of significant digits that can be retained The total, or global truncation error can be further split into: local truncation error that results from an application method in question over a single step, and propagated truncation error that results from the approximations produced during previous steps. 5

Error Analysis for Euler s Method The local truncation error for Euler s method is O(h 2 ) and proportional to the derivative of f(t,y) while the global truncation error is O(h). This means: The global error can be reduced by decreasing the step size, and Euler s method will provide error-free predictions if the underlying function is linear. Euler s method is conditionally stable, depending on the size of h. 6

Example dy dt ay Analytical Solution: yy 0 e at Euler s method: y i1 y i ay i hy i (1ah) 1-ah is called an amplification factor. Convergence condition: 1-ah <1 7

Heun s Method One method to improve Euler s method is to determine derivatives at the beginning and predicted ending of the interval and average them: 8

Heun s Method (cont.) This process relies on making a prediction of the new value of y, then correcting it based on the slope calculated at that new value. This predictor-corrector approach can be iterated to convergence: 9

Example 20.2 Solve y =4e0.8t-0.5y with y(0)=2. Stopping criterion: 0.00001%. Analytical solution: y=4/1.3 (e0.8t-e-0.5t)+2e-0.5t 10

Midpoint Method Another improvement to Euler s method is similar to Heun s method, but predicts the slope at the midpoint of an interval rather than at the end: This method has a local truncation error of O(h 3 ) and global error of O(h 2 ) 11

Runge-Kutta Methods Runge-Kutta (RK) methods achieve the accuracy of a Taylor series approach without requiring the calculation of higher derivatives. For RK methods, the increment function can be generally written as: a 1 k 1 a 2 k 2 a n k n where the a s are constants and the k s are k 1 f t i, y i k 2 f t i p 1 h, y i q 11 k 1 h k 3 f t i p 2 h, y i q 21 k 1 h q 22 k 2 h k n ft i p n1 h, y i q n1,1 k 1 h q n1,2 k 2 h q n1,n1 k n1 h where the p s and q s are constants. 12

Classical Fourth-Order Runge-Kutta Method The most popular RK methods are fourthorder, and the most commonly used form is: y i1 y i 1 6 k 1 2k 2 2k 3 k 4 h where: k 1 f t i, y i k 2 f t i 1 2 h, y i 1 2 k 1h k 3 f t i 1 2 h, y 1 i 2 k h 2 k 4 f t i h, y i k 3 h 13

Example 20.3 Use Classical Fourth-Order RK Method to solve Example 20.2. t true RK4 Error(%) 0 2 2 0 2 6.1946 6.2010 0.1034 3 14.844 14.863 0.1251 4 33.677 33.721 0.1312 5 75.339 75.439 0.1330 14

Systems of Equations Many practical problems require the solution of a system of equations: dy 1 dt f 1 t, y, y,, y 1 2 n dy 2 f 2 t, y 1, y 2,, y n dt dy n f n t, y 1, y 2,, y n dt The solution of such a system requires that n initial conditions be known at the starting value of t. 15

Solution Methods Single-equation methods can be used to solve systems of ODE s as well; for example, Euler s method can be used on systems of equations - the one-step method is applied for every equation at each step before proceeding to the next step. Fourth-order Runge-Kutta methods can also be used, but care must be taken in calculating the k s. 16

Example 20.5 Solve dx dt v dv dt g c d m v 2 function dy=dydtsys(t,y) dy=[y(2);9.81-0.25/68.1*y(2)^2]; [t y]=rk4sys(dydtsys,[0 10],[0,0],2); Initial condition: x(0)=0, v(0)=0 Analytical solution: v(t) gm tanh c d gc d m t x(t) m ln cosh c d gc d m t 17

Example (cont.) 18

Case Study: Predator-Prey Models and Chaos Predator-Prey Models dx dt axbxy dy dt cydxy x: the number of prey y: the number of predator a: prey growth rate c: predator death rate b: prey death rate due to predator d: predator growth rate due to prey 19

Example Let a=1.2, b=0.6, c=0.8 and d=0.3. Initial condition: x=2, y=1. t=0 to 30, h=0.0625 20

Lorenz Equations dx dt σxσy dy dt rxyxz dz dt bzxy Chaotic behavior. Bounded but not periodic. Sensitive to initial value. 21

Strange Attractors 22

Strange Attractors (cont.) 23