1 Introduction

The problem of the free rigid body is well known to be integrable and the exact solution was developed by Jacobi (1850). The solution uses Jacobi elliptic functions and elliptic integrals, which are necessary to solve exactly this problem. Nevertheless, the numerical evaluation of these functions is more expensive than the usual ones (e.g., Touma and Wisdom 1994; Fassò 2003). If only the final orientation of the body is necessary, only one step is required, and the higher cost is not a problem. However, in most cases, the kinetic energy of the free rigid body is coupled to a potential part making the problem no longer integrable. It is notably the case in Celestial Mechanics for the integration of the dynamics of a planetary system where the rotation of a body interacts with the orbital motion (e.g., Touma and Wisdom 1994) and in molecular dynamics (e.g., Dullweber et al. 1997). The temporary position of the body is then needed at every step, and the use of a cheaper approximated integrator is significant.

Several approximated integrators, which can be used for the free rigid body, exist [see Hairer et al. (2006) for their description and Hairer and Vilmart (2006) for a comparison]. In this paper, we are only interested in the splitting technique. This symplectic method usually consists in the splitting of a Hamiltonian into several integrable parts, which are successively integrated by stage. It allows one to conserve on average the energy, but it realizes the integration of a slightly perturbed Hamiltonian. Each stage of the integration scheme is weighted by a coefficient. The number of stages and an appropriate choice of their coefficients allow one to increase the order of the integrator.

This technique was proposed for the free rigid body by McLachlan (1993), Touma and Wisdom (1994), Reich (1994) and splits the Hamiltonian into parts, which can be easily integrated as a succession of elementary rotations. The integration schemes of the free rigid body are those usually used for any Hamiltonian. For instance Touma and Wisdom (1994) and Dullweber et al. (1997) used the classical Störmer–Verlet or leapfrog integrator and Omelyan (2007) used the Yoshida’s technique (Yoshida 1990) to obtain a fourth-order scheme with the second-order leapfrog scheme. These integrators are then symmetrically composed with a potential to realize the symplectic integration of the perturbed rotation as it was done for instance by Touma and Wisdom (1994) in celestial mechanics and by Dullweber et al. (1997) in molecular dynamics.

Fassò (2003) compared the efficiency of the different possible splittings of the Hamiltonian for the second-order leapfrog scheme by evaluating the third-order remainder of the integrator, which dominates the error between the approximated integration and the exact solution. By computing the third-order remainder for each scheme and each permutation of moments of inertia, Fassò (2003) concluded that the most efficient scheme depends on the moments of inertia of the considered body and particularly noticed that the Lie algebra of the angular momentum allows one to simplify the expression of the third-order remainder.

The aim of this paper is to use the Lie algebra of the angular momentum to construct symplectic integrators dedicated to the Hamiltonian of the free rigid body more effective than the existing reference integrators. As noticed by Fassò (2003), the number of terms in the third-order remainder is lower than for an ordinary Hamiltonian. It is then possible to construct symplectic integrators with fewer stages. This is made possible by the fact that in the present work the coefficients of the integrator depend on the moments of inertia of the body. The determination of these coefficients is then allowed by the study of the Lie algebra of the angular momentum. Therefore, each rigid body has its proper integrator with different coefficients. In this paper, we are interested in developing symplectic integrators for the free rotation. These integrators can be then coupled with a potential to integrate the perturbed rotation.

The structure of the remainder of a symplectic integrator of the free rigid body is developed in Sect. 2. In addition, relations between the coefficients of the remainder allow us to reduce the number of conditions on the integrator. In Sect. 3, we construct symmetric integrators, which verify the conditions of Sect. 2. These integrators can have fewer stages than the usual integrators but are specific to a given rigid body because the coefficients of the integrators depend on their moments of inertia. We then proceed to numerical tests in Sect. 4: we first consider the simplest case of the spherical top and then the water molecule, which is an asymmetric body used in previous studies to test integrators of the rigid body. For these two selected bodies, we determine the best dedicated symplectic integrators and compare them to the usual symplectic integrators. In Sect. 5, we determine analytically the best dedicated symplectic integrators for the set of the rigid bodies and compare them to the usual schemes.

2 Constraints on a symplectic integrator

We consider a free rigid body \(\mathcal {S}\) in the inertial reference frame \(\mathcal {R}\). \((\mathbf {I},\mathbf {J},\mathbf {K})\) is a direct orthonormal basis associated with the body frame \(\mathcal {R}_{S}\). The vectors \(\mathbf {I}\), \(\mathbf {J}\), \(\mathbf {K}\) are associated with the principal axes of inertia of moments of inertia, respectively, \(I_{1}\), \(I_{2}\) and \(I_{3}\). \(\mathbf {g}\) is the angular momentum of \(\mathcal {S}\) expressed in the inertial frame \(\mathcal {R}\). For a free rigid body, the angular momentum \(\mathbf {g}\) and the Hamiltonian H are conserved. The Hamiltonian H of the free rigid body is reduced to the rotational kinetic energy

$$\begin{aligned} H=\frac{G_{1}^{2}}{2I_{1}}+\frac{G_{2}^{2}}{2I_{2}}+\frac{G_{3}^{2}}{2I_{3}}, \end{aligned}$$
(1)

where \(\mathbf {G}=\left( G_{1},G_{2},G_{3}\right) \) is the angular momentum expressed in the body frame \(\mathcal {R}_{S}\). In the body frame \(\mathcal {R}_{S}\), the coordinates of \(\mathbf {G}\) are not conserved but the norm G is conserved with

$$\begin{aligned} G=\sqrt{G_{1}^{2}+G_{2}^{2}+G_{3}^{2}}. \end{aligned}$$
(2)

Two different splittings of the Hamiltonian H can reduce its integration to the composition of simple rotations. The first splitting, ABC, splits the Hamiltonian into three parts (e.g., Reich 1994)

$$\begin{aligned} H=A+B+C, \end{aligned}$$
(3)

with

$$\begin{aligned} A= & {} \frac{G_{1}^{2}}{2I_{1}}, \end{aligned}$$
(4)
$$\begin{aligned} B= & {} \frac{G_{2}^{2}}{2I_{2}}, \end{aligned}$$
(5)
$$\begin{aligned} C= & {} \frac{G_{3}^{2}}{2I_{3}}. \end{aligned}$$
(6)

For the length of time t, each part corresponds to a rotation of angles \(G_{1}t/I_{1}\), \(G_{2}t/I_{2}\), \(G_{3}t/I_{3}\), around the respective principal axes \(\mathbf {I}\), \(\mathbf {J}\), \(\mathbf {K}\). The second splitting, RS, splits the Hamiltonian into two parts (McLachlan 1993; Touma and Wisdom 1994)

$$\begin{aligned} H=R+S, \end{aligned}$$
(7)

with

$$\begin{aligned} R= & {} \frac{G_{1}^{2}}{2}\left( \frac{1}{I_{1}}-\frac{1}{I_{2}}\right) , \end{aligned}$$
(8)
$$\begin{aligned} S= & {} \frac{G_{3}^{2}}{2}\left( \frac{1}{I_{3}}-\frac{1}{I_{2}}\right) +\frac{G^{2}}{2I_{2}}. \end{aligned}$$
(9)

R corresponds to the rotation around the principal axis \(\mathbf {I}\) with the angle \(G_{1}t(1/I_{1}-1/I_{2})\) and S, which is the Hamiltonian of a symmetric top, to a rotation around the principal axis \(\mathbf {K}\) of angle \(G_{3}t(1/I_{3}-1/I_{2})\) followed by a rotation around the angular momentum \(\mathbf {G}\) of angle \(Gt/I_{2}\).

These two decompositions give rise to two possible splittings, which result in two classes of symplectic integrators,

$$\begin{aligned} \mathcal {S}_{ABC}\left( h\right) =\prod _{i=1}^{n} e^{a_{i}hL_{A}}e^{b_{i}hL_{B}}e^{c_{i}hL_{C}}, \end{aligned}$$
(10)

and

$$\begin{aligned} \mathcal {S}_{RS}\left( h\right) =\prod _{i=1}^{n} e^{a_{i}hL_{R}}e^{b_{i}hL_{S}}, \end{aligned}$$
(11)

where \(L_{X}= \left\{ X,.\right\} \) is the Lie derivative of a Hamiltonian X, h the step size and \(a_i\), \(b_i\) and \(c_i\) the coefficients of the integrators.

These splitting integrators exactly integrate a slightly different Hamiltonian K. For the symplectic integrator \(\mathcal {S}\left( h\right) =e^{hL_K}\), this Hamiltonian is given by (e.g., Yoshida 1990; Koseleff 1993)

$$\begin{aligned} hK=hH+\sum ^{n}_{k=2} h^{k}H_{R_{k}}+O\left( h^{n+1}\right) , \end{aligned}$$
(12)

where each Hamiltonian \(H_{R_{k}}\) is the remainder of order k.

The remainders \(H_{R_k}\) of the schemes \(\mathcal {S}_{ABC}\) and \(\mathcal {S}_{RS}\) belong to the Lie algebra \(\mathcal {L}\) generated by the alphabet \(\mathcal {A}\) composed of the three elements \(G^2_1\), \(G^2_2\), \(G^2_3\) and associated with the Poisson brackets. \(\mathcal {L}=\oplus _{k\ge 1} \mathcal {L}_k\) is a graded Lie algebra and is the sum of the Lie algebras \(\mathcal {L}_k\) generated by the Lie monomials of length k (e.g., Koseleff 1993). The Hamiltonian \(H_{R_{k}}\) belongs to \(\mathcal {L}_k\) and is the sum of Lie monomials of length k.

To obtain an integrator of order n, we must have \(H_{R_{k}}=0\) for \(k=2,\ldots ,n\) (e.g., Yoshida 1990; Koseleff 1993; McLachlan 1995). The Baker–Campbell–Hausdorff formula allows one to determine the remainders for each order and to know what equations must verify the coefficients \(a_i\), \(b_i\) and \(c_i\) to cancel the remainders \(H_{R_{k}}\) for \(k=2,\ldots ,n\). If the scheme is symmetric, \(H_{R_{k}}=0\) is already verified for the even values of k (e.g., Yoshida 1990).

