High-order regularised symplectic integrator for collisional planetary systems

We present a new mixed variable symplectic (MVS) integrator for planetary systems that fully resolves close encounters. The method is based on a time regularisation that allows keeping the stability properties of the symplectic integrators while also reducing the effective step size when two planets encounter. We used a high-order MVS scheme so that it was possible to integrate with large time-steps far away from close encounters. We show that this algorithm is able to resolve almost exact collisions (i


Introduction
Precise long-term integration of planetary systems is still a challenge today.The numerical simulations must resolve the motion of the planets along their orbits, but the lifetime of a system is typically billions of years, resulting in computationally expensive simulations.In addition, because of the chaotic nature of planetary dynamics, statistical studies are often necessary, which require running multiple simulations with close initial conditions (Laskar & Gastineau 2009).This remark is particularly true for unstable systems that can experience strong planet scattering caused by close encounters.
There is therefore considerable interest in developing fast and accurate numerical integrators, and numerous integrators have been developed over the years to fulfill this task.For long-term integrations, the most commonly used are symplectic integrators.Symplectic schemes incorporate the symmetries of Hamiltonian systems, and as a result, usually conserve the energy and angular momentum better than non-symplectic integrators.In particular, the angular momentum is usually conserved up to a roundoff error in symplectic integrators.
Independently, Kinoshita et al. (1991) and Wisdom & Holman (1991) developed a class of integrators that are often called mixed variable symplectic (MVS) integrators.This method takes advantage of the hierarchy between the Keplerian motion of the planets around the central star and the perturbations induced by planet interactions.It is thus possible to make accurate integrations using relatively large time-steps.
The initial implementation of Wisdom & Holman (1991) is a low-order integration scheme that still necessitates small time-steps to reach machine precision.Improvements to the method have since been implemented.The first category is symplectic correctors (Wisdom et al. 1996;Wisdom 2006).They consist of a modification of the initial conditions to improve the scheme accuracy.Because it is only necessary to apply them when an output is desired, they do not affect the performance of the integrator.This approach is for example used in WHFAST (Rein & Tamayo 2015).The other approach is to consider higher order schemes (McLachlan 1995b;Laskar & Robutel 2001;Blanes et al. 2013).High-order schemes permit a very good control of the numerical error by fully taking advantage of the hierarchical structure of the problem.This has been used with success to carry out high-precision long-term integrations of the solar system (Farrés et al. 2013).
The principal limitation of symplectic integrators is that they require a fixed time-step (Gladman et al. 1991).If the time-step is modified between each step, the integrator remains symplectic because each step is symplectic.However, the change in time-step introduces a possible secular energy drift that may reduce the interest of the method.As a consequence, classical symplectic integrators are not very adapted to treat the case of systems that experience occasional close encounters where very small time-steps are needed.
To resolve close encounters, Duncan et al. (1998) and Chambers (1999) provided solutions in the form of hybrid symplectic integrators.Duncan et al. (1998) developed a multiple time-step symplectic integrator, SYMBA, where the smallest time-steps are only used when a close encounter occurs.The method is limited to an order two scheme, however.The hybrid integrator MERCURY (Chambers 1999) moves terms from the perturbation step to the Keplerian step when an interaction between planets becomes too large.The Keplerian step is no longer integrable but can be solved at numerical precision using a non-symplectic scheme such as Burlisch-Stoer or Gauss-Radau.However, the switch of numerical method leads to a linear energy drift (Rein & Tamayo 2015).Another solution to the integration of the collisional N-body problem has been proposed in (Hernandez & Bertschinger 2015;Hernandez 2016;Dehnen & Hernandez 2017).It consists of a fixed time-step second-order symplectic integrator that treats every interaction between pairs of bodies as Keplerian steps.
Another way to build a symplectic integrator that correctly regularises close encounters is time renormalisation.Up to an extension of the phase space and a modification of the Hamiltonian, it is indeed always possible to modify the time that appears in the equations of motion.As a result, the real time becomes a variable to integrate.Providing some constraints on the renormalisation function, it is possible to integrate the motion with a fixed fictitious timestep using an arbitrary splitting scheme.Here we show that with adapted time renormalisation, it is possible to resolve close encounters accurately.
While time renormalisation has not been applied in the context of close encounters of planets, it has been successful in the case of perturbed highly eccentric problems (Mikkola 1997;Mikkola & Tanikawa 1999;Preto & Tremaine 1999;Blanes & Iserles 2012), see (Mikkola 2008) for a general review.We here adapt a time renormalisation proposed independently by Mikkola & Tanikawa (1999) and Preto & Tremaine (1999).We show that it is possible to use the perturbation energy to monitor close encounters in the context of systems with few planets with similar masses.We are able to define a MVS splitting that can be integrated with any high-order scheme.
We start in section 2 by briefly recalling the basics of the symplectic integrator formalism.In section 3 we present the time renormalisation that regularises close encounters, and we then discuss the consequence of the renormalisation on the hierarchical structure of the equations (section 4).In section 5 we numerically demonstrate over short-term integrations the behaviour of the integrator at close encounter.We then explain (section 6) how our time regularisation can be combined with the perihelion regularisation proposed by (Mikkola 1997).Finally, we show the results of long-term integration of six planet systems in the context of strong planet scattering (section 7) and compare our method to a recent implementation of MERCURY described in (Rein et al. 2019), to SYMBA, and to the non-symplectic high-order integrator IAS15 (section 8).

Splitting symplectic integrators
We consider a Hamiltonian H(p, q) that can be written as a sum of two integrable Hamiltonians, (1) A classical example is given by H 0 = T (p) and H 1 = U(q), where T (p) is the kinetic energy and U(q) is the potential energy.In planetary dynamics, we can split the system as H 0 = K(p, q), where K is the sum of the Kepler problems in Jacobi coordinates (e.g.Laskar 1990) and H 1 = H inter (q) is the interaction between the planets.
Using the Lie formalism (e.g.Koseleff 1993;Laskar & Robutel 2001), the equation of motion can be written where z = (p, q), {•, •} is the Poisson bracket 1 , and we note L f = { f, •}, the Lie differential operator.The formal solution of Eq. ( 2) at time t = τ + t 0 from the initial condition z(t 0 ) is In general, the operators L H 0 and L H 1 do not commute, so that exp(τL H ) exp(τL H 0 ) exp(τL H 1 ).However, using the Baker-Campbell-Hausdorff (BCH) formula, we can find the coefficients a i and b i such that where ) is an error Hamiltonian depending on H 0 , H 1 , τ and the coefficients a i and b i .
Because H 0 and H 1 are integrable, we can explicitly compute the evolution of the coordinates z under the action of the maps exp(τL H 0 ) and exp(τL H 1 ).The map S(τ) is symplectic because it is a composition of symplectic maps.Moreover, S(τ) exactly integrates the Hamiltonian H + H err .
If there is a hierarchy in the Hamiltonian H in the sense that |H 1 /H 0 | ε 1, we can choose the coefficients such that the error Hamiltonian is of the order of (see McLachlan 1995b;Laskar & Robutel 2001;Blanes et al. 2013;Farrés et al. 2013).For small ε and τ, the solution of H + H err is very close to the solution of H.In particular, it is thought that the energy error of a symplectic scheme is bounded.Because H err depends on τ, a composition of steps S(τ) also has this property if the time-step is kept constant.Otherwise, the exact integrated dynamics changes at each step, leading to a secular drift of the energy error.
In planetary dynamics, we can split the Hamiltonian such that H 0 is the sum of the Keplerian motions in Jacobi coordinates and H 1 is the interaction Hamiltonian between planets, which only depends on positions and thus is integrable (e.g.Laskar 1990).This splitting naturally introduces a scale separation ε given by where N is the number of planets, m k is the mass of the k-th planet, and m 0 is the mass of the star.If the planets remain far from each other, H 1 is always ε small with respect to H 0 .The perturbation term is of the order of ε/∆, where ∆ is the typical distance between the planets in units of a typical length of the system.During close encounters, ∆ can become very small, and the step size needs to be adapted to ε/∆ min Here ∆ min is the smallest expected separation between planets normalised by a typical length of the system.

