A Brief Note on Linear Multistep Methods

Total Page:16

File Type:pdf, Size:1020Kb

A Brief Note on Linear Multistep Methods A brief note on linear multistep methods Alen Alexanderian* Abstract We review some key results regarding linear multistep methods for solving intial value prob- lems. Moreover, we discuss some common classes of linear multistep methods. 1 Basic theory Here we provide a summary of key results regarding stability and consistency of linear mul- tistep methods. We focus on the initial value problem, 0 y = f(x; y); x 2 [a; b]; y(a) = y0: (1.1) Here y(x) 2 R is the state variable, and all throughout, we assume that f satisfies a uniform Lipschitz condition with respect to y. Definition of a multistep method. The generic description of a linear multistep method is as follows: define nodes xn = a + nh, n = 0;:::;N, with h = (b − a)=N. The general form of a multistep method is p p X X yn+1 = αjyn−j + h βjf(xn−j; yn−j); n ≥ p: (1.2) j=0 j=−1 p p Here fαigi=0, and fβigi=−1 are constant coefficients, and p ≥ 0. If either αp 6= 0 or βp 6= 0, then the method is called a p + 1 step method. The initial values, y0; y1; : : : ; yp, must be obtained by other means (e.g., an appropriate explicit method). Note that if β−1 = 0, then the method is explicit, and if β−1 6= 0, the method is implicit. Also, here we use the convention that y(xn) is the exact value of y at xn and yn is the numerically computed approximation to y(xn); i.e., yn ≈ y(xn). Truncation error and accuracy. The local trunction error of the method is defined by 2 0 p p 13 1 X X T (y; h) = y(x ) − α y(x ) + h β f(x ; y(x )) : (1.3) n h 4 n+1 @ j n−j j n−j n−j A5 j=0 j=−1 Note that in many texts, τn(y) is used to denote the Tn(y; h) defined above. The present nota- tion is adapted from [2]. Note also that we can rewrite the expression for the local truncation error as, 2 0 p p 13 1 X X T (y; h) = y(x ) − α y(x ) + h β y0(x ) ; n h 4 n+1 @ j n−j j n−j A5 j=0 j=−1 which defines the local truncation error for integrating y0(x). Next, we define, τ(h) := max jTn(y; h)j: xp≤xn≤b We say the method is consistent if τ(h) ! 0; as h ! 0: (1.4) *North Carolina State University, Raleigh, NC, USA. E-mail: [email protected] Last revised: August 15, 2018. On linear multistep methods The speed of convergence of the numerical solution to the true solution is related to the speed of convergence in (1.4). Hence, we need to understand the conditions under which τ(h) = O(hm); (1.5) as h ! 0. The largest value of m for which this holds is called the order of the method (1.2). Theorem 1.1 ([1, Theorem 6.5]). Let m ≥ 1 be an integer. For (1.4) to hold for all continuously differentiable functions y(x), that is for the method (1.2) to be consistent, it is necessary and sufficient that p p p X X X αj = 1; − jαj + βj = 1: (1.6) j=0 j=0 j=−1 For (1.5) to hold for all y(x) that are m + 1 times continuouly differentiable, it is necessary and sufficient that (1.6) hold and that p p X i X i−1 (−j) αj + i (−j) βj = 1; i = 2; 3; : : : ; m: j=0 j=−1 Examples. The following is an example of a linear multistep method, known as the midpoint method: yn+1 = yn−1 + 2hf(xn; yn); n ≥ 1 Notice that y1 needs to be computed before the iterations can begin. This can be done via one step of explicit Euler: y1 = y0 + hf(x0; y0). The truncation error for this method is given by: 1 T (y; h) = [y(x ) − y(x ) − 2hy0(x )] : (1.7) n h n+1 n−1 n To compute this, we use Taylor expansion of y(xn+1) and y(xn−1): h2 h3 y(x ) = y(x ) + hy0(x ) + y00(x ) + y000(x ) + O(h4); n+1 n n 2 n 6 n h2 h3 y(x ) = y(x ) − hy0(x ) + y00(x ) − y000(x ) + O(h4): n−1 n n 2 n 6 n Substituting Taylor expansions of y(xn+1) and y(xn−1) in (1.7), we have 1 h2 h3 T (y; h) = y(x ) + hy0(x ) + y00(x ) + y000(x ) + O(h4) n h n n 2 n 6 n h2 h3 −y(x ) + hy0(x ) − y00(x ) + y000(x ) + O(h4) − 2hy0(x ) n n 2 n 6 n n h2 = y000(x ) + O(h3): 3 n This shows, in particular, that the method is second order. The following is another example of a linear multistep method: h y = 3y − 2y + [f(x ; y ) − 3f(x ; y )]; n ≥ 1: (1.8) n+1 n n−1 2 n n n−1 n−1 Using a similar approach as above, we can compute the truncation error for this method: 7 T (y; h) = h2y000(x ) + O(h3): n 12 n Thus, this is also a second order method. A simple but useful convergence result. The following convergence result is Theorem 6.6 in [1]. While this is not the most general convergence result for linear multistep methods, it applies to a wide class of such methods. 2 On linear multistep methods Theorem 1.2. Consider solving the initial value problem (1.1) using the linear multistep method (1.2) N N with a step size h to obtain fyngn=0 that approximate fy(xn)gn=0. Let the initial errors satisfy, η(h) := max jy(xn) − ynj ! 0; as h ! 0: 0≤n≤p p Assume that the method is consistent, and assume that the coefficients fαjgj=0 in (1.2) are non-negative. Then, the method is convergent, and max jy(xn) − ynj ≤ c1η(h) + c2τ(h); a≤xn≤b where c1 and c2 are suitable constants. If the method is of order m, and if the initial errors satisfy η(h) = O(hm), then the speed of convergence is O(hm). Remark 1.3. The above result states that to ensure a rate of convergence of O(hm) for the method (1.2), it is necessary that the method be of order m, i.e, each step has an error of O(hm+1) (recall truncation error (1.3) is this error divided by h). However, the initial values m y0; : : : ; yp need to be computed with only an accuracy of O(h ). Thus, the initial values can be computed with a lower order method. This is also noted in [1, p. 361]. As an example, and as mentioned before, the midpoint method, which is of second order, can be initialized with explict Euler, which is only first order accurate. General stability and convergence theory. To obtain a more general convergence re- sult, without the non-negativity assumption on αj, we need to investigate the stability of the method (1.2) more closely. The general theory is rather involved and is discussed in texts such as [1, 2, 3]. The stability of (1.2) is linked to the polynomial p p+1 X p−j ρ(r) = r − αjr : j=0 We note immediately that by the consistency condition, we have ρ(1) = 0. Let r0; r1; : : : ; rp denote roots of ρ, repeated according to their multiplicity, and let r0 = 1. The method (1.2) satisfies the root condition if the following hold: jrjj ≤ 1; j = 0; 1; : : : ; p (1.9) 0 jrjj = 1 ) ρ (rj) 6= 0: (1.10) We note that (1.9) requires all roots of ρ lie inside the unit circle fz 2 C : jzj ≤ 1g, and (1.10) states that the roots on the boundary of the unit circle are to be simple roots (i.e., of multiplicity one) of ρ(r). A key result on linear multistep methods says that (1.2) is stable if and only if the root condition holds. The general convergence result for linear multistep methods states that a consistent linear multistep method is convergent if and only if it satisfies the root condition; see [1, 2] for more details. As an example, consider the midpoint method described above. The characteristic equation for that method is given by ρ(r) = r2 − 1; which has roots r = ±1. Therefore, the method satisfies the root condition, and is thus stable. Next, we study stability of (1.8); the method has α0 = 3 and α1 = −2, and thus, its characteristic polynomial is ρ(r) = r2 − 3r + 2 = (r − 1)(r − 2); which has roots r1 = 1 and r2 = 2 and thus violates the root condition. Therefore, the method (1.8) is unstable. 2 Some commonly used linear multistep methods. We will focus on the following classes of methods: 1. Backward differentiation formulas (BDFs) 3 On linear multistep methods 2. Adams methods (a) Adams–Bashforth (explicit) (b) Adams–Moulton (implicit) 3. Predictor corrector methods 2.1 Backward differentiation formulas These methods are obtained based on numerical differentiation formulas. Basic idea: Interpolate past values of y(x), and then differentiate the interpolating polyno- mial to approximate y0. More specifically, let q(x) be the polynomial of degree ≥ p that interpolates y(x) at the points xn+1; xn; : : : ; xn−p+1, for some p ≥ 1: p−1 X q(x) = y(xn−j)`j(x); (2.1) j=−1 where `j(x)’s are elementary Lagrange polynomials.
Recommended publications
  • Numerical Solution of Ordinary Differential Equations
    NUMERICAL SOLUTION OF ORDINARY DIFFERENTIAL EQUATIONS Kendall Atkinson, Weimin Han, David Stewart University of Iowa Iowa City, Iowa A JOHN WILEY & SONS, INC., PUBLICATION Copyright c 2009 by John Wiley & Sons, Inc. All rights reserved. Published by John Wiley & Sons, Inc., Hoboken, New Jersey. Published simultaneously in Canada. No part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, recording, scanning, or otherwise, except as permitted under Section 107 or 108 of the 1976 United States Copyright Act, without either the prior written permission of the Publisher, or authorization through payment of the appropriate per-copy fee to the Copyright Clearance Center, Inc., 222 Rosewood Drive, Danvers, MA 01923, (978) 750-8400, fax (978) 646-8600, or on the web at www.copyright.com. Requests to the Publisher for permission should be addressed to the Permissions Department, John Wiley & Sons, Inc., 111 River Street, Hoboken, NJ 07030, (201) 748-6011, fax (201) 748-6008. Limit of Liability/Disclaimer of Warranty: While the publisher and author have used their best efforts in preparing this book, they make no representations or warranties with respect to the accuracy or completeness of the contents of this book and specifically disclaim any implied warranties of merchantability or fitness for a particular purpose. No warranty may be created ore extended by sales representatives or written sales materials. The advice and strategies contained herin may not be suitable for your situation. You should consult with a professional where appropriate. Neither the publisher nor author shall be liable for any loss of profit or any other commercial damages, including but not limited to special, incidental, consequential, or other damages.
    [Show full text]
  • An Enhanced Parareal Algorithm Based on the Deferred Correction Methods for a Stiff System✩
    Journal of Computational and Applied Mathematics 255 (2014) 297–305 Contents lists available at SciVerse ScienceDirect Journal of Computational and Applied Mathematics journal homepage: www.elsevier.com/locate/cam An enhanced parareal algorithm based on the deferred correction methods for a stiff systemI Sunyoung Bu a,∗, June-Yub Lee a,b a Institute of Mathematical Sciences, Ewha Womans University, Seoul 120-750, Republic of Korea b Department of Mathematics, Ewha Womans University, Seoul 120-750, Republic of Korea article info a b s t r a c t Article history: In this study, we consider a variant of the hybrid parareal algorithm based on deferred Received 31 March 2012 correction techniques in order to increase the convergence order even for the stiff system. Received in revised form 4 April 2013 A hybrid parareal scheme introduced by Minion (2011) [20] improves the efficiency of the original parareal by utilizing a Spectral Deferred Correction (SDC) strategy for a fine Keywords: propagator within the parareal iterations. In this paper, we use Krylov Deferred Correction Hybrid parareal algorithm (KDC) for a fine propagator to solve the stiff system and Differential Algebraic Equations Spectral deferred correction (DAEs) stably. Also we employ a deferred correction technique based on the backward Euler Krylov deferred correction Stiff system method for a coarse propagator in order to make the global order of accuracy reasonably Differential algebraic equation high while limiting the cost of sequential steps as small as possible. Numerical experiments on the efficiency of our method are promising. ' 2013 Elsevier B.V. All rights reserved. 1. Introduction Deferred correction methods can be used to obtain high order numerical solutions for a system of time dependent differential equations in the form of 0 f .y.t/; y .t/; t/ D 0; (1) y.0/ D y0: Deferred correction methods have mainly been used for boundary value problems.
    [Show full text]
  • Chapter 16: Differential Equations
    ✐ ✐ ✐ ✐ Chapter 16 Differential Equations A vast number of mathematical models in various areas of science and engineering involve differ- ential equations. This chapter provides a starting point for a journey into the branch of scientific computing that is concerned with the simulation of differential problems. We shall concentrate mostly on developing methods and concepts for solving initial value problems for ordinary differential equations: this is the simplest class (although, as you will see, it can be far from being simple), yet a very important one. It is the only class of differential problems for which, in our opinion, up-to-date numerical methods can be learned in an orderly and reasonably complete fashion within a first course text. Section 16.1 prepares the setting for the numerical treatment that follows in Sections 16.2–16.6 and beyond. It also contains a synopsis of what follows in this chapter. Numerical methods for solving boundary value problems for ordinary differential equations receive a quick review in Section 16.7. More fundamental difficulties arise here, so this section is marked as advanced. Most mathematical models that give rise to differential equations in practice involve partial differential equations, where there is more than one independent variable. The numerical treatment of partial differential equations is a vast and complex subject that relies directly on many of the methods introduced in various parts of this text. An orderly development belongs in a more advanced text, though, and our own description in Section 16.8 is downright anecdotal, relying in part on examples introduced earlier. 16.1 Initial value ordinary differential equations Consider the problem of finding a function y(t) that satisfies the ordinary differential equation (ODE) dy = f (t, y), a ≤ t ≤ b.
    [Show full text]
  • Differential Equations
    Differential Equations • Overview of differential equation • Initial value problem • Explicit numeric methods • Implicit numeric methods • Modular implementation Physics-based simulation • It’s an algorithm that produces a sequence of states over time under the laws of physics • What is a state? Physics-based simulation xi xi+1 xi xi+1 = xi +∆x ∆x Physics-based simulation xi Newtonian laws gravity wind gust xi+1 elastic force . integrator xi xi+1 = xi +∆x ∆x Differential equations • What is a differential equation? • It describes the relation between an unknown function and its derivatives • Ordinary differential equation (ODE) • is the relation that contains functions of only one independent variable and its derivatives Ordinary differential equations An ODE is an equality equation involving a function and its derivatives known function x˙(t)=f(x(t)) time derivative of the unknown function that unknown function evaluates the state given time What does it mean to “solve” an ODE? Symbolic solutions • Standard introductory differential equation courses focus on finding solutions analytically • Linear ODEs can be solved by integral transforms • Use DSolve[eqn,x,t] in Mathematica Differential equation: x˙(t)= kx(t) − kt Solution: x(t)=e− Numerical solutions • In this class, we will be concerned with numerical solutions • Derivative function f is regarded as a black box • Given a numerical value x and t, the black box will return the time derivative of x Physics-based simulation xi Newtonian laws gravity wind gust xi+1 elastic force . integrator
    [Show full text]
  • Introduction to Numerical Analysis
    INTRODUCTION TO NUMERICAL ANALYSIS Cho, Hyoung Kyu Department of Nuclear Engineering Seoul National University 10. NUMERICAL INTEGRATION 10.1 Background 10.11 Local Truncation Error in Second‐Order 10.2 Euler's Methods Range‐Kutta Method 10.3 Modified Euler's Method 10.12 Step Size for Desired Accuracy 10.4 Midpoint Method 10.13 Stability 10.5 Runge‐Kutta Methods 10.14 Stiff Ordinary Differential Equations 10.6 Multistep Methods 10.7 Predictor‐Corrector Methods 10.8 System of First‐Order Ordinary Differential Equations 10.9 Solving a Higher‐Order Initial Value Problem 10.10 Use of MATLAB Built‐In Functions for Solving Initial‐Value Problems 10.1 Background Ordinary differential equation A differential equation that has one independent variable A first‐order ODE . The first derivative of the dependent variable with respect to the independent variable Example Rates of water inflow and outflow The time rate of change of the mass in the tank Equation for the rate of height change 10.1 Background Time dependent problem Independent variable: time Dependent variable: water level To obtain a specific solution, a first‐order ODE must have an initial condition or constraint that specifies the value of the dependent variable at a particular value of the independent variable. In typical time‐dependent problems . Initial condition . Initial value problem (IVP) 10.1 Background First order ODE statement General form Ex) . Flow lines Analytical solution In many situations an analytical solution is not possible! Numerical solution of a first‐order ODE A set of discrete points that approximate the function y(x) Domain of the solution: , N subintervals 10.1 Background Overview of numerical methods used/or solving a first‐order ODE Start from the initial value Then, estimate the value at a second nearby point third point … Single‐step and multistep approach .
    [Show full text]
  • Numerical Methods for Evolutionary Systems, Lecture 2 Stiff Equations
    Numerical Methods for Evolutionary Systems, Lecture 2 C. W. Gear Celaya, Mexico, January 2007 Stiff Equations The history of stiff differential equations goes back 55 years to the very early days of machine computation. The first identification of stiff equations as a special class of problems seems to have been due to chemists [chemical engineers] in 1952 (C.F. Curtiss and J.O. Hirschfelder, Integration of stiff equations, Proc. of the National Academy of Sciences of U.S., 38 (1952), pp 235--243.) For 15 years stiff equations presented serious difficulties and were hard to solve, both in chemical problems (reaction kinetics) and increasingly in other areas (electrical engineering, mechanical engineering, etc) until around 1968 when a variety of methods began to appear in the literature. The nature of the problems that leads to stiffness is the existence of physical phenomena with very different speeds (time constants) so that, while we may be interested in relative slow aspects of the model, there are features of the model that could change very rapidly. Prior to the availability of electronic computers, one could seldom solve problems that were large enough for this to be a problem, but once electronic computers became available and people began to apply them to all sorts of problems, we very quickly ran into stiff problems. In fact, most large problems are stiff, as we will see as we look at them in a little detail. L2-1 Copyright 2006, C. W. Gear Suppose the family of solutions to an ODE looks like the figure below. This looks to be an ideal problem for integration because almost no matter where we start the final solution finishes up on the blue curve.
    [Show full text]
  • Nonlinear Problems 5
    Nonlinear Problems 5 5.1 Introduction of Basic Concepts 5.1.1 Linear Versus Nonlinear Equations Algebraic equations A linear, scalar, algebraic equation in x has the form ax C b D 0; for arbitrary real constants a and b. The unknown is a number x. All other algebraic equations, e.g., x2 C ax C b D 0, are nonlinear. The typical feature in a nonlinear algebraic equation is that the unknown appears in products with itself, like x2 or x 1 2 1 3 e D 1 C x C 2 x C 3Š x C ::: We know how to solve a linear algebraic equation, x Db=a, but there are no general methods for finding the exact solutions of nonlinear algebraic equations, except for very special cases (quadratic equations constitute a primary example). A nonlinear algebraic equation may have no solution, one solution, or many solutions. The tools for solving nonlinear algebraic equations are iterative methods,wherewe construct a series of linear equations, which we know how to solve, and hope that the solutions of the linear equations converge to a solution of the nonlinear equation we want to solve. Typical methods for nonlinear algebraic equation equations are Newton’s method, the Bisection method, and the Secant method. Differential equations The unknown in a differential equation is a function and not a number. In a linear differential equation, all terms involving the unknown function are linear in the unknown function or its derivatives. Linear here means that the unknown function, or a derivative of it, is multiplied by a number or a known function.
    [Show full text]
  • Numerical Methods for Ordinary Differential Equations
    Numerical methods for ordinary differential equations Ulrik Skre Fjordholm May 1, 2018 Chapter 1 Introduction Consider the ordinary differential equation (ODE) x.t/ f .x.t/; t/; x.0/ x0 (1.1) P D D d d d where x0 R and f R R R . Under certain conditions on f there exists a unique solution of (1.1), and2 for certainW types of! functions f (such as when (1.1) is separable) there are techniques available for computing this solution. However, for most “real-world” examples of f , we have no idea how the solution actually looks like. We are left with no choice but to approximate the solution x.t/. Assume that we would like to compute the solution of (1.1) over a time interval t Œ0; T for some T > 01. The most common approach to finding an approximation of the solution of2 (1.1) starts by partitioning the time interval into a set of points t0; t1; : : : ; tN , where tn nh is a time step and h T is the step size2. A numerical method then computes an approximationD of the actual solution D N value x.tn/ at time t tn. We will denote this approximation by yn. The basis of most numerical D methods is the following simple computation: Integrate (1.1) over the time interval Œtn; tn 1 to get C Z tn 1 C x.tn 1/ x.tn/ f .x.s/; s/ ds: (1.2) C D C tn Although we could replace x.tn/ and x.tn 1/ by their approximations yn and yn 1, we cannot use the formula (1.2) directly because the integrandC depends on the exact solution x.s/C .
    [Show full text]
  • The N-Body Problem Applied to Exoplanets
    Chapter 1 The N-body problem applied to exoplanets 1.1 Motivation The N-body problem is the problem of solving the motion of N > 1 stars or planets that are mutually gravitationally attracting each other. The 2-body problem is a special case which can be solved analytically. The solutions to the 2-body problem are the Kepler orbits. For N > 2 there is, however, no analytical solution. The only way to solve the N > 2 problem is by numerical integration of the Newtonian equations of motion. Of course there are limiting cases where the N > 2 problem reduces to a set of independent N = 2 problems: To first order the orbit of the planets around the Sun are Kepler orbits: N = 2 solutions in which the two bodies are the Sun and the planet. That is because the mutual gravitational force between e.g. Venus and Earth is much smaller than the gravitational force of the Sun. So for the planets of our Solar System, and for most planets around other stars, the N-body problem can, to first order, be simplified into N 1 independent 2-body problems. That means that e.g. the − Earth’s orbit is only very slightly modified by the gravitational attraction by Venus or Mars. For most purposes we can ignore this tiny effect, meaning that the Kepler orbital characteristic are sufficiently accurate to describe most of what we want to know about the system. However, for exoplanetary systems where the planets are closer to each other, the situation may be different.
    [Show full text]
  • Recent Advances in Computational and Applied Mathematics
    Recent Advances in Computational and Applied Mathematics Theodore E. Simos Editor Recent Advances in Computational and Applied Mathematics Editor Theodore E. Simos Department of Mathematics College of Sciences King Saud University P.O. Box 2455 Riyadh 11451 Saudi Arabia and Laboratory of Computational Sciences Department of Computer Science and Technology University of Peloponnese 22100 Tripolis Greece [email protected] ISBN 978-90-481-9980-8 e-ISBN 978-90-481-9981-5 DOI 10.1007/978-90-481-9981-5 Springer Dordrecht Heidelberg London New York Library of Congress Control Number: 2010938640 Mathematics Subject Classification (2000): 65, 65D20, 65Rxx, 65Lxx, 30, 30G35, 31B05, 31B35, 31, 33C05, 33C10, 33C15, 35A08, 35G15, 35Q40, 35R01, 41A60, 49Jxx, 49Nxx, 76-xx, 76A05, 81Q05, 81Qxx, 93Exx © Springer Science+Business Media B.V. 2011 Chapter 10 was created within the capacity of an US governmental employment and therefore is in the public domain. No part of this work may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, photocopying, microfilming, recording or otherwise, without written permission from the Publisher, with the exception of any material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work. Cover design: WMXDesign Printed on acid-free paper Springer is part of Springer Science+Business Media (www.springer.com) Preface This volume includes an exciting collection of papers on computational and applied mathematics presenting the recent advances in several areas of this field. All the papers have been peer reviewed by at least three reviewers.
    [Show full text]
  • Numerical Integration
    Game Physics Game and Media Technology Master Program - Utrecht University Dr. Nicolas Pronost Numerical Integration Updating position • Recall that 퐹푂푅퐶퐸 = 푀퐴푆푆 × 퐴퐶퐶퐸퐿퐸푅퐴푇퐼푂푁 – If we assume that the mass is constant then 퐹 푝표, 푡 = 푚 ∗ 푎(푝표, 푡) ′ ′ – We know that 푣 푡 = 푎(푡) and 푝표 푡 = 푣(푡) ′′ – So we have 퐹 푝표, 푡 = 푚 ∗ 푝표 (푡) • This is a differential equation – Well studied branch of mathematics – Often difficult to solve in real-time applications Game Physics 3 Taylor series • Taylor expansion series of a function can be applied on 푝0 at t + ∆푡 푝표 푡 + ∆푡 ∆푡2 = 푝 푡 + ∆t ∗ 푝 ′ 푡 + 푝 ′′ 푡 + ⋯ 표 표 2 표 ∆푡푛 + 푝 푛 푡 푛! 표 • But of course we don’t know the values of the entire infinite series, at best we have 푝표 푡 and the first two derivatives Game Physics 4 First order approximation • Hopefully, if ∆푡 is small enough, we can use an approximation ′ 푝표 푡 + ∆푡 ≈ 푝표 푡 + ∆t ∗ 푝표 푡 • Separating out position and velocity gives 퐹(푡) 푣 푡 + ∆푡 = 푣 푡 + 푎 푡 ∆푡 = 푣 푡 + ∆푡 푚 푝표(푡 + ∆푡) = 푝표(푡) + 푣(푡)∆푡 Game Physics 5 Euler’s method 5.1 • This is known as Euler’s method 푣 푡 + ∆푡 = 푣 푡 + 푎 푡 ∆푡 푝표(푡 + ∆푡) = 푝표(푡) + 푣(푡)∆푡 푣(푡 − ∆푡) 푡 푎(푡 − ∆푡) 푣(푡) 푡 + ∆푡 푣(푡) 푣(푡 + ∆푡) 푎(푡) Game Physics 6 Euler’s method • So by assuming the velocity is constant for the time ∆푡 elapsed between two frames – We compute the acceleration of the object from the net force applied on it 푎 푡 = 퐹(푡)/푚 – We compute the velocity from the acceleration 푣 푡 + ∆푡 = 푣 푡 + 푎 푡 ∆푡 – We compute the position from the velocity 푝표 푡 + ∆푡 = 푝표 푡 + 푣(푡)∆푡 Game Physics 7 Issues with linear dynamics • We only look at a sequence of instants without meaning – E.g.
    [Show full text]
  • Solving Differential Equations in R
    Use R! Solving Differential Equations in R Bearbeitet von Karline Soetaert, Jeff Cash, Francesca Mazzia 1. Auflage 2012. Taschenbuch. xvi, 248 S. Paperback ISBN 978 3 642 28069 6 Format (B x L): 15,5 x 23,5 cm Gewicht: 409 g Weitere Fachgebiete > Mathematik > Stochastik > Mathematische Statistik Zu Inhaltsverzeichnis schnell und portofrei erhältlich bei Die Online-Fachbuchhandlung beck-shop.de ist spezialisiert auf Fachbücher, insbesondere Recht, Steuern und Wirtschaft. Im Sortiment finden Sie alle Medien (Bücher, Zeitschriften, CDs, eBooks, etc.) aller Verlage. Ergänzt wird das Programm durch Services wie Neuerscheinungsdienst oder Zusammenstellungen von Büchern zu Sonderpreisen. Der Shop führt mehr als 8 Millionen Produkte. Chapter 2 Initial Value Problems Abstract In the previous chapter we derived a simple finite difference method, namely the explicit Euler method, and we indicated how this can be analysed so that we can make statements concerning its stability and order of accuracy. If Euler’s method is used with constant time step h then it is convergent with an error of order O(h) for all sufficiently smooth problems. Thus, if we integrate from 0 to 1 with step h = 10−5, we will need to perform 105 function evaluations to complete the integration and obtain a solution with error O(h). To achieve extra accuracy using this method we could reduce the step size h. This is not in general efficient and in many cases it is preferable to use higher order methods rather than decreasing the step size with a lower order method to obtain higher accuracy. One of the main differences between Euler’s and higher order methods is that, whereas Euler’s method uses only information involving the value of y and its derivative (slope) at the start of the integration interval to advance to the next integration step, higher order methods use information at more than one point.
    [Show full text]