The number of independent equations at order k which must verify the coefficients \(a_i\), \(b_i\) and \(c_i\) to verify \(H_{R_{k}}=0\) is given by the dimension of the Lie algebra \(\mathcal {L}_k\). The minimal number of stages of an integrator of order n is then given by the total number of independent equations, which the coefficients \(a_i\), \(b_i\) and \(c_i\) must verify to have an integrator of order n.

Fassò (2003) compared the efficiency of the two possible splittings for the Hamiltonian of the free rigid body for the second-order symmetric schemes obtained with the leapfrog method

$$\begin{aligned}&\mathcal {S}_{ABCBA2}\left( h\right) = e^{\frac{h}{2}L_{A}}e^{\frac{h}{2}L_{B}}e^{hL_{C}}e^{\frac{h}{2}L_{B}}e^{\frac{h}{2}L_{A}}, \end{aligned}$$
(13)
$$\begin{aligned}&\mathcal {S}_{RSR2}\left( h\right) = e^{\frac{h}{2}L_{R}}e^{hL_{S}}e^{\frac{h}{2}L_{R}}, \end{aligned}$$
(14)
$$\begin{aligned}&\mathcal {S}_{SRS2}\left( h\right) = e^{\frac{h}{2}L_{S}}e^{hL_{R}}e^{\frac{h}{2}L_{S}}. \end{aligned}$$
(15)

To obtain all the possible schemes, Fassò (2003) considered the six permutations of the three Hamiltonians \(G_1^2/(2I_1)\), \(G_2^2/(2I_2)\) and \(G_3^2/(2I_3)\), which is equivalent to consider the permutations of the moments of inertia. We call the six permutations ABC, BCA, CAB, ACB, CBA, BAC.

For each scheme, Fassò (2003) simplified the analytical expression of the three order remainder by using the relation \(\lbrace G_{i},G_{j} \rbrace = \epsilon _{ijk} G_{k}\) for the Poisson brackets \(\lbrace , \rbrace \) and estimated it for the six permutations. He concluded that their efficiency depends on the moments of inertia for a given body. For the bodies near to a symmetric top, the integrators \(\mathcal {S}_{RSR2}\) and \(\mathcal {S}_{SRS2}\) are more accurate than \(\mathcal {S}_{ABCBA2}\). It is possible to combine symmetrically these three second-order integrators to obtain higher order integrators (e.g., Suzuki 1990; Yoshida 1990; McLachlan 1995). These techniques work for any Hamiltonian but do not consider the Lie algebra of the free rigid body.

In Sect. 3, we seek to construct symmetric fourth-order integrators for the Hamiltonian of the free rigid body. To obtain a fourth-order integrator, we must verify \(H_{R_2}=H_{R_3}=H_{R_4}=0\). For a symmetric integrator, the remainders of even order are already canceled and we must then just verify \(H_{R_3}=0\). To know the number of coefficients necessary to cancel this remainder, we need to know its expression.

In this section, we then study the structure of the Lie algebra for the Hamiltonian of the free rigid body to know the number of constraints to impose to construct symplectic integrators for the free rigid body.

2.1 Lie algebra structure for the Hamiltonian of the free rigid body

The elements of the Lie algebra \(\mathcal {L}_k\) are the sum of Lie monomials of length k for the alphabet \(\mathcal {A}=(G_1^2,G_2^2,G_3^2)\). The Poisson brackets of the components \(G_i\) of the angular momentum verify the relation (e.g., Touma and Wisdom 1994; Fassò 2003)

$$\begin{aligned} \left\{ G_{i},G_{j} \right\} = \epsilon _{ijk} G_{k}. \end{aligned}$$
(16)

Here, we take into account this relation to express the elements of the Lie algebra \(\mathcal {L}_k\) of order k as a linear combination of monomials of the components \(G_i\) of the angular momentum.

2.1.1 First orders

We first look the structure of the algebra for the first orders.

If the family of elements \(v_{1_i}\) spans \(\mathcal {L}_{1}\) and the family of elements \(v_{k_j}\) spans \(\mathcal {L}_{k}\), the family of elements \(\lbrace v_{1_i},v_{k_j} \rbrace \) spans \(\mathcal {L}_{k+1}\). To obtain the expression of an element of \(\mathcal {L}_{k+1}\), we must then compute all the terms \(\lbrace v_{1_i},v_{k_j}\rbrace \). We note \(n_k\) the number of monomials in the linear combination for the order k.

Order 1: For the first order, the Lie monomials of length 1 are \(G_{1}^{2}\), \(G_{2}^{2}\), \(G_{3}^{2}\). Therefore \(n_1=3\).

Order 2: For the second order, the Lie monomials of length 2 can be expressed as \(\lbrace G_{j}^{2},G_{k}^{2}\rbrace \). With Eq. (16), we have

$$\begin{aligned} \left\{ G_{1}^2,G_{2}^2\right\} = \left\{ G_{2}^2,G_{3}^2\right\} = \left\{ G_{3}^2,G_{1}^2\right\} = 4G_{1}G_{2}G_{3}, \end{aligned}$$
(17)

and therefore \(n_2=1\). (\(G_1G_2G_3\)) is a basis of \(\mathcal {L}_2\) and then the dimension of \(\mathcal {L}_2\) is 1. To simplify, we note \(W=G_{1}G_{2}G_{3}\) in the following.

Order 3: For the third order, the Lie monomials of length 3 can be written as \(\lbrace G_{i}^{2},\lbrace G_{j}^{2},G_{k}^{2}\rbrace \rbrace \) and are a linear combination of the terms \(\lbrace G_{i}^{2},W\rbrace \). With Eq. (16), we have

$$\begin{aligned} \left\{ G_{1}^2,W\right\}= & {} 2\left( G_{1}^2G_{3}^2-G_{1}^2G_{2}^2\right) \end{aligned}$$
(18)
$$\begin{aligned} \left\{ G_{2}^2,W\right\}= & {} 2\left( G_{2}^2G_{1}^2-G_{2}^2G_{3}^2\right) \end{aligned}$$
(19)
$$\begin{aligned} \left\{ G_{3}^2,W\right\}= & {} 2\left( G_{3}^2G_{2}^2-G_{3}^2G_{1}^2\right) . \end{aligned}$$
(20)

Therefore, each element of \(\mathcal {L}_3\) is a linear combination of the terms \(G_{1}^{2}G_{2}^{2}\), \(G_{1}^{2}G_{3}^{2}\), \(G_{2}^{2}G_{3}^{2}\) and \(n_3=3\).

We consider the third-order remainder \(H_{R_{3}}\) of an integrator of the free rigid body. \(H_{R_{3}}\) belongs to \(\mathcal {L}_{3}\) and is then a linear combination of the three terms \(G_{1}^2G_{3}^2-G_{1}^2G_{2}^2\), \(G_{2}^2G_{1}^2-G_{2}^2G_{3}^2\), \(G_{3}^2G_{2}^2-G_{3}^2G_{1}^2\),

$$\begin{aligned} H_{R_{3}}\left( G_{1},G_{2},G_{3}\right) =P_1 G_{1}^{2}G_{2}^{2} + P_2 G_{1}^{2}G_{3}^{2} + P_3 G_{2}^{2}G_{3}^{2} \end{aligned}$$
(21)

with the coefficients \(P_{i}\). If \(G_{1}=G_{2}=G_{3}=1\), \(G_{1}^2G_{3}^2-G_{1}^2G_{2}^2\), \(G_{2}^2G_{1}^2-G_{2}^2G_{3}^2\), \(G_{3}^2G_{2}^2-G_{3}^2G_{1}^2\) are canceled and \(H_{R_{3}}\left( 1,1,1\right) =0\). The coefficients \(P_{i}\) must then verify

$$\begin{aligned} P_1 + P_2 + P_3=0. \end{aligned}$$
(22)

The three terms are linearly dependent. By keeping two of them, we can easily verify that we obtain two linearly independent terms. For instance, (\(G_{1}^2G_{3}^2-G_{1}^2G_{2}^2\), \(G_{2}^2G_{1}^2-G_{2}^2G_{3}^2\)) is a basis of \(\mathcal {L}_{3}\) and the dimension of \(\mathcal {L}_{3}\) is then 2.

Orders 4 and 5:We can continue this procedure for the orders 4 and 5. We obtain that (\(G_1^2W\), \(G_2^2W\), \(G_3^2W\)) is a basis of \(\mathcal {L}_4\) of dimension 3 and that (\(3W^2-G_1^4G_2^2\), \(3W^2-G_2^4G_3^2\), \(3W^2-G_3^4G_1^2\), \(G_1^4(G_2^2-G_3^2)\), \(G_2^4(G_3^2-G_1^2)\), \(G_3^4(G_1^2-G_2^2)\)) is a basis of \(\mathcal {L}_5\) of dimension 6.

2.1.2 All orders

We can generalize the structure of the Lie algebras for the first orders with a general theorem about the Lie algebra generated by the alphabet \(\mathcal {A}=(G_1^2,G_2^2,G_3^2)\).

Theorem 1

Let \(\mathcal {L}\) be the graded Lie algebra generated by the alphabet \(\mathcal {A}=(G_1^2,G_2^2,G_3^2)\) with \(G_i\) the components of an angular momentum and \(\mathcal {L}_k\) the Lie algebra generated by the Lie monomials of length k such that \(\mathcal {L}=\oplus _{k\ge 1} \mathcal {L}_k\).

Each element of \(\mathcal {L}_{2k}\) for \(k\in \mathbb {N}^*\) can be expressed as a linear combination of the monomials of degree \(2k+1\)

$$\begin{aligned} G_1^{2p+1}G_2^{2q+1}G_3^{2r+1} \end{aligned}$$
(23)

with \(p+q+r=k-1\) and \(p,q,r\in \mathbb {N}\).

Each element of \(\mathcal {L}_{2k+1}\) for \(k\in \mathbb {N}^*\) can be expressed as a linear combination of the monomials of degree \(2k+2\)

$$\begin{aligned} G_1^{2p}G_2^{2q}G_3^{2r} \end{aligned}$$
(24)

with \(p+q+r=k+1\), \(p,q,r\in \mathbb {N}\) and \(p,q,r\le k\).

