Numerical Methods for Partial Differential Equations

Similar documents
Numerical Methods for Partial Differential Equations

3. Z Transform. Recall that the Fourier transform (FT) of a DT signal xn [ ] is ( ) [ ] = In order for the FT to exist in the finite magnitude sense,

6.003 Homework #3 Solutions

Math 113, Calculus II Winter 2007 Final Exam Solutions

1 Approximating Integrals using Taylor Polynomials

NICK DUFRESNE. 1 1 p(x). To determine some formulas for the generating function of the Schröder numbers, r(x) = a(x) =

Math 312 Lecture Notes One Dimensional Maps

Section A assesses the Units Numerical Analysis 1 and 2 Section B assesses the Unit Mathematics for Applied Mathematics

MIDTERM 3 CALCULUS 2. Monday, December 3, :15 PM to 6:45 PM. Name PRACTICE EXAM SOLUTIONS

Chapter 10: Power Series

Introduction to Signals and Systems, Part V: Lecture Summary

Complex Analysis Spring 2001 Homework I Solution

Math 210A Homework 1

A NEW CLASS OF 2-STEP RATIONAL MULTISTEP METHODS

1 6 = 1 6 = + Factorials and Euler s Gamma function

Taylor expansion: Show that the TE of f(x)= sin(x) around. sin(x) = x - + 3! 5! L 7 & 8: MHD/ZAH

SOLUTIONS TO EXAM 3. Solution: Note that this defines two convergent geometric series with respective radii r 1 = 2/5 < 1 and r 2 = 1/5 < 1.

L 5 & 6: RelHydro/Basel. f(x)= ( ) f( ) ( ) ( ) ( ) n! 1! 2! 3! If the TE of f(x)= sin(x) around x 0 is: sin(x) = x - 3! 5!

Chapter 4. Fourier Series

4x 2. (n+1) x 3 n+1. = lim. 4x 2 n+1 n3 n. n 4x 2 = lim = 3

Apply change-of-basis formula to rewrite x as a linear combination of eigenvectors v j.

Chapter 7: The z-transform. Chih-Wei Liu

MATH 10550, EXAM 3 SOLUTIONS

COMM 602: Digital Signal Processing

Polynomials with Rational Roots that Differ by a Non-zero Constant. Generalities

9.3 The INTEGRAL TEST; p-series

Chapter 2: Numerical Methods

CS321. Numerical Analysis and Computing

Zeros of Polynomials

Recurrence Relations

ME 501A Seminar in Engineering Analysis Page 1

Ma 530 Introduction to Power Series

CS537. Numerical Analysis and Computing

Z - Transform. It offers the techniques for digital filter design and frequency analysis of digital signals.

MASSACHUSETTS INSTITUTE OF TECHNOLOGY 6.436J/15.085J Fall 2008 Lecture 19 11/17/2008 LAWS OF LARGE NUMBERS II THE STRONG LAW OF LARGE NUMBERS

Math 113 Exam 3 Practice

TERMWISE DERIVATIVES OF COMPLEX FUNCTIONS

Kinetics of Complex Reactions

ENGI Series Page 6-01

x a x a Lecture 2 Series (See Chapter 1 in Boas)

TEACHER CERTIFICATION STUDY GUIDE

Problem Cosider the curve give parametrically as x = si t ad y = + cos t for» t» ß: (a) Describe the path this traverses: Where does it start (whe t =

The z-transform. 7.1 Introduction. 7.2 The z-transform Derivation of the z-transform: x[n] = z n LTI system, h[n] z = re j

The Method of Least Squares. To understand least squares fitting of data.

3.2 Properties of Division 3.3 Zeros of Polynomials 3.4 Complex and Rational Zeros of Polynomials

PRELIM PROBLEM SOLUTIONS

(c) Write, but do not evaluate, an integral expression for the volume of the solid generated when R is

We are mainly going to be concerned with power series in x, such as. (x)} converges - that is, lims N n

6.3 Testing Series With Positive Terms

Introduction to Optimization Techniques. How to Solve Equations

