Sponsored Links

Minggu, 01 April 2018

Sponsored Links

Numerical methods for ordinary differential equations - YouTube
src: i.ytimg.com

Numerical methods for ordinary differential equations are methods used to find numerical approximations to the solutions of ordinary differential equations (ODEs). Their use is also known as "numerical integration", although this term is sometimes taken to mean the computation of integrals.

Many differential equations cannot be solved using symbolic computation ("analysis"). For practical purposes, however - such as in engineering - a numeric approximation to the solution is often sufficient. The algorithms studied here can be used to compute such an approximation. An alternative method is to use techniques from calculus to obtain a series expansion of the solution.

Ordinary differential equations occur in many scientific disciplines, for instance in physics, chemistry, biology, and economics. In addition, some methods in numerical partial differential equations convert the partial differential equation into an ordinary differential equation, which must then be solved.


Video Numerical methods for ordinary differential equations



The problem

A first-order differential equation is an Initial value problem (IVP) of the form,

y ? ( t ) = f ( t , y ( t ) ) , y ( t 0 ) = y 0 , ( 1 ) {\displaystyle y'(t)=f(t,y(t)),\qquad y(t_{0})=y_{0},\qquad \qquad (1)}

where f is a function that maps [t0,?) × Rd to Rd, and the initial condition y0 ? Rd is a given vector. First-order means that only the first derivative of y appears in the equation, and higher derivatives are absent.

Without loss of generality to higher-order systems, we restrict ourselves to first-order differential equations, because a higher-order ODE can be converted into a larger system of first-order equations by introducing extra variables. For example, the second-order equation y'' = -y can be rewritten as two first-order equations: y' = z and z' = -y.

In this section, we describe numerical methods for IVPs, and remark that boundary value problems (BVPs) require a different set of tools. In a BVP, one defines values, or components of the solution y at more than one point. Because of this, different methods need to be used to solve BVPs. For example, the shooting method (and its variants) or global methods like finite differences, Galerkin methods, or collocation methods are appropriate for that class of problems.

The Picard-Lindelöf theorem states that there is a unique solution, provided f is Lipschitz-continuous.


Maps Numerical methods for ordinary differential equations



Methods

Numerical methods for solving first-order IVPs often fall into one of two large categories: linear multistep methods, or Runge-Kutta methods. A further division can be realized by dividing methods into those that are explicit and those that are implicit. For example, implicit linear multistep methods include Adams-Moulton methods, and backward differentiation methods (BDF), whereas implicit Runge-Kutta methods include diagonally implicit Runge-Kutta (DIRK), singly diagonally implicit runge kutta (SDIRK), and Gauss-Radau (based on Gaussian quadrature) numerical methods. Explicit examples from the linear multistep family include the Adams-Bashforth methods, and any Runge-Kutta method with a lower diagonal Butcher tableau is explicit. A loose rule of thumb dictates that stiff differential equations require the use of implicit schemes, whereas non-stiff problems can be solved more efficiently with explicit schemes.

The so-called general linear methods (GLMs) are a generalization of the above two large classes of methods.

Euler method

From any point on a curve, you can find an approximation of a nearby point on the curve by moving a short distance along a line tangent to the curve.

Starting with the differential equation (1), we replace the derivative y' by the finite difference approximation

y ? ( t ) ? y ( t + h ) - y ( t ) h , ( 2 ) {\displaystyle y'(t)\approx {\frac {y(t+h)-y(t)}{h}},\qquad \qquad (2)}

which when re-arranged yields the following formula

y ( t + h ) ? y ( t ) + h y ? ( t ) {\displaystyle y(t+h)\approx y(t)+hy'(t)\qquad \qquad }

and using (1) gives:

y ( t + h ) ? y ( t ) + h f ( t , y ( t ) ) . ( 3 ) {\displaystyle y(t+h)\approx y(t)+hf(t,y(t)).\qquad \qquad (3)}

This formula is usually applied in the following way. We choose a step size h, and we construct the sequence t0, t1 = t0 + h, t2 = t0 + 2h, ... We denote by yn a numerical estimate of the exact solution y(tn). Motivated by (3), we compute these estimates by the following recursive scheme

y n + 1 = y n + h f ( t n , y n ) . ( 4 ) {\displaystyle y_{n+1}=y_{n}+hf(t_{n},y_{n}).\qquad \qquad (4)}

This is the Euler method (or forward Euler method, in contrast with the backward Euler method, to be described below). The method is named after Leonhard Euler who described it in 1768.

The Euler method is an example of an explicit method. This means that the new value yn+1 is defined in terms of things that are already known, like yn.

Backward Euler method

If, instead of (2), we use the approximation

y ? ( t ) ? y ( t ) - y ( t - h ) h , ( 5 ) {\displaystyle y'(t)\approx {\frac {y(t)-y(t-h)}{h}},\qquad \qquad (5)}

we get the backward Euler method:

y n + 1 = y n + h f ( t n + 1 , y n + 1 ) . ( 6 ) {\displaystyle y_{n+1}=y_{n}+hf(t_{n+1},y_{n+1}).\qquad \qquad (6)}

The backward Euler method is an implicit method, meaning that we have to solve an equation to find yn+1. One often uses fixed point iteration or (some modification of) the Newton-Raphson method to achieve this.

It costs more time to solve this equation than explicit methods; this cost must be taken into consideration when one selects the method to use. The advantage of implicit methods such as (6) is that they are usually more stable for solving a stiff equation, meaning that a larger step size h can be used.

First-order exponential integrator method

Exponential integrators describe a large class of integrators that have recently seen a lot of development. They date back to at least the 1960s.

In place of (1), we assume the differential equation is either of the form

y ? ( t ) = - A y + N ( y ) , ( 7 ) {\displaystyle y'(t)=-A\,y+{\mathcal {N}}(y),\qquad \qquad \qquad (7)}

or it has been locally linearized about a background state to produce a linear term - A y {\displaystyle -Ay} and a nonlinear term N ( y ) {\displaystyle {\mathcal {N}}(y)} .

Exponential integrators are constructed by multiplying (7) by e A t {\displaystyle e^{At}} , and exactly integrating the result over a time interval [ t n , t n + 1 = t n + h ] {\displaystyle [t_{n},t_{n+1}=t_{n}+h]} :

y n + 1 = e - A h y n + ? 0 h e - ( h - ? ) A N ( y ( t n + ? ) ) d ? . {\displaystyle y_{n+1}=e^{-Ah}y_{n}+\int _{0}^{h}e^{-(h-\tau )A}{\mathcal {N}}\left(y\left(t_{n}+\tau \right)\right)\,d\tau .}

This integral equation is exact, but it doesn't define the integral.

The first-order exponential integrator can be realized by holding N ( y ( t n + ? ) ) {\displaystyle {\mathcal {N}}(y(t_{n}+\tau ))} constant over the full interval:

y n + 1 = e - A h y n + A - 1 ( 1 - e - A h ) N ( y ( t n ) )   . ( 8 ) {\displaystyle y_{n+1}=e^{-Ah}y_{n}+A^{-1}(1-e^{-Ah}){\mathcal {N}}(y(t_{n}))\ .\qquad \qquad (8)}

Generalizations

The Euler method is often not accurate enough. In more precise terms, it only has order one (the concept of order is explained below). This caused mathematicians to look for higher-order methods.

One possibility is to use not only the previously computed value yn to determine yn+1, but to make the solution depend on more past values. This yields a so-called multistep method. Perhaps the simplest is the Leapfrog method which is second order and (roughly speaking) relies on two time values.

Almost all practical multistep methods fall within the family of linear multistep methods, which have the form

? k y n + k + ? k - 1 y n + k - 1 + ? + ? 0 y n {\displaystyle \alpha _{k}y_{n+k}+\alpha _{k-1}y_{n+k-1}+\cdots +\alpha _{0}y_{n}}
= h [ ? k f ( t n + k , y n + k ) + ? k - 1 f ( t n + k - 1 , y n + k - 1 ) + ? + ? 0 f ( t n , y n ) ] . {\displaystyle =h\left[\beta _{k}f(t_{n+k},y_{n+k})+\beta _{k-1}f(t_{n+k-1},y_{n+k-1})+\cdots +\beta _{0}f(t_{n},y_{n})\right].}

Another possibility is to use more points in the interval [tn,tn+1]. This leads to the family of Runge-Kutta methods, named after Carl Runge and Martin Kutta. One of their fourth-order methods is especially popular.

Advanced features

A good implementation of one of these methods for solving an ODE entails more than the time-stepping formula.

It is often inefficient to use the same step size all the time, so variable step-size methods have been developed. Usually, the step size is chosen such that the (local) error per step is below some tolerance level. This means that the methods must also compute an error indicator, an estimate of the local error.

An extension of this idea is to choose dynamically between different methods of different orders (this is called a variable order method). Methods based on Richardson extrapolation, such as the Bulirsch-Stoer algorithm, are often used to construct various methods of different orders.

Other desirable features include:

  • dense output: cheap numerical approximations for the whole integration interval, and not only at the points t0, t1, t2, ...
  • event location: finding the times where, say, a particular function vanishes. This typically requires the use of a root-finding algorithm.
  • support for parallel computing.
  • when used for integrating with respect to time, time reversibility

Alternative methods

Many methods do not fall within the framework discussed here. Some classes of alternative methods are:

  • multiderivative methods, which use not only the function f but also its derivatives. This class includes Hermite-Obreschkoff methods and Fehlberg methods, as well as methods like the Parker-Sochacki method or Bychkov-Scherbakov method, which compute the coefficients of the Taylor series of the solution y recursively.
  • methods for second order ODEs. We said that all higher-order ODEs can be transformed to first-order ODEs of the form (1). While this is certainly true, it may not be the best way to proceed. In particular, Nyström methods work directly with second-order equations.
  • geometric integration methods are especially designed for special classes of ODEs (e.g., symplectic integrators for the solution of Hamiltonian equations). They take care that the numerical solution respects the underlying structure or geometry of these classes.
  • Quantized State Systems Methods are a family of ODE integration methods based on the idea of state quantization. They are efficient when simulating sparse systems with frequent discontinuities.

Parallel-in-time methods

For applications that require parallel computing on supercomputers, the degree of concurrency offered by a numerical method becomes relevant. In view of the challenges from exascale computing systems, numerical methods for initial value problems which can provide concurrency in temporal direction are being studied. Parareal is a relatively well known example of such a parallel-in-time integration method, but early ideas go back into the 1960s.


Euler's Method Differential Equations, Examples, Numerical Methods ...
src: i.ytimg.com


Analysis

Numerical analysis is not only the design of numerical methods, but also their analysis. Three central concepts in this analysis are:

  • convergence: whether the method approximates the solution,
  • order: how well it approximates the solution, and
  • stability: whether errors are damped out.

Convergence

A numerical method is said to be convergent if the numerical solution approaches the exact solution as the step size h goes to 0. More precisely, we require that for every ODE (1) with a Lipschitz function f and every t* > 0,

lim h -> 0 + max n = 0 , 1 , ... , ? t * / h ? ? y n , h - y ( t n ) ? = 0. {\displaystyle \lim _{h\to 0+}\max _{n=0,1,\dots ,\lfloor t^{*}/h\rfloor }\|y_{n,h}-y(t_{n})\|=0.}

All the methods mentioned above are convergent. In fact, a numerical scheme has to be convergent to be of any use.

Consistency and order

Suppose the numerical method is

y n + k = ? ( t n + k ; y n , y n + 1 , ... , y n + k - 1 ; h ) . {\displaystyle y_{n+k}=\Psi (t_{n+k};y_{n},y_{n+1},\dots ,y_{n+k-1};h).\,}

The local (truncation) error of the method is the error committed by one step of the method. That is, it is the difference between the result given by the method, assuming that no error was made in earlier steps, and the exact solution:

? n + k h = ? ( t n + k ; y ( t n ) , y ( t n + 1 ) , ... , y ( t n + k - 1 ) ; h ) - y ( t n + k ) . {\displaystyle \delta _{n+k}^{h}=\Psi \left(t_{n+k};y(t_{n}),y(t_{n+1}),\dots ,y(t_{n+k-1});h\right)-y(t_{n+k}).}

The method is said to be consistent if

lim h -> 0 ? n + k h h = 0. {\displaystyle \lim _{h\to 0}{\frac {\delta _{n+k}^{h}}{h}}=0.}

The method has order p {\displaystyle p} if

? n + k h = O ( h p + 1 ) as  h -> 0. {\displaystyle \delta _{n+k}^{h}=O(h^{p+1})\quad {\mbox{as }}h\to 0.}

Hence a method is consistent if it has an order greater than 0. The (forward) Euler method (4) and the backward Euler method (6) introduced above both have order 1, so they are consistent. Most methods being used in practice attain higher order. Consistency is a necessary condition for convergence, but not sufficient; for a method to be convergent, it must be both consistent and zero-stable.

A related concept is the global (truncation) error, the error sustained in all the steps one needs to reach a fixed time t. Explicitly, the global error at time t is yN - y(t) where N = (t-t0)/h. The global error of a pth order one-step method is O(hp); in particular, such a method is convergent. This statement is not necessarily true for multi-step methods.

Stability and stiffness

For some differential equations, application of standard methods --such as the Euler method, explicit Runge-Kutta methods, or multistep methods (e.g., Adams-Bashforth methods)-- exhibit instability in the solutions, though other methods may produce stable solutions. This "difficult behaviour" in the equation (which may not necessarily be complex itself) is described as stiffness, and is often caused by the presence of different time scales in the underlying problem. For example, a collision in a mechanical system like in an impact oscillator typically occurs at much smaller time scale than the time for the motion of objects; this discrepancy makes for very "sharp turns" in the curves of the state parameters.

Stiff problems are ubiquitous in chemical kinetics, control theory, solid mechanics, weather forecasting, biology, plasma physics, and electronics. One way to overcome stiffness is to extend the notion of differential equation to that of differential inclusion, which allows for and models non-smoothness.


Numerical Methods for Ordinary Differential Equations: J. C. ...
src: images-na.ssl-images-amazon.com


History

Below is a timeline of some important developments in this field.

  • 1768 - Leonhard Euler publishes his method.
  • 1824 - Augustin Louis Cauchy proves convergence of the Euler method. In this proof, Cauchy uses the implicit Euler method.
  • 1855 - First mention of the multistep methods of John Couch Adams in a letter written by F. Bashforth.
  • 1895 - Carl Runge publishes the first Runge-Kutta method.
  • 1901 - Wilhelm Kutta describes the popular fourth-order Runge-Kutta method.
  • 1910 - Lewis Fry Richardson announces his extrapolation method, Richardson extrapolation.
  • 1952 - Charles F. Curtiss and Joseph Oakland Hirschfelder coin the term stiff equations.
  • 1963 - Germund Dahlquist introduces A-stability of integration methods.

Download Numerical Methods For Ordinary Differential Equations ...
src: pbs.twimg.com


Numerical solutions to second-order one-dimensional boundary value problems

Boundary value problems (BVPs) are usually solved numerically by solving an approximately equivalent matrix problem obtained by discretizing the original BVP. The most commonly used method for numerically solving BVPs in one dimension is called the Finite Difference Method. This method takes advantage of linear combinations of point values to construct finite difference coefficients that describe derivatives of the function. For example, the second-order central difference approximation to the first derivative is given by:

u i + 1 - u i - 1 2 h = u ? ( x i ) + O ( h 2 ) , {\displaystyle {\frac {u_{i+1}-u_{i-1}}{2h}}=u'(x_{i})+{\mathcal {O}}(h^{2}),}

and the second-order central difference for the second derivative is given by:

u i + 1 - 2 u i + u i - 1 h 2 = u ? ( x i ) + O ( h 2 ) . {\displaystyle {\frac {u_{i+1}-2u_{i}+u_{i-1}}{h^{2}}}=u''(x_{i})+{\mathcal {O}}(h^{2}).}

In both of these formulae, h = x i - x i - 1 {\displaystyle h=x_{i}-x_{i-1}} is the distance between neighbouring x values on the discretized domain. One then constructs a linear system that can then be solved by standard matrix methods. For instance, suppose the equation to be solved is:

d 2 u d x 2 - u = 0 , {\displaystyle {\frac {d^{2}u}{dx^{2}}}-u=0,}
u ( 0 ) = 0 , {\displaystyle u(0)=0,}
u ( 1 ) = 1. {\displaystyle u(1)=1.}

The next step would be to discretize the problem and use linear derivative approximations such as

u i ? = u i + 1 - 2 u i + u i - 1 h 2 {\displaystyle u''_{i}={\frac {u_{i+1}-2u_{i}+u_{i-1}}{h^{2}}}}

and solve the resulting system of linear equations. This would lead to equations such as:

u i + 1 - 2 u i + u i - 1 h 2 - u i = 0 , ? i = 1 , 2 , 3 , . . . , n - 1 . {\displaystyle {\frac {u_{i+1}-2u_{i}+u_{i-1}}{h^{2}}}-u_{i}=0,\quad \forall i={1,2,3,...,n-1}.}

On first viewing, this system of equations appears to have difficulty associated with the fact that the equation involves no terms that are not multiplied by variables, but in fact this is false. At i = 1 and n - 1 there is a term involving the boundary values u ( 0 ) = u 0 {\displaystyle u(0)=u_{0}} and u ( 1 ) = u n {\displaystyle u(1)=u_{n}} and since these two values are known, one can simply substitute them into this equation and as a result have a non-homogeneous linear system of equations that has non-trivial solutions.




See also

  • Courant-Friedrichs-Lewy condition
  • Energy drift
  • General linear methods
  • List of numerical analysis topics#Numerical methods for ordinary differential equations
  • Reversible reference system propagation algorithm
  • Modelica Language and OpenModelica software



Notes




References

  • Bradie, Brian (2006). A Friendly Introduction to Numerical Analysis. Upper Saddle River, New Jersey: Pearson Prentice Hall. ISBN 0-13-013054-0. 
  • J. C. Butcher, Numerical methods for ordinary differential equations, ISBN 0-471-96758-0
  • Ernst Hairer, Syvert Paul Nørsett and Gerhard Wanner, Solving ordinary differential equations I: Nonstiff problems, second edition, Springer Verlag, Berlin, 1993. ISBN 3-540-56670-8.
  • Ernst Hairer and Gerhard Wanner, Solving ordinary differential equations II: Stiff and differential-algebraic problems, second edition, Springer Verlag, Berlin, 1996. ISBN 3-540-60452-9.
    (This two-volume monograph systematically covers all aspects of the field.)
  • Hochbruck, Marlis; Ostermann, Alexander (May 2010). "Exponential integrators": 209-286. doi:10.1017/S0962492910000048. 
  • Arieh Iserles, A First Course in the Numerical Analysis of Differential Equations, Cambridge University Press, 1996. ISBN 0-521-55376-8 (hardback), ISBN 0-521-55655-4 (paperback).
    (Textbook, targeting advanced undergraduate and postgraduate students in mathematics, which also discusses numerical partial differential equations.)
  • John Denholm Lambert, Numerical Methods for Ordinary Differential Systems, John Wiley & Sons, Chichester, 1991. ISBN 0-471-92990-5.
    (Textbook, slightly more demanding than the book by Iserles.)



External links

  • Joseph W. Rudmin, Application of the Parker-Sochacki Method to Celestial Mechanics, 1998.
  • Dominique Tournès, L'intégration approchée des équations différentielles ordinaires (1671-1914), thèse de doctorat de l'université Paris 7 - Denis Diderot, juin 1996. Réimp. Villeneuve d'Ascq : Presses universitaires du Septentrion, 1997, 468 p. (Extensive online material on ODE numerical analysis history, for English-language material on the history of ODE numerical analysis, see e.g. the paper books by Chabert and Goldstine quoted by him.)

Source of the article : Wikipedia

Comments
0 Comments