General expression
In order to construct an adaptive symplectic scheme that regularises the collisions, we extend the phase space and integrate the system with a fictitious time.Let s be such that dt = g(p, p t , q)ds, where g is a function to be determined and p t is the conjugated momentum to the real time t in the extended phase space.In order to have an invertible function t(s), we require g to be positive.We consider the new Hamiltonian Γ defined as Γ does not depend on t, therefore p t is a constant of motion.
The equations of motion of this Hamiltonian are and for all function f (z) In general, H is not a constant of motion of Γ.We have If we choose initial conditions z 0 such that p t = −H(z 0 ), we have Γ| t=0 = 0.Because Γ is constant and g is positive, we deduce from equation (3) that we have at all times Because p t is also a constant of motion, H is constant for all times.We can simplify the equations of motion ( 9) and (10) into On the manifold p t = −H(t 0 ), equations (13) describe the same motion as equation ( 2).We call them the regularised equations.
We now wish to write Γ as a sum of two integrable Hamiltonians such as in section 2. Based on previous works (Preto & Tremaine 1999;Mikkola & Tanikawa 1999;Blanes & Iserles 2012), we write for H = H 0 + H 1 and we define g as where f is a smooth function to be determined.g is the difference quotient of f and is well defined when H 0 + p t + H 1 → 0. We have With this choice of g, the Hamiltonian Γ becomes where we note Γ 0 = f (H 0 + p t ) and Γ 1 = − f (−H 1 ).We remark that Γ 0 (Γ 1 ) is integrable because it is a function of H 0 + p t (H 1 ), which is integrable.Moreover, we have Because H 0 + p t (resp.H 1 ) is a first integral of Γ 0 (resp.Γ 1 ), we have where The operator exp(σL ) with a modified time step.The operator exp(σL Γ ) can be approximated by a composition of operators exp(σL , where Γ err is an error Hamiltonian that depends on σ.The symplectic map S Γ (σ) exactly integrates the modified Hamiltonian Γ + Γ err .The iteration of S Γ (σ) with fixed σ is a symplectic integrator algorithm for Γ.
When the timescale σ is small enough, the numerical values of H 0 and H 1 do not change significantly between each step of the composition.We have S Γ (σ) S(τ) with τ σ f (−H 1 ).In other words, S Γ behaves as S with an adaptive time-step while keeping the bounded energy properties of a fixed time-step integrator.

Choice of the regularisation function
We wish the step sizes (20) to become smaller when planets experience close encounters.These time-steps are determined by the derivative of f .For nearly Keplerian systems, Mikkola & Tanikawa (1999) and Preto & Tremaine (1999) studied renormalisation functions such that f (x) ∝ x −γ , where γ > 0 (this corresponds to power-law functions and the important case of f = ln).
However, these authors considered splitting of the type H 0 = T (p) and H 1 = U(q).As pointed out in (Blanes & Iserles 2012), when the Hamiltonian is split as the Keplerian part plus an integrable perturbation, it appears that both terms K(p, q) + p t and −H 1 can change signs, resulting in large errors in the integration.
We remark that the use of f = ln gives the best result when two planets experience a close encounter, but it leads to large energy errors far away for collision when H 1 is nearly 0. Based on these considerations, we require f to verify several properties to successfully regularise the perturbed Keplerian problem in presence of close encounters: f should only depend on the magnitude of the perturbation H 1 , therefore we require f even (and f odd).
A&A proofs: manuscript no.integ adapt 22) as a function of h/E 1 .The asymptotic value for h/E 1 → +∞ is given in green.Lower panel: f /E 1 , Eq. ( 23) as a function of h/E 1 .
-As already pointed out, t must be an increasing function of s, therefore f > 0 f should be smooth, therefore we exclude piecewise renormalisation functions.-We require that the regularisation vanishes in absence of perturbation i.e f (0) = 1.It results that for vanishing perturbation, σ = τ.
-Let E 1 be a typical value of H 1 far from close encounters that we determine an expression for below.f should only depend on H 1 /E 1 in order to only track relative changes in the magnitude of the perturbation.
-For high values of the perturbation (e.g. during close encounters), we require f (H 1 ) ∼ |E 1 /H 1 | such that we preserve the good properties pointed out by previous studies (Preto & Tremaine 1999;Mikkola & Tanikawa 1999).-To reduce the computational cost of the integrator, f has to be numerically inexpensive to evaluate.
These properties lead to a very natural choice for f (see in figure 1).We choose Taking the odd primitive of Eq. ( 22), we find For now on, f always refers to definition (23).With this choice of the function f , the Hamiltonian Γ takes the form where we used the oddity of f .We need to define E 1 more explicitly.When planets are far from each other, their mutual distance is of the same order as the typical distance between the planets and the star.Using the same idea as in (Marchal & Bozis 1982;Petit et al. 2018), we define a typical length unit of the system based on the initial system energy E 0 .We have where M * = 0≤i< j m i m j .The typical value for the perturbation Hamiltonian far away from collision can be defined as where m * = 1≤i< j m i m j .We note that we have The behaviour of the higher order derivative of f is useful for the error analysis, and in particular, their dependence in ε.The k-th derivative of f has for expression 4. Order of the scheme

