Splitting and composition methods with embedded error estimators

We propose new local error estimators for splitting and composition methods. They are based on the construction of lower order schemes obtained at each step as a linear combination of the intermediate stages of the integrator, so that the additional computational cost required for their evaluation is almost insignificant. These estimators can be subsequently used to adapt the step size along the integration. Numerical examples show the efficiency of the procedure.


Introduction
Splitting and composition methods are of particular interest in the numerical integration of differential equations when the vector field is separable into solvable parts or when a low order basic method is known, and the goal is to construct higher order schemes by composing the basic method with fractional time steps [25,26].
Although integrators of this class have a long history in numerical mathematics and have been applied, sometimes with different names, in many different contexts (partial differential equations [32], quantum statistical mechanics [34], chemical physics [16,18], molecular dynamics [36], celestial mechanics [11,23], etc.), it has been with the advent of the so-called Geometric Numerical Integration that the interest in splitting and composition has revived and new and very efficient schemes have been designed in the simulation of physical systems. The goal in Geometric Numerical Integration is to construct schemes in such a way that the numerical approximation shares with the exact solution many of its relevant qualitative (very often, geometrical) properties, such as symplecticity, unitarity, orthogonality, etc. [5,19]. If the basic method possesses (some of) these geometric properties, so do the schemes obtained by composing them. In addition, when they are used with a constant time step, they show a more favorable error growth behavior than standard integrators, especially in long term integrations. Symplectic integration schemes for Hamiltonian dynamical systems constitute a classical example of geometric numerical integrators [30].
Even in problems where no qualitative properties have to be preserved and/or only short time integrations are required, splitting and composition methods have shown to be an excellent option (see e.g. [17] and references therein), even when compared with other standard integrators.
As is well known, some of the most popular and efficient standard schemes are embedded methods: the numerical procedure contains, besides the numerical approximation x n , a second approximation x n (usually of a lower order) obtained from intermediate outputs, so that the difference is used as an estimate of the local error for the less precise result and can subsequently be used for step size control [20]. Well known examples in this area are the class of high order embedded Runge-Kutta methods constructed by Verner [37] (implemented as the DVERK code) and Prince & Dormand [29], giving rise to the code DOP853 [20].
Since splitting and composition methods also provide intermediate outputs when computing the numerical approximation at every step, it seems then natural to analyze whether these intermediate outputs can also be used along the same lines as standard embedded methods to endow the schemes with a step size control. We will see that this is indeed the case as long as the splitting scheme involves a sufficiently large number of stages and, furthermore, we will show how to construct explicitly the lower order approximation x n from these intermediate outputs at virtually cost free.
It is important to remark that, whereas splitting and composition methods implemented with a constant step size are specially well suited in geometric numerical integration for long time integrations, this is not the case of the variable step size schemes constructed by applying the strategy proposed here [10]. In any case, the second approximation x n is only used to estimate the local error and this is not propagated along the integration interval.
Of course, the idea of endowing splitting methods with a local error estimator is not new. We can mention in particular references [13,14], where a embedded splitting method is constructed for the second-order Strang splitting for stiff evolutionary partial differential equations, and [2,3,35], where a controller splitting method of order r + 1 is selected and then an integrator of order r is constructed for which a maximal number of compositions coincide with those of the controller. The methods thus built are then applied for the numerical solution of nonlinear parabolic problems with periodic boundary conditions. By contrast, the approach we follow here allows one, given a splitting or composition method of order r, to construct a second, lower order approximation as a linear combination of the outputs generated at the intermediate stages. This is essentially similar to the procedure presented in [8] for computing cheap approximations to the optimal postprocessor in composition methods with processing, and can be done virtually cost-free. The lower order methods thus designed can be used to endow some of the most popular splitting and composition schemes with a reliable and easy-toevaluate error estimator [9,12,28] The plan of the paper is the following. In section 2 we briefly summarize the mathematical formalism to be used in the subsequent analysis. Then, in section 3 we proceed to obtain estimators for symmetric compositions of second order basic schemes and of a first order method with its adjoint, whereas an analogous treatment is discussed in section 4. The relationship between composition and splitting methods, together with their respective estimators, is treated in section 5. The new estimators are illustrated in section 6 in comparison with other well established techniques. Finally, section 7 contains some concluding remarks.

