Journal of Applied Mathematics and Physics
Vol.04 No.07(2016), Article ID:69245,17 pages
10.4236/jamp.2016.47145
Filtered Leapfrog Time Integration with Enhanced Stability Properties
Ari Aluthge, Scott A. Sarra, Roger Estep
Department of Mathematics, Marshall University, Huntington, WV, USA

Copyright © 2016 by authors and Scientific Research Publishing Inc.
This work is licensed under the Creative Commons Attribution International License (CC BY).
http://creativecommons.org/licenses/by/4.0/


Received 27 May 2016; accepted 25 July 2016; published 28 July 2016
ABSTRACT
The Leapfrog method for the solution of Ordinary Differential Equation initial value problems has been historically popular for several reasons. The method has second order accuracy, requires only one function evaluation per time step, and is non-dissipative. Despite the mentioned attractive pro- perties, the method has some unfavorable stability properties. The absolute stability region of the method is only an interval located on the imaginary axis, rather than a region in the complex plane. The method is only weakly stable and thus exhibits computational instability in long time integrations over intervals of finite length. In this work, the use of filters is examined for the purposes of both controlling the weak instability and also enlarging the size of the absolute stability region of the method.
Keywords:
Leapfrog Method, Computational Mode, Weak Stability, Method of Lines, Numerical Weather Prediction

1. Introduction
In this work the stability properties of a well known linear multistep method (LMM) are examined. The method is based on a three point polynomial finite difference approximation of the first derivative. The Leapfrog method (also known as the explicit midpoint rule or Nyström’s method) for the first order Ordinary Differential Equation (ODE) initial value problem (IVP)
(1)
is a simple three-level scheme with second order accuracy. The leapfrog scheme has a long history in applications. The applications include general oceanic circulation models and atmospheric models that go back at least as far as the pioneering work of Richardson [1] (p. 150) in 1922 where it was called the step-over method. In this context, the time integration method is used to advance in time a semi-discrete system in which the space derivatives of a partial differential equation have been discretized by an appropriate method. Such an application is called the method of lines. The leapfrog method remains relevant today as it is a component of many numerical weather forecasting systems and most current geophysical fluid dynamics (GFD) codes use a form of leapfrog time differencing. Reference [2] lists 25 major GFD codes currently using this approach. The recent textbook [3] (p. 90) describes the leapfrog method as an important method for numerical weather forecasting.
The Leapfrog method is efficient as it only requires one function evaluation per time step, with a function evaluation referring to the function F in Equation (1). The leapfrog scheme has the desirable property of being non-dissipative, but it suffers from phase errors. The most serious drawback of the scheme is its well documented [4] weak stability property which results in computational instability when it is used in long time integrations. Methods that have been used to control the weak instability of the leapfrog method involve a process called filtering. A Filtering process replaces a time level with an average of that time level and neighboring time levels. The use of filtering in numerical ODE methods originated in [5] with a two-level averaging. Filtering methods that have been used to control the weak instability of the leapfrog method include the following. The Asselin time filter [6] adds a small artificial viscosity to the leapfrog method and is applied each time step. Gragg [7] used a three-point symmetric filter to replace a time level of the leapfrog solution after every N steps. Bulirsch and Stoer [8] extended Gragg’s method to build an extrapolation scheme. In [9] filtering was shown not to be necessary in extrapolation schemes involving the leapfrog method since the Euler starting step and the extrapolation process alone have been able to control the weak instability. Five point symmetric and asymmetric filters were considered by Iri [10] who recommended the use of an asymmetric filter. Stabilizing the Leapfrog method continues to be an active research area. Examples of recent work in the area can be found in [11] and [12] .
In the next section LMMs and their stability properties are reviewed. Then three and five point filters are developed and it is shown that a five-point symmetric filter can be effectively used to control the weak instability that is inherent to the leapfrog method. After the five-point symmetric is shown to be effective, ways to incorporate the filter into a leapfrog time differencing schemes are examined. The application of the filter leads to new LMMs as well as various filter and restart algorithms. The ideal application of the filter will control the weak instability as well as retain the favorable features of the method: efficiency, second order accuracy, an absolute stability region with imaginary axis converge, and will be non-dissipative. Finally, the conclusions are illustrated with numerical examples.
2. Linear Multistep Methods
A general s-step linear multistep method for the numerical solution of the ODE IVP (1) is of the form
(2)
where
and
are given constants and k is the size of the time step. It is conventional to normalize (2) by setting
. When
the method is explicit. Otherwise it is implicit. In order to start the method, the first
time levels need to be calculated by a one-step method such as a Runge-Kutta method.
The stability of ODE methods is a relatively new concept in numerical methods and was rarely if ever used before the 1950’s [13] . The first description of numerical instability of numerical ODE methods may have been in 1950 in [14] . It was the advent of high speed electronic computers that brought the concept of stability to the forefront. Varying definitions of and types of stability for ODE methods have been proposed over the last 60 years. Indeed, when surveying the literature and textbooks that have been published over that time period it is not straightforward to grasp what is meant by the stability of a LMM due to the multitude of definitions and the same concepts often being given more than one name.
The stability properties of LMMs are examined by applying the method to the ODE
(3)
where
is a complex number with
. Equation (3) is commonly known as the Dahlquist test equation. The first concepts of stability result from considering the simple case of
in (3) for which the solution is the constant
. In this case the application of the LMM (2) to the test equation results in a difference equation with a general solution of the form
(4)
where the
are the zeros of the first characteristic polynomial
(5)
of the LMM (2). For a consistent method one of the terms, say