Analytical error estimates
As explained in section 2, most of the planet dynamics simulations are made with a simple a second-order scheme such as the Wisdom-Holman leapfrog integrator (Wisdom & Holman 1991).It is indeed possible to take advantage of the hierarchy between H 0 and H 1 .This can be done by adding symplectic correctors (Wisdom et al. 1996;Rein & Tamayo 2015) or by cancelling the term of the form ετ k up to a certain order (Laskar & Robutel 2001).
Hierarchical order schemes such as SABA(10, 6, 4) (Blanes et al. 2013;Farrés et al. 2013) behave effectively as a tenth-order integrator if ε is small enough.Cancelling only selected terms reduces the number of necessary steps of the scheme, which reduces the numerical error and improves the performances.
Unfortunately, this property cannot be used for the regularised Hamiltonian because Γ 0 and Γ 1 are almost equal in magnitude.Nevertheless, it should be noted that the equations of motion ( 13) and the Lie derivatives (18) keep their hierarchical structure.The Poisson bracket of Γ 0 and Γ 1 gives Because f does not depend directly on ε (by choice, f only tracks relative variations of H 1 ), {Γ 0 , Γ 1 } is of the order of ε.However, for higher order terms in σ in H err , it is not possible to exploit the hierarchical structure in ε.We consider the terms of the order of σ 2 in the error Hamiltonian for the integration of Γ using the leapfrog scheme.We have (e.g.Laskar & Robutel 2001) In order to show the dependence in ε, we develop the Poisson brackets in Eq. ( 29) The first and third terms only depend on f and nested Poisson brackets of H 0 and H 1 .Their dependency on ε is thus determined by the Poisson brackets as in the fixed time-step case.The first term is of the order of εσ 2 and the third of the order of ε 2 σ 2 .On the other hand, the second and last terms introduce the second derivative of f as well as a product of Poisson bracket of H 0 and H 1 .Equation ( 27) shows that they are of the order of εσ 2 .In order to cancel all terms of the order of εσ 2 , it is necessary to cancel both terms in σ 2 in Eq. ( 29).Thus, the strategy used in (Blanes et al. 2013) does not provide a scheme with a hierarchical order because every Poisson bracket contributes with terms of the order of ε to the error Hamiltonian.
It is easy to extend the previous result to all orders in σ.We consider a generic error term of the form where k j is either 0 or 1 and k 0 = 0 and k 1 = 1.The development of Γ gen into Poisson brackets of H 0 and H 1 contains a term that has for expression where n j is the number of Γ j in Γ gen , and f 1 = f (H 1 ).Because n = n 0 + n 1 , we deduce from Eq. ( 27) that the term (32) is of the order of εσ n−1 .Thus, the effective order of the Hamiltonian is always εσ r min , where r min is the smallest exponent r k in Eq. ( 5).The error is still linear in ε.Hence, it is still worth using the Keplerian splitting.
We use schemes that are not dependent on the hierarchy between H 0 and H 1 .McLachlan (1995a) provided an exhaustive list of the optimal methods for fourth-, sixth-, and eighth-order integrators.Among the schemes he presented, we select a sixth-order method consisting of a composition of n = 7 leapfrog steps introduced by Yoshida (1990) and an eighth-order method that is a combination of n = 15 leapfrog steps.A complete review of these schemes can be found in (Hairer et al. 2006).The coefficients of the schemes are given in Appendix B.
In order to solve the Kepler step, we adopt the same approach as (Mikkola 1997;Rein & Tamayo 2015).The details on this particular solution as well as other technical details are given in Appendix A.