Flows and Lie derivatives
The analysis of splitting and composition methods can be conveniently carried out with the formalism of Lie derivatives. In that case both the exact flow and the numerical flow corresponding to an integrator, as well as compositions of this integrator, can be associated to the exponential (or products of exponentials) of operators, just as in the linear case, so that the order conditions can be obtained by applying the familiar Baker-Campbell-Hausdorff formula.
To be more specific, given the initial value probleṁ with f : R D −→ R D and flow ϕ t , we can associate with f the first order differential operator (the Lie derivative) L f , whose action on differentiable functions G : so that formally Moreover, one can also introduce an operator Φ t acting on functions G as [27] Then, the Taylor series of G(ϕ t (x 0 )) at t = 0 is given by [19,5] and where, for the sake of simplicity in the notation, we write F ≡ L f . If we replace G in (5) by the identity map Id(x) = x, we get for the exact solution of (1) In the same way as for the exact flow ϕ t , we can associate to each numerical integrator for a time step h, χ h : R d −→ R d , the operator where I denotes the identity operator and each X n acts on smooth functions G as . It is then possible to write X(h) formally as the exponential of another operator Y (h), where Clearly, the integrator χ h is of order r if exp(Y (h)) = exp(hF ) up to terms h r , or equivalently, if Y 1 = F, and Y n = 0 for 2 ≤ n ≤ r.
If the coefficients α 1 , . . . , α s satisfy some requirements (the order conditions), then ψ h provides an approximation of order r to the exact solution. The number of order conditions is considerably reduced for symmetric compositions, i.e., in (11). In that case its associated series of differential operators reads is the operator associated with S [2] h . By requiring that one gets the order conditions to be satisfied by the coefficients α 1 , . . . , α s in the composition (11). Up to order r = 6 these conditions read explicitly Notice that, when computing the numerical approximation (11), the procedure also provides s − 1 intermediate outputs in addition to x n , i.e., x n,k = S [2] hα k • · · · • S [2] hα 1 x n , k = 1, . . . , s − 1, and the question we pose is whether one can obtain another approximation x n+1 of x(t n+1 ) by a linear combination of these intermediate values x n,k , with x n,0 = x n . It turns out that this is indeed possible, but the highest order of approximation that can be achieved in this way depends on the number of intermediate stages s. The procedure is similar to the technique used in [7,8] to construct cheap postprocessors for composition methods with processing. One should note that w s is not included in the linear combination (15). Otherwise, only the trivial solution w s = 1, w k = 0, k = 0, 1, . . . , s − 1 is obtained. Our goal is then to find coefficients w k so that, given a number of stages s, the linear combination (15) is an approximation to x(t n+1 ) of order ℓ, or equivalently, where exp(Y (hα k )) is given by (13) and ℓ is as large as possible. Since a linear combination of exponential operator is not, in general, a exponential operator, the conditions to be satisfied by w k can be derived by expanding both terms in (16) in powers of h and equating their respective coefficients. Thus, in particular, up to order ℓ = 4, one has explicitly and  Table 1: Number of order conditions, in additional to the trivial one for w 0 , required by a linear combination of intermediate outputs to achieve order ℓ for symmetric compositions of 2nd-order symmetric schemes (SS), compositions of a first order method with its adjoint (28) (method-adjoint) and a splitting method (36) (splitting). whence the following system of linear equations results: Notice that the first equation is trivially solved in w 0 , so to achieve an approximation x n+1 of order 4, we have to verify 7 linear equations. More generally, the total number of equations (in addition to the trivial one) required to achieve a given order ℓ is collected in Table 1 for orders ℓ = 1, . . . 6. Strictly speaking, this number is the sum of the dimensions m k , k ≥ 1, of the subspaces A k of the universal enveloping algebra A = k≥0 A k associated to the graded Lie algebra of operators corresponding to the composition method, with A 0 = span(I) [8].
Next we analyze in detail the construction of numerical schemes of orders 3, 4 and 5 within this approach to be used as error estimators for symmetric compositions of the form (11).
Third-order estimators. Only the first five equations in (17) have to be satisfied to get order three. This can be achieved if the composition (11) has at least s = 5. For s = 5, when the symmetry of the coefficients (12) (i.e., α 5 = α 1 , α 4 = α 2 ) and the order conditions of a 4th-order composition (i.e., equations in the first line of (14)) are taken into account, then the unique solution of the system is given by so that w 0 = −1. A popular (and efficient) 4th-order composition method within this class is the one devised by Suzuki [33], with coefficients so that its third-order estimator reads Another widely used 4th-order method involving s = 7 stages is due to McLachlan [24], with coefficients Its corresponding estimator now involves a free parameter, which can be taken to be w 3 , and reads x n+1 = −x n + w 1 (x n,1 + x n,6 ) + w 2 (x n,2 + x n,5 ) + w 3 (x n,3 + x n,4 ). Here The same strategy can also be applied to the popular 4th-order 3-stage Yoshida's method [38] φ with which is known to lead to small errors when complex coefficients are taken [6]. Since only three intermediate outputs per step are available, one needs at least two steps of it as if it were one single method, i.e., one can take as integrator the composition In this case the corresponding estimator reads We can adopt the terminology of embedded Runge-Kutta methods [20] and denote the previous compositions with their respective estimators as methods of order 4(3).
Compositions of order 6(4). To get linear combinations (15) of order four one has to solve the whole set of equations (17). Although in principle this would require s = 8 stages, it turns out that if the underlying time-symmetric composition (11) satisfies the order conditions up to order 6 given by (14) with the minimum number of stages (s = 7), one gets a unique solution of the form where w i can be expressed analytically in terms of the α i coefficients of the composition. For the particular method found by Yoshida [38], with coefficients one has w 1 = −0.90983233007647709242, The same strategy can be applied of course if 6th-order compositions with more stages are considered. For instance, we have found an estimator within this class for the symmetric method proposed by Kahan & Li [21], with s = 9 stages.
Compositions of order 6(5) and 8 (5). A system of 13 linear equations has to be solved for getting an estimator of order five. Although not all of them are independent when the time-symmetry and the order conditions for the underlying composition are introduced, at least s = 11 stages are necessary. Starting from the 6th-order symmetric composition obtained by Sofroniou & Spaletta [31] with coefficients there is just one set of coefficients satisfying all the order conditions. The resulting method of order 6(5) is of the form with The same strategy can be applied to compositions (11) of order 8. A well known example within this class is the symmetric method proposed by Kahan & Li [21] with s = 17 and coefficients the estimator reads The DOP853 algorithm based on a 12-stage RK8(6) method by Dormand & Prince (announced but not published in [15]), where the embedded 6th-order method is replaced by a pair of embedded methods of order five and three by Hairer & Wanner [20]), is one of the most efficient schemes within this framework. In comparison, the previous composition method involves more stages, but on the other hand does not require to keep up to 12 vectors in memory. As a matter of fact, we can apply the same strategy to the 8th-order composition method considered here and construct a second estimator of order 3 to avoid any possible over-estimation of the error. One possible 3th-order estimator is given by with w 1 , w 7 verifying where g 1 = α 1 , g 7 = α 1 + · · · + α 7 , i.e.
We then have two error estimators for the scheme (11) with coefficients (25), .
Applying now the same strategy as in [20], we consider err = err 5 · err 5 as an error estimator that behaves asymptotically like the global error of the method. Notice that we can obtain error estimators for other composition schemes in a similar way. For example, at order eight one can find in the literature methods with up to 21 stages [19,21,31], and their relative performance depend on the particular problem to solve as well as on the symmetric second order scheme used as the basic scheme for the composition.