・ A method is stable (also called zero stable) if 

・ A weakly stable method has all roots of 




・ A method for which a root of 
A stronger definition of stability can be made by considering non-zero 







where



of the LMM (2). The method is absolutely stable for a particular value of z if the zeros of (6) satisfy the root condition. The set of all numbers z in the complex plane for which the zeros of (6) satisfy the root condition is called the absolute stability region, 

that is the ratio of the characteristic polynomials of the method. For z in the stability region, the numerical solutions exhibit the same asymptotic behavior as does the exact solution of (3). For a linear system of ODEs, a necessary condition for absolute stability is that all of the scaled (by k) eigenvalues of the coefficient matrix of the system must lie in the stability region. For nonlinear systems, the system must be linearized and the scaled eigenvalues of the Jacobian matrix of the system must be analyzed at each
3. The Leapfrog Method
The leapfrog method for the system (1) is

The method is constructed by replacing the time derivative in (1) by the second order accurate central difference approximation

of the first derivative. The method needs two time levels to start, 



The characteristic polynomials of the leapfrog method are

Obviously the roots of 

and the absolute stability region only consists of the interval 
4. Filter Construction
It is shown in [20] that the solution of the IVP (1) obtained by the leapfrog method using starting values only assumed to have an asymptotic expansion of the very general form

has an asymptotic expansion of the form

The physical mode

consists of the exact solution 



contributes a non-physical oscillatory factor to the solution which grows in size with increasing t. References [7] and [20] can be consulted for the details of the derivation of the expressions for 

In order to damp the computational mode while retaining the second order accurate approximation of the physical mode, a filter of the form

is considered where







and
Thus, applying the filter (17) to the physical mode (15) results in

and applying the filter to the computational mode gives

Equation (18) suggests that in order for the physical mode to be kept unchanged up to the order 

In a similar manner Equation (19) reveals that in order for the computational mode to be reduced by a factor of 

4.1. Three Point Filter
First, filters of length three are considered. A three point symmetric filter is of the form

The filter coefficients can be found by equating the coefficients of (22) with the coefficients from Equation (20) and Equation (21). This can be done by setting 


and

Additionally

where on the second line 

and equating the coefficients of s gives

Similarly

where 