Non-integrable perturbation Hamiltonian
When the classical splitting of the Hamiltonian written in canonical heliocentric coordinates is used, H 1 depends on both positions and momenta.We can write H 1 as a sum of two integrable Hamiltonian H 1 = T 1 + U 1 , where T 1 is the indirect part that only depends on the momenta and U 1 is the planet interaction potential, only depending on positions (Farrés et al. 2013).We thus approximate the evolution operator (19) by The numerical results suggest that heliocentric coordinates give slightly more accurate results at constant cost.It is possible to use an alternative splitting that is often called democratic heliocentric splitting (Laskar 1990;Duncan et al. 1998).With this partition of the Hamiltonian, the kinetic and the potential part of the perturbation Hamiltonian commute.Therefore, the step exp(σL Γ 1 ) is directly integrable using the effective step size τ 1 (20).In the following numerical tests, we always use the classical definition when we refer to heliocentric coordinates.

Time-step and scheme comparison
In this section, we test how a single close encounter affects the energy conservation.To do so, we compare different integration schemes for a two-planet system, initially on circular orbits, during an initial synodic period where n i is the mean motion of planet i and α is the ratio of the semi-major axis.
Because the time-step is renormalised, we need to introduce a cost function that depends on the fictitious time s as well as on the number of stages involved in the scheme of the integrator.We define the cost of an integrator as the number of evaluations of exp(aσL Γ 0 ) exp(bσL Γ 1 ) that are required to integrate for a given real time period where s syn is the fictitious time after T syn , σ is the fixed fictitious time-step, and n is the number of stages of the integrator.We also compare the renormalised integrators to the same scheme with fixed time-step.For a fixed timestep, the cost function is simply given by C fixed = n/τ, where τ is the time-step (Farrés et al. 2013).We present different configurations in figures 2, 3, and 4.
In the two first sets, we integrate the motion of two equal-mass planets on circular orbits, starting in opposition with respect to the star.In both simulations, we have ε = (m 1 + m 2 )/m 0 = 10 −5 , the stellar mass is 1 M , and the outer planet semi-major axis is 1 AU.In both figures, we represent the averaged relative energy variation as a function of the inverse cost C −1 of the integration for various schemes: the classical order 2 leapfrog ABA(2, 2), -the scheme ABA(8, 2) from (Laskar & Robutel 2001), -the scheme ABA(10, 6, 4) from (Blanes et al. 2013) -the sixth-and eighth-order schemes from (McLachlan 1995a) that we introduced in the previous section.
For each scheme, we plot with a solid line the result of the fixed time-step algorithm and with dots the results of the adaptive time-step integrator.In the results presented in figure 2 and 3, the systems are integrated in Jacobi coordinates.In figure 4 we integrate in heliocentric coordinates.
For the three cases, the integrations were also carried out with the other set of coordinates with almost no differences.
In Figure 2 the initial semi-major axis ratio α is 0.8 and the closest approach of the two planets is 0.19992 AU.  2 for a system of two equal-mass initially on planar circular orbits with ε = 2m/m 0 = 10 −3 and α = 0.9.The closest planet approach is 1.7 × 10 −2 AU.This system is integrated in heliocentric coordinates to demonstrate that we obtain similar results to the case of Jacobi coordinates.
In this case, a fixed time-step algorithm provides accurate results, and when a generalized order scheme such as ABA(8, 2) or ABA(10, 6, 4) is used, the performances are better with a fixed time-step than with an adaptive one.However, we see no sensitive differences in accuracy between the fixed and adaptive versions of the ABA(6 * ) and ABA(8 * ) schemes.For the most efficient schemes, machine precision is reached for an inverse cost of a few 10 −3 .This case illustrates the point made in section 4 that there is no advantage in using the hierarchical structure of the original equation in the choice of the scheme.
In Figure 3 the initial semi-major axis ratio α is 0.97 and the closest approach of the two planets is 3.68 × 10 −5 AU.The radius of a planet of mass 5 × 10 −6 M with a density of 5 g.cm −3 , denser than Earth, is 5.21 × 10 −4 AU, that is, ten times greater.We can compute the density that corresponds to a body of mass 5 × 10 −6 M and radius half the closest approach distance.We obtain a density of 1.1×10 5 g.cm −3 , which is close to the white dwarf density.In this case, the fixed time-step algorithm is widely inaccurate while the performance of the adaptive time-step algorithm remains largely unchanged.This demonstrates how powerful this new approach is for the integration of systems with a few planets.We also give an example with higher mass planets in figure 4. We plot the relative energy error as a function of the inverse cost for a system of two planets of mass 5 × 10 −4 M that correspond to the case of ε = 10 −3 .The initial semimajor axis ratio is 0.9 to ensure a closest-approach distance of 1.7 × 10 −2 AU.
For this particular close encounter, it is still possible to reach machine precision with a fixed time-step at the price of a very small time-step.On the other hand, the close encounter is perfectly resolved for the adaptive time-step, even if ε is larger by two orders of magnitude.Because of the higher masses, it is necessary to take smaller time-steps to ensure that the relative energy error remains at machine precision.