Composition of a first order method with its adjoint
Higher order methods can also be obtained by composing a first order basic method χ h and its adjoint with appropriately chosen real coefficients (α 1 , . . . , α 2s ). The associated series of differential operators is of the form where Again, by requiring that Ψ(h) = exp(hF + O(h r+1 )), one gets the order conditions to be satisfied by the coefficients to achieve order r. These order conditions are considerably simplified if α 2s−j+1 = α j for all j. In that case the composition (28) is time-symmetric.
As with symmetric compositions of symmetric second order schemes, here we can also take a linear combination of intermediate outputs to produce an approximation of order ℓ < r to be used as an error estimator for the composition (28). The coefficients w k can be determined by requiring that By expanding the product of exponentials we get the number of conditions the w k have to satisfy at a given order in a similar way as with compositions of 2nd-order symmetric methods. This number is collected in Table 1.
In particular, 8 linear equations are required to get a 3rd-order approximation in this way. Since several efficient 4th-order methods of this class with up to 6 stages (or 12 intermediate outputs) are available in the literature, it is in principle possible to get third order estimators for them (even with free parameters for optimization). As an illustration, for the symmetric 4th-order method (28)

Estimators for splitting methods
If f in equation (1) can be split as can be integrated exactly, with solutions x(h) = ϕ h (x 0 ) at t = h, then the basic first-order method in the composition (28) can be taken simply as whereas its adjoint is just the reversed composition For m = 2, i.e., when f (x) is decomposed in just two pieces, one could also consider a time-symmetric composition with appropriately chosen coefficients a i , b i verifying to achieve a prescribed order. Here it is also possible to take advantage of the intermediate outputs to construct a lower order approximation which may be used as an error estimator for the integrator (36). In this case it has the form a i h (x n,2i−1 ).
As before, the analysis can be carried out with the associated series of differential operators, which in this case reads where A and B denote the Lie derivatives corresponding to f [1] and f [2] , respectively: Analogously, the conditions to be satisfied by the w i are determined by expanding the exponentials in The number to achieve a given order is collected in Table 1 (last line). Now a system of 15 equations have to be satisfied by the coefficients w i in the linear combination (37) to achieve order 3. As in the preceding cases, we can take several efficient splitting methods of the form (36) involving enough intermediate steps and construct estimators for them. In particular, for the 4th-order symmetric splitting scheme designed by Blanes & Moan [9], with 12 intermediate outputs we propose the linear combination solving all order conditions with Another particularly efficient 4th-order splitting method designed for systems of the formÿ = g(y), when written as a first order system d dt f [2] corresponds to the composition (38) In this case the estimator has also the form (39) with This splitting method, as well as the error estimator, can also be used to integrate in time the Schrödinger equation where m is the reduced mass, ∆ is the Laplacian operator and V (x) is the potential. After spatial discretisation one has to solve a linear system of ODEs where A corresponds to the spatial discretization of the kinetic part and B to the potential part. Here B is a diagonal matrix in the coordinates space, whereas A is diagonal in the momentum space, so fast Fourier transform (FFT) algorithms F can be used to compute the action of a A on a vector, Au = F −1 D A F u, with D A a diagonal matrix.
A noteworthy exception is the case in which f [1] and f [2] originate from a partitioned ordinary differential equation of the forṁ The system can then be written as d dt f [2] and ϕ where the same evaluation g(p n ) is used in both cases.
The algorithm corresponding to the splitting method (45) for the step (q 0 , p 0 ) → (q 1 , p 1 ) reads so that it can be seen as an explicit partitioned Runge-Kutta method. On the other hand, the composition (28) with (44) leads to the algorithm requiring exactly the same evaluations of f and g. If in addition g(p) = p (i.e., if we are solving the second order differential equationq = f (q)), then the estimator for (47) takes the form (for appropriate choices of the parameters w i ) in a similar way as for embedded Runge-Kutta-Nyström methods. In any case, other choices of δ i , γ i can also lead to estimators associated to a given s-stage composition scheme [10], and that can not be obtained by taking intermediate outputs.