Demonstration We proceed by recurrence to demonstrate the Theorem 1 and consider the proposition \(\mathcal {P}_{k}\): each element of \(\mathcal {L}_{2k}\) is a linear combination of the monomials \(G_1^{2p+1}G_2^{2q+1}G_3^{2r+1}\) with \(p+q+r=k-1\) and \(p,q,r\in \mathbb {N}\).

For the order 2, we have seen in Sect. 2.1.1 that each element of the Lie algebra \(\mathcal {L}_2\) is proportional to \(G_{1}G_{2}G_{3}\) and \(\mathcal {P}_{1}\) is then true.

We suppose that \(\mathcal {P}_{k}\) is true. We know the family \((G_{1}^{2}, G_{2}^{2}, G_{3}^{2})\) which spans \(\mathcal {L}_{1}\) and the family \((G_1^{2p+1}G_2^{2q+1}G_3^{2r+1})\) which spans \(\mathcal {L}_{2k}\). Each element of \(\mathcal {L}_{2k+1}\) can then be written as a linear combination of the terms \(\lbrace G_i^{2},G_1^{2p+1}G_2^{2q+1}G_3^{2r+1} \rbrace \). We compute all these terms and for instance, we have

$$\begin{aligned} \left\{ G_1^{2},G_1^{2p+1}G_2^{2q+1}G_3^{2r+1} \right\}= & {} G_1^{2p+1}G_3^{2r+1}\left\{ G_1^{2},G_2^{2q+1} \right\} + G_1^{2p+1}G_2^{2q+1}\left\{ G_1^{2},G_3^{2r+1} \right\} \nonumber \\= & {} 2\left( 2q+1\right) G_1^{2\left( p+1\right) }G_2^{2q}G_3^{2r+1}\left\{ G_1,G_2 \right\} \nonumber \\&- 2\left( 2r+1\right) G_1^{2\left( p+1\right) }G_2^{2q+1}G_3^{2r}\left\{ G_1,G_3 \right\} \nonumber \\= & {} \left( 4q+2\right) G_1^{2\left( p+1\right) }G_2^{2q}G_3^{2\left( r+1\right) }\nonumber \\&-\left( 4r+2\right) G_1^{2\left( p+1\right) }G_2^{2\left( q+1\right) }G_3^{2r}. \end{aligned}$$
(25)

We have then

$$\begin{aligned} \left\{ G_1^{2},G_1^{2p+1}G_2^{2q+1}G_3^{2r+1} \right\}= & {} \left( 4q+2\right) G_1^{2\left( p+1\right) }G_2^{2q}G_3^{2\left( r+1\right) } \nonumber \\&- \left( 4r+2\right) G_1^{2\left( p+1\right) }G_2^{2\left( q+1\right) }G_3^{2r} \nonumber \\ \left\{ G_2^{2},G_1^{2p+1}G_2^{2q+1}G_3^{2r+1} \right\}= & {} \left( 4r+2\right) G_1^{2\left( p+1\right) }G_2^{2\left( q+1\right) }G_3^{2r} \nonumber \\&- \left( 4p+2\right) G_1^{2p}G_2^{2\left( q+1\right) }G_3^{2\left( r+1\right) } \nonumber \\ \left\{ G_3^{2},G_1^{2p+1}G_2^{2q+1}G_3^{2r+1} \right\}= & {} \left( 4p+2\right) G_1^{2p}G_2^{2\left( q+1\right) }G_3^{2\left( r+1\right) } \nonumber \\&- \left( 4q+2\right) G_1^{2\left( p+1\right) }G_2^{2q}G_3^{2\left( r+1\right) }. \end{aligned}$$
(26)

We deduce that each element of \(\mathcal {L}_{2k+1}\) is a linear combination of the monomials \(G_1^{2p}G_2^{2q}G_3^{2r}\) with \(p+q+r=k+1\), \(p,q,r\in \mathbb {N}\) and \(p,q,r\le k\). Therefore, if the Theorem 1 is verified for the order 2k, it is also satisfied for the order \(2k+1\).

Therefore, each element of \(\mathcal {L}_{2k+2}\) can be written as a linear combination of the terms \(\lbrace G_i^2,G_1^{2p}G_2^{2q}G_3^{2r} \rbrace \) with \(p+q+r=k+1\), \(p,q,r\in \mathbb {N}\) and \(p,q,r\le k\). We then compute these terms

$$\begin{aligned} \left\{ G_1^{2},G_1^{2p}G_2^{2q}G_3^{2r} \right\}= & {} 4qG_1^{2p}G_2^{2\left( q-1\right) }G_3^{2r}W-4rG_1^{2p}G_2^{2q}G_3^{2\left( r-1\right) }W \nonumber \\ \left\{ G_2^{2},G_1^{2p}G_2^{2q}G_3^{2r} \right\}= & {} 4rG_1^{2p}G_2^{2q}G_3^{2\left( r-1\right) }W-4pG_1^{2\left( p-1\right) }G_2^{2q}G_3^{2r}W \nonumber \\ \left\{ G_3^{2},G_1^{2p}G_2^{2q}G_3^{2r} \right\}= & {} 4pG_1^{2\left( p-1\right) }G_2^{2q}G_3^{2r}W-4qG_1^{2p}G_2^{2\left( q-1\right) }G_3^{2r}W. \end{aligned}$$
(27)

We deduce that each element of \(\mathcal {L}_{2k+2}\) is a linear combination of the monomials \(G_1^{2p+1}G_2^{2q+1}G_3^{2r+1}\) with \(p+q+r=k\) and \(p,q,r\in \mathbb {N}\). If the Theorem 1 is verified for the order \(2k+1\), it is also satisfied for the order \(2k+2\).

If the proposition \(\mathcal {P}_k\) is true, \(\mathcal {P}_{k+1}\) is also verified. Therefore, the Theorem 1 is verified for all the integers k with \(k\ge 2\).

2.2 Reduction formula

For the third order, we have obtained the supplementary relation Eq. (22) between the coefficients of the third-order remainder \(H_{R_3}\). This allows us to decrease the number of independent coefficients needed to cancel \(H_{R_3}\). This reduction formula can be generalized at all order with the following theorem.

Theorem 2

Let \(\mathcal {L}\) be the graded Lie algebra generated by the alphabet \(\mathcal {A}=(G_1^2,G_2^2,G_3^2)\) with \(G_i\) the components of an angular momentum and \(\mathcal {L}_k\) the Lie algebra generated by the Lie monomials of length k such that \(\mathcal {L}=\oplus _{k\ge 1} \mathcal {L}_k\). Let \(X\in \mathcal {L}_{2k+1}\) and \(X=\sum _{\begin{array}{c} 0\le p,q,r\le k \\ p+q+r=k+1 \end{array}} \beta _{2k+1,pqr} G_1^{2p}G_2^{2q}G_3^{2r}\).

The coefficients \(\beta _{2k+1,pqr}\) verify the reduction formula

$$\begin{aligned} \sum _{\begin{array}{c} 0\le p,q,r\le k \\ p+q+r=k+1 \end{array}} \frac{\left( 2p\right) !}{2^p p!}\frac{\left( 2q\right) !}{2^q q!}\frac{\left( 2r\right) !}{2^r r!}\beta _{2k+1,pqr}=0. \end{aligned}$$
(28)

Demonstration: We seek the coefficients \(\lambda _{pqr}\ne 0\) which satisfy the relation

$$\begin{aligned} \sum _{\begin{array}{c} 0\le p,q,r\le k \\ p+q+r=k+1 \end{array}} \lambda _{pqr} \beta _{2k+1,pqr}=0. \end{aligned}$$
(29)

Along the Theorem 1, each element X of \(\mathcal {L}_{2k+1}\) can be written

$$\begin{aligned} X=\sum _{\begin{array}{c} 0\le p,q,r\le k \\ p+q+r=k+1 \end{array}} \beta _{2k+1,pqr} G_1^{2p}G_2^{2q}G_3^{2r}. \end{aligned}$$
(30)

Along the demonstration of the Theorem 1, X can also be written as

$$\begin{aligned} X=\sum ^{3}_{i=1} \sum _{\begin{array}{c} 0\le p,q,r \\ p+q+r=k-1 \end{array}} \alpha _{i,pqr} \left\{ G_i^{2},G_1^{2p+1}G_2^{2q+1}G_3^{2r+1} \right\} , \end{aligned}$$
(31)

with

$$\begin{aligned} \beta _{2k+1,pqr}= & {} \left( 4p+2\right) \left( \alpha _{3,pq-1r-1}-\alpha _{2,pq-1r-1}\right) \nonumber \\&+ \left( 4q+2\right) \left( \alpha _{1,p-1qr-1}-\alpha _{3,p-1qr-1}\right) \nonumber \\&+ \left( 4r+2\right) \left( \alpha _{2,p-1q-1r}-\alpha _{1,p-1q-1r}\right) , \end{aligned}$$
(32)

where \(\alpha _{i,pqr}=0\) if p, q, r do not verify \(0\le p,q,r\) and \(p+q+r=k-1\). From Eq. (32), we deduce