Behaviour at exact collision
To demonstrate the power of our algorithm in resolving close encounters, we considered the case of two planets that almost exactly collide (as if the bodies were material points).We take two planets of mass m = 10 −5 M , the first on an orbit of eccentricity 0.1 and semi-major axis 0.95 AU, and the second on a circular orbit of semi-major axis 1 AU.
We then fine-tuned the mean longitudes of the two planets to ensure that we approach the exact collision.We integrated 1000 initial conditions for which we linearly varied λ 1 between -0.589 and -0.587, and we took λ 2 = −1.582.
In figure 5 we represent for each initial condition the mutual distance of the planets as a function of the fictitious time s.In the upper axis, we give the real time of the particular initial condition that gave the closest approach.In this simulation, all initial conditions reached a mutual distance smaller than 1.1 × 10 −4 AU and the closest approach is 5.5×10 −9 AU.For the chosen masses, we can compute the physical radius of such bodies assuming a particular bulk density.We have where ρ is the bulk density of the planet.The radius is only a weak function of the density over the range of planet bulk densities.When we assume a very conservative value of ρ = 6 g.cm −3 , we obtain a planet radius of 6.17×10 −4 AU, that is, well above the close encounters considered here.
We plot the energy error as a function of the closest approach distance in figure 6.We also considered a more practical case where four other planets were added to the system.The additional planets were located on circular orbits, had the same masses of 10 −5 M and were situated outside of the orbit of the second planet, with an equal Minimal distance in planet radius (log) Fig. 6.Relative energy error as a function of the closest mutual approach reached during a close encounter of super-Earths in a two-planet system and in a six-planet system.The particular initial conditions are described in the text.In the upper part, we give the mutual distance in units of planet radii for a planet of density ρ = 6 g.cm −3 .
spacing of 0.15 AU.Their initial angles are randomly drawn but were similar in every run.
In both set-ups, we used the heliocentric ABA(8 * ) scheme, and the fictitious time-step was σ = 10 −2 .In the case of the two-planet system, machine precision is reached even for an approach of approximately 10 −6 AU, which corresponds to a planet radius of about 10 −3 .When planets are added, it is more difficult to reach very close encounters because the the other planets are perturbed.Nonetheless, approaches up to 6 × 10 −7 AU are reached, and the close encounter is resolved at machine precision up to a closest distance of 3 × 10 −5 AU or a planet radius of 5 × 10 −2 .

