MATH 1080 Spring 2020, Second Half of Semester Notes for the Remote Teaching 1

MATH 1080 Spring 2020, Second Half of Semester Notes for the Remote Teaching 1

MATH 1080 Spring 2020, second half of semester Notes for the remote teaching 1. Numerical methods for Ordinary Differential Equations (ODEs). DEFINITION 1.1 (ODE of order p). d py d p−1y dy + a + ··· + a + a y = f (t;y;y0;:::;y(p−1)): (1.1) dt p p−1 dt p−1 1 dt 0 REMARK 1.1. An ODE of order p can be written as a system of p first-order equations, with the unknowns: 0 00 (p−2) (p−1) y1 = y;;y2 = y ; y3 = y ;;:::; yp−1 = y ;yp = y ; hence satisfying 8 y0 = y > 1 2 > y0 = y ; > 2 3 < . > y0 = y ; > p−1 p :> 0 yp = f (t;y1;y2;:::;yp−1) − ap−1yp − ··· − a1y2 − a0y1: EXAMPLE 1.1 (Logistic equation). y y0 = cy 1 − : (scalar equation) B EXAMPLE 1.2 (Lotka-Volterra). 0 y1 = c1y1(1 − b1y1 − d2y2) 0 (system of 2 first-order equations) y2 = c2y2(1 − b2y2 − d1y1): EXAMPLE 1.3 (Vibrating spring / simple harmonic motion). u00(x) + k(x)u0(x) + m(x)u(x) = f (x): (2nd order scalar equation) n n DEFINITION 1.2 (The Cauchy problem, Initial Value Problem (IVP)). Find y : I ! R ;y 2 C1(R ) such that y0 = f (t;y(t)); t 2 (0;T] (IVP) y(t0) = y0: n 1 Here I = [t0;T], y0 2 R is called ’initial datum’, and y(·) 2 C (R) satisfying (IVP) is a classical solution. Moreover, if f (t;y(t)) ≡ f (y(t)), the equation/system (IVP) is called ‘autonomous’. DEFINITION 1.3. The equation (IVP) can be considered in ‘integral form’: Z t y(t) = y(t0) + f (s;y(s))ds: (1.2) t0 n and then the solution y(·) 2 C(R ) is called a ‘mild solution’. DEFINITION 1.4. The function f is globally Lipschitz if n j f (t;y) − f (s;z)j ≤ L jt − sj + jy − zj ; 8(t;y);(s;z) 2 R × R : (1.3) THEOREM 1.5 (Existence and uniqueness of IVPs). If f is Lipschitz continuous, then 9! there exists a unique solution y to the (IVP). 1 1.1. One-step numerical methods. To simplify the presentation, we shall consider first the constant step size (equidistant mesh) case, i.e., T −t Dt = 0 ; (constant time step) N where N 2 N is the number of subintervals, and ti = t0 + iDt, for all i = 0 : N. In order to introduce some of the most classical numerical methods for ODEs, let us consider the Initial Value Problem (IVP) in its integral form (1.2). Or equivalently, let us integrate (IVP) on [tn;tn+1] to obtain Z tn+1 y(tn+1) = y(tn) + f (t;y(t))dt; (1.4) tn and use some of the quadrature (numerical integration) rules to approximate the integral, namely Z tn+1 f (t;y(t))dt ≈ f (tn;y(tn)) · Dt (rectangle left) tn Z tn+1 f (t;y(t))dt ≈ f (tn+1;y(tn+1)) · Dt (rectangle right) tn Z tn+1 t +t t +t f (t;y(t))dt ≈ f n n+1 ;y n n+1 · Dt (rectangle midpoint rule) tn 2 2 Z tn+1 f (t ;y(t )) + f (t ;y(t )) f (t;y(t))dt ≈ n+1 n+1 n n · Dt ( trapezoidal rule) tn 2 These approximations then yield the following numerical methods for solving (IVP) yn+1 = yn + Dt f (tn;yn) (Forward Euler) yn+1 = yn + Dt f (tn+1;yn+1) (Backward Euler) t +t t +t y + y y = y + Dt f n n+1 ;??? ≈ y + Dt f n n+1 ; n n+1 (implicit midpoint) n+1 n 2 n 2 2 f (t ;y ) + f (t ;y ) y = y + Dt n+1 n+1 n n (trapezoidal / Crank-Nicolson) n+1 n 2 where yn ≈ y(tn);8n = 1 : N. NOTATION 1.1. From now on we are going to denote frequently fn := f (tn;yn). DEFINITION 1.6 (One-step numerical method). Let F be a functional depending on the unknowns fyng and the values f (yn). Then the relation yn+1 = yn + DtF(yn+1;yn; fn; fn+1) (1.5) is called a one-step numerical method for approximating the Cauchy problem (IVP). Note that the methods above, namely (Forward Euler) (FE), (Backward Euler) (BE), (implicit midpoint), and (trapezoidal / Crank-Nicolson) are all one-step methods. 1.2. Consistency. DEFINITION 1.7 (Local truncation error). The residual obtained by substituting the exact solution y(t) of (IVP), evaluated at the mesh points tn;tn+1, in the numerical method (1.5) Dttn(Dt) := y(tn+1) − y(tn) − DtF y(tn+1);y(tn); f (y(tn)); f (y(tn+1)) (LTE) is called the Local Truncation Error (LTE), and is used to evaluate the approximating qualities of each method, order of ‘consistency’, and serves as an essential tool in time-adaptivity [1]. 2 DEFINITION 1.8 (Order of consistency). A numerical method is ‘consistent with order p’ if p+1 Dttn(Dt) = O(Dt ); i.e., there exist a positive constant C > 0 such that p+1 jy(tn+1) − y(tn) − DtF y(tn+1);y(tn); f (y(tn)); f (y(tn+1)) j ≤ CDt EXAMPLE 1.4. The (Forward Euler) method has order of consistency p = 1. Proof. Indeed, by substituting the exact solution y(t) into the (Forward Euler) formula, or equivalently, using the (LTE) with F from (Forward Euler), we obtain FE Dttn := y(tn+1) − y(tn) − Dt f (y(tn)): Inhere we use the Taylor formula to expand y(tn+1) about tn, namely Dt2 y(t ) = y(t ) + y0(t )Dt + y00(t ) ; n+1 n n en 2 where (of course) this holds provided the exact solution is smooth, meaning it has two continuous derivatives: 2 y 2 C [t0;T], and where ten 2 (tn;tn+1), an arbitrary point. Substituting this into the value of the local truncation above yields Dt2 DttFE := y(t ) − y(t ) − Dt f (y(t )) = y(t¨) + y0(t )Dt + y00(t ) − y(t¨) − Dt f (y(t )) n n+1 n n ¨ n n en 2 ¨ n n 2 2 0 00 Dt 0 00 Dt 1 00 2 = y (tn)Dt + y (ten) − Dt f (y(tn)) = Dt y (tn) − f (y(tn)) +y (ten) = y (ten)Dt ; 2 | {z } 2 2 =0 from (IVP) which shows that p = 1, i.e., (Forward Euler) is first-order consistent. EXAMPLE 1.5 (Implicit midpoint). The (implicit midpoint) method can also be implemented in a refactorized form as 8 ∗ y − yn ∗ > = f (y ); <> Dt=2 ; equivalently y = y + Dt f (y∗); (midpoint) n+1 ∗ n+1 n > y − y ∗ ∗ > = f (y ); or yn+1 = 2y − yn : Dt=2 ∗ where y denotes yn+1=2. Then it is easily seen that the (implicit midpoint) method is also second-order consistent. Proof. Indeed, proceding as above midpoint Dttn = y(tn+1) − y(tn) − Dt f (y(tn+1=2)) X 2 3 Dt 0 DXt X00 Dt 000 4 = y(t ) + y (t ) + y X(t X ) + y (t ) + O(Dt ) n+1=2 2 n+1=2 2! · 4 n+1X=X2 3! · 8 n+1=2 X 2 3 Dt 0 DXt X00 Dt 000 4 − y(t ) − y (t ) + y X(t X ) − y (t ) + O(Dt ) − Dt f (y(t )) n+1=2 2 n+1=2 2! · 4 n+1X=X2 3! · 8 n+1=2 n+1=2 Dt2 1 = Dt y0(t ) − f (y(t )+2 y000(t ) + O(Dt4) = y000(t )Dt3 n+1=2 n+1=2 3! · 8 n+1=2 24 n+1=2 | {z } ≡0 from (IVP) 3 which implies that p = 2. EXAMPLE 1.6 (Explicit midpoint / leapfrog method). Using the second-order central difference approximation of a first-derivative 0 y(tn+2) − y(tn) 2 y (tn+ ) = + O(Dt ); (central difference approximation) 1 2Dt we obtain the following important example of a Linear Multistep Method (LMM) is the leapfrog method: yn+2 = yn + 2Dt f (yn+1); (LF) which is also second-order consistent. EXAMPLE 1.7 (Explicit midpoint / leapfrog method). Another important LMM is the backward differentiation formula 2 (BDF2) method: 3y − 4y + y n+2 n+1 n = f (y ); (BDF2) 2Dt n+2 also second-order consistent. 1.3. Zero-stability. DEFINITION 1.9. A general 2-step LMM has the form a2yn+2 + a1yn+1 + a0yn = Dt a2 f (yn+2) + a1 f (yn+1) + a0 f (yn) : (1.6) The 1st characteristic polynomial: 2 r(r) = a2r + a1r + a0; (1.7) and the 2nd characteristic polynomial: 2 s(r) = a2r + a1r + a0: (1.8) DEFINITION 1.10 (Stability). A numerical method is zero-stable if “small” perturbations in the data f ;y0 yield small perturbations in the solutions fyng. DEFINITION 1.11 (Root condition). An equivalent property with the zero-stability of a linear multistep method for ODEs is the root condition, i.e., the roots of the first characteristic polynomial are inside the unit disc, and if they are on the unit circle, they must be simple roots. EXAMPLE 1.8 (Zero stability of the Leapfrog method (LF)). The leapfrog (explicit midpoint) method (LF) yn+2 = yn + Dt · 2 f (yn+1); hence by (1.6) and (1.7): a2 = 1;a1 = 0;a0 = −1; has the first characteristic polynomial rLF(r) = r2 − 1; with roots r1;2 = ±1, hence (LF) is zero-stable (no double roots).

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    39 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us