Numerical examples
In this section we analyze the accuracy and reliability of the estimators presented in this work in comparison with other well established schemes for a simple example. Specifically, the methods (and notation) we consider are the following: • RKN 6 43: The 6-stage 4th-order splitting method (38) for systems of the form (41) with the 3rd-order estimator (43).
These are compared with: • eRKN 4 43: the non-symmetric 4-stage 4th-order Runge-Kutta-Nyström (RKN) method with a 3rd-order estimator presented in [10]. This method has an error estimator that is only valid for equations of the form (41), so that it cannot be used in particular for the Schrödinger equation.
• ePRK 5 43: The 5-stage 4th-order splitting method given by the composition with the symmetry b 6−i = a i , i = 1, 2, . . . , 5, and the 3rd-order estimator given by a similar composition sharing the first stages 2 with a i , b i , i = 3, 4, 5 chosen appropriately. The estimator requires three new evaluations. We take in particular the scheme 3 Emb 4/3 AK p, in which case a 3 = 0, so that only two new evaluations are required and the overall cost is taken as 7 evaluations per step.
Specifically, we consider as a test bench the two-dimensional Kepler problem with Hamiltonian H(q, p) = T (p) + V (q) = 1 2 2 The idea to consider estimators using a second composition sharing some of the stages was first proposed in [22] 3 The corresponding coefficients are available at http://www.asc.tuwien.ac.at/˜winfried/splitting Here q = (q 1 , q 2 ), p = (p 1 , p 2 ), µ = GM , G is the gravitational constant and M is the sum of the masses of the two bodies. Taking µ = 1 and initial conditions if 0 ≤ e < 1, then the total energy is H = H 0 = −1/2, the solution is periodic with period 2π, and the trajectory is an ellipse of eccentricity e. The performance of an embedded Runge-Kuta method depends on the performance of the high order method used to propagate the solution, but also on the accuracy of the lower order one as well as how the error estimator approaches the true error of the high order method. Some times the error estimator is much larger than the true error and the algorithm uses smaller time steps than necessary to reach a given accuracy. Some other times, however, this error can be considerably smaller than the true error (usually due to cancellations because the methods share internal stages) and the algorithm takes longer time steps than required which lead to undesirable large errors.
In this example we integrate with a constant time step and compute the maximum true error E 1 = max n x(t n ) − x n and the maximum error estimator An efficient method should give E 2 ∼ E 1 , while being both as small as possible at a given computational cost.
The integration is carried out in the time interval t ∈ [0, 20] with a constant time step, and this integration is repeated for different values of the time step and for several values of the eccentricity, in particular for e = 1 5 , 2 5 , 3 5 , 4 5 . This is done first for RK6(5) (or DVERK subroutine) and the composition scheme SS 11 65. Figure 1 shows in double logarithmic scale the error E 1 (thin lines) and the estimate E 2 (thick lines) versus the computational cost measured as the number of force evaluations. Dashed lines are obtained with RK6(5), whereas solid lines correspond to SS 11 65.
We notice from the figure that the composition method is not only more accurate at the same cost (even for such a short time integration) but also the error estimator is much closer to the true error. The error estimator of DVERK is very optimistic: E 2 is much smaller that E 1 , especially when the eccentricity takes large values (and thus adjusting the step size is increasingly relevant). The reason lies in the fact that both x n and x n are computed using very similar procedures, since they share the intermediate stages. This is not the case for the error estimators proposed here, and thus the error E 2 is reasonably close to the true error of the method, even when the coefficients for this specific method are not particularly small.
Next the same numerical experiment is carried out again, but this time with DOP853 and the composition scheme SS 17 853. Figure 2 shows the results obtained.
We observe that, for this example, the symplectic composition method is as efficient as the 8th-order RK method even for such a short time integration. In addition, our error estimator for the composition method is closer to the true error providing a better error estimator and as a result allowing to choose more appropriate time steps. Next we compare the results achieved by methods of order 4(3) that are valid for general splitting methods and symmetric-symmetric compositions. This is shown in Figure 3 for eccentricity e = 1/2 in eq. (51): PRK 6 43 (dashed lines); ePRK 5 43 (dot-dashed lines); and SS 5 43 (solid lines). We observe that the embedded scheme ePRK 5 43 provides an exceedingly optimistic error estimator as well as a lower performance due to its higher cost per step.
Finally, Figure 4 shows the same results as Figure 3 for the RKN methods of order 4(3) and the composition method-adjoint obtained from the coefficients of the 6-stage RKN method and the relation (47). It provides the same results for the 4th-order method, but different outputs for the estimator. Specifically, we collect the results obtained with S 6 43 (dashed lines), eRKN 4 43 (dot-dashed lines), and RKN 6 43 (solid lines). We observe that the scheme eRKN 4 43 provides an optimistic error estimator as well as a lower performance.