$$\begin{aligned}&\sum _{\begin{array}{c} 0\le p,q,r\le k\\ p+q+r=k+1 \end{array}} \lambda _{pqr} \beta _{2k+1,pqr}\nonumber \\&\quad = \sum _{\begin{array}{c} 0\le p,q,r\le k \\ p+q+r=k+1 \end{array}} \lambda _{pqr} \left( 4p+2\right) \left( \alpha _{3,pq-1r-1}-\alpha _{2,pq-1r-1}\right) \nonumber \\&\qquad + \sum _{\begin{array}{c} 0\le p,q,r\le k \\ p+q+r=k+1 \end{array}} \lambda _{pqr} \left( 4q+2\right) \left( \alpha _{1,p-1qr-1}-\alpha _{3,p-1qr-1}\right) \nonumber \\&\qquad + \sum _{\begin{array}{c} 0\le p,q,r\le k \\ p+q+r=k+1 \end{array}} \lambda _{pqr} \left( 4r+2\right) \left( \alpha _{2,p-1q-1r}-\alpha _{1,p-1q-1r}\right) \nonumber \\&\quad = \sum _{\begin{array}{c} 0\le p,q,r\le k-1 \\ p+q+r=k-1 \end{array}} \lambda _{pq+1r+1} \left( 4p+2\right) \left( \alpha _{3,pqr}-\alpha _{2,pqr}\right) \nonumber \\&\qquad + \sum _{\begin{array}{c} 0\le p,q,r\le k-1 \\ p+q+r=k-1 \end{array}} \lambda _{p+1qr+1} \left( 4q+2\right) \left( \alpha _{1,pqr}-\alpha _{3,pqr}\right) \nonumber \\&\qquad + \sum _{\begin{array}{c} 0\le p,q,r\le k-1 \\ p+q+r=k-1 \end{array}} \lambda _{p+1q+1r} \left( 4r+2\right) \left( \alpha _{2,pqr}-\alpha _{1,pqr}\right) \nonumber \\&\quad = \sum _{\begin{array}{c} 0\le p,q,r\le k-1 \\ p+q+r=k-1 \end{array}} \left( \lambda _{p+1qr+1} \left( 4q+2\right) -\lambda _{p+1q+1r} \left( 4r+2\right) \right) \alpha _{1,pqr} \nonumber \\&\qquad + \sum _{\begin{array}{c} 0\le p,q,r\le k-1 \\ p+q+r=k-1 \end{array}} \left( \lambda _{p+1q+1r} \left( 4r+2\right) -\lambda _{pq+1r+1} \left( 4p+2\right) \right) \alpha _{2,pqr}\nonumber \\&\qquad + \sum _{\begin{array}{c} 0\le p,q,r\le k-1 \\ p+q+r=k-1 \end{array}} \left( \lambda _{pq+1r+1} \left( 4p+2\right) -\lambda _{p+1qr+1} \left( 4q+2\right) \right) \alpha _{3,pqr}, \end{aligned}$$
(33)

because \(\alpha _{i,pqr}=0\) if p, q, r do not verify \(0\le p,q,r\) and \(p+q+r=k-1\). To verify Eq. (28), it is sufficient to have

$$\begin{aligned} \lambda _{pq+1r+1} \left( 2p+1\right) =\lambda _{p+1qr+1}\left( 2q+1\right) =\lambda _{p+1q+1r}\left( 2r+1\right) . \end{aligned}$$
(34)

To verify this relation, it is sufficient to have

$$\begin{aligned} \lambda _{pqr}=\frac{\left( 2p\right) !}{2^p p!}\frac{\left( 2q\right) !}{2^q q!}\frac{\left( 2r\right) !}{2^r r!}. \end{aligned}$$
(35)

Equation (28) allows us to find in an other way Eq. (22) obtained previously.

2.3 Number of stages of a symplectic integrator

We consider the two possible integrators \(\mathcal {S}_{ABC}\) (Eq. (10)) and \(\mathcal {S}_{RS}\) (Eq. (11)). From the Theorems 1 and 2, the expression of the modified Hamiltonian of these integrators is

$$\begin{aligned} hK= & {} h\left( \beta _{1,100}\frac{G_1^{2}}{2I_1}+\beta _{1,010}\frac{G_2^{2}}{2I_2}+\beta _{1,001}\frac{G_3^{2}}{2I_3} \right) \nonumber \\&+ \sum ^{+\infty }_{k=1}h^{2k}\sum _{\begin{array}{c} 0\le p,q,r \\ p+q+r=k-1 \end{array}}\beta _{2k,pqr}G_1^{2p+1}G_2^{2q+1}G_3^{2r+1}\nonumber \\&+ \sum ^{+\infty }_{k=1}h^{2k+1}\sum _{\begin{array}{c} 0\le p,q,r\le k \\ p+q+r=k+1 \end{array}}\beta _{2k+1,pqr}G_1^{2p}G_2^{2q}G_3^{2r}, \end{aligned}$$
(36)

where the coefficients \(\beta _{k,pqr}\) depend on the coefficients of the integrator \(a_i\), \(b_i\), \(c_i\) and of the moments of inertia \(I_1\), \(I_2\), \(I_3\).

To obtain an integrator of order n, it is sufficient to cancel all the coefficients \({\beta }_{k,pqr}\) for \(k\in \mathbb {N}\), \(2\le k \le n\) and we must also verify \({\beta }_{1,100}={\beta }_{1,010}={\beta }_{1,001}=1\). We have in total \(N\left( n\right) \) equations to verify at order n. To solve \(N\left( n\right) \) independent equations, we need \(N\left( n\right) \) independent variables \(a_i\), \(b_i\), \(c_i\) (e.g., Koseleff 1993, 1996; McLachlan 1995). The number of stages of the integrator is then given by the number of equations.

For the special case of a symmetric integrator, the remainders of even order are already canceled (e.g., Yoshida 1990) and the expression of the modified Hamiltonian is

$$\begin{aligned} hK= & {} h\left( \beta _{1,100}\frac{G_1^{2}}{2I_1}+\beta _{1,010}\frac{G_2^{2}}{2I_2}+\beta _{1,001}\frac{G_3^{2}}{2I_3} \right) \nonumber \\&+ \sum ^{+\infty }_{k=1}h^{2k+1}\sum _{\begin{array}{c} 0\le p,q,r\le k \\ p+q+r=k+1 \end{array}}\beta _{2k+1,pqr}G_1^{2p}G_2^{2q}G_3^{2r}. \end{aligned}$$
(37)

To obtain an integrator of order 2n, it is sufficient to cancel all the coefficients \({\beta }_{2k+1,pqr}\) for \(k\in \mathbb {N}\), \(1\le k \le n-1\) and to verify \({\beta }_{1,100}={\beta }_{1,010}={\beta }_{1,001}=1\). We have in total \(N\left( 2n\right) \) equations and the number of independent variables \(a_i\), \(b_i\), \(c_i\) is then \(N\left( 2n\right) \). For a symmetric integrator of 2l stages, the stages i and \(2l-i\) are identical and the number of independent variables is l. Therefore, the number of stages of the integrator is \(2N\left( 2n\right) \). However, the stages l and \(l+1\) are identical and consecutive, and the number of stages becomes then \(2N\left( 2n\right) -1\).

2.4 Application to the rigid body

We now count the number of equations to obtain the number of stages of the integrators for the Hamiltonian of the free rigid body. The number of independent equations for each order k is given by the dimension of the Lie algebra \(\mathcal {L}_k\). However in Sect. 2.1, we have only determined the dimensions of the Lie algebras \(\mathcal {L}_k\) for the first orders \(k=1,2,3,4,5\). We can then know the minimal number of stages only for these five first orders. For the higher orders, we have only express the remainders as a linear combination of monomials and we obtain in this case an upper bound for the minimal number of stages.

Table 1 Dimension of Lie algebras \(\mathcal {L}_k\), number of equations, number of stages of an integrator non symmetric (NS) and symmetric (S) in the case of a general Hamiltonian and of the one of the free rigid body with respect to the order for a decomposition in two and three parts

For the even orders, the number of monomials of the linear combination of the Theorem 1 is \(n_{2k}=k(k+1)/2\) for \(k\ge 1\). For the odd orders, the number of monomials of the linear combination of the Theorem 1 is \(n_{2k+1}=k(k+5)/2\) for \(k\ge 1\). For the first order, the number of monomials is three. To obtain the number of equations to verify to build an integrator, we sum the number of monomials until the order of the integrator. Moreover, from the Theorem 2, we have one additional relation between the coefficients of each odd order. For the splitting RS, we have the additional relation \({\beta }_{1,010}={\beta }_{1,001}\). Each relation reduces by one the number of equations to verify in order to cancel the remainder of these orders.

We obtain the number of equations to verify for an integrator of order 2n

$$\begin{aligned} N\left( 2n\right) = \frac{n\left( 2n^2+9n-11\right) }{6}+4+(-1)_{RS} \end{aligned}$$
(38)

and the number of equations for an integrator of order \(2n+1\)

$$\begin{aligned} N\left( 2n+1\right) = \frac{n\left( n^2+6n+2\right) }{3}+3+(-1)_{RS}. \end{aligned}$$
(39)

\((-1)_{RS}\) indicates that for the splitting RS the number of equations must be reduced by 1. The number of equations for a symmetric integrator of order 2n is

$$\begin{aligned} N_{\mathrm{sym}}\left( 2n\right) =\frac{n\left( n^2+6n-13\right) }{6}+4+(-1)_{RS}. \end{aligned}$$
(40)

Table 1, whose the part on the ordinary Hamiltonian split in two parts is extracted from Koseleff (1993), compares for the two splittings the dimensions of the Lie algebras \(\mathcal {L}_k\) for the Hamiltonian of the free rigid body and for an ordinary Hamiltonian and precises the number of equations and the number of stages. Equations (38) and (39) allow us to fill in Table 1 the column 7 and Eq. (40) the column 8 for the free rigid body. We note that for the five first orders, these formulas give results which correspond to the minimal number of stages given by the dimensions of the Lie algebras \(\mathcal {L}_k\). Therefore, with these formulas, we obtain the minimal number of stages for the orders 1, 2, 3, 4 and 5. The dimensions of the Lie algebras in the general case have been obtained by Koseleff (1993), McLachlan (1995) and Koseleff (1996) for a Hamiltonian split in two parts and by Munthe-Kaas and Owren (1999) for a Hamiltonian split in three parts. To fill Table 1, we also use the inventory of the splitting integrators made by Blanes et al. (2008) and Skokos et al. (2014) for Hamiltonians which can be split in, respectively, two and three parts.

For an ordinary Hamiltonian split in two parts, Koseleff (1996) demonstrated that the minimal number of stages for a symmetric fourth-order integrator is 7, where the Yoshida’s scheme is the only real solution. In the special case of the free rigid body, the number of stages is 7 (Table 1) and the splitting RS cannot benefit from the algebra of the angular momentum to construct integrators with fewer stages. For an ordinary Hamiltonian split in three parts, Koseleff (1996) demonstrated that the minimal number of stages for a symmetric fourth-order integrator is 13 and Tang (2002) proved that the Yoshida’s scheme is the only real solution. For the free rigid body, the number of stages becomes 9 (Table 1) and the splitting ABC profits by the algebra of the free rigid body to construct integrators with fewer stages.

3 Construction of symmetric integrators

In this part, we explain how to construct symplectic integrators for the rigid body which benefit from the algebra of the angular momentum. We limit ourselves to fourth-order schemes, which are the easiest to construct.