INFINITE SEQUENCES AND SERIES

Lecture 6 Chi Square Distribution (χ 2 ) and Least Squares Fitting

Time-Domain Representations of LTI Systems

PC5215 Numerical Recipes with Applications - Review Problems

Numerical Methods for Ordinary Differential Equations

Chapter 9: Numerical Differentiation

Ma 4121: Introduction to Lebesgue Integration Solutions to Homework Assignment 5

lim za n n = z lim a n n.

Appendix: The Laplace Transform

ECE-S352 Introduction to Digital Signal Processing Lecture 3A Direct Solution of Difference Equations

CHAPTER 10 INFINITE SEQUENCES AND SERIES

1.3 Convergence Theorems of Fourier Series. k k k k. N N k 1. With this in mind, we state (without proof) the convergence of Fourier series.

Sequences and Series of Functions

Lecture 6 Chi Square Distribution (χ 2 ) and Least Squares Fitting

Math 128A: Homework 1 Solutions

x x x Using a second Taylor polynomial with remainder, find the best constant C so that for x 0,

Linear Differential Equations of Higher Order Basic Theory: Initial-Value Problems d y d y dy

from definition we note that for sequences which are zero for n < 0, X[z] involves only negative powers of z.

( θ. sup θ Θ f X (x θ) = L. sup Pr (Λ (X) < c) = α. x : Λ (x) = sup θ H 0. sup θ Θ f X (x θ) = ) < c. NH : θ 1 = θ 2 against AH : θ 1 θ 2

Math 2784 (or 2794W) University of Connecticut

A widely used display of protein shapes is based on the coordinates of the alpha carbons - - C α

Math 220B Final Exam Solutions March 18, 2002

Notes 8 Singularities

THE SOLUTION OF NONLINEAR EQUATIONS f( x ) = 0.

Honors Calculus Homework 13 Solutions, due 12/8/5

(b) What is the probability that a particle reaches the upper boundary n before the lower boundary m?

SIDDHARTH GROUP OF INSTITUTIONS :: PUTTUR Siddharth Nagar, Narayanavanam Road QUESTION BANK (DESCRIPTIVE)

The axial dispersion model for tubular reactors at steady state can be described by the following equations: dc dz R n cn = 0 (1) (2) 1 d 2 c.

mx bx kx F t. dt IR I LI V t, Q LQ RQ V t,

Riemann Sums y = f (x)

6 Integers Modulo n. integer k can be written as k = qn + r, with q,r, 0 r b. So any integer.

*X203/701* X203/701. APPLIED MATHEMATICS ADVANCED HIGHER Numerical Analysis. Read carefully

MAT 271 Project: Partial Fractions for certain rational functions

Analysis of Algorithms. Introduction. Contents

(a) (b) All real numbers. (c) All real numbers. (d) None. to show the. (a) 3. (b) [ 7, 1) (c) ( 7, 1) (d) At x = 7. (a) (b)

Assignment 1 : Real Numbers, Sequences. for n 1. Show that (x n ) converges. Further, by observing that x n+2 + x n+1

Infinite Sequences and Series

Unit 4: Polynomial and Rational Functions

A collocation method for singular integral equations with cosecant kernel via Semi-trigonometric interpolation

Seunghee Ye Ma 8: Week 5 Oct 28

b i u x i U a i j u x i u x j

Polynomial Functions and Their Graphs

In algebra one spends much time finding common denominators and thus simplifying rational expressions. For example:

Chapter 7 z-transform

Definition of z-transform.

Math 21B-B - Homework Set 2

Math 61CM - Solutions to homework 3

MTH Assignment 1 : Real Numbers, Sequences

j=1 dz Res(f, z j ) = 1 d k 1 dz k 1 (z c)k f(z) Res(f, c) = lim z c (k 1)! Res g, c = f(c) g (c)

n 3 ln n n ln n is convergent by p-series for p = 2 > 1. n2 Therefore we can apply Limit Comparison Test to determine lutely convergent.

Transcription:

Numerical Methods for Partial Differetial Equatios CAAM 45 Sprig 005 Lecture 4 -step time-steppig methods: stability, accuracy Ruge-Kutta Methods, Istructor: Tim Warburto

Today Recall AB stability regios ad start up issues Group aalysis of the Leap-Frog scheme Oe-step methods Example Ruge-Kutta methods: Modified Euler Geeral family of d order RK methods Heu s 3 rd Order Method The 4 th Order Ruge-Kutta method Jameso-Schmidt-Turkel Liear Absolute Stability Regios for the d order family RK Global error aalysis for geeral -step methods (stops slightly short of a full covergece aalysis) Warig o usefuless of global error estimate Discussio o AB v. RK Embedded lower order RK schemes useful for a posteriori error estimates. CAAM 45 Sprig 005

Recall: AB v. AB3 v. AB4 These are the margis of absolute stability for the AB methods: Startig with the yellow AB (Euler-Forward) we see that as the order of accuracy goes up the stability regio shriks. i.e. we see that to use the higher order accurate AB scheme we are required to take more time steps. Q) how may more? CAAM 45 Sprig 005

AB: AB: AB3: Recall: Requiremets Startig Requiremets u0 = u( 0) u ( ) + = u + dt f u u = u( dt) u = u( 0) 0 3 u = u + dt f u f u u = u dt + 0 ( 0) u = u dt u = u dt u = u + f f + f ( 3 6 5 ) + solutio level for start solutio levels for start 3 solutio levels for start CAAM 45 Sprig 005

cot So as we take higher order versio of the AB scheme we also eed to provide iitial values at more ad more levels. For a problem where we do ot kow the solutio at more tha the iitial coditio we may have to: Use AB with small dt to get the secod restart level Use AB with small dt to get the third restart level March o usig AB3 started with the three levels achieved above. AB AB AB3 CAAM 45 Sprig 005

Recall: Derivatio of AB Schemes The AB schemes were motivated by cosiderig the exactly time itegrated ODE: Which we approximated by usig a p th order polyomial iterpolatio of the fuctio f + u t u t f u t dt + = + t + p t t t u t u t I f u t dt + + CAAM 45 Sprig 005

Leap Frog Scheme We could also have started the itegral at: t + Ad used the mid poit rule: Which suggests the leap frog scheme: t t + u t u t f u t dt = + + u t u t dtf u t + u u dtf u + = + CAAM 45 Sprig 005

Voluteer Exercise u u dtf u + = + ) accuracy: what is the local trucatio error? ) stability: what is the maifold of absolute liear stability (try aalytically) i the u=dt*mu plae? a) what is the regio of absolute liear-stability? CAAM 45 Sprig 005

cot u u dtf u + = + 3) How may startig values are required? 4) Do we have covergece? 5) What is the global order of accuracy? 6) Whe is this a good method? CAAM 45 Sprig 005

Oe Step Methods Give the difficulties iheret i startig the higher order AB schemes we are ecouraged to look for oe-step methods which oly require to evaluate i.e. u u + u = u + dt Φ + u, t; dt Euler-Forward is a oe-step method: u = u + dtf u Φ + u, t ; dt : = f u We will cosider the oe-step Ruge-Kutta methods. For itroductory details see: A itroductio to umerical aalysis, Suli ad Mayers,. (p37) ad o Trefethe p75- Gustafsso,Kreiss ad Oliger p4- CAAM 45 Sprig 005

Ruge-Kutta Methods The Ruge-Kutta are a family of oe-step methods. They cosist of s stages (i.e. require s evaluatios of f) They will be p th order accurate, for some p. They are self startig!!!. CAAM 45 Sprig 005

Example Ruge-Kutta Method (Modified Euler) a = dtf ( u, t ) Modified Euler: a dt b = dtf u, t + + u+ = u + b Note how we oly eed oe startig value. We ca also reiterpret this through itermediate values: dt uˆ = u + f ( u, t ) u+ = u + dtf ( uˆ, t+ / ) This looks like a half step to approximate the miditerval u ad the a full step. This is a -stage, d order, sigle step method. CAAM 45 Sprig 005