The linear system consisting of Equations (26), (27), and (29) has the solution


Thus, the three-point symmetric filter is
or equivalently

Three point filters alter the accurate physical mode by a factor of k and also damp the computational mode by a factor of k.
The coefficients of non-symmetric filters 

4.2. Five-Point Filter
The consideration of a five point filter presents two more degrees of freedom that can be used to develop a filter that alters the physical mode by one less power of k and that damps the computational mode by one more power of k in comparison to a three point filter. That is, in the asymptotic expansion of the physical mode 

A five point symmetric filter is of the form

In this case the first few terms in the expansions of (20) and (21) respectively are

and

Additionally
Table 1. Three point filter coefficients.


where this time 
Equating the constant terms (32) and (34) results in the equation

and then equating the coefficients of s gives

and finally equating the coefficients of 

Similarly

where 

and

The linear system consisting of Equations (36)-(38), (40), and (41) has the solution




or

The coefficients of non-symmetric filters



The advantages of the five point filter when compared to the three point filter are now clear. The five point filter retains the second order accuracy of the leapfrog method and damps the computational mode by a factor of
Table 2. Five point filter coefficients.
5. New LMMs
Incorporating the filter in each leapfrog step by averaging 

or

This approach has the advantage that the result may be analyzed within the LMM framework. The characteristic
polynomials of the method are 

polynomial has 
Averaging 


The roots of the first characteristic polynomial of the method are 
A strong point of the leapfrog method, especially in the method of lines integration of wave propagation type PDEs, is that it is non-dissipative. The phase and amplitude errors of the two new LMMs are compared with the phase and amplitude errors of the leapfrog method in Figure 2. The 

6. 
In this section, four filter and restart algorithms are explored. For each option the effects on accuracy and stability properties are examined. The options include:
・ Method 1 (M1). Filter after every step.
・ Method 2 (M2). Filter followed by Euler restart every N steps.
・ Method 3 (M3). Alternative starting/restarting-algorithm 1.
・ Method 4 (M4). Alternative starting/restarting-algorithm 2.
Figure 1. Stability regions for the (solid line) 

Figure 2. Amplitude and phase errors of the leapfrog method (9), the 

To allow for the absolute stability region to be examined, all four algorithms have a start up procedure following by multiple steps of leapfrog and/or filtering. Then after a fixed number, N, of steps the algorithm is restarted with the start up procedure. In each of the four algorithms 

6.1. Filter after Every Step (M1)
The first approach uses an explicit Euler step (11) to calculate the first time level. Each subsequent step takes one leapfrog step to the time level n plus two additional leapfrog steps to calculate time levels 




The absolute stability region of the M1 approach with 

The absolute stability regions of methods M1, M2, M2, and M4 are found in the following manner. For example, the stability region of M1 with 

and
The absolute stability region contains all the 

6.2. Filter, Euler Restart Every N Steps (M2)
Method M2 approximates the first time level with Euler’s method (11) and then advances in time with 





Figure 3. (a): Absolute stability region of method M1. (b): close up of the stability region along the imaginary axis.
The M2 approach remains second order accurate and requires 

6.3. Alternative Start/Restart-Algorithm 1 (M3)
The absolute stability region of Euler’s method is a circle of radius one that is centered at 
The following starting procedure

is suggested for minimizing this effect. To advance from the initial condition to time level one, M smaller substeps are taken consisting of one Euler step followed by 




6.4. Alternative Start/Restart Algorithm 2 (M4)
Algorithm M4 uses the same starting procedure (46) as does M3 but it does not terminate and restart after filtering at time step N. Instead time levels 




Figure 4. (a): Absolute stability region of method M2. (b): close up of the stability region along the imaginary axis.

Figure 5. (a): Absolute stability region of method M3. (b): close up of the stability region along the imaginary axis.

Figure 6. (a): Absolute stability region of method M4. (b): close up of the stability region along the imaginary axis.
covering approximately the interval