Pericenter regularisation
When planet-planet scattering is studied, the closest distance between the planet and the star may be reduced.As a result, the fixed time-step becomes too large and the passage at pericenter is insufficiently resolved.In order to address this problem, we can combine the close-encounter regularisation of section 3 with a regularisation method introduced by (Mikkola 1997).
We first detail Mikkola's idea.When integrating a fewbody problem Hamiltonian, a time renormalisation dt = g(q)du can be introduced, where Here A i are coefficients that can be chosen arbitrarily.In this article, we define them as where a typical , defined in Eq. ( 25), is the typical length scale of the system.The new Hamiltonian Υ in the extended phase space (q, t, p, p t ) is As in section 3, in the sub-manifold {p t = H(0)}, Υ and H have the same equations of motion up to the time transformation.If H 1 only depends on q (using Jacobi coordinates, e.g.), Υ 1 is trivial to integrate.

Kepler step
It is also possible to integrate Υ 0 as a modified Kepler motion through the expression of g (Mikkola 1997).We denote υ 0 = Υ 0 (0) and H0 = g −1 (q)(Υ 0 − υ 0 ).H0 has the same equations of motion as Υ 0 up to a time transformation d t = g −1 (q)du.We have where Ki is the Hamiltonian of a Keplerian motion of planet i with a modified central mass However, the time equation must be solved as well.We integrate with a fixed fictitious time-step ∆u.The time ∆ t(u) is related to u through the relation where r i ( t) follows a Keplerian motion.We can rewrite equation ( 43) with the Stumpff formulation of the Kepler equation (Mikkola 1997;Rein & Tamayo 2015, see Appendix A.1).Because As a consequence, the N Stumpff-Kepler equations must be solved simultaneously with equation (44).To do so, we used a multidimensional Newton-Raphson method on the system of N + 1 equations consisting of the N Kepler equations (45) and equation ( 44) of unknowns Y = (X 1 , . . ., X N , ∆ t).The algorithm is almost as efficient as the fixed-time Kepler evolution because it does not add up computation of Stumpff's series.At step k, we can obtain Y (k+1) through the equation where with κ i being the derivative with respect to X i of κ i (Eq.45).Equation ( 46) can be rewritten as a two-step process where a new estimate for the time ∆ t(k+1) is computed and is then used to estimate X (k+1) i .We have and . (50)

Heliocentric coordinates
In heliocentric coordinates, H H 1 depends on p as well.As a result, gH H 1 cannot be easily integrated, and it is not even possible write it as a sum of integrable Hamiltonians.To circumvent this problem, we can split gH H 1 into gU H 1 and gT H 1 .The potential part gU H 1 is integrable, but a priori, gT H 1 is not integrable.The integration of gT H 1 can be integrated using a logarithmic method as proposed in (Blanes & Iserles 2012).The evolution of gT H 1 during a step ∆t is the same as the evolution of log gT H 1 = log g + log T H 1 , which is separable, for a step T 1 ∆t where T 1 = gT H 1 | t=0 .Therefore, we can approximate log gT H 1 using a leapfrog scheme, and the error is of order ∆u 2 ε 3 as well.
Then, we can approximate the heliocentric step using the same method as in Sect.4.2.In this case, it is necessary to approximate the step even when democratic heliocentric coordinates are used because g(q) does not commute with T H 1 .