Liear Stability Aalysis As before we assume that f is liear i u ad idepedet of time The scheme becomes (for some give mu): dt uˆ = u + f u t u = u + dtf u t (, ) ( ˆ, ) + + / dt uˆ = u + µ u u = u + dtµ uˆ + Which we simplify (elimiate the uhat variable): dt uˆ = u + µ u ( dt ) u = u + µ dtµ u + + u u = u + dtµ uˆ + CAAM 45 Sprig 005

cot We gather all terms o the right had side: ( dtµ ) u+ = + dtµ + u [ Note: the bracketed term is exactly the first 3 terms of the Taylor series for exp(dt*mu), more o that later ] We also ote for the umerical solutio to be bouded, ad the scheme stable, we require: ( dtµ ) + dtµ + CAAM 45 Sprig 005

cot The stability regio is the set of u=mu*dt i the complex plae such that: ν + ν + The maifold of margial stability ca be foud (as i the liear multistep methods) by fixig the multiplier to be of uit magitude ad lookig for the correspodig values of u which produce this multiplier. i.e. for each theta fid u such that ν + ν + = i e θ CAAM 45 Sprig 005

cot We ca maually fid the roots of this quadratic: ν + ν + = i e θ To obtai a parameterized represetatio of the maifold of margial stability: ( i ) ν = ± e θ CAAM 45 Sprig 005

Plottig Stability Regio for Modified Euler ( i ) ν = ± e θ CAAM 45 Sprig 005

Checkig Modified Euler at the Imagiary Axis As before we wish to check how much of the imagiary axis is icluded iside the regio of absolute stability. Here we plot the real part of the + root CAAM 45 Sprig 005

Is the Imagiary Axis i the Stability Regio? We ca aalytically zoom i by choosig u=i*alpha (i.e. o the imagiary axis). We the check the magitude of the multiplier: 4 ν α α α + ν + = + iα = α + = + 4 So we kow that the oly poit o the imagiary axis with multiplier magitude bouded above by is the origi. Modified Euler is ot suitable for the advectio equatio. CAAM 45 Sprig 005