7. Numerical Results
7.1. Example 1
The purpose of the first example is to demonstrate the ability of the proposed methods to control the computational mode that is introduced by the leapfrog weak instability. The example considers the nonlinear IVP

which has the exact solution




Table 3 records the results of applying the two new LMMs from section 2 and as well as using the four filter and restart algorithms. Additionally, the five point asymmetric filter 




7.2. Example 2
This example numerically calculates the order of convergence of the leapfrog method and the seven filtered methods. The test Equation (3) is used with 




Figure 7. Exact (dashed) and leapfrog (solid) solution of problem (47) with
Table 3. Errors from problem (47).
Figure 8. Oscillations appear in the asymmetric 

Figure 9. Convergence plots. (a): LF, LMM3, LMM5, 
M2 methods are only first order accurate while the LMM5, M3, and M4 methods retain the second order accuracy of the leapfrog method. In this example, the three second order accurate filtered methods are about a decimal place more accurate for a given value of k than is the leapfrog method.
7.3. Advection
The purpose of the third example is to give an illustration of the effects of the dispersion and dissipation properties of the two LMM described in Section 2 and to illustrate the effectiveness of the M4 algorithm as a method of lines integrator of hyperbolic PDEs. A model hyperbolic PDE problem is the advection equation

The domain for the problem is the interval 

The space derivative of (48) is discretized with the Fourier Pseudospectral method [21] [22] . A relatively large number of points, 

remains to be advanced in time where D is the 


Runs with two different time step sizes are made. The first with 







7.4. Advection-Diffusion
Discretized advection-diffusion operators do not have purely imaginary eigenvalues and thus the leapfrog method is not an appropriate method of lines integrator for this type of problem. Advection-diffusion problems in which the advection term is dominant will have differentiation matrices with eigenvalues that have negative real parts that are of small to moderate size. Algorithm M4 can be effectively applied in such a problem.

Figure 10. Solutions of problem (48) at 



Table 4. Errors from problem (48),
As an example, the advection diffusion equation

where 


is used and the problem is advanced in time to 



8. Conclusion
Filters of length three and five have been examined for the purpose of controlling the weak instability of the leapfrog method. Filtering the leapfrog method with a three point filter reduces the accuracy of the overall scheme to first order. If a five point filter is used, it is possible for the method to retain the second order accuracy as well as damp the computational mode by a factor of
Table 5. Errors from problem (48),

