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

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

Applied Math for Engineers

Solving Ordinary Differential equations

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

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

Numerical solution of ODEs

Ordinary Differential Equations II

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.

Scientific Computing: An Introductory Survey

Mini project ODE, TANA22

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

Numerical Methods - Initial Value Problems for ODEs

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

Scientific Computing with Case Studies SIAM Press, Lecture Notes for Unit V Solution of

Initial value problems for ordinary differential equations

Numerical Methods for Differential Equations

ECE257 Numerical Methods and Scientific Computing. Ordinary Differential Equations

Ordinary Differential Equations II

Section 7.4 Runge-Kutta Methods

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

Review for Exam 2 Ben Wang and Mark Styczynski

Numerical Methods for Differential Equations

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

Solving scalar IVP s : Runge-Kutta Methods

Chapter 11 ORDINARY DIFFERENTIAL EQUATIONS

Ordinary Differential Equations

Chapter 6 - Ordinary Differential Equations

Richarson Extrapolation for Runge-Kutta Methods

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

Ordinary Differential Equations I

Ordinary differential equations - Initial value problems

NUMERICAL SOLUTION OF ODE IVPs. Overview

Initial value problems for ordinary differential equations

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

Fourth Order RK-Method

multistep methods Last modified: November 28, 2017 Recall that we are interested in the numerical solution of the initial value problem (IVP):

Mathematics for chemical engineers. Numerical solution of ordinary differential equations

CS520: numerical ODEs (Ch.2)

MecE 390 Final examination, Winter 2014

Ordinary Differential Equations: Initial Value problems (IVP)

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

Multistage Methods I: Runge-Kutta Methods

8.1 Introduction. Consider the initial value problem (IVP):

Computation Fluid Dynamics

Module 4: Numerical Methods for ODE. Michael Bader. Winter 2007/2008

FDM for parabolic equations

Differential Equations

MA/CS 615 Spring 2019 Homework #2

X i t react. ~min i max i. R ij smallest. X j. Physical processes by characteristic timescale. largest. t diff ~ L2 D. t sound. ~ L a. t flow.

Applied Mathematics 205. Unit III: Numerical Calculus. Lecturer: Dr. David Knezevic

Lecture 5: Single Step Methods

Numerical Methods for the Solution of Differential Equations

Numerical Analysis II. Problem Sheet 9

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

Ordinary Differential Equations I

9.6 Predictor-Corrector Methods

ODE Runge-Kutta methods

Chapter 5 Exercises. (a) Determine the best possible Lipschitz constant for this function over 2 u <. u (t) = log(u(t)), u(0) = 2.

Initial Value Problems

Numerical Methods for Differential Equations

Multistep Methods for IVPs. t 0 < t < T

Applied Numerical Analysis

Ordinary Differential Equations

Astronomy 8824: Numerical Methods Notes 2 Ordinary Differential Equations


Solving Ordinary Differential Equations

Lecture 42 Determining Internal Node Values

Implicit-explicit exponential integrators

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

Chapter 9 Implicit Methods for Linear and Nonlinear Systems of ODEs

Southern Methodist University.

Ordinary Differential Equations I

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

Validated Explicit and Implicit Runge-Kutta Methods

Ordinary Differential Equations

arxiv: v1 [math.na] 31 Oct 2016

Numerical Methods - Boundary Value Problems for ODEs

Explicit One-Step Methods

Selected HW Solutions

MTH 452/552 Homework 3

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

2.29 Numerical Fluid Mechanics Fall 2011 Lecture 20

Astrodynamics (AERO0024)

NUMERICAL METHODS FOR ENGINEERING APPLICATION

Numerical Methods for ODEs. Lectures for PSU Summer Programs Xiantao Li

Part IB Numerical Analysis

Index. C 2 ( ), 447 C k [a,b], 37 C0 ( ), 618 ( ), 447 CD 2 CN 2

Math 660 Lecture 4: FDM for evolutionary equations: ODE solvers

Backward error analysis

The Initial Value Problem for Ordinary Differential Equations

Ph 22.1 Return of the ODEs: higher-order methods

A New Block Method and Their Application to Numerical Solution of Ordinary Differential Equations

Parallel Methods for ODEs

Integration of Ordinary Differential Equations

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

Runge-Kutta Theory and Constraint Programming Julien Alexandre dit Sandretto Alexandre Chapoutot. Department U2IS ENSTA ParisTech SCAN Uppsala

Chap. 20: Initial-Value Problems

Ordinary Differential Equations

Semi-implicit Krylov Deferred Correction Methods for Ordinary Differential Equations

APPLICATIONS OF FD APPROXIMATIONS FOR SOLVING ORDINARY DIFFERENTIAL EQUATIONS

Transcription:

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 be posted tonight

Runge Kutta Methods The family of Runge Kutta methods with two intermediate evaluations is defined by y k+1 = y k + h(ak 1 + bk 2 ), where k 1 = f (t k, y k ), k 2 = f (t k + αh, y k + βhk 1 ) The Euler method is a member of this family, with a = 1 and b = 0. By careful analysis of the truncation error, it can be shown that we can choose a, b, α, β to obtain a second-order method

Runge Kutta Methods Three such examples are: The modified Euler method (a = 0, b = 1, α = β = 1/2): ( y k+1 = y k + hf t k + 1 2 h, y k + 1 ) 2 hf (t k, y k ) The improved Euler method (or Heun s method) (a = b = 1/2, α = β = 1): y k+1 = y k + 1 2 h[f (t k, y k ) + f (t k + h, y k + hf (t k, y k ))] Ralston s method (a = 1/4, b = 3/4, α = 2/3, β = 2/3) y k+1 = y k + 1 4 h[f (t k, y k ) + 3f (t k + 2h 3, y k + 2h 3 f (t k, y k ))]