Combining the two regularisations
We showed that the Hamiltonian Υ is separable into two parts that are integrable (or nearly integrable for heliocentric coordinates).Therefore we can simply regularise the close encounters by integrating the Hamiltonian where p u is the momentum associated with the intermediate time u used to integrate Υ alone.The time equation is We need to place ourselves on the sub-manifold such that Υ 0 + p u + Υ 1 = 0 and H 0 + p t + H 1 = 0, in order to have the same equations of motion for Γ, Υ and H .Both of these conditions are fulfilled by choosing p t = −E 0 and p u = 0.
Article number, page 8 of 13 Petit: High-order regularised symplectic integrators for collisional planetary systems

Long-term integration performance
So far, we only presented the performance of the algorithm for very short integrations.In this section, we present the long-term behaviour of the integrator for systems with a very chaotic nature.We consider two different configurations, a system composed of equal planet masses on initially circular, coplanar and equally spaced orbits, used as a test model for stability analysis since the work of Chambers et al. (1996).The second is a similar system but with initially moderate eccentricities and inclinations.

Initially circular and coplanar systems
We integrated 100 systems of six initially coplanar and circular planets.The planet masses were taken to be equal to 10 −5 M ⊕ , and the semi-major axis of the outermost planet was fixed to 1 AU, while the semi-major axis ratios of the adjacent planets were all equal to 0.88.These valus were chosen to ensure that the lifetime of the system was of the order of 300 kyr before the first collision.The fixed fictitious time-step was σ = 10 −2 yr.Because of the renormalisation, this approximately corresponds to a fixed time-step of 6.3 × 10 −3 yr in terms of computational cost.The initial period of the inner planet was of the order of 0.38 yr, that is, we have about 50 steps per orbit.
The simulations were stopped when two planet centres approached each other by less than half the planet radii, assuming a density of 6 g.cm −3 .This stopping criterion is voluntarily nonphysical as it allows for a longer chaotic phase that leads to more close encounters.We also monitored any encounters with an approach closer than 2 Hill radii at 1 AU (0.054 AU) and recorded its time, the planets involved, and the closest distance between the two planets.
For the majority of the integrations, we observe moderate semi-major axis diffusion without close encounters.About 1 kyr before the final collision, the system enters a true scattering phase with numerous close encounters.Semi-major axis (AU) Fig. 8. Evolution of the semi-major axis, periapsis, and apoapsis for a typical initial condition.The bold curve is the semi-major axis, and the filled region represents the extent of the orbit.The mutual inclinations are not represented.
The integrations lasted on average 353 kyr, the shortest was 129 kyr long and the longest 824 kyr.On average, we recorded 557 close encounters, and 68% occurred during the last 10000 years.On average, 6.4 approaches below 0.01 AU per system were recorded.Of these very close encounters, 95% occurred during the last 1000 years.
The relative energy error evolution is shown in figure 7. We observe that the integrator follows the Brouwer (1937) law because the energy error behaves as a random walk (the error grows as √ t).The scattering phase does not affect the energy conservation: no spikes of higher error values occur towards the end of the integrations.

Planet scattering on inclined and eccentric orbits
Our second long-term test problem was a set of planetary systems with moderate eccentricities and inclinations.The goal is here to test the integrator in a regime where strong scattering occurs on long timescales with a much higher frequency in very close encounters (shorter than 0.01 AU).In addition, this case helps to demonstrate the advantage of the pericenter regularisation.The initial conditions were chosen as follows: -Similarly to the previous case, we considered systems of six planets with an equal mass of 10 −5 M .-The semi-major axis ratio of adjacent pairs was 0.85.
-The Cartesian components of the eccentricities (e cos( ), e sin( )) and inclinations (i cos(Ω), i sin(Ω)) were drawn from a centred Gaussian distribution with a standard deviation of 0.08.The average eccentricities and inclinations were about 0.11.-The mean longitudes were chosen randomly.
We also kept the same stopping criterion and recorded the close encounters (smaller than 2 Hill radii).
The integrations were performed with two sets of coordinates, Jacobi and heliocentric; with and without pericenter regularisation.The main statistics from the runs are summarised in table 1.For all integrations, we used the eighth-order scheme and a fictitious time-step σ = 4 × 10 −3 .coordinates seem to provide a more stable integrator even though the interaction step is approximated.In the two cases without the pericenter regularisation, J1 and H1, it seems that the energy error is no longer proportional to √ t but linear in t.
As explained above, because of the high eccentricities, the innermost pericenter passage is not very well resolved, and therefore the step-to-step energy variation is no longer close to machine precision.This effect has been confirmed by the detailed analysis of the time-series close to energy spikes by restarts of the integration from a binary file.We observed that the energy did not change during the close encounter, but shortly after, when the inner planet passed closer to the star because of the scattering.
We also observe an initial condition well above the machine-precision level in all four runs.In this particular system, we have e 5 (t = 0) = 0.81, which gives an initial pericenter at 0.15 AU.In this extreme case, the pericenter regularisation leads to an improvement by two orders of magnitude of the error in Jacobi coordinates.The heliocentric coordinates remain more efficient, however, and we do not see an improvement in this particular case.
In all runs, the time distribution of the close encounters appears to be rather uniform.Moreover, the probability distribution function (PDF) of the closest approach during a close encounter is linear in the distance, as shown in figure 10.This proves that the systems are in a scattering regime where the impact parameters for the close encounters are largely random (see also Laskar et al. 2011, figure 5).