Figure 11. (a): Stability region of method M4 and the scaled spectrum of the discretized problem (50); (b): Numerical solution (solid) vs. exact (dashed) at
of the leapfrog method (9) results in a new second order accurate LMM (43) which is zero stable and that has an absolute stability region that includes both coverage of a portion of the imaginary axis as well as a region in the left half plane. Of the four filter and restart algorithms described, algorithm M4 is the most attractive. The M4 method, which restarts after every 21 time steps, has an absolute stability region that includes nearly as much of the imaginary axis as does the leapfrog method as well as includes a region in the left half plane. This allows the method to be an effective method of lines integrator for pure advection and advection dominated problems as is illustrated in the examples. In addition to the second order accuracy, the method also retains the computational efficiency of the leapfrog method. Method M4 is a potential replacement for existing leapfrog type time differencing schemes that are used in geophysical fluid dynamics codes.
Cite this paper
Ari Aluthge,Scott A. Sarra,Roger Estep, (2016) Filtered Leapfrog Time Integration with Enhanced Stability Properties. Journal of Applied Mathematics and Physics,04,1354-1370. doi: 10.4236/jamp.2016.47145
References
- 1. Richardson, L.F. (1922) Weather Prediction by Numerical Process. Cambridge University Press, Cambridge.
- 2. Williams, P. (2009) A Proposed Modification to the Robert-Asselin Time Filter. Monthly Weather Review, 137, 2538-2546.
http://dx.doi.org/10.1175/2009MWR2724.1 - 3. Coiffier, J. (2011) Fundamentals of Numerical Weather Prediction. Cambridge University Press, Cam-bridge.
http://dx.doi.org/10.1017/CBO9780511734458 - 4. Butcher, J. (2003) Numerical Methods for Ordinary Differential Equations. Wiley.
http://dx.doi.org/10.1002/0470868279 - 5. Milne, W. and Reynolds, R. (1959) Stability of a Numerical Solutions of Differential Equations. Journal of the ACM, 6, 196-203.
http://dx.doi.org/10.1145/320964.320976 - 6. Asselin, R. (1972) Frequency Filter for Time Integrations. Monthly Weather Review, 100, 487-490.
http://dx.doi.org/10.1175/1520-0493(1972)100<0487:FFFTI>2.3.CO;2 - 7. Gragg, W.B. (1963) Re-peated Extrapolation to the Limit in the Numerical Solution of Ordinary Differential Equations. PhD Thesis, UCLA.
- 8. Bulirsch, R. and Stoer, J. (1966) Numerical Treatment of Ordinary Differential Equations by Extrapolation Methods. Numerische Mathematik, 8, 1-13.
http://dx.doi.org/10.1007/BF02165234 - 9. Shampine, L. and Baca, L. (1983) Smoothing the Extrapolated Midpoint Rule. Numerische Mathematik, 41, 165-175.
- 10. Iri, M. (1963) A Stabilizing Device for Unstable Numerical Solutions of Ordinary Differential Equations—Design Principle and Application of a Filter. Journal of the Information Processing Society of Japan, 4, 249-260.
- 11. Li, Y. and Trenchea, C. (2014) A Higher-Order Robert-Asselin Type Time Filter. Journal of Computational Physics, 259, 23-32.
http://dx.doi.org/10.1016/j.jcp.2013.11.022 - 12. Norton, T. and Hill, A. (2015) An Iterative Starting Method to Control Parasitism for the Leapfrog Method. Applied Numerical Mathematics, 87, 145-156.
http://dx.doi.org/10.1016/j.apnum.2014.09.005 - 13. Dahlquist, G. (1985) 33 Years of Numerical Instability, Part I. BIT, 188-204.
http://dx.doi.org/10.1007/BF01934997 - 14. Todd, J. (1950) Solution of Differential Equations by Recurrence Relations. Mathematical Tables and Other Aids to Computation, 4, 39-44.
http://dx.doi.org/10.2307/2002701 - 15. Hairer, E., Norsett, S. and Wanner, G. (2000) Solving Ordinary Differential Equations I: Nonstiff Problems. Springer.
- 16. Hairer, E. and Wanner, G. (2000) Solving Ordinary Differential Equations II: Stiff and Differential—Algebraic Problems. 2nd Edition, Springer.
- 17. Henrici, P. (1962) Discrete Variable Methods in Ordinary Differential Equations. Wiley.
- 18. Iserles, A. (1973) A First Course in the Analysis of Differential Equations. Wiley.
- 19. Lambert, J. (1973) Computational Methods in Ordinary Differential Equations. Wiley.
- 20. Aluthge, A. (1985) Filtering and Extrapolation Techniques in the Numerical Solution of Ordinary Differential Equations. Master’s Thesis, University of Ottawa, Ottawa.
- 21. Boyd, J.P. (2000) Chebyshev and Fourier Spectral Methods. 2nd Edition, Dover Publications, Inc., New York.
- 22. Canuto, C., Hussaini, M., Quarteroni, A. and Zang, T. (1988) Spectral Methods in Fluid Dynamics. Springer.
http://dx.doi.org/10.1007/978-3-642-84108-8 - 23. Weideman, J.A.C. and Reddy, S. (2000) A MATLAB Differentiation Matrix Suite. ACM Transactions on Mathematical Software, 26, 465-519.
http://dx.doi.org/10.1145/365723.365727






