3.1 Splitting RS

For a Hamiltonian split into two parts, we have seen in Sect. 2.4 that the minimum number of stages for a fourth-order symmetric integrator of the free rigid body is 7. Two splitting schemes of 7 stages exist

$$\begin{aligned} \begin{array}{ll} RSRSRSR &{} \\ SRSRSRS &{} \\ \end{array} \end{aligned}$$
(41)

where the Hamiltonians R and S are defined, respectively, in Eqs. (8) and (9). In order to compute the coefficients of these two integrators, we scale everything by \(I_1\) and write the Hamiltonian of the free rigid body as

$$\begin{aligned} H= \frac{G_1^2}{2I_1}+ \frac{G_2^2}{2I_2} + \frac{G_3^2}{2I_3}=\frac{1}{2I_1}\left( G_{1}^{2}\left( 1-x\right) +G_{3}^{2}\left( y-x\right) +xG^{2}\right) , \end{aligned}$$
(42)

with

$$\begin{aligned} x = \frac{I_1}{I_2}, \ \qquad y = \frac{I_1}{I_3}. \end{aligned}$$
(43)

3.1.1 Computation of the coefficients

We start with the scheme RSRSRSR defined by

$$\begin{aligned} \mathcal {S}_{RSRSRSR}\left( h\right) =e^{a_{1}hL_{R}}e^{b_{1}hL_{S}}e^{a_{2}hL_{R}}e^{b_{2}hL_{S}}e^{a_{2}hL_{R}}e^{b_{1}hL_{S}}e^{a_{1}hL_{R}}. \end{aligned}$$
(44)

The first-order conditions impose

$$\begin{aligned} 2a_1+2a_2=1, \ \qquad 2b_1+b_2=1. \ \end{aligned}$$
(45)

We have only two free parameters \(a_1\) and \(b_1\), and the other coefficients are given by

$$\begin{aligned} a_2=\frac{1}{2}-a_1, \ \qquad b_2=1-2b_1. \ \end{aligned}$$
(46)

With the Baker–Campbell–Hausdorff formula, we can compute the Hamiltonian K which is effectively integrated for the integrator \(\mathcal {S}_{RSRSRSR}\left( h\right) =e^{L_K}\) with