Concluding remarks
In this work we have proposed a procedure to estimate the local error of splitting and composition methods based on the construction of a second lower order integrator by linear combinations of the intermediate outputs of the original scheme. The difference can then be combined with standard strategies of automatic step size control [20] to use the original splitting and composition methods with adaptive step size along the integration. In contrast with other approaches, the proposed strategy does not increase the computational cost of the overall scheme and provides a reliable estimate of the error, so that it can be safely used in problems where keeping the step size constant is not of paramount importance, such as it is the case in certain partial differential equations of evolution. In any event, in that case one should use a very precise discretization in space to guarantee that the main source of error originates when integrating in time.
We should remark in particular the good properties exhibited by the estimator constructed for the 17-stage 8th-order composition scheme (11) with coefficients (25) in comparison with the well known routine DOP853. Taking into account that even more efficient composition methods involving 19 and 21 stages do exist within this class, we conclude that these can constitute a worthwhile alternative for integrating problems when high accuracy is required. The error estimator proposed here coupled with a variable step size strategy could be most useful for the application of splitting methods for solving the Schrödinger eigenvalue problem with the imaginary time propagation technique, in order to reduce the overall computational cost, as illustrated e.g. in [4].
Although only several representative schemes have been considered, it is clear that the same strategy can be applied to any other splitting and composition method. In particular, we can also construct estimators for the high-order methods with complex coefficients collected in [6] and schemes involving double commutators, such as those presented in [12,23,28], as long as they involve a sufficiently large number of intermediate stages to form the required linear combinations.