Comparison with existing integrators
We ran the same eccentric and inclined initial conditions using the REBOUND (Rein & Liu 2012) package integrators IAS15 (Rein & Spiegel 2015) and MERCURIUS (Rein et al. 2019).IAS15 is an adaptive high-order Gauss-Radau integrator, and MERCURIUS is a hybrid symplectic integrator similar to MERCURY (Chambers 1999).This choice is motivated because the REBOUND team made recent and precise comparisons with other available integrators (Rein & 1 to other codes: IAS15, MERCURIUS, and SYMBA.The same initial conditions were integrated.We plot the median of the energy error. Spiegel 2015; Rein & Tamayo 2015).Moreover, we used a very similar implementation of the Kepler step.We also ran the same tests with the multi-time-step symplectic integrator SYMBA (Duncan et al. 1998).
We plot the energy error median that results from the integration.Our integrator performs similarly to the nonsymplectic integrator IAS15 and better than MERCURIUS and SYMBA.Our integrator runs at the same speed as MER-CURIUS and SYMBA with a time-step of ∆t = 10 −4 .However, IAS15 is much faster on this particular problem (by a factor 10 on average).MERCURIUS and SYMBA are not designed to work efficiently at such low-energy errors.However, our motivation for this work was to find a precise symplectic integrator for close encounters.We thus tried to obtain the best precision from MERCURIUS and SYMBA to make the comparison relevant.

Discussion
We showed that time renormalisation can lead to very good results for the integration of highly unstable planetary systems using a symplectic integrator (section 3).The algorithm can use a scheme of arbitrary order, however, we have not been able to take advantage of the hierarchical structure beyond the first order in ε.This is due to the non linearity of the time renormalisation as explained in section 4. It is possible, however, to cancel every term up to arbitrary order in the time-step using non-hierarchical schemes.
Our time renormalisation uses the perturbation energy to monitor when two planets encounter each other.The algorithm is thus efficient if the two-planet interaction contributes to a significant part of the perturbation energy.As a result, this integrator is particularly well adapted for systems of a few planets (up to a few tens) with similar masses (within an order of magnitude).Moreover, it behaves extremely well in the two-planet problem even when one planet mass is significantly lower than the other.
However, the algorithm is not yet able to spot close encounters between terrestrial planets in a system that contains giant planets, such as the solar system.In the case of the solar system, the perturbation energy is dominated by the interaction between Jupiter and Saturn.We plan to address this particular problem in the future.

Fig. 2 .
Fig.2.Comparison between various schemes detailed in the body of the text for the integration of a single synodic period for a system of equal-mass planets initially on planar circular orbits with ε = 2m/m 0 = 10 −5 and α = 0.8.The solid lines represent the integrations using a fixed real time-step and the dots the adaptive time-steps.The closest planet approach is 0.19992 AU.

Fig. 4 .
Fig.4.Same as figure 2 for a system of two equal-mass initially on planar circular orbits with ε = 2m/m 0 = 10 −3 and α = 0.9.The closest planet approach is 1.7 × 10 −2 AU.This system is integrated in heliocentric coordinates to demonstrate that we obtain similar results to the case of Jacobi coordinates.

Fig. 7 .
Fig. 7. Evolution of the relative energy error for 100 systems composed of six planets on initially circular orbits.The light curves represent individual systems, and the thicker blue curves show the average over the 100 systems.The orange straight line is proportional to √ t in order to show that the integrator follows Brouwer's law.The orange line is the same in all energy error figures for comparison.

Fig. 10 .
Fig. 10.PDF of the closest approach during close encounters.The PDFs of the four runs are almost identical.

Fig. 11 .
Fig. 11.Comparison of the different adaptive integrator runs presented in Table1to other codes: IAS15, MERCURIUS, and SYMBA.The same initial conditions were integrated.We plot the median of the energy error.
Fig. 5. Mutual distance of the planets as a function of the fictitious time for 1000 initial conditions chosen as described in the body of the text.On the upper axis, we give the real time for the initial condition that reached the closest approach.