$$\begin{aligned} hK=hH+\frac{h^3}{\left( 2I_1\right) ^3}\left( P'_1G_1^2G_2^2 + P'_2G_1^2G_3^2 + P'_3G_2^2G_3^2\right) +O\left( h^5\right) , \end{aligned}$$
(47)

and where the coefficients \(P'_i=P_i(2I_1)^3\) are given by

$$\begin{aligned} P'_1= & {} \frac{1}{3}(x-1)^2(x-y)\left( 1-6(1-2 a_1)^2 b_1\right) \nonumber \\ P'_2= & {} -\frac{1}{3}(x-1)(x-y)\left( (x-1)(1-6(1-2 a_1)^2b_1)\right. \nonumber \\&\left. +\,2(x-y)\left( 6\left( 1-2 a_1\right) \left( 1-b_1\right) b_1-1\right) \right) \nonumber \\ P'_3= & {} \frac{2}{3}(x-1)(x-y)^2 \left( 6(1-2 a_1)(1-b_1) b_1-1\right) . \end{aligned}$$
(48)

With \(P'_1+P'_2+P'_3=0\), it is sufficient to impose \(P'_1=P'_3=0\) to cancel the third-order remainder. For an asymmetric body (\(x\ne 1\), \(x\ne y\), \(y\ne 1\)), we obtain

$$\begin{aligned} b_1^3-2b_1^2 + b_1-\frac{1}{6} =0 , \ \qquad a_1 = \frac{1}{2}b_1. \ \end{aligned}$$
(49)

The only real solution is the Yoshida’s scheme with \(b_1=1/(2-2^{1/3})\) (Yoshida 1990).

With the scheme SRSRSRS defined by

$$\begin{aligned} \mathcal {S}_{SRSRSRS}\left( h\right) =e^{a_{1}hL_{S}}e^{b_{1}hL_{R}}e^{a_{2}hL_{S}}e^{b_{2}hL_{R}}e^{a_{2}hL_{S}}e^{b_{1}hL_{R}}e^{a_{1}hL_{S}}, \end{aligned}$$
(50)

we have

$$\begin{aligned} P'_1= & {} \frac{2}{3}(x-1)^2 (x-y) \left( 6(1-2 a_1)(1-b_1)b_1-1\right) \nonumber \\ P'_2= & {} -\frac{1}{3}(x-1)(x-y)\left( 2(x-1)(6 (1-2 a_1)(1-b_1)b_1-1)\right. \nonumber \\&\left. +\,(x-y)(1-6 (1-2 a_1)^2b_1)\right) \nonumber \\ P'_3= & {} \frac{1}{3}(x-1)(x-y)^2 \left( 1-6 (1-2 a_1)^2 b_1\right) . \end{aligned}$$
(51)

Like previously, there is only one real solution, which is the Yoshida’s one.

Therefore, using the algebra of the angular momentum for the splitting RS does not allow us to obtain supplementary integrators other than Yoshida’s scheme for the integrators with seven stages.

3.1.2 Notes on the splitting RS

We observe that if we switch the parts \(G_1^{2}/(2I_1)\) and \(G_3^{2}/(2I_3)\) for the scheme RSRSRSR, we obtain the same third-order remainder as the scheme SRSRSRS. This is due to the fact that \(R_G=G^{2}/(2I_2)\) commutes with \(R_1=G_1^2(1/(2I_1)-1/(2I_2))\) and \(R_3=G_3^2(1/(2I_3)-1/(2I_2))\) [This commutation has been previously noted by Fassò (2003)]. Therefore, the scheme RSRSRSR with the permutation of the parts \(G_1^{2}/(2I_1)\) and \(G_3^{2}/(2I_3)\) has a remainder identical to the one of the scheme SRSRSRS for any order.

Fassò (2003) has already noted for the leapfrog scheme that the third-order remainder of the type RS with this permutation is identical to the one of the SR. Here, we see that this can be generalized to any order and any scheme. Therefore it is not necessary to consider the schemes SR, which in the case of a kinetic energy coupled to a potential part is more expensive than the schemes RS, because the stage R is cheaper than S.

As the part \(R_G\) commutes with the parts \(R_1\) and \(R_3\), it is possible to gather all the stages of type \(e^{L_{R_G}}\) in a step of integration to decrease the computation time. An integrator with the splitting RS has then only a rotation around the angular momentum by step of integration. This reduction of the computation time for the splitting RS was not previously noticed as far as we know.

3.2 Splitting ABC: integrator N

For a Hamiltonian split into three parts, we have seen in Sect. 2.4 that the minimum number of stages for a fourth-order symmetric integrator of the free rigid body is 9. Seven splitting schemes of 9 stages and beginning with the stage A and followed by the stage B, exist. We call them integrators N and they can be sorted in alphabetical order as

$$\begin{aligned} \begin{array}{ll} \textit{ABABCBABA} &{} \textit{N}1 \\ \textit{ABACACABA} &{} \textit{N}2 \\ \textit{ABACBCABA} &{} \textit{N}3 \\ \textit{ABCABACBA} &{} \textit{N}4 \\ \textit{ABCACACBA} &{} \textit{N}5 \\ \textit{ABCBABCBA} &{} \textit{N}6 \\ \textit{ABCBCBCBA} &{} \textit{N}7. \\ \end{array} \end{aligned}$$
(52)

To obtain all the possible schemes, we consider the six permutations ABC, BCA, CAB, ACB, CBA, BAC as Fassò (2003). For example, the scheme N4 with the permutation CAB becomes CABCACBAC. Therefore, we count 42 fourth-order possible schemes.

To compute the coefficients of each integrator, we scale everything by \(I_1\) and write

$$\begin{aligned} H= \frac{G_1^2}{2I_1}+ \frac{G_2^2}{2I_2} + \frac{G_3^2}{2I_3}=\frac{1}{2I_1} \left( G_1^2+\left( 1+x\right) G_2^2+\left( 1+y\right) G_3^2\right) , \end{aligned}$$
(53)

with

$$\begin{aligned} 1+x = \frac{I_1}{I_2}, \ \qquad 1+y = \frac{I_1}{I_3}. \ \end{aligned}$$
(54)

3.2.1 Computation of the coefficients

We explain here in detail the computation of the coefficients only for the scheme N4 with the permutation ABC

$$\begin{aligned} \mathcal {S}_{N4\,ABC}\left( h\right) =e^{a_{1}hL_{A}}e^{b_{1}hL_{B}}e^{c_{1}hL_{C}}e^{a_{2}hL_{A}}e^{b_{2}hL_{B}}e^{a_{2}hL_{A}}e^{c_{1}hL_{C}}e^{b_{1}hL_{B}}e^{a_{1}hL_{A}}. \end{aligned}$$
(55)

The conditions of the first-order impose

$$\begin{aligned} 2a_1+2a_2=1, \ \qquad 2b_1+b_2=1, \ \qquad 2c_1=1. \ \end{aligned}$$
(56)

We have only two free parameters \(a_1\) and \(b_1\) and the other coefficients are given by

$$\begin{aligned} a_2=\frac{1}{2}-a_1, \ \qquad b_2=1-2b_1, \ \qquad c_1=\frac{1}{2}. \ \end{aligned}$$
(57)

With the Baker–Campbell–Hausdorff formula, we determine the Hamiltonian K effectively integrated of the scheme \(\mathcal {S}_{N4\,ABC}\left( h\right) =e^{hL_K}\) with

$$\begin{aligned} hK=hH+\frac{h^3}{\left( 2I_1\right) ^3}\left( P'_1 G_1^2G_2^2 + P'_2 G_1^2G_3^2 + P'_3 G_2^2G_3^2\right) +O\left( h^5\right) , \end{aligned}$$
(58)

where \(P'_1\), \(P'_2\) and \(P'_3\) depend on \(a_1\), \(b_1\), x and y with

$$\begin{aligned} P'_1= & {} -\frac{1}{3}+2b_1-8a_1b_1+8a_1b_1^{2}+4a_1^{2}-8a_1^{2}b_1+4yb_1^{2}-8ya_1b_1+4ya_1^{2}-x+2xb_1\nonumber \\&+\,4xa_1-16xa_1b_1+16xa_1b_1^{2}-8xa_1^{2}b_1-4xyb_1+8xyb_1^{2}+4xya_1-8xya_1b_1\nonumber \\&-\,8x^{2}a_1b_1+8x^{2}a_1b_1^{2}+\frac{2}{3}x^{2}y-4x^{2}yb_1+4x^{2}yb_1^{2},\nonumber \\ P'_2= & {} -\frac{1}{3}+2a_1-4a_1^{2}+8a_1^{2}b_1+8ya_1b_1-4ya_1^{2}+2y^{2}b_1\nonumber \\&-\,2y^{2}a_1+8xa_1^{2}b_1+8xya_1b_1-\frac{1}{3}xy^{2}+2xy^{2}b_1,\nonumber \\ P'_3= & {} \frac{2}{3}-2b_1-2a_1+8a_1b_1-8a_1b_1^{2}-4yb_1^{2}-2y^{2}b_1+2y^{2}a_1+x-2xb_1\nonumber \\&-\,4xa_1+16xa_1b_1-16xa_1b_1^{2}+4xyb_1-8xyb_1^{2}-4xya_1+\frac{1}{3}xy^{2}-2xy^{2}b_1\nonumber \\&+\,8x^{2}a_1b_1-8x^{2}a_1b_1^{2}-\frac{2}{3}x^{2}y+4x^{2}yb_1-4x^{2}yb_1^{2}. \end{aligned}$$
(59)

With \(P'_1+P'_2+P'_3=0\), we only need to cancel the coefficients \(P'_1\) and \(P'_2.\) Using Gröbner base reduction (Buchberger 1965), solving \(P'_k=0\) for \(k=1,2\) can be reduced to the two equations

$$\begin{aligned}&{\alpha }a_1^3 + {\beta }a_1^2 + {\gamma }a_1 + {\delta }=0 \nonumber \\&\quad {\alpha }' a_1 + {\beta }' b_1 + {\gamma }' = 0, \end{aligned}$$
(60)

where \({\alpha }\), \({\beta }\), \({\gamma }\), \({\delta }\), \({\alpha }'\), \({\beta }'\), \({\gamma }'\) are constant coefficients that depend on the moments of inertia with

$$\begin{aligned} {\alpha }= & {} 48\,{x}^{2}y-24\,x{y}^{2}+144\,xy-72\,{y}^{2}+72\,x+24,\nonumber \\ {\beta }= & {} 48\,{x}^{2}{y}^{2}-12\,x{y}^{3}+144\,x{y}^{2}-36\,{y}^{3}+36\,xy+72\,{y}^{2}-24\,x+60\,y,\nonumber \\ {\gamma }= & {} 12\,{x}^{2}{y}^{3}+24\,x{y}^{3}-24\,x{y}^{2}+18\,{y}^{3}-24\,xy-18\,{y}^{2}-30\,y-6,\nonumber \\ {\delta }= & {} {x}^{2}{y}^{4}-6\,x{y}^{3}-4\,x{y}^{2}-3\,{y}^{3}+3\,y+1, \nonumber \\ {\alpha }'= & {} 4\,{x}^{2}y-2\,x{y}^{2}+12\,xy-6\,{y}^{2}+6\,x+2,\nonumber \\ {\beta }'= & {} 2\,{x}^{2}{y}^{2}+8\,x{y}^{2}+6\,xy+6\,{y}^{2}+2\,x+6\,y+2,\nonumber \\ {\gamma }'= & {} -x{y}^{2}-3\,xy-2\,x-y-1. \end{aligned}$$
(61)

These two equations can count several solutions, which depend on the moments of inertia through x and y. The coefficients of these integrators are specific to a sorted triplet of moments of inertia. For each different triplet of moments of inertia, we need to compute the coefficients of the integrator. In exchange for this dependence of coefficients, we have integrators with fewer stages.

The coefficients \(P'_k\) of Eq. (59) can be used for any permutation of the moments of inertia of the integrator N4. Instead of doing a permutation of the stages A, B, C, we can switch the moments of inertia and modify the values of x and y. In the “Appendix A”, we indicate the equations to solve to obtain the coefficients of the seven integrators N.

3.2.2 Decreasing of the number of stages for specific bodies

For the integrator N4, there are values of (x,y) for whom \({\delta }=0\) and then \(a_1=0\) can be a solution. There is then a curve (\({\delta }=0\)) in the set of definition of (xy) where it is possible to obtain fourth-order integrators with 7 or even 5 stages for some discrete values of this curve where \({\gamma }'=0\) and where \(a_1=b_1=0\) is a solution. Fassò (2003) observed a similar result and found that the leapfrog scheme becomes a fourth-order integrator for the case of a flat body with moments of inertia \(\left( 0.25,0.75,1\right) \).

3.3 Estimation of the remainder

We have 42 possible integrators of type N, and for each of them, several solutions for their coefficients. To determine the best integrator, we can perform numerical integrations. Alternatively, we can also estimate faster the precision of the integrator by evaluating the analytical remainder. For an integrator of order n, the precision can be estimated by the Euclidean norm of the remainder terms of lowest degree \(n+1\).

From Theorem 1, the fifth-order remainder can be written

$$\begin{aligned} H_{R_{5}}= & {} Q_{1}G_{1}^{2}G_{2}^{4}+Q_{2}G_{2}^{2}G_{3}^{4}+Q_{3}G_{3}^{2}G_{1}^{4}+Q_{4}G_{1}^{4}G_{2}^{2}+Q_{5}G_{2}^{4}G_{3}^{2}\nonumber \\&+\,Q_{6}G_{3}^{4}G_{1}^{2}+Q_{7}G_{1}^{2}G_{2}^{2}G_{3}^{2}, \end{aligned}$$
(62)

and from Theorem 2, we verify the reduction formula for the fifth-order

$$\begin{aligned} 3\left( Q_{1}+Q_{2}+Q_{3}+Q_{4}+Q_{5}+Q_{6}\right) +Q_{7}=0. \end{aligned}$$
(63)

\(H_{R_5}\) belongs then to the set \(\mathcal {V}\) of basis (\(G_{1}^{2}G_{2}^{4}\), \(G_{2}^{2}G_{3}^{4}\), \(G_{3}^{2}G_{1}^{4}\), \(G_{1}^{4}G_{2}^{2}\), \(G_{2}^{4}G_{3}^{2}\), \(G_{3}^{4}G_{1}^{2}\), \(G_{1}^{2}G_{2}^{2}G_{3}^{2}\)). The estimation of the remainder for a fourth-order integrator by the Euclidean norm \(\left\| H_{R_{5}}\right\| \) in the set \(\mathcal {V}\) is then

$$\begin{aligned} \left\| H_{R_{5}}\right\| =\sqrt{Q_{1}^{2}+Q_{2}^{2}+Q_{3}^{2}+Q_{4}^{2}+Q_{5}^{2}+Q_{6}^{2}+Q_{7}^{2}}. \end{aligned}$$
(64)

3.4 Additional parameter

In order to lower the value of the remainder, it is possible to add to any of the previous schemes an additional stage (two stages for a symmetric integrator). This provides an additional free parameter that we can determine in order to minimize the remainder of Eq. (64).

3.4.1 Splitting RS: integrator R

The addition of a parameter in the previous fourth-order RS example gives the integrator of nine stages

$$\begin{aligned} {\textit{RSRSRSRSR}} \end{aligned}$$
(65)

which we call integrator R. The scheme \(\mathcal {S}_R(h)=e^{hL_K}\) is given by

$$\begin{aligned} e^{a_{1}hL_{R}}e^{b_{1}hL_{S}}e^{a_{2}hL_{R}}e^{b_{2}hL_{S}}e^{a_{3}hL_{R}}e^{b_{2}hL_{S}}e^{a_{2}hL_{R}}e^{b_{1}hL_{S}}e^{a_{1}hL_{R}} \end{aligned}$$
(66)

with

$$\begin{aligned} a_3=1-2\left( a_1+a_2\right) ,\ \qquad b_2=\frac{1}{2}-b_1,\ \end{aligned}$$
(67)

and

$$\begin{aligned} hK=hH+h^3H_{R_3}+h^5H_{R_5}+O\left( h^7\right) .\ \end{aligned}$$
(68)

With \(x=I_1/I_2\) and \(y=I_1/I_3\), we solve \(P_1=P_2=0\) to cancel \(H_{R_3}\) and minimize \(\left\| H_{R_5}\right\| ^2\) using Lagrange multipliers.

3.4.2 Splitting ABC: integrator P

For the splitting ABC, we have the fifteen following possible schemes

$$\begin{aligned} \begin{array}{ll} ABABACABABA &{} P1 \\ ABABCACBABA &{} P2 \\ ABABCBCBABA &{} P3 \\ ABACABACABA &{} P4 \\ ABACACACABA &{} P5 \\ ABACBABCABA &{} P6 \\ ABACBCBCABA &{} P7 \\ ABCABABACBA &{} P8 \\ ABCABCBACBA &{} P9 \\ ABCACACACBA &{} P10 \\ ABCACBCACBA &{} P11 \\ ABCBABABCBA &{} P12 \\ ABCBACABCBA &{} P13 \\ ABCBCACBCBA &{} P14 \\ ABCBCBCBCBA &{} P15 \\ \end{array} \end{aligned}$$
(69)

which we call integrators P. The first scheme \(\mathcal {S}_{P1\,ABC}\left( h\right) =e^{hL_K}\) is given by

$$\begin{aligned} e^{a_{1}hL_{A}}e^{b_{1}hL_{B}}e^{a_{2}hL_{A}}e^{b_{2}hL_{B}}e^{a_{3}hL_{A}}e^{c_{1}hL_{C}}e^{a_{3}hL_{A}}e^{b_{2}hL_{B}}e^{a_{2}hL_{A}}e^{b_{1}hL_{B}}e^{a_{1}hL_{A}} \end{aligned}$$
(70)

with

$$\begin{aligned} a_3=\frac{1}{2}-\left( a_1+a_2\right) ,\ \qquad b_2=\frac{1}{2}-b_1, \ \qquad c_1=1, \end{aligned}$$
(71)

and

$$\begin{aligned} hK=hH+h^3H_{R_3}+h^5H_{R_5}+O\left( h^7\right) . \end{aligned}$$
(72)

With \(1+x=I_1/I_2\) and \(1+y=I_1/I_3\), we solve \(P_1=P_2=0\) to cancel \(H_{R_3}\) and minimize \(\left\| H_{R_5}\right\| ^2\).

4 Numerical tests

In this part, we realize numerical tests to compare the efficiency of the obtained dedicated integrators to the one of the usual symplectic integrators.

Table 2 Coefficients of the fourth-order integrators N for the spherical top

4.1 Method

To compare the integrators, we need to evaluate their cost \(\mathcal {C}\) for the same step size h. We can then compare two integrators of the same accuracy by comparing their reduced step size defined as in Farrés et al. (2013) by \(S(h)={h}/{\mathcal {C}}\). We note \(\mathcal {C}_0\) the numerical cost of a rotation. The stages \(e^{hL_{A}}\), \(e^{hL_{B}}\), \(e^{hL_{C}}\), \(e^{hL_{R}}\) correspond to one rotation around a principal axis and have the same cost \(\mathcal {C}_0\). Therefore, a scheme ABC with N stages of type \(e^{hL_A}\), \(e^{hL_{B}}\), \(e^{hL_{C}}\) has a cost of \(N\mathcal {C}_0\). However the stage \(e^{hL_{S}}\) is composed of one rotation around one of the principal axes and one rotation around the angular momentum. The cost of \(e^{hL_{S}}\) is thus \(2\mathcal {C}_0\). With the reduction of the computation time noted in Sect. 3.1.2 for the splitting RS, we need to perform the rotation around the angular momentum only one time by integration step. Therefore, a scheme RS with N stages of type \(e^{hL_{R}}\), \(e^{hL_{S}}\) has a cost of \((N+1)\mathcal {C}_0\).

Fig. 1
figure 1

Comparison of the numerical remainders \(R_n\) for a spherical top between the integrators of Table 2, the classical leapfrog scheme (ABCBA 2) and the Yoshida’s scheme (ABCBA4 SS3 Yoshida)

Table 3 Numerical and analytical remainders for the integrators N dedicated to the spherical top normalized by those of the best integrator N5 (2)
Fig. 2
figure 2

Normalized analytical remainder \(R_a\) (Table 3) with respect to the normalized numerical remainder \(R_n\) (Table 3) for the integrators of Table 2

Table 4 Coefficients of the best fourth-order integrators N for the water molecule
Fig. 3
figure 3

Comparison of the numerical remainders \(R_n\) for the water molecule between the integrators of Table 4 and the classical leapfrog scheme (ABCBA 2, RSR 2) and the Yoshida’s scheme (ABCBA 4, RSR 4) obtained with the best permutation

Fig. 4
figure 4

Comparison of the numerical remainders \(R_n\) for the water molecule between the integrator N2 BAC (2) and the integrators obtained by Yoshida (1990), Suzuki (1990) and McLachlan (1995)

Fig. 5
figure 5

Comparison of the numerical remainders \(R_n\) for the water molecule between the integrators N2 BAC (2), P1 BAC (5), R ABC (4) and RS4 S5 McLachlan CBA

Fig. 6
figure 6

Set of the moments of inertia of the rigid bodies \({\mathcal {E}}\). The red lines correspond to the symmetric tops with two equal moments of inertia and delimit each permutation. The blue lines (\(I_1+I_2=1\), \(1+I_1=I_2\), \(1+I_2=I_1\)) correspond to the flat body and delimit the set \(\mathcal {E}\). S corresponds to the spherical top and A, B, C, D, E to the flat symmetric tops

Fig. 7
figure 7

Best integrators N (a) and associated permutations (b) for a rigid body of moments of inertia (\(I_1<I_2<1\)), where each integrator and permutation are associated with a color

Fig. 8
figure 8

Ratio of the remainder of the integrator RS4 S5 McLachlan obtained with the best permutation, \(R_M\), on the one of the best integrator N, \(R_N\), for a rigid body of moments of inertia (\(I_1<I_2< 1\)). The color scale indicates \(\log _{10}(R_M/R_N)\)

Fig. 9
figure 9

Best integrators P (a) and associated permutations (b) for a rigid body of moments of inertia (\(I_1<I_2<1\)), where each integrator and permutation are associated with a color

Fig. 10
figure 10

Ratio of the remainder of the integrator RS4 S5 McLachlan obtained with the best permutation, \(R_M\), on the one of the best integrator P, \(R_P\), for a rigid body of moments of inertia (\(I_1<I_2< 1\)). The color scale indicates \(\log _{10}(R_M/R_P)\)

In all the numerical tests, we start with a body of angular momentum \(\mathbf {G}=\left( 1,1,1\right) \) for an initial orientation of the body \((\mathbf {I},\mathbf {J},\mathbf {K})=(\left( 1,0,0\right) ,\left( 0,1,0\right) ,\left( 0,0,1\right) )\in \mathbb {R}^9\). We perform numerical integrations over a period \(T=1\) with a step size \(h_{i}={1}/{2^{i}}\) for \(i=1,\ldots ,10\).

For all the numerical tests, we estimate the precision of an integrator by the numerical remainder \(R_n\) on the orientation of the body, which is obtained by the following procedure. At every step, we compute the Euclidean norm in \(\mathbb {R}^9\) of the difference between the orientation of the body computed with the given symplectic scheme and the one given by the exact solution. To compute the exact solution of the free rigid body, we use the matrix algorithm of Celledoni et al. (2008). For small angles, this difference can be interpreted as the quadratic mean of the angular errors on the three principal axes multiplied by \(\sqrt{3}\). The numerical remainder \(R_n\) is then obtained by taking the average of this difference on the whole integration.

We compare the efficiency of the schemes developed for the rigid body to the general integrators which can be used for any Hamiltonian. Among them, McLachlan (1995) distinguished the symmetric integrators (type S) and the symmetric integrators built from symmetric integrators of lower order (type SS). We have seen in Sect. 3.1.2 that it is not necessary to consider the schemes SR provided that we consider all the possible permutations of the moments of inertia for the schemes RS.

The reference schemes used for the tests are the classical leapfrog scheme (ABCBA2, RSR2), the Yoshida’s fourth-order scheme with a composition of three leapfrog schemes (ABCBA4 SS3 Yoshida, RSR4 SS3 Yoshida) (Yoshida 1990), the Suzuki’s fourth-order scheme with a composition of five leapfrog schemes (ABCBA4 SS5 Suzuki, RSR4 SS5 Suzuki) (Suzuki 1990), the McLachlan’s fourth-order scheme with a composition of five leapfrog schemes (ABCBA4 SS5 McLachlan, RSR4 SS5 McLachlan) and the McLachlan’s fourth-order symmetric schemes of \(2n+1\) stages with \(n=4\) (ABC4 S4 McLachlan, RS4 S4 McLachlan) and \(n=5\) (ABC4 S5 McLachlan, RS4 S5 McLachlan) (McLachlan 1995).

4.2 Spherical top

The moments of inertia of a spherical top are identical (\(I_1=I_2=I_3=1\)). The rotation of a spherical top is then trivially integrable and the exact solution corresponds to a rotation around the angular momentum. However, this simple example allows us to test our algorithms and to find an efficient way to compare the different integrators. In Eq. (54), we have \(x=y=0\) and the Hamiltonian reduces to \(H= (G_1^2+G_2^2+G_3^2)/2\).

The RS schemes are trivial as R reduces to the identity, and S to the rotation around the angular momentum. We will thus only consider here the splitting ABC. For the integrators N of Eq. (52), we obtain 12 real solutions (Table 2). As all the moments of inertia are identical, it is not necessary to consider their permutations. To compare these solutions, the numerical remainder (Sect. 4.1) is compared to the reduced step \(S(h)=h/\mathcal {C}\) for all the integrators N of Table 2 on Fig. 1. We sort the solutions in ascending order of the coefficient \(a_1\). The same quantities are plotted for the classical leapfrog scheme of order 2, and the Yoshida’s integrator of order 4 (Yoshida 1990). The best integrator for the spherical top is N5 (2) which is, at equivalent reduced cost \(h/\mathcal {C}\), about 700 times more accurate than the Yoshida’s integrator.

On Table 3, the estimation of the analytical remainder of Sect. 3.3 is also provided in column 3 and they are very well correlated to the numerical remainders (Fig. 2). In the following, we can then use the analytical remainder as a fast estimate of the accuracy of the integrators.

4.3 Water molecule

After the spherical top, we will test our integrators on an asymmetric body, the water molecule, which is a standard model on which the integrators of the free rigid body are tested notably in molecular dynamics (Dullweber et al. 1997; Fassò 2003; Hairer and Vilmart 2006; Omelyan 2007). Fassò (2003) and Hairer and Vilmart (2006) used the moments of inertia (\(I_1=0.345\), \(I_2=0.653\), \(I_3=1\)). This does not correspond to a physical body for which the sum of two moments of inertia must be superior or equal to the third. We prefer use the values (\(I_{1}={10220}/{29376}\simeq 0.348\), \(I_{2}={19187}/{29376}\simeq 0.653\), \(I_{3}=1\)) (Eisenberg and Kauzmann 1969).

The water molecule has different moments of inertia and it is then necessary to consider the six possible permutations. For the water molecule, the integrators N have in total 90 real solutions for the coefficients \(a_i\), \(b_i\), \(c_i\). We can first discriminate the different solutions by comparing the analytical remainder estimated by the method of Sect. 3.3. The integrators, which present the smallest analytical remainders, are indicated in Table 4. Their analytical remainders are very close, and to determine precisely the best integrator, we need to compare them numerically.

We have represented on Fig. 3 the obtained numerical remainders for the integrators of Table 4, the classical leapfrog scheme and the Yoshida’s integrator with the two splittings for their best permutations.

As predicted by the analytical remainder on Table 4, the numerical tests allow us to deduce that the best integrators for the water molecule are N2 BAC (2) and N2 ACB (1). For the smallest step size, the best integrator is N2 BAC (2) and for the others N2 ACB (1). We consider then that the best integrator is N2 BAC (2) for the water molecule. It is, respectively, about 170 and 1.6 times more accurate than the Yoshida’s integrators ABCBA 4 and RSR 4 obtained with the more accurate permutation of moments of inertia. The best scheme for the water molecule \(\mathcal {S}_{N2\,BAC\,(2)}\left( h\right) \) is given by

$$\begin{aligned} e^{a_{1}hL_{B}}e^{b_{1}hL_{A}}e^{a_{2}hL_{B}}e^{c_{1}hL_{C}}e^{a_{3}hL_{B}}e^{c_{1}hL_{C}}e^{a_{2}hL_{B}}e^{b_{1}hL_{A}}e^{a_1hL_{B}}, \end{aligned}$$
(73)

with the coefficients

$$\begin{aligned} a_{1}= & {} 4.5504624774591050429019276281136041301731\times 10^{-2} \nonumber \\ b_{1}= & {} \frac{1}{2} \nonumber \\ a_{2}= & {} 1.5208328361334726621353294430175796767150\times 10^{-1} \nonumber \\ c_{1}= & {} \frac{1}{2} \nonumber \\ a_{3}= & {} 1-2(a_1+a_2). \end{aligned}$$
(74)

We notice that all the coefficients are positive. This is not possible in a classical fourth-order symplectic integrator (Sheng 1989; Suzuki 1991).

It is possible to obtain fourth-order schemes more accurate than the Yoshida’s one. We then compare to the fourth-order schemes of Suzuki (1990) and McLachlan (1995) and determine the best permutation for all these schemes. On Fig. 4, we compare the numerical remainders of these integrators and deduce that the best is RS4 S5 McLachlan CBA. On Fig. 4, we also compare with the integrator N2 BAC (2) and conclude that RS4 S5 McLachlan CBA is about 4.7 times more accurate than N2 BAC (2).

For the water molecule, we see that the integrators N are not more efficient than the existing integrators. Therefore, we look if adding a parameter to minimize the fifth-order remainder (Sect. 3.4) allows us to obtain better integrators. We start with the integrator R. The six permutations allow us to obtain 46 solutions. We determine numerically the best integrator, which is R ABC (4) and is 1.5 times more accurate than N2 BAC (2) (Fig. 5). We then consider the fifteen integrators P, which have in total 724 solutions for the water molecule. We determine numerically the best integrator among the ones which present the smallest analytical remainders. The best one is P1 BAC (5), which is about 8 times more accurate than N2 BAC (2) and about 1.7 times more precise than RS4 S5 McLachlan CBA (Fig. 5). The scheme \(\mathcal {S}_{P1\,BAC\,(5)}\left( h\right) \) is given by

$$\begin{aligned} e^{a_{1}hL_{B}}e^{b_{1}hL_{A}}e^{a_{2}hL_{B}}e^{b_{2}hL_{A}}e^{a_{3}hL_{B}}e^{c_{1}hL_{C}}e^{a_{3}hL_{B}}e^{b_{2}hL_{A}}e^{a_{2}hL_{B}}e^{b_{1}hL_{A}}e^{a_{1}hL_{B}}, \end{aligned}$$
(75)

with the coefficients

$$\begin{aligned} a_{1}= & {} 2.6576137190217391781483465189759344419197\times 10^{-2}\nonumber \\ b_{1}= & {} 2.8352180398306075206301328654179005782548\times 10^{-1}\nonumber \\ a_{2}= & {} 2.7103966011355754480520833151108230977015\times 10^{-1}\nonumber \\ b_{2}= & {} \frac{1}{2}-b_1\nonumber \\ a_{3}= & {} \frac{1}{2}-(a_1+a_2)\nonumber \\ c_{1}= & {} 1. \end{aligned}$$
(76)

It corresponds to a modest decreasing of the computation time of \(12\%\).

Therefore, the dedicated integrators N, P and R for the water molecule do not allow us to decrease significantly the computation time with respect to the existing reference integrators.

5 Comparison for the set of the rigid bodies

In this part, we compare for each rigid body the obtained dedicated integrators to the usual ones. However, we do not reproduce the numerical test which we have performed for the water molecule for each physical rigid body. We have seen in Sect. 4.2 that the evaluation of the analytical remainder allows us to estimate faster the best integrator for a rigid body. We use then in this part this evaluation of the remainder to compare the dedicated integrators to the usual ones.

5.1 Method

We follow here the method of Fassò (2003). We consider a rigid body of moments of inertia (\(I_1\), \(I_2\), \(I_3\)), where the moments of inertia are normalized to obtain \(I_3=1\). By definition (e.g., Fassò 2003), the sum of any two moments of inertia must be superior or equal to the third one. Therefore, \(I_1\) and \(I_2\) must verify

$$\begin{aligned} I_1+I_2\ge 1, \qquad 1+I_1\ge I_2, \qquad 1+I_2\ge I_1. \end{aligned}$$
(77)

This allows one to define a set \(\mathcal {E}\) represented on the Fig. 6. \(\mathcal {E}\) is not bounded and \(I_1\) and \(I_2\) can go to infinity. However, several points of \(\mathcal {E}\) represent the same rigid body. For instance, we consider the body (\(I_1\), \(I_2\), 1) with \(I_1<I_2<1\). This body can be represented in \(\mathcal {E}\) by the six points (\(I_1\), \(I_2\)), (\(I_2/I_1\), \(1/I_1\)), (\(1/I_2\), \(I_1/I_2\)), (\(I_1/I_2\), \(1/I_2\)), (\(1/I_1\), \(I_2/I_1\)), (\(I_2\), \(I_1\)) associated with the respective permutations of moments of inertia ABC, BCA, CAB, ACB, CBA, BAC.

An asymmetric body is then represented in the set \(\mathcal {E}\) by six points corresponding to the six permutations. As Fassò (2003), we can restrict the study to the triangle ESA of the set \(\mathcal {E}\) in Fig. 6 provided we consider the six permutations for each point of this triangle.

We sample the triangle ESA with a grid of \(N=40401\) points. We do not consider the points of this grid which correspond to symmetric tops, which have a trivial solution. For each point and for each permutation, we estimate the analytical remainder as explained in Sect. 3.3 for each dedicated integrator and for the integrator RS4 S5 McLachlan which is the best reference integrator for the water molecule. We first determine the best dedicated integrator, which has the smaller analytical remainder, and its associated permutation. Then, we compare its analytical remainder to the one of the integrator RS4 S5 McLachlan for its best permutation.

5.2 Integrator N

We determine the best dedicated integrator N and the associated permutation in Fig. 7 for the set of the rigid bodies. If we know the moments of inertia of a body, we can then determine easily its best integrator N with Fig. 7.

For each point of the triangular grid, we divide the analytical remainder of the integrator RS4 S5 McLachlan for the best permutation by the one of the best integrator N. Along Sect. 4.1, RS4 S5 McLachlan has a cost of \(12\mathcal {C}_0\) and an integrator N a cost of \(9\mathcal {C}_0\). We take into account the cost of these integrators of order 4 by multiplying the ratio by \((12/9)^4\). The values of the ratio of these two remainders on the grid are in Fig. 8. If the ratio is larger than 1, the integrators N are better than RS4 S5 McLachlan. We observe that the integrators N are better than the reference scheme RS4 S5 McLachlan only for some bodies of the triangular grid. RS4 S5 McLachlan is especially more accurate for the ones close to the symmetric tops. Therefore, the integrators N, which we have built, are in general less efficient than the existing integrators.

5.3 Integrator P

As made for the integrators N, we determine the best dedicated integrator P and the associated permutation in Fig. 9 for the set of the rigid bodies. In Fig. 9, one can notice isolated points. They correspond to values for which a singularity occurs during the automatic resolution of the system of equations. We have not analyzed more precisely these solutions.

We represent in Fig. 10 the ratio of the analytical remainder of the integrator RS4 S5 McLachlan for the best permutation by the one of the best integrator P. Along Sect. 4.1, an integrator P has a cost of \(11\mathcal {C}_0\) and we have then multiplied the ratio by \((12/11)^4\). The values of the ratio of these two remainders on the grid are in Fig. 10. We observe that the integrators P are better than the reference scheme RS4 S5 McLachlan only for very asymmetric bodies.

6 Conclusion

We used the properties of the Lie algebra of the angular momentum to build symplectic integrators dedicated to the Hamiltonian of the free rigid body. The relation \(\lbrace G_{i},G_{j}\rbrace = \epsilon _{ijk} G_{k}\) between the components of the angular momentum simplifies the expression of the remainders of a symplectic integrator of the rigid body. These remainders depend on the moments of inertia of the integrated body. By introducing a dependence of the coefficients of the integrators on the moments of inertia, we can cancel the third-order remainder to construct symmetric fourth-order integrators dedicated to the rigid bodies. For the splitting in three parts (splitting ABC), it allows us to obtain symplectic fourth-order integrators for the free rigid body with fewer stages than for the general case. On the opposite, this reduction does not occur for the integrators obtained with the splitting in two parts (splitting RS). During our analysis of the splitting RS, we have noted a commutation that allows us to decrease the computation time of the RS integrators, which has not been previously noticed as far as we know.

We performed extensive numerical tests on the water molecule which is a classical body to test integrators of rigid bodies. We first test the obtained dedicated fourth-order integrators with the minimal number of stages (integrators N). These integrators for the water molecule are not more efficient than the existing ones. We then consider the integrators which we have obtained by adding a free parameter to minimize the fifth-order remainders (integrators R and P). Deceptively, these integrators for the water molecule are only slightly more accurate than the existing reference integrators.

By sampling the set of the moments of inertia of the rigid bodies, we determine for each existing body the best fourth-order integrators N and P and the associated permutation by estimating the analytical fifth-order remainder. We then compare the best new integrator for each body to the best existing integrator for the water molecule. The integrators N have not better performances than the existing ones, while the integrators P can be better for very asymmetric bodies.

Here, we restricted ourselves to the simpler fourth-order integrators to obtain simpler schemes. It should be still possible to obtain better schemes by considering the addition of two free parameters. However, the coefficients are then more difficult to obtain and the schemes more complicate than the ones, which have been obtained here. It is also possible to construct sixth-order integrators, but the system of equations to solve to obtain the coefficients becomes more difficult to solve.