Runge Kutta Methods The most famous Runge Kutta method is the classical fourth-order method, RK4 (used by MATLAB s ode45): where y k+1 = y k + 1 6 h(k 1 + 2k 2 + 2k 3 + k 4 ) k 1 = f (t k, y k ) k 2 = f (t k + h/2, y k + hk 1 /2) k 3 = f (t k + h/2, y k + hk 2 /2) k 4 = f (t k + h, y k + hk 3 ) Analysis of the truncation error in this case (which gets quite messy!) gives T k = O(h 4 )

Runge Kutta Methods: Stability We can also examine stability of RK4 methods for y = λy Figure shows stability regions for four different RK methods (higher order RK methods have larger stability regions here)

Butcher tableau Can summarize an s + 1 stage Runge Kutta method using a triangular grid of coefficients α 0 α 1 β 1,0 The ith intermediate step is The (k + 1)th answer for y is.. α s β s,0 β s,1... β s,s 1 γ 0 γ 1... γ s 1 γ s i 1 f (t k + α i h, y k + h k j ). y k+1 = y k + h j=0 s γ j k j. j=0

Estimation of error First approach: Richardson extrapolation. Suppose that y k+2 is the numerical result of two steps with size h of a Runge Kutta method of order p, and w is the result of one big step with step size 2h. Then the error of y 2 can be approximated as and y(t k + 2h) y k+2 = y k+2 w 2 p 1 + O(hp+2 ) ŷ k+2 = y k+2 + y 2 w 2 p 1 is an approximation of order p + 1 to y(t 0 + 2h).

Estimation of error Second approach: can derive Butcher tableaus that contain an additional higher-order formula for estimating error. e.g. Fehlberg s order 4(5) method, RKF45 0 1 4 1 4 3 8 3 32 9 32 12 1932 13 2197 7200 7296 2197 2197 439 3680 1 216 8 513 845 4104 1 8 3544 1859 2 27 2 2565 4104 2197 25 1408 y k+1 216 0 2565 ŷ k+1 16 135 0 6656 12825 11 40 4104 1 5 0 28561 56430 9 50 y k+1 is order 4 and ŷ k+1 is order 5. Use y k+1 ŷ k+1 as an error estimate. 2 55

Higher-order methods Fehlberg s 7(8) method 1 1 From Solving Ordinary Differential Equations by Hairer, Nørsett, and Wanner.

Stiff systems You may have heard of stiffness in the context of ODEs: an important, though somewhat fuzzy, concept Common definition of stiffness for a linear ODE system y = Ay is that A has eigenvalues that differ greatly in magnitude 2 The eigenvalues determine the time scales, and hence large differences in λ s = resolve disparate timescales simultaneously! 2 Nonlinear case: stiff if the Jacobian, J f, has large differences in eigenvalues, but this defn. isn t always helpful since J f changes at each time-step

Stiff systems Suppose we re primarily interested in the long timescale. Then: We d like to take large time steps and resolve the long timescale accurately But we may be forced to take extremely small timesteps to avoid instabilities due to the fast timescale In this context it can be highly beneficial to use an implicit method since that enforces stability regardless of timestep size

Stiff systems From a practical point of view, an ODE is stiff if there is a significant benefit in using an implicit instead of explicit method e.g. this occurs if the time-step size required for stability is much smaller than size required for the accuracy level we want Example: Consider y = Ay, y 0 = [1, 0] T where [ ] 998 1998 A = 999 1999 which has λ 1 = 1, λ 2 = 1000 and exact solution [ 2e y(t) = t e 1000t ] e t + e 1000t

Multistep Methods So far we have looked at one-step methods, but to improve efficiency why not try to reuse data from earlier time-steps? This is exactly what multistep methods do: y k+1 = m m α i y k+1 i + h β i f (t k+1 i, y k+1 i ) i=1 i=0 If β 0 = 0 then the method is explicit We can derive the parameters by interpolating and then integrating the interpolant

Multistep Methods The stability of multistep methods, often called zero stability, is an interesting topic, but not considered here Question: Multistep methods require data from several earlier time-steps, so how do we initialize? Answer: The standard approach is to start with a one-step method and move to multistep once there is enough data Some key advantages of one-step methods: They are self-starting Easier to adapt time-step size

ODE Boundary Value Problems

ODE BVPs Consider the ODE Boundary Value Problem (BVP): 3 find u C 2 [a, b] such that αu (x) + βu (x) + γu(x) = f (x), x [a, b] for α, β, γ R and f : R R The terms in this ODE have standard names: αu (x): βu (x): γu(x): f (x): diffusion term convection (or transport) term reaction term source term 3 Often called a Two-point boundary value problem

ODE BVPs Also, since this is a BVP u must satisfy some boundary conditions, e.g. u(a) = c 1, u(b) = c 2 u(a) = c 1, u(b) = c 2 are called Dirichlet boundary conditions Can also have: A Neumann boundary condition: u (b) = c 2 A Robin (or mixed ) boundary condition: 4 u (b) + c 2 u(b) = c 3 4 With c 2 = 0, this is a Neumann condition

ODE BVPs This is an ODE, so we could try to use the ODE solvers from III.3 to solve it! Question: How would we make sure the solution satisfies u(b) = c 2?

ODE BVPs Answer: Solve the IVP with u(a) = c 1 and u (a) = s 0, and then update s k iteratively for k = 1, 2,... until u(b) = c 2 is satisfied This is called the shooting method, we picture it as shooting a projectile to hit a target at x = b (just like Angry Birds!) However, the shooting method does not generalize to PDEs hence it is not broadly useful