Geeral stage RK family Cosider the four parameter family of RK schemes of the form: k = (, ) ( β, α ) f u t k = f u + dtk t + dt u = u + dt ak + bk + where we will determie the parameters (a,b,alpha,beta) by cosideratio of accuracy. [ Euler-Forward is i this family with a=,b=0 CAAM 45 Sprig 005

cot The sigle step operator i this case is: k = (, ) ( β, α ) (, ) β f u t k = f u + dtk t + dt u = u + dt ak + bk + u = u + Φ u t + where Φ u, t = af u, t + bf u + dtf u, t, t + αdt CAAM 45 Sprig 005

cot We ow perform a trucatio aalysis, similar to that performed for the liear multistep methods. We will use the followig fact: du dt = (, t) f u t d u d f f du f f (, ) dt dt t u dt t u 3 d u d f f f... 3 dt dt t u = f u t t = + = + f = + = f f f f f f f + + + + + t t u u t u u t u f f f f CAAM 45 Sprig 005

cot (accuracy) We expad Phi i terms of powers of dt usig the bivariate Taylor s expasio ( ) β where: ( α ) Φ u t, t = af u, t + bf u + dtf u, t, t + dt f + f f = af + b αdt + βdtf + + O dt t u ( αdt) f f ( βdtf ) f ( αdt)( βdt) f + +! t t u! u (, ) f = f u t t 3 CAAM 45 Sprig 005

cot We costruct the local trucatio error as: ( ) (, ) T = u t + dt u t dtφ u t t dt dt = dtf + ft + ffu + ftt + ftu f + fuu f + fu ft + fu f 3! ( α dt) ( βdtf ) dtaf + b f + αdtf + βdtff + f + αβdt ff + f + O dt 4 t u tt tu uu Now we choose a,b,alpha,beta to miimize the local trucatio error. Note we use subidexig to represet partial derivatives. CAAM 45 Sprig 005

cot Cosider terms which are the same order i dt i the local trucatio error: dt dt T = dtf + ( ft + ffu ) + ( ftt + ftu f + fuu f + fu ( ft + fu f )) 3! αdt βdtf dtaf + b f + αdtft + βdtffu + ftt + αβdt fftu + fuu + O dt Coditio : a b = 0 4 Coditio : ( ft + ffu ) b( αdtft + βdtffu ) = 0 f bα = bβ = Uder these coditios, the trucatio is order 3 so the method is d order accurate. It is ot possible to further elimiate the dt^3 terms by adjustig the parameters. CAAM 45 Sprig 005

Case: No Explicit t Depedece i f ( u ( t ), t ) bf u βdtf ( u) Φ = + ( βdtf ) f f = bf + βdtf + O dt + u! u 3 du d u f d u f f ( ), 3 = f u t = f = f + f dt dt u dt u u ( ; ) T = u t u t dtφ u t dt + ( dt) ( 3 ) = dt + + ( fuu f + fu f ) dt b + + f + O d 3! dt dt β f ff 4 u f βdtff u uu t b =, β = It is easier to geeralize to higher order RK i this case whe there is o explicit time depedece i f. CAAM 45 Sprig 005

Secod Example Ruge-Kutta: Heu s Third Order Formula Traditioal versio (, ) a = dtf u t a dt b = dtf u, t + + 3 3 b dt c = dtf u +, t + 3 3 u+ = u + ( a + 3c) 4 I terms of itermediate variables: dt uˆ = u + f ( u, t ) 3 dt uˆ = u + f ( uˆ, t+ /3 ) 3 u = u + f u t + f u t 4 ( (, ) 3 ( ˆ, )) + + /3 This is a 3 rd order, 3 stage sigle step explicit Ruge-Kutta method. CAAM 45 Sprig 005

Agai Let s Check the Stability Regio dt uˆ = u + f ( u, t ) 3 dt uˆ = u + f ( uˆ, t+ /3 ) 3 u = u + f u t + f u t 4 ( (, ) 3 ( ˆ, )) + + /3 With f=mu*u reduces to a sigle level recursio with a very familiar multiplier: dt uˆ = u + µ u 3 dt dt uˆ = u + µ u + µ u 3 3 dt dt dt u = u + µ u 3µ u µ u µ u 4 + + + 3 3 + dt dt dt = u + µ 3µ µ µ u 4 + + + 3 3 ( µ dt) ( µ dt) = + µ dt + + 3 3 u CAAM 45 Sprig 005

Stability of Heu s 3 rd Order Method Each margially stable mu*dt is such that the multiplier is of magitude, i.e. 3 ν ν + ν + + = 6 This traces a curve i the u=mu*dt complex plae. Sice we are short o time we ca plot this usig Matlab s roots fuctio i e θ CAAM 45 Sprig 005

Stability Regio for RK (s=p) rk3 rk rk4 CAAM 45 Sprig 005

Heu s Method ad The Imagiary Axis This time we cosider poits o the imagiary axis which are close to the origi: ν = iα 3 α α + iα i 6 3 α α = + α 6 4 6 α α = + 36 rk3 Ad this is bouded above by if α 3.73 CAAM 45 Sprig 005

Observatio o RK liear stability For the s th order, s stage RK we see that the stability regio grows with icreasig s: Cosequetly we ca take a larger time step (dt) as the order of the RK scheme icrease. O the dow side, we require more evaluatios of f CAAM 45 Sprig 005

Popular 4 th Order Ruge-Kutta Formula Four stages: a = dtf u, t b = dtf u + a /, t c = dtf u + b /, t d = dtf u + c, t + + / + / u+ = u + a + b + c + d 6 see: http://web.comlab.ox.ac.uk/oucl/work/ick.trefethe/all.pdf of miimum umber of stages to achieve p th order. p76 for details CAAM 45 Sprig 005

Imagiary Axis (agai) With the obvious multiplier we obtai: ν = iα 3 4 ν ν ν + ν + + + = 6 4 3 4 6 8 α α α α α + iα i + = + 6 4 7 4 For stability we require: α α 7 4 6 8 8 α i.e. α.83 rk4 CAAM 45 Sprig 005

Imagiary Axis Stability Summary.83 for the 4 th Order Ruge-Kutta method.73 for Heu s 3 rd Order Method 0 for modified Euler CAAM 45 Sprig 005

Boudig the Global Error i Terms of the Local Trucatio Error Theorem: Cosider the geeral oe-step method u = u + dt Φ + u, t; dt ad we assume that Phi is Lipschitz cotiuous with respect to the first argumet (with costat L Φ ) i.e. for (, ; ) (, ; ) { } u, t, v, t D = u, t : t t t, u u C we have: Φ u t dt Φ v t dt L u v 0 max 0 The assumig u ( t ) u ( t ) C = N it follows that 0,,.., T u u t e, = 0,,..., N where T = max T ( L Φ( t ) ) t 0 L 0 N Φ Φ CAAM 45 Sprig 005

cot Proof: we use the defiitio of the local trucatio error: T = ( u( t + dt) u( t )) dtφ( u( t ), t ) to costruct the error equatio: we use the Lipschitz cotiuity of Phi: tidyig: ( ) u t + u + = u t u + dt Φ u t, t Φ u, t + T u t u u t u + dtl u t u + T + + Φ u t u dtl u t u T + + + Φ + CAAM 45 Sprig 005

( ) proof cot u t u + dtl u t u + T + + Φ { } ( ) ( ) + dtl + dtl u t u + T + T + ( dtl ) u( t ) u T ( dtl ) m= T + m= 0 m Φ Φ Φ 0 0 m Φ m= 0 ( dtl ) Φ m m= + + + { } m= max ( ) { max } m dtlφ Tm dtlφ Tm + = m m m= 0 Φ T ( + ) T ( + ) dtl + dtlφ e dtl dtl T dtl Φ Φ ( L ) Φ t+ t0 e Φ Φ m + + + dtl CAAM 45 Sprig 005

proof summary We ow have the global error estimate: T u t u e ( L ) Φ t+ t0 + + dtlφ Broadly speakig this implies that if the local trucatio error is h^{p+} the the error at a give time step will scale as O(h^p): p ( + ) + u t u O h Covergece follows uder restrictios o the ODE which guaratee existace of a uique C solutio ad stable choice of dt. CAAM 45 Sprig 005

Warig About Global Error Estimate It should be oted that the error estimate is of almost zero practical use. T u t u e ( L ) Φ t+ t0 + + dtlφ I the full covergece aalysis we pick a fial time t ad we will see that expoetial term agai. Covergece is guarateed but the costat ca be extraordiarily large for fiite time: L Φ ( L ) Φ t t0 e CAAM 45 Sprig 005

A Posteriori Error Estimate There are examples of RK methods which have embedded lower order schemes. i.e. after oe full RK time step, for some versios it is possible to use a secod set of coefficiets to recostruct a lower order approximatio. Thus we ca compute the differece betwee the two differet approximatios to estimate the local trucatio error committed over the time step. google: ruge kutta embedded Numerical recipes i C: http://www.library.corell.edu/r/bookcpdf/c6-.pdf CAAM 45 Sprig 005

My Favorite s Stage Ruge-Kutta Method There is a s stage Ruge-Kutta method of particular simplicity due to Jameso-Schmidt- Turkel, which is of iterest whe there is o explicit time depedece for f u for m=0:s- + u dt u = u + f u s m ed u = = u CAAM 45 Sprig 005

RK v. AB Whe should we use RK ad whe should we use AB? rk3 rk rk4 CAAM 45 Sprig 005

Class Cacelled o 0/7/05 There will be o class o Thursday 0/7/05 The homework due for that class will be due the followig Thursday 0/4/05 CAAM 45 Sprig 005