1 Introduction

With the highly increasing number of space missions there is a renewed interest in the control of End-Of-Life (EOL) disposal of satellites. In fact, the accumulation of space debris is worrisome since the end of the 1970s. So, EOL is an important issue in the design of a space mission. When performing the necessary manoeuvres at this stage, fast and precise integrations of the equations of motion are required and pure numerical methods are, sometimes, not quick nor exact enough. Something similar happens with problems of ballistic and navigation support (BNS) (Golikov 2012). In these cases, semi-analytical methods have proved to be the best option. The work we present here is completely analytical. As the integration is in closed form, we can include in the potential a big number of terms to reach the required precision. Thus, this theory can be used as a starting point to design an EOL disposal, perform numerical integrations and construct a semi-analytical theory that satisfy the time and precision requirements of the manoeuvres. Moreover, we do not perform expansions in the eccentricity and then, our method can be used to deal with highly eccentric satellites, such as INTEGRAL (Winkler 2012; Armellin et al. 2015).

In the context of the spatial elliptic restricted three-body problem we consider the lunar case, i.e. the small particle orbits one of the primaries (the host). It is a non-autonomous three-degree-of-freedom system where the time dependence is periodic. Using the Hamiltonian formalism we formulate the system as the Keplerian Hamiltonian plus a small perturbation. The perturbation is expressed as a series by using Legendre polynomials (Szebehely 1967). The resulting expression is an infinite series that converges in a certain domain related with the distance from the small particle to the host. We aim at the simplification of the system by normalising or averaging the perturbation over two of the three angle variables plus the time (Sanders et al. 2007) or (Meyer and Offin 2017). The perturbation is treated in a compact form by using classical formulae that transform powers of sines and cosines of the angles in multiples of these angles. The three normalisations are, in fact, transformations of the equations of motion, as in the process of averaging one obtains the three generating functions that allow one to construct explicitly the direct and inverse changes of variables. All the normalisations are carried out at first significant order of the perturbation, but taking all the terms in a compact form. As a final result, after truncating higher-order terms, we get a one-degree-of-freedom Hamiltonian whose angle variable is the argument of the pericentre of the infinitesimal particle. Notice that, as we are in the context of the lunar problem, there are no resonances among the frequencies.

With the resulting Hamiltonian one can pursue analytical and semi-analytical studies. The triple averaged Hamiltonian can be used to obtain information on the departure system by the analysis of the corresponding reduced phase space. As well, it can be integrated numerically. Also, once the mean anomaly has been eliminated (the short period perturbation), the resulting Hamiltonian can be integrated numerically to deal with the long period perturbations instead of eliminating them analytically.

As it is well known the expansion of perturbing potentials related to \(N\)-body problems is a classical topic in celestial mechanics. Many papers have dealt with analytical theories relying on those expansions, see for instance the article by Broucke and Smith (1971), the works of Brumberg and collaborators (Brumberg 1995) or more recently the contribution of Ito (2016) to the circular restricted three-body problem. However, the generic way in which we approach the normalisation in compact form, avoiding any simplification to begin with, is not so common. In particular the treatment of the time averaging, which is based in the paper by Palacián et al. (2006), is not spread out in the literature but turns out to be a key point in the analysis of periodic time-dependent Hamiltonians.

The compact developments can be of interest, for instance, in cases where the convergence of the expansions of the perturbation as a function of Legendre polynomials is slow, i.e., when the distance of the small particle to the host is not much smaller than the distance to the other massive body. This situation can be present in problems, such as the case of binary stellar systems with a planet having a small mass compared to the one of the stars (Astakhov and Farrelly 2004; Lara et al. 2011). Having performed the developments in block form, the formulae corresponding to the Hamiltonians and changes of variables are easy to obtain with a symbolic processor, such as Mathematica, even when taking many terms in the perturbation.

As we have mentioned before, our study is also significant for artificial satellite problems where the third body perturbation has to be taken into account. For example, in Lara et al. (2010) the motion of a spacecraft orbiting Mercury is analysed in the framework of the elliptic restricted three-body problem plus the perturbation of two zonal coefficients of Mercury’s potential. The approach of the present paper is a step forward in the sense that we can include as many terms of the third-body perturbation as we wish and all of them are considered as a block, although the gravity potential of the planet is not taken into account here. As an example of the use of the theory we elaborate, in Sects. 3.1 and 3.2 we relate the averaged Hamiltonians appearing in Lara et al. (2010) with the formulae obtained here and show how easy the results in Lara et al. (2010) can be obtained as a particular case.

The idea of developing averaging theories in compact form is not new. Old references can be traced to the XIXth century, with the pioneering work of Hansen (1855) and Tisserand (1899). In the modern times, the first contribution is probably due to Kaula in the sixties of the last millennium (Kaula 1962, 2000). Since then, many papers have been devoted to develop the disturbing function of a particle using Kaula’s functions in the eccentricity and inclinations. A recent reference in this context is by Laskar and Boué (2010). They present a very simple algorithm to deal with the Hansen coefficients and the Tisserand function well suited for high-order expansions.

Our standpoint is slightly different from that of Kaula and followers as we do not make expansions in the eccentricity, inclinations or any angle variables. Indeed we perform all the computations in closed form for the variables included in the Hamiltonian. Therefore, our approach is valid if the bodies move on perturbed ellipses. We must quote the paper by De Saedeleer (2005), who designed a theory to average up to first order the mean anomaly in the case of a small particle orbiting a certain planet, by using also a collection of formulae that are in closed form for all the variables. The perturbation was given by the zonal harmonics coming from the planet’s gravitational inhomogeneity. This work was generalized by Lara et al. (2009), who added to the planet’s gravitational perturbation the effect of an external body. For instance, this could correspond to the perturbation of the Moon or the Sun over an artificial satellite orbiting the Earth. Our approach flows in the same direction, but we perform three different averagings and the departing Hamiltonian is more involved than the ones appearing in De Saedeleer (2005) and Lara et al. (2009).

The theory developed in this manuscript may be straightforwardly adapted to deal with the different normalisations in closed form applied to (non-restricted) \(N\)-body problems either by using Delaunay elements or Deprit’s variables, that are better suited for the application of the elimination of the nodes (Deprit 1983).

Our approach can be applied in the context of KAM theory for restricted and non-restricted \(N\)-body problems (Celletti and Chierchia 2006, 2007), since the results of the compact normalisations are infinite series for both the averaged Hamiltonians and generating functions. These series can be analysed and the estimates of the truncations performed in the averaging processes could be useful in the determination of invariant tori in problems of \(N\) bodies.

We have structured the paper in four sections and an appendix. We start in Sect. 2 with the formulation of the spatial elliptic restricted three-body problem, following basically the exposition of (Szebehely 1967) up to the introduction of the perturbation in the last subsection. It is precisely there where we explain how to prepare the Hamiltonian to perform the normalisations in the subsequent sections. In the lunar case (Lara et al. 2010) the Hamiltonian written in an inertial frame can be split into two terms, the principal term accounting for the pure Keplerian motion of the infinitesimal particle around its host plus a perturbation. The perturbation is developed as a power series of the ratio between the distance of the particle with negligible mass and the host and the distance between the two primaries.

In Sect. 3 we apply three successive Lie transformations (Deprit 1969) up to the first significant order, so as to obtain a one degree of freedom Hamiltonian. First of all we normalise the system with respect to the mean anomaly corresponding to the motion of the infinitesimal particle. Then, we eliminate the time from the resulting Hamiltonian by means of an average with respect to the true anomaly of the common motion of the two massive bodies. Finally, the normalisation of the argument of the node of the small particle’s motion is carried out after passing to a rotating frame so that the Coriolis term shows up explicitly. All the three transformations are obtained in closed form with respect to the two eccentricities involved in the process, the angles and the time. As we give explicit expressions of the Hamiltonians and generating functions at each step, the computation of partial derivatives is immediate.

Section 4 includes some tests and experiments we have achieved to give an idea of the number of terms that are carried out in the averagings and their generating functions for the three transformations. We also comment on the tests made to check that the homological equations are solved correctly.

In Sect. 5 we state the main conclusions of the paper and give some indications of possible related work.

The main contribution of this paper is the reduction of the elliptic restricted lunar three body problem by three normalisations from a time-dependent three degree-of-freedom system to a one degree of freedom problem. It is the adequate use of variables and their relations what allows us to express the Hamiltonian in such a way that the normalisations are reduced to the computation of integrals that can be found in classical books. For the calculation of the different expressions—basically the definite integrals and the corresponding primitives—that appear in Sect. 3 we have included the Appendix, which is crucial to get the Hamiltonians and generating functions in a compact form. In this way we also make the paper self-contained.

2 The spatial elliptic restricted three-body problem

2.1 Relative motion

We depart from an inertial frame \(Oxyz\) where \(O\) is the centre of mass of the two primaries with masses \(m\) and \(M\). In addition to that, \(S\) is the particle of negligible mass, see Fig. 1.

Fig. 1
figure 1

The spatial elliptic restricted three body problem: the primaries are \(m\) and \(M\) whereas \(S\) is the particle with negligible mass

In this and the following paragraphs we essentially follow the presentation that appears in Szebehely (1967) and Lara et al. (2010). Let us start by defining \(\mathbf{R} = \overline{OS}\), \(\mathbf{r} = \overline{mS}\), \(\mathbf{q} = \overline{MS}\), \(\boldsymbol{\rho } = \overline{mM}\) and \(r = \left\| {\mathbf{r}}\right\| \), \(\rho = \left\| \boldsymbol{\rho } \right\| \) and \(q = \left\| {\mathbf{q}}\right\| \). As \(O\) is the centre of mass of \(m\) and \(M\), then

$$ \overline{mO} = \frac{M}{m + M} \boldsymbol{\rho }, \qquad \overline{OM} = \frac{m}{m + M} \boldsymbol{\rho }, \qquad \kappa = \frac{M}{m + M}, $$

where \(\kappa \) stands for the mass ratio of \(M\) to the total mass of the system.

The motion of \(S\) follows Newton’s second law, thus

$$\begin{aligned} \displaystyle \frac{\mathrm{d}^{2}{\mathbf{R}}}{\mathrm{d} t^{2}} = \displaystyle \nabla V(\mathbf{r}) - \frac{GM}{q^{3}}{\mathbf{q}} , \end{aligned}$$
(1)

where \(\mathbf{R} = \mathbf{r} - \kappa \boldsymbol{\rho }\), \(\mathbf{q} = \mathbf{r} - \boldsymbol{\rho }\), \(G\) is the universal gravitational constant and \(V\) is the gravitational potential of \(m\).

We replace the previous relations in (1), obtaining

$$\begin{aligned} \frac{\mathrm{d}^{2}( \mathbf{r} - \kappa \boldsymbol{\rho })}{\mathrm{d} t ^{2}} = \nabla V(\mathbf{r}) - GM \frac{\mathbf{r} - \boldsymbol{\rho }}{\| {\mathbf{r}}-\boldsymbol{\rho }\|^{3}}. \end{aligned}$$

The relative motion between \(m\) and \(M\) is that of the problem of two bodies, and is represented through

$$ \frac{\mathrm{d}^{2}\boldsymbol{\rho }}{\mathrm{d} t^{2}} = - \frac{G(m + M)}{ \rho^{3}} \boldsymbol{\rho }, \quad \text{with } \rho = \frac{a _{M} (1 - e_{M}^{2})}{1 + e_{M} \cos f_{M}}, $$

where the constant \(a_{M}\) is the semimajor axis of the Keplerian orbit of \(m\) around \(M\) and \(e_{M}\) is the corresponding eccentricity, which is also constant. In addition to that, \(f_{M}\) is the true anomaly of the relative motion of \(m\) with respect to \(M\), therefore

$$ \frac{\mathrm{d}^{2} {\mathbf{r}}}{\mathrm{d} t^{2}} = \nabla V(\mathbf{r}) - GM \biggl( \frac{\mathbf{r} - \boldsymbol{\rho }}{{ \Vert {\mathbf{r} - \boldsymbol{\rho }} \Vert }^{3}} + \frac{\boldsymbol{\rho }}{\rho ^{3}} \biggr) . $$

2.2 Hamiltonian formulation

The motion of the particle \(S\) is described by the following Hamiltonian:

$$\begin{aligned} \mathcal{H} = \frac{1}{2}(\mathbf{u}\cdot {\mathbf{u}}) - \frac{GM}{r} - \mathcal{P}(\mathbf{r}, \boldsymbol{\rho }), \end{aligned}$$
(2)

the velocity in the inertial frame, \(\mathbf{u}\), being the momentum conjugate to \(\mathbf{r}\). The perturbing function is

$$\begin{aligned} \mathcal{P} = R_{m} + R_{M}, \end{aligned}$$

where \(R_{m}\) refers to the gravitational attraction that experiences \(S\) due to the body \(m\). Specifically, \(R_{m}\) is

$$\begin{aligned} R_{m} = -\frac{G m}{r} \sum_{k\geq 2} \biggl( \frac{{\alpha }_{\oplus }}{r} \biggr) ^{k} J_{k} P_{k}( \sin \varphi ), \end{aligned}$$

where the scaling factor \({\alpha }_{\oplus }\) is the equatorial radius of the central body \(m\), \(J_{k}\) are the zonal harmonic coefficients of the potential and \(P_{k}\) are the Legendre polynomials of degree \(k\) as functions of the latitude \(\varphi \). In the expression of \(R_{m}\) it is considered that the tesseral coefficients \(C_{k j}\), \(S_{k j}\) are zero in order to simplify the formulation. This is equivalent to saying that the body \(m\) has an axial symmetry with respect to the equatorial plane, which coincides with the plane where the primaries keep on moving.

The perturbation \(R_{M}\) comes from the gravitational effect that \(M\) causes on \(S\), and it is expressed by the formula:

$$\begin{aligned} R_{M} = G M \biggl( \frac{1}{\|{\mathbf{r}} - \boldsymbol{\rho }\|} - \frac{ \mathbf{r} \cdot \boldsymbol{\rho }}{{\rho }^{3}} - \frac{1}{{\rho }} \biggr) , \end{aligned}$$

where \(1/ {\rho }\) has been introduced to eliminate the linear terms in the later expansion in Legendre polynomials. We note that this can be done because the gradient of \(-1/\rho \) with respect to \((\mathbf{x}, \mathbf{X})\) is zero.

We are interested in the case \(r \ll \rho \) (lunar case), which implies that \(S\) is revolving around \(m\), therefore

$$\begin{aligned} {\| {\mathbf{r} - \boldsymbol{\rho }}\| } = \rho \sqrt{1 - 2 \frac{r}{ \rho } \cos \psi + \biggl( \frac{r}{\rho } \biggr) ^{2}}, \end{aligned}$$

where \(\psi = \widehat{SmM}\) is the angle formed by \(\mathbf{r}\) and \(\boldsymbol{\rho }\), see Fig. 1.

By virtue of the previous paragraphs, \(R_{M}\) can be expanded in the following way:

$$\begin{aligned} R_{M} = \frac{GM}{\rho } \sum_{j\geq 2} \biggl( \frac{r}{\rho } \biggr) ^{j} P_{j}(\cos \psi ) , \end{aligned}$$
(3)

see also Lara et al. (2010).

2.3 Perturbing function

We need to express \(\boldsymbol{\rho }\) and \(\mathbf{r}\) in the inertial frame \(Oxyz\). We know that

$$\begin{aligned} &\boldsymbol{\rho } = {\rho } \left( \textstyle\begin{array}{c} \cos f_{M} \\ \sin f_{M} \\ 0 \end{array}\displaystyle \right) , \\ &\mathbf{r}=r \left( \textstyle\begin{array}{c} \cos h \cos \theta - \sin h \sin \theta \cos I \\ \sin h \cos \theta + \cos h \sin \theta \cos I \\ \sin \theta \sin I \end{array}\displaystyle \right) , \end{aligned}$$

where \(\theta = f + g\) (\(\theta \) is the argument of the latitude of the orbit of \(S\), \(f\) stands for the true anomaly of \(S\), and \(g\), \(I\) and \(h\) represent, respectively, the argument of the pericentre, the orbital inclination and the argument of the node of \(S\)). The cosine of \(\psi \) is related with \(\boldsymbol{\rho }\) and \(\mathbf{r}\) through the following expression:

$$\begin{aligned} \boldsymbol{\rho }\cdot {\mathbf{r}} = &{\rho }\, r \cos \psi , \end{aligned}$$

where

$$\begin{aligned} \cos \psi =& \cos f_{M} \cos \theta \cos h + \sin f_{M} \cos \theta \sin h \\ & {}+ C (\sin f_{M} \sin \theta \cos h - \cos f_{M} \sin \theta \sin h), \end{aligned}$$

and \(C = \cos I\) is the cosine of the inclination angle formed between the planes that contain the orbits of the primaries and the orbit of the small particle.

The Legendre polynomials \(P_{j}(\cos \psi )\) are written in terms of powers of \(\cos \psi \) using the classical formulae, see for instance (Wolfram 2017), leading to

$$\begin{aligned} R_{M} =& \frac{GM}{\rho } \sum_{j\geq 2} \biggl( \frac{r}{\rho } \biggr) ^{j} P_{j}(\cos \psi ) \\ =& \frac{GM}{\rho } \sum_{j\geq 2} \biggl( \frac{r}{\rho } \biggr) ^{j} \\ &{}\times \Biggl( \frac{1}{2^{j}} \sum _{k\geq 0}^{[j/2]} \frac{(-1)^{k} (2j-2k)!}{k! (j-k)!(j-2k)!} (\cos \psi )^{j-2k} \Biggr) , \end{aligned}$$

where \([ \phantom{h}]\) denotes the integer part of a real number. Now we express \(\cos \psi \) in terms of \(f_{M}\), \(\theta \), \(h\) and \(C\):

$$\begin{aligned} (\cos \psi )^{j-2k} =& \bigl(\cos f_{M} \cos h \cos \theta + \sin f _{M} \sin h \cos \theta \\ &{} + C (\sin f_{M}\cos h \sin \theta\\ &{} - \cos f_{M} \sin h \sin \theta ) \bigr)^{j-2k}. \end{aligned}$$

We define \(P\) and \(Q\) such that

$$\begin{aligned} \!\begin{aligned} &P = \cos f_{M} \cos h + \sin f_{M} \sin h, \\ &Q = C (\sin f_{M} \cos h - \cos f_{M} \sin h), \end{aligned} \end{aligned}$$
(4)

or, equivalently,

$$ P = \cos (f_{M} - h), \qquad Q = C \sin (f_{M} - h). $$

Since \(\theta = f + g\), we get

$$\begin{aligned} P \cos \theta + Q \sin \theta =& P \cos (f + g) + Q \sin (f + g) \\ =& (P \cos g + Q \sin g) \cos f \\ &{}+ (Q \cos g - P \sin g) \sin f \\ =& A \cos f + B \sin f, \end{aligned}$$

where

$$\begin{aligned} \!\begin{aligned} &A = P \cos g + Q \sin g, \\ &B = Q \cos g - P \sin g. \end{aligned} \end{aligned}$$
(5)

Thus, we infer that

$$\begin{aligned} (\cos \psi )^{j-2k} =& (A \cos f + B \sin f)^{j-2k} \\ =& \sum_{p\geq 0}^{j-2k} \binom{j-2k}{p} A^{p} B^{j-2k-p}\\ &{}\times (\cos f)^{p} (\sin f)^{j-2k-p}. \end{aligned}$$

Finally, \(R_{M}\) and \({\mathcal{P}}\) are given explicitly by the formula

$$\begin{aligned} {\mathcal{P}}&\equiv R_{M} \\ &= \frac{GM}{\rho } \sum_{j\geq 2}\sum _{k\geq 0}^{[j/2]} \sum_{p\geq 0} ^{j-2k} \binom{j-2k}{p} \biggl( \frac{r}{\rho } \biggr) ^{j} \\ &\quad{}\times\frac{(-1)^{k} (2j-2k)!}{2^{j} k! (j-k)! (j-2k)!} \\ &\quad{}\times A^{p} B^{j-2k-p} (\cos f)^{p} (\sin f)^{j-2k-p} . \end{aligned}$$
(6)

The Hamiltonian function is now ready to apply the three transformations of Sect. 3.

3 Normalisations at first order

The objective in this section is to average Hamiltonian (2) up to the first significant order of the involved expressions. Considering that the small parameter \(\varepsilon \) is absorbed in the corresponding Hamiltonians, we express the Hamiltonian ℋ given in (2), where \({\mathcal{P}}\) appears explicitly in (6), by

$$\begin{aligned} \mathcal{H} =& \mathcal{H}^{(0)}_{0} + \mathcal{H}^{(0)}_{1} + \frac{ \mathcal{H}^{(0)}_{2}}{2!}, \end{aligned}$$

where

$$\begin{aligned} \mathcal{H}^{(0)}_{0} =& \frac{1}{2} (\mathbf{u}\cdot {\mathbf{u}}) - \frac{GM}{r} = -\frac{\mu^{2}}{2L^{2}}, \\ \mathcal{H}^{(0)}_{1} =& T, \\ \mathcal{H}^{(0)}_{2} =& - 2 \mathcal{P}(\mathbf{r}, \boldsymbol{\rho }). \end{aligned}$$

In the above formulae, if \(a\) stands for the semimajor axis of the osculating ellipse described by the particle \(S\) and \(\mu = G M\) is the standard gravitational parameter, then the momentum \(L\) is introduced as \(L=\sqrt{\mu a}\).

Hamiltonian (2) includes the Keplerian term \(\mathcal{H}^{(0)}_{0}\), while \(T\) is the fictitious momentum associated with the time \(t\) that is introduced in order to achieve the average over the time properly, using the autonomous version of the Lie transformation method. Besides, the perturbation \(\mathcal{H}^{(0)} _{2}\) appears at second order. We use the spatial Delaunay elements \((l, g, h, L, G, H)\), where \(g\), \(h\) and \(L\) have been introduced previously and \(l\), \(G\) and \(H\) represent respectively, the mean anomaly, the modulus of the angular momentum vector and its third component, see for instance Brouwer and Clemence (1961) for the introduction of Delaunay elements. Thus, the first averaging process consists in normalising the Hamiltonian ℋ with respect to the mean anomaly, see Deprit (1982) for an explanation on how to normalise by using Delaunay variables.

3.1 Elimination of the mean anomaly

We apply a Lie transformation (see Deprit 1969 for the definition) to ℋ with the aim of building a change of coordinates that transform the original Hamiltonian ℋ into another Hamiltonian independent of \(l\) up to second order.

At first order

$$\begin{aligned} {\mathcal{H}}^{(1)}_{0} = \frac{1}{2\pi }\int_{0}^{2\pi } T\, \mathrm{d}l=T, \qquad \mathcal{W}_{1}=0. \end{aligned}$$

As the first order is trivial we proceed to second order—i.e., the first significant order—by calculating \(\mathcal{H}^{(2)}_{0}\) and \({\mathcal{W}} _{2}\). Specifically we have to calculate the following average with respect to \(l\):

$$\begin{aligned} {\mathcal{H}}^{(2)}_{0} =& \frac{1}{2 \pi } \int_{0}^{2\pi } \mathcal{H}^{(0)}_{2} \, \mathrm{d}l = -\frac{1}{2\pi } \int_{0}^{2 \pi } 2 \mathcal{P}(\mathbf{r}, \boldsymbol{\rho }) \, \mathrm{d}l \\ &= -\frac{1}{2 \pi } \int_{0}^{2\pi } 2 R_{M} \, \mathrm{d}l. \end{aligned}$$
(7)

The calculations are executed using the eccentric anomaly \(E\) corresponding to the motion of \(S\):

$$ l = E - e \sin E \quad \text{and} \quad r = a (1 - e \cos E), $$

so that

$$ {\mathrm{d}} l = (1 - e \cos E) \, \mathrm{d} E = \frac{r}{a} \, \mathrm{d} E. $$

The variable \(e\) stands for the eccentricity of the orbit described by \(S\). We also need to put \(\cos f\) and \(\sin f\) in terms of \(r\), \(\cos E\) and \(\sin E\) through the following formulae, see for instance Brouwer and Clemence (1961),

$$ \cos f = \frac{a}{r} (\cos E - e), \qquad \sin f = \frac{a \eta }{r} \sin E, $$

where we have introduced \(\eta =\sqrt{1-e^{2}}\).

Taking into account the expression of \(R_{M}\) given in (6), the relationship between \(l\) and \(E\) and the formulae for \(r\), \(\cos f\), \(\sin f\) in terms of \(E\) we end up with

$$\begin{aligned} &2 \int R_{M}\, \mathrm{d}l\\ &\quad=\frac{2GM}{\rho } \sum_{j \geq 2} \sum_{k \geq 0}^{[j/2]} \sum_{p\geq 0}^{j-2k}\sum_{d\geq 0}^{2k+1} \sum_{m \ge 0}^{p} \binom{j-2k}{p} \binom{2k+1}{d} \binom{p}{m} \\ &\qquad{} \times \frac{(-1)^{k}(2j-2k)!}{(2\rho )^{j} k! (j-k)! (j-2k)!} a ^{j-2k} (-e)^{p+d-m} \eta^{j-2k-p} \\ &\qquad{} \times A^{p} B^{j-2k-p} \int (\cos E)^{d+m} (\sin E)^{j-2k-p} \, \mathrm{d}E. \end{aligned}$$

We are interested in calculating the average and the corresponding generating function, therefore we have to compute:

$$\begin{aligned} \frac{1}{2 \pi } \int_{0}^{2\pi } (\cos E)^{d+m} (\sin E)^{j-2k-p} \, \mathrm{d}E , \end{aligned}$$
(8)

and

$$\begin{aligned} \int_{\text{pp}} (\cos E)^{d+m} (\sin E)^{j-2k-p}\, \mathrm{d}E , \end{aligned}$$
(9)

where \(\int_{\text{pp}}\) indicates the periodic part of the integral. We encounter three cases:

  1. (1)

    \(d+m\) is odd,

  2. (2)

    \(d+m\) is even and \(j-2k-p\) is odd,

  3. (3)

    \(d+m\) and \(j-2k-p\) are both even.

These cases include all the possibilities. We use the expression (55) of the Appendix to determine integrals (8) and (9), concluding that (8) is equal to zero when \(d+m\) or \(j-2k-p\) or both of them are odd. If \(d+m\) and \(j-2k-p\) are even, the value is

$$\begin{aligned} &\frac{1}{2\pi } \int_{0}^{2\pi } (\cos E)^{d+m} (\sin E)^{j-2k-p}\, \mathrm{d}E\\ &\quad= \sum_{s \ge 0}^{\frac{j-2k-p}{2}} \binom{ \frac{j-2k-p}{2}}{s}\binom{d+m+2s}{\frac{d+m}{2}+s} \frac{(-1)^{s}}{2^{d+m+2s}}. \end{aligned}$$

Now we can write the average \({\mathcal{H}}_{0}^{(2)}\) as

$$\begin{aligned} {\mathcal{H}}_{0}^{(2)} =& -\frac{1}{\pi } \int_{0}^{2\pi } R_{M} \, \mathrm{d}l \\ =& \frac{GM}{\rho } \sum_{j\geq 2} \sum_{k\geq 0}^{[j/2]} \sum_{p \geq 0}^{j-2k} \sum_{d\geq 0}^{2k+1} \sum_{m\geq 0}^{p} \binom{j-2k}{p} \binom{2k+1}{d} \\ & \quad{} \times \binom{p}{m}(-1)^{p+d-m+k+1}\frac{(2j-2k)!}{k! (j-k)! (j-2k)!} \\ & \quad{} \times \frac{A ^{p} B^{j-2k-p}}{(2\rho )^{j}} a^{j} e^{p+d-m} \eta^{j-2k-p} \\ & \quad{} \times\mathcal{F}^{*}(j,k,p,d,m), \end{aligned}$$
(10)

where

$$\begin{aligned} \mathcal{F}^{*}(j,k,p,d,m) = 0 \end{aligned}$$
(11)

if \(j-2k-p\) or \(d+m\) are odd (any of the two) whereas

$$\begin{aligned} &\mathcal{F}^{*}(j,k,p,d,m) \\ &\quad= \sum_{s \geq 0}^{\frac{j-2k-p}{2}} \binom{ \frac{j-2k-p}{2}}{s} \binom{d+m+2s}{\frac{d+m}{2}+s} \frac{(-1)^{s}}{2^{d+m+2s-1}} \end{aligned}$$
(12)

when \(j-2k-p\) and \(d+m\) are both even.

Notice that formula (16) in Lara et al. (2010) can be deduced from our averaged Hamiltonian \({\mathcal{H}}_{0}^{(2)}\) by truncating the infinite series in (10) at \(j=2\).

Once the averaged Hamiltonian with respect to \(l\) has been determined we calculate the corresponding generating function \(\mathcal{W}_{2}\). Taking into account that \(\mathcal{W}_{1} = 0\) and \({\mathcal{H}}_{0} ^{(0)} = -\mu^{2}/(2L^{2})\), the generator \(\mathcal{W}_{2}\) is obtained by solving the homological equation

$$ \mathcal{H}^{(2)}_{0} = \mathcal{H}^{(0)}_{2} + \bigl\{ \mathcal{H}^{(0)} _{0} , \mathcal{W}_{2} \bigr\} , $$
(13)

where \(\{ \, , \, \}\) stands for the usual Poisson bracket of two scalar functions in terms of the Delaunay coordinates. Specifically, (13) leads to the ordinary differential equation

$$ \mathcal{H}^{(2)}_{0} = \mathcal{H}^{(0)}_{2} - n \frac{\partial \mathcal{W}_{2}}{\partial l}, $$
(14)

where \(n=\sqrt{\mu /a^{3}}\) represents the mean motion of the particle \(S\). We solve (14) to get

$$\begin{aligned} \mathcal{W}_{2} = \frac{1}{n} \int \bigl(\mathcal{H}^{(0)}_{2}-{\mathcal{H}} ^{(2)}_{0}\bigr) \,\mathrm{d}l =-\frac{{\mathcal{H}}^{(2)}_{0}}{n}l - \frac{2}{n} \int R_{M}\,\mathrm{d}l, \end{aligned}$$

where \({\mathcal{H}}^{(2)}_{0}\) is independent of the mean anomaly \(l\). Next, we express \({\mathcal{H}}^{(2)}_{0}\) in terms of \(E\) through \(\mathrm{d}l = ( r / a) \, \mathrm{d}E\), define \(R_{M}^{*} = ( r / a ) R _{M}\), and decompose it as \(R_{M}^{*} = R_{M_{A}}^{*} + R_{M_{B}}^{*}\), where

$$ \frac{\partial R_{M_{A}}^{*}}{\partial E} = 0,\quad \mbox{i.e.} \quad \bigl\langle R_{M_{A}}^{*} \bigr\rangle _{E} = 0, $$

while

$$ R_{M_{B}}^{*} = \sum_{j\geq 1} \alpha_{j} \cos (j E) + \beta_{j} \sin (j E). $$

From the above we infer that

$$ \mathcal{W}_{2} = - \frac{{\mathcal{H}}^{(2)}_{0}}{n} l - \frac{2 R _{M_{A}}^{*}}{n} E - \frac{2}{n} \int R_{M_{B}}^{*} \, \mathrm{d}E, $$

but \(R_{M_{A}}^{*}\)—i.e. the part of \(( r / a ) R_{M}\) independent of \(E\)—is related to \({\mathcal{H}}^{(2)}_{0}\), specifically, \(R_{M_{A}}^{*} \equiv - {\mathcal{H}}^{(2)}_{0}/2\). In addition to that, taking into account the Kepler equation (\(E - l = e \sin E\)), then

$$ \frac{{\mathcal{H}}^{(2)}_{0}}{n} (E - l) = \frac{{\mathcal{H}}^{(2)} _{0}}{n} e \sin E. $$

Moreover, considering

$$ \frac{2}{n} \int R_{M_{B}}^{*} \, \mathrm{d} E = \frac{2}{n} \sum_{j \geq 1} \frac{1}{j} \bigl( \alpha_{j} {\sin (jE)} - \beta_{j} {\cos (jE)} \bigr) , $$

it follows that

$$ \mathcal{W}_{2} = \frac{{\mathcal{H}}^{(2)}_{0}}{n} e \sin E - \frac{2}{n} \sum _{j\geq 1} \frac{1}{j} \bigl( \alpha_{j} \sin (jE) - \beta_{j} \cos (jE) \bigr) . $$

Thus,

$$\begin{aligned} \mathcal{W}_{2} = \frac{{\mathcal{H}}^{(2)}_{0}}{n} e \sin E - \frac{2}{n} \int R_{M_{B}}^{*} \, \mathrm{d}E, \end{aligned}$$
(15)

which is a Fourier series in the angle \(E\). Taking into account the relationship between \(n\), \(\mu \) and \(a\) we obtain

$$\begin{aligned} &\frac{2}{n}\int R_{M}^{*} \, \mathrm{d} E \\ &\quad= \frac{GM}{n \rho }\sum_{j\geq 2}\sum_{k\geq 0}^{[j/2]}\sum_{p\geq 0} ^{j-2k}\sum_{d\geq 0}^{2k+1} \sum_{m\geq 0}^{p}\binom{j-2k}{p} \binom{2k+1}{d} \binom{p}{m} \\ &\qquad{} \times (-1)^{p+d-m+k+1} \frac{(2j-2k)!}{k! (j-k)! (j-2k)!} \frac{A ^{p} B^{j-2k-p}}{(2\rho )^{j}} \\ &\qquad{} \times a^{j} e^{p+d-m} \eta^{j-2k-p} \mathcal{G}^{*}(j,k,p,d,m;E), \end{aligned}$$

where

$$\begin{aligned} &\mathcal{G}^{*}(j,k,p,d,m;E) \\ &\quad= \textstyle\begin{cases} 2\mathcal{G}_{i_{1}}^{*}(j,k,p,d,m;E) & \mbox{if } d+m\ \mbox{is odd,} \\ 2\mathcal{G}_{i_{2}}^{*}(j,k,p,d,m;E) & \mbox{if } d+m\ \mbox{is even and} \\ & j-2k-p \ \mbox{is odd,} \\ 2\mathcal{G}_{p}^{*}(j,k,p,d,m;E) & \mbox{if } d+m\ \mbox{and} \\ & j-2k-p \ \mbox{are even.} \end{cases}\displaystyle \end{aligned}$$
(16)

In order to determine the value of \(\mathcal{G}^{*}\) according to the previous cases we use formulae (56), (60) and (66) of the Appendix, arriving at the following expressions:

$$\begin{aligned} \!\begin{aligned} &\mathcal{G}_{i_{1}}^{*}(j,k,p,d,m;E)\\ &\quad= \sum_{s\geq 0}^{\frac{d+m-1}{2}} \binom{ \frac{d+m-1}{2}}{s} (-1)^{s}\frac{( \sin E)^{2s+j-2k-p+1}}{2s+j-2k-p+1}, \\ & \mathcal{G}_{i_{2}}^{*}(j,k,p,d,m;E) \\ &\quad = \sum_{s \geq 0}^{\frac{j-2k-p-1}{2}} \binom{\frac{j-2k-p-1}{2}}{s} (-1)^{s+1}\frac{( \cos E)^{2s+d+m+1}}{2s+d+m+1}, \\ &\mathcal{G}_{p}^{*}(j,k,p,d,m;E)\\ &\quad= \sum_{s \geq 0}^{\frac{j-2k-p}{2}} \sum_{u\geq 0}^{\frac{d+m}{2}+s-1} \binom{\frac{j-2k-p}{2}}{s}\binom{d+m+2s}{u} \\ &\qquad{}\times\frac{(-1)^{s}}{2^{d+m+2s}}\frac{\sin ((d+m+2s-2u)E)}{\frac{d+m}{2}+s-u}. \end{aligned} \end{aligned}$$
(17)

After replacing the expressions of \((\sin E)^{2s+j-2k-p+1}\) and \((\cos E)^{2s+d-m+1}\), the functions \(\mathcal{G}_{i_{1}}^{*}\) and \(\mathcal{G}_{i_{2}}^{*}\) can be rewritten as combinations of sines and cosines of multiples of \(E\). For that we use the expressions (57) and (58). We begin with \(\mathcal{G}_{i_{1}} ^{*}\), taking into account that \(2s+j-2k-p+1\) can be even or odd. Then,

$$ \mathcal{G}_{i_{1}}^{*}(j,k,p,d,m;E) = \sum_{s\geq 0}^{\frac{d+m-1}{2}} \binom{\frac{d+m-1}{2}}{s} \frac{(-1)^{s}}{z} {\mathcal{V}}^{*}, $$
(18)

where \(z=2s+j-2k-p+1\) and

$$ \displaystyle {\mathcal{V}}^{*} = \textstyle\begin{cases} \frac{2}{2^{z}} \sum_{u\ge 0}^{\frac{z - 1}{2}} \binom{z}{u} (-1)^{ ( \frac{z - 1}{2} - u) } \sin ((z - 2u) E) \\ \quad\mbox{if } z \ \mbox{is odd,} \\ \frac{2}{2^{z}} \sum_{u\ge 0}^{\frac{z}{2} - 1} \binom{z}{u} (-1)^{ ( \frac{z}{2} - u) } \cos ((z - 2u) E) \\ \quad \mbox{if } z \ \mbox{is even.} \end{cases} $$
(19)

Continuing with \(\mathcal{G}_{i_{2}}^{*}\), we know that \(2s+d+m+1\) is odd because \(d+m\) is always even in case (2), so

$$\begin{aligned} & \mathcal{G}_{i_{2}}^{*}(j,k,p,d,m;E) \\ &\quad= \sum_{s\geq 0}^{\frac{j-2k-p-1}{2}} \binom{\frac{j-2k-p-1}{2}}{s} \frac{(-1)^{s+1}}{z} {\mathcal{V}}^{*}, \end{aligned}$$
(20)

where this time \(z = 2s+d+m+1\) and

$$ {\mathcal{V}}^{*} = \frac{2}{2^{z}} \sum _{u\ge 0}^{\frac{z - 1}{2}} \binom{z}{u} \cos \bigl((z - 2u) E \bigr). $$
(21)

The function \(\mathcal{G}_{p}^{*}\) needs not to be changed because it is already expressed in terms of sines and cosines of multiples of \(E\).

Finally, the generating function (15) is the periodic function given as

$$\begin{aligned} \mathcal{W}_{2} =& \frac{GM}{n \rho } \sum _{j\geq 2} \sum_{k\geq 0}^{[j/2]} \sum _{p \geq 0}^{j-2k}\sum_{d\geq 0}^{2k+1} \sum_{m\geq 0}^{p} \binom{j-2k}{p} \binom{2k+1}{d} \binom{p}{m} \\ &{} \times (-1)^{p+d-m+k+1} a^{j} e^{p+d-m}\eta^{j-2k-p} \\ &{} \times \frac{(2j-2k)!}{k! (j-k)! (j-2k)!} \frac{A^{p} B^{j-2k-p}}{(2\rho )^{j}} \\ &{} \times \bigl(e \mathcal{F}^{*}(j,k,p,d,m) \sin E + \mathcal{G}^{*}(j,k,p,d,m;E) \bigr), \end{aligned}$$
(22)

where \(\mathcal{F}^{*}\) is defined through (11) and (12), while \(\mathcal{G}^{*}\) appears in (16), with \(\mathcal{G} _{i_{1}}^{*}\) written in (18) and (19), \(\mathcal{G}_{i_{2}}^{*}\) in (20) and (21) and \(\mathcal{G}_{p}^{*}\) in (17).

3.2 Time removal

In this subsection we perform the elimination of the time having in mind that the dependence of \({\mathcal{K}}^{(1)}_{0}\) (or also the dependence of \(\mathcal{P}\)) on \(t\) occurs through \(\rho \) and \(f_{M}\). We calculate the new Hamiltonian \({\mathcal{K}}_{0}^{(1)}\), as well as its associated generating function \({\mathcal{S}}_{1}\). Thus, the transformation is completed up to first order. The procedure is analogous to the one followed in Palacián et al. (2006) and Lara et al. (2010).

After truncating higher-order terms the term \({\mathcal{H}}_{0}^{(0)}\) is a constant of motion of the averaged Hamiltonian, so we can remove it from the Hamiltonian and rescale the system, getting

$$ {\mathcal{K}} = {\mathcal{K}}_{0}^{(0)} + {\mathcal{K}}_{1}^{(0)} \equiv {\mathcal{H}}_{0}^{(1)} + \frac{{\mathcal{H}}_{0}^{(2)}}{2!}, $$

so that \({\mathcal{K}}_{0}^{(0)} \equiv {\mathcal{H}}_{0}^{(1)} \equiv T\) and \({\mathcal{K}}_{1}^{(0)} \equiv {\mathcal{H}}_{0}^{(2)}/2\). The goal is to obtain a new Hamiltonian that is independent of the time up to order one. For that, we perform the following averaging:

$$\begin{aligned} \mathcal{K}^{(1)}_{0} = \frac{1}{P_{t}} \int_{0}^{P_{t}}\mathcal{K} ^{(0)}_{1}\,\mathrm{d}t, \end{aligned}$$
(23)

\(P_{t}\) being the period of the functions appearing in \(\mathcal{K} ^{(0)}_{1}\) with respect to \(t\). According to (10) at this point it is necessary to obtain explicitly the integral

$$\begin{aligned} \frac{1}{P_{t}} \int_{0}^{P_{t}} \frac{A^{p} B^{j-2k-p}}{\rho^{j+1}} \, \mathrm{d}t . \end{aligned}$$
(24)

In this case we work with the true anomaly \(f_{M}\) in order to get the formulae in closed form in terms of \(e_{M}\) and \(f_{M}\). We start by putting \(\rho \) as a function of \(f_{M}\) through

$$ \rho = \frac{a_{M} ( 1 - e_{M}^{2} ) }{1 + e_{M} \cos f_{M}}. $$

In order to change from the variable \(t\) to \(f_{M}\) we need to calculate the partial derivative \(\mathrm{d} f_{M}/{\mathrm{d}} t\). We proceed as follows:

$$\begin{aligned} \frac{\mathrm{d} f_{M}}{\mathrm{d} t} = \frac{\partial f_{M}}{\partial l _{M}} \frac{\mathrm{d} l_{M}}{\mathrm{d} t}, \end{aligned}$$

where \(l_{M}\) corresponds to the mean anomaly of the relative motion of the primaries. The derivatives \({\partial f_{M}}/{\partial l_{M}}\) and \(\mathrm{d} l_{M}/{\mathrm{d}} t\) are, respectively,

$$ \frac{\partial f_{M}}{\partial l_{M}} = \frac{a_{M} \eta_{M}^{2}}{\rho ^{2}}, \qquad \frac{\mathrm{d} l_{M}}{\mathrm{d} t} = n_{M}, $$

where \(\eta_{M}=\sqrt{1-e^{2}_{M}}\) and \(n_{M}\) indicates the mean motion of the relative motion of the primaries. As the period of the perturbation with respect to \(f_{M}\) and \(l_{M}\) is \(2\pi \) then, the period \(P_{t}\) in (23) with respect to \(t\) is \(2\pi /n_{M}\). Hence, the integral (24) leads to

$$\begin{aligned} &\frac{1}{P_{t}} \int_{0}^{P_{t}} \frac{A^{p} B^{j-2k-p}}{\rho^{j+1}} \,\mathrm{d} t \\ &\quad= \frac{1}{2\pi a_{M}^{2} \eta_{M}} \int_{0}^{2\pi }\frac{A ^{p} B^{j-2k-p}}{\rho^{j-1}}\,\mathrm{d} f_{M}. \end{aligned}$$

We need to express \(A\) and \(B\) as functions of \(f_{M}\):

$$\begin{aligned} & A = \overline{P} \cos f_{M} + \overline{Q} \sin f_{M}, \\ & B = \overline{\overline{P}}\cos f_{M} + \overline{\overline{Q}} \sin f_{M}, \end{aligned}$$

where \(\overline{P}\), \(\overline{Q}\), \(\overline{\overline{P}}\) and \(\overline{\overline{Q}}\) are given by

$$\begin{aligned} &\overline{P} = \cos h \cos g - C \sin h \sin g, \\ &\overline{Q} = \sin h \cos g + C \cos h \sin g, \\ &\overline{\overline{P}} = -\cos h \sin g - C \cos g \sin h, \\ &\overline{\overline{Q}} = C \cos h \cos g - \sin h \sin g. \end{aligned}$$

We have that

$$\begin{aligned} &A^{p} B^{j-2k-p}\\ &\quad=\sum_{u \geq 0}^{p} \sum_{s\geq 0}^{j-2k-p} \binom{p}{u} \binom{j-2k-p}{s} \\ &\qquad{} \times (\overline{P})^{u} (\overline{Q})^{p-u} (\overline{\overline{P}})^{s} (\overline{\overline{Q}})^{j-2k-p-s} \\ &\qquad{} \times (\cos f_{M})^{u+s} (\sin f_{M})^{j-2k-u-s}, \end{aligned}$$

and

$$\begin{aligned} \frac{1}{\rho^{j-1}} = &\frac{ ( 1 + e_{M} \cos f_{M} ) ^{j-1}}{a _{M}^{j-1} \eta_{M}^{2j-2}}\\ =&\frac{1}{a_{M}^{j-1} \eta_{M}^{2j-2}} \sum _{v \geq 0}^{j-1} \binom{j-1}{v} e_{M}^{v} (\cos f_{M})^{v}. \end{aligned}$$

Therefore,

$$\begin{aligned} &\int_{0}^{2\pi }\frac{A^{p}B^{j-2k-p}}{\rho^{j-1}}\,\mathrm{d}f_{M}\\ &\quad=\frac{1}{a _{M}^{j-1}\eta_{M}^{2j-2}}\sum_{u \geq 0}^{p} \sum_{s\geq 0}^{j-2k-p} \sum_{v\geq 0}^{j-1}\binom{p}{u}\binom{j-2k-p}{s} \\ &\qquad{} \times \binom{j-1}{v}e_{M}^{v}(\overline{P})^{u}(\overline{Q})^{p-u}(\overline{ \overline{P}})^{s} (\overline{\overline{Q}})^{j-2k-p-s} \\ &\qquad{} \times \int_{0}^{2\pi }(\cos f_{M})^{u+v+s} (\sin f_{M})^{j-2k-u-s} \, \mathrm{d}f_{M}. \end{aligned}$$

We are interested in calculating

$$\begin{aligned} \frac{1}{2 \pi } \int_{0}^{2\pi }(\cos f_{M})^{u+v+s} (\sin f_{M})^{j-2k-u-s} \, \mathrm{d}f_{M}, \end{aligned}$$
(25)

together with

$$\begin{aligned} \int_{\text{pp}}(\cos f_{M})^{u+v+s} (\sin f_{M})^{j-2k-u-s}\,\mathrm{d}f _{M}. \end{aligned}$$
(26)

According to the exponents of \(\cos f_{M}\) and \(\sin f_{M}\), we consider three cases:

  1. (1)

    \(u+v+s\) is odd,

  2. (2)

    \(u+v+s\) is even and \(j-2k-u-s\) is odd,

  3. (3)

    \(u+v+s\) and \(j-2k-u-s\) are both even.

It is evident that the three cases include all the possible situations. According to expressions (55) and (59) of the Appendix, in cases (1) and (2), the integral (25) is equal to zero. We introduce a function \(\mathcal{F}^{**}\) such that, on the one hand:

$$ \mathcal{F}^{**}(j,k,u,s,v) = 0 $$
(27)

if \(u+v+s\) is odd and \(j-2k-u-s\) is even or odd, or if \(u+v+s\) if even, and \(j-2k-u-s\) is odd. On the other hand, according to formula (65) of the Appendix, if \(u+v+s\) and \(j-2k-u-s\) are both even, the integral (25) is equal to

$$\begin{aligned} &\mathcal{F}^{**}(j,k,u,s,v) \\ &\quad= \sum_{w\geq 0}^{\frac{j-2k-u-s}{2}}\binom{ \frac{j-2k-u-s}{2}}{w}\binom{u+v+s+2w}{\frac{u+v+s}{2}+w} \frac{(-1)^{w}}{2^{u+v+s+2w}}. \end{aligned}$$
(28)

Thereby, putting all the pieces together we can write explicitly the resulting averaged Hamiltonian:

$$\begin{aligned} {\mathcal{K}}^{(1)}_{0} =& {GM}\sum_{j\geq 2} \sum_{k\geq 0}^{[j/2]}\sum_{p\geq 0}^{j-2k} \sum_{d\geq 0}^{2k+1} \sum_{m\geq 0}^{p}\sum_{u\geq 0}^{p} \sum_{s \geq 0}^{j-2k-p} \sum_{v\geq 0}^{j-1}\binom{j-2k}{p} \\ &{} \times \binom{2k+1}{d} \binom{p}{m} \binom{p}{u} \binom{j-2k-p}{s}\binom{j-1}{v} \\ &{}\times(-1)^{p+d-m+k+1} \frac{(2j-2k)!}{2^{j} k! (j-k)! (j-2k)!} \\ &{} \times \frac{a^{j} e^{p+d-m} \eta^{j-2k-p} e_{M}^{v}}{a^{j+1}_{M} \eta_{M}^{2j-1}} \\ &{}\times(\overline{P})^{u}(\overline{Q})^{p-u}(\overline{ \overline{P}})^{s}(\overline{\overline{Q}})^{j-2k-p-s} \\ &{}\times\mathcal{F^{*}}(j,k,p,d,m) \mathcal{F^{**}}(j,k,u,s,v), \end{aligned}$$
(29)

with \(\mathcal{F^{**}}\) defined by means of (27) and (28) and \(\mathcal{F^{*}}\) through (11) and (12).

Note that formula (24) in Lara et al. (2010) can be obtained from (29) truncating the infinite series at \(j=2\).

In the remaining section we concentrate on the calculation of the generating function \(\mathcal{S} _{1}\) associated with this transformation. The corresponding homological equation is

$$ \mathcal{K}^{(1)}_{0} = \mathcal{K}^{(0)}_{1} + \bigl\{ \mathcal{K}^{(0)} _{0}, \mathcal{S}_{1}\bigr\} , $$
(30)

from where we make

$$\begin{aligned} \mathcal{S}_{1} =& \int \bigl(\mathcal{K}^{(0)}_{1} - { \mathcal{K}}^{(1)} _{0}\bigr)\, \mathrm{d}t. \end{aligned}$$
(31)

Defining the angle \(\phi_{M} = f_{M} - l_{M}\), that is, the equation of the centre corresponding to the primary’s motion, which is a periodic function, and taking into consideration that \(l_{M} = n_{M} t\) or, in other words, setting \(T_{p}=0\), we get

$$\begin{aligned} \mathcal{S}_{1} = \frac{{\mathcal{K}}^{(1)}_{0}}{n_{M}} \phi_{M} + \frac{1}{2 \pi a_{M}^{2} \eta_{M}}\int_{0}^{2\pi } \rho^{2} \mathcal{K}^{(0)} _{1}\,\mathrm{d}f_{M}. \end{aligned}$$
(32)

Then, in order to express the corresponding indefinite integral in (32), in the Appendix we divide the formulae of the type \(\int_{\text{pp}}\) by \(n_{M}\). The explicit form of the generating function is

$$\begin{aligned} \mathcal{S}_{1} =& \displaystyle \frac{{\mathcal{K}}^{(1)}_{0}}{n_{M}} \phi_{M} + \frac{GM}{n_{M}} \\ &{}\times \sum_{j\geq 2}\sum_{k\geq 0}^{[j/2]} \sum_{p \geq 0}^{j-2k} \sum_{d\geq 0}^{2k+1} \sum_{m\geq 0}^{p}\sum_{u\geq 0} ^{p} \sum_{s\geq 0}^{j-2k-p} \sum_{v\geq 0}^{j-1} \binom{j-2k}{p} \\ &{} \times \binom{2k+1}{d}\binom{p}{m} \binom{p}{u} \binom{j-2k-p}{s} \binom{j-1}{v} \\ &{} \times (-1)^{p+d-m+k+1}\frac{(2j-2k)!}{2^{j} k! (j-k)! (j-2k)!} \\ &{} \times \frac{a^{j} e^{p+d-m} \eta^{j-2k-p} e_{M}^{v}}{a_{M}^{j+1} \eta_{M}^{2j-1}} \\ &{} \times (\overline{P})^{u} (\overline{Q})^{p-u} (\overline{ \overline{P}})^{s} (\overline{\overline{Q}})^{j-2k-p-s} \\ &{} \times \mathcal{F^{*}}(j,k,p,d,m) \mathcal{G}^{**}(j,k,u,s,v;f_{M}), \end{aligned}$$
(33)

where \(\mathcal{G}^{**}(j,k,u,s,v;f_{M})\) is defined in the following form:

$$\begin{aligned} &\mathcal{G}^{**}(j,k,u,s,v;f_{M}) \\ &\quad = \textstyle\begin{cases} \mathcal{G}_{i_{1}}^{**}(j,k,u,s,v;f_{M}) & \mbox{if }u+v+s\mbox{ is odd,} \\ \mathcal{G}_{i_{2}}^{**}(j,k,u,s,v;f_{M}) & \mbox{if }u+v+s\mbox{ is even and } \\ & j-2k-u-s \mbox{ is odd,} \\ \mathcal{G}_{p}^{**}(j,k,u,s,v;f_{M}) & \mbox{if }u+v+s\mbox{ is even and } \\ & j-2k-u-s \mbox{ is even,} \end{cases}\displaystyle \end{aligned}$$
(34)

where

$$\begin{aligned} \!\begin{aligned} &\mathcal{G}^{**}_{i_{1}}(j,k,u,s,v;f_{M})\\ &\quad= \sum_{o\geq 0}^{\frac{u+v+s-1}{2}}\binom{\frac{u+v+s-1}{2}}{o}(-1)^{o}\frac{( \sin f_{M})^{2o+j-2k-u-s+1}}{2o+j-2k-u-s+1}, \\ &\mathcal{G}^{**}_{i_{2}}(j,k,u,s,v;f_{M})\\ &\quad= \sum_{o\geq 0}^{\frac{j-2k-u-s-1}{2}}\binom{\frac{j-2k-u-s-1}{2}}{o} \\ &\qquad\times(-1)^{o+1}\frac{( \cos f_{M})^{2o+u+v+s+1}}{2o+u+v+s+1}, \\ &\mathcal{G}^{**}_{p}(j,k,u,s,v;f_{M})\\ &\quad= \sum_{o\geq 0}^{\frac{j-2k-u-s}{2}} \sum_{q \geq 0}^{\frac{u+v+s}{2}+o-1} \binom{\frac{j-2k-u-s}{2}}{o} \binom{u+v+s+2o}{q} \\ &\qquad\times \frac{(-1)^{s}}{2^{u+v+s+2o}} \frac{\sin ((u+v+s+2o-2q) f_{M})}{\frac{u+v+s}{2}+o-q}. \end{aligned} \end{aligned}$$
(35)

We should still express the powers of \(\cos f_{M}\) and \(\sin f_{M}\) as sines and cosines of multiples of \(f_{M}\) by using equations (56), (60) and (66) of the Appendix in the following way. The function \(\mathcal{G}_{i_{1}}^{**}\) takes the form

$$ \mathcal{G}^{**}_{i_{1}}(j,k,u,s,v;f_{M}) = \sum_{o \geq 0}^{ \frac{u+v+s-1}{2}} \binom{\frac{u+v+s-1}{2}}{o} \frac{(-1)^{o}}{z} {\mathcal{V}}^{**}, $$
(36)

where \(z=2o+j-2k-u-s+1\) and \({\mathcal{V}}^{**}\) is

$$ {\mathcal{V}}^{**} = \textstyle\begin{cases} \frac{2}{2^{z}} \sum_{q\ge 0}^{\frac{z-1}{2}} \binom{z}{q} (-1)^{ ( \frac{z-1}{2}-q) } \sin ((z-2q) f_{M}) \\ \quad \mbox{if } z \ \mbox{is odd,} \\ \frac{2}{2^{z}} \sum_{q\ge 0}^{\frac{z}{2}-1} \binom{z}{q} (-1)^{ ( \frac{z}{2}-q) } \cos ((z-2q) f_{M}) \\ \quad \mbox{if } z \ \mbox{is even.} \end{cases} $$
(37)

For \(\mathcal{G}_{i_{2}}^{**}\) we take into account that \(u+v+s\) is even. Then, \(2o+u+v+s+1\) is odd. Therefore,

$$\begin{aligned} &\mathcal{G}^{**}_{i_{2}}(j,k,u,s,v;f_{M}) \\ &\quad = \sum_{o \geq 0}^{ \frac{j-2k-u-s-1}{2}} \binom{\frac{j-2k-u-s-1}{2}}{o} \frac{(-1)^{o+1} }{z}{\mathcal{V}}^{**}, \end{aligned}$$
(38)

where \(z=2o+u+v+s+1\) and \({\mathcal{V}}^{**}\) is

$$ \displaystyle {\mathcal{V}}^{**} = \frac{2}{2^{z}} \sum _{q\ge 0}^{\frac{z-1}{2}} \binom{z}{q} \cos \bigl((z-2q) f_{M}\bigr). $$
(39)

The function \(\mathcal{G}_{p}^{*}\) needs not to be changed because it is expressed in terms of sines and cosines of multiples of \(f_{M}\).

Remark that the expression (26) in Lara et al. (2010) is obtained from (33) after truncating the series expansion at \(j=2\).

As a conclusion, the generating function \({\mathcal{S}}_{1}\) is a periodic function defined through (33), where \(\mathcal{G}^{**}\) is taken from (34), while \(\mathcal{G}_{i_{1}}^{**}\) appears in (36) and (37), \(\mathcal{G}_{i_{2}}^{**}\) is given in (38) and (39) and \(\mathcal{G}^{**}_{p}\) appears in (35). Additionally, \({\mathcal{K}}^{(1)}_{0}\) is given through (29), (27), (28), (11) and (12), whereas \(\mathcal{F^{*}}\) is obtained through (11) and (12).

3.3 Elimination of the node

In this subsection we average Hamiltonian \({\mathcal{K}}^{(1)}_{0}\) with respect to the node. Previous to the averaging process we change to a rotating frame with the aim of making explicit the appearance of the action \(H\) in the Hamiltonian, so that the resulting generating function be periodic in the argument of the node, \(h\). This change is customary, see for example Goldstein et al. (2002), and is performed by means of the following time-dependent generating function:

$$\begin{aligned} {\mathcal{J}} =& X \bigl( x' \cos (n_{M} t) + y' \sin (n_{M} t) \bigr) \\ &{}+ Y \bigl( -x' \sin (n_{M} t) + y' \cos (n_{M} t) \bigr) + Z z'. \end{aligned}$$

We apply to \((\mathbf{x}, \mathbf{X}) = (x, y, z, X, Y, Z)\) a transformation \({\mathcal{R}}: (\mathbf{x}, \mathbf{X}) \rightarrow (\mathbf{y}, \mathbf{Y})= (x', y', z',X', Y', Z')\) that is built through \({\mathcal{J}}\). The change ℛ is symplectic and, applied to \({\mathcal{K}}(\mathbf{x}, \mathbf{X})\), yields

$$ \tilde{{\mathcal{K}}}(\mathbf{y}, \mathbf{Y}) = {\mathcal{K}}(\mathbf{y}, \mathbf{Y}) - n_{M} (x' Y' - y' X'). $$

Thence, the resulting Hamiltonian \(\tilde{{\mathcal{K}}}(\mathbf{y}, \mathbf{Y})\) is the same as the previous one plus the Coriolis term \(-n_{M} (x' Y' - y' X')\). This latter term expressed in Delaunay coordinates is \(-n_{M} H'\), that is precisely the term needed to carry out the elimination of the node. From now on, for the sake of clarity, we drop the primes in both the Cartesian and Delaunay coordinates but we assume that in order to recover the expressions of the Hamiltonians and generating function in the inertial frame we need to apply the inverse change of ℛ.

At this point we write down the transformed Hamiltonian in the rotating frame. The term \(-n_{M} H\) is placed at order zero, since in the lunar case of the elliptic problem, \(-n_{M} H\) is the principal term compared with the rest of terms of the Hamiltonian that are placed in the perturbation, see also Meyer and Offin (2017) or Palacián et al. (2006). We end up with

$$ {\mathcal{L}}_{0}^{(0)} = -n_{M} H, \qquad {\mathcal{L}}_{0}^{(1)} = {\mathcal{K}}_{0}^{(1)}. $$

Though ℒ is given in terms of the new variables \((\mathbf{y}, \mathbf{Y})\), we use its expression in Delaunay elements. Thus, for us \({\mathcal{L}}_{0}^{(1)}\) comes defined in (29) although it is referred to the rotating frame.

The normalisation of the argument of the node is a Lie transformation that consists in finding a new Hamiltonian, \({\mathcal{L}} _{1}^{(0)}\), that is independent of \(h\) and a generating function, \({\mathcal{Z}} _{1}\), that will allow us to construct explicitly the transformation of the variables. In order to average \({\mathcal{L}}_{1}^{(0)}\) with respect to \(h\) we need to obtain the following integral:

$$\begin{aligned} \int (\overline{P})^{u} (\overline{Q})^{p-u} (\overline{\overline{P}})^{s} (\overline{\overline{Q}})^{j-2k-p-s} \, \mathrm{d}h. \end{aligned}$$
(40)

We start by replacing \(\overline{P}\), \(\overline{Q}\), \(\overline{ \overline{P}}\) and \(\overline{\overline{Q}}\) depending on the angles \(g\) and \(h\) and on the cosine of the orbital inclination \(C\). Then, (40) has the following form:

$$\begin{aligned} & \int (\overline{P})^{u} (\overline{Q})^{p-u} ( \overline{ \overline{P}})^{s} (\overline{\overline{Q}})^{j-2k-p-s}\, \mathrm{d}h \\ &\quad = \int \bigl((\cos h \cos {g} - C \sin h \sin g)^{u} \\ &\qquad{}\times (\sin h \cos g + C \cos h \sin g)^{p-u} \\ &\qquad{}\times (-\cos h \sin g - C\cos g \sin h)^{s} \\ &\qquad{}\times (C \cos h \cos g - \sin h \sin g)^{j-2k-p-s} \bigr) \,\mathrm{d}h \\ &\quad=\sum_{o\geq 0}^{u}\sum _{q\geq 0}^{p-u}\sum_{w \geq 0}^{s} \sum_{z\geq 0}^{j-2k-p-s}\binom{u}{o} \binom{p-u}{q} \binom{s}{w} \\ &\qquad{}\times \binom{j-2k-p-s}{z}C^{p-o-q+s-w+z} \\ &\qquad{}\times (-1)^{j-2k-p-o+u-z} (\cos {g})^{o+q+s-w+z} \\ &\qquad{}\times ( \sin {g})^{j-o-q-2k-s-z} \\ &\qquad{}\times \int (\cos h)^{o+p-u-q+w+z} \\ &\qquad{}\times (\sin h)^{q+u-o-w+j-2k-p-z} \, \mathrm{d}h. \end{aligned}$$

In fact we have to obtain

$$ \frac{1}{2 \pi } \int_{0}^{2\pi } (\cos h)^{o+p-u-q+w+z} (\sin h)^{q+u-o-w+j-2k-p-z} \, \mathrm{d}h $$
(41)

and

$$ \int_{\text{pp}} (\cos h)^{o+p-u-q+w+z} (\sin h)^{q+u-o-w+j-2k-p-z}\, \mathrm{d}h. $$
(42)

For that, we consider three cases depending on the exponents of \(\sin h\) and \(\cos h\):

  1. (1)

    \(o+p-u-q+w+z\) is odd,

  2. (2)

    \(o+p-u-q+w+z\) is even and \(q+u-o-w+j-2k-p-z\) is odd,

  3. (3)

    \(o+p-u-q+w+z\) and \(q+u-o-w+j-2k-p-z\) are both even.

The three cases encompass all possible situations.

According to expressions (55) and (59) of the Appendix, when \(o+p-u-q+w+z\) is odd and \(q+u-o-w+j-2k-p-z\) is even or odd (case (1)), or when \(o+p-u-q+w+z\) is even and \(q+u-o-w+j-2k-p-z\) it odd (case (2)), integral (41) vanishes. Then, the only case that gives a non-null average is (3). As a consequence we define

$$ \mathcal{F}^{***}(o,q,p,u,j,w,z,k)=0, $$
(43)

if \(o+p-u-q+w+z\) is odd or if \(o+p-u-q+w+z\) is even and \(q+u-o-w+j-2k-p-z\) is odd. According to formula (65) of the Appendix, if \(o+p-u-q+w+z\) and \(q+u-o-w+j-2k-p-z\) are both even, \(\mathcal{F}^{***}\) is the same as

$$\begin{aligned} & \mathcal{F}^{***}(o,q,p,u,j,w,z,k) \\ &\quad= \sum_{b\geq 0}^{\frac{q+u-o-w+j-2k-p-z}{2}}\binom{ \frac{q+u-o-w+j-2k-p-z}{2}}{b} \\ &\qquad{}\times \binom{o+p-u-q+w+z+2b}{\frac{o+p-u-q+w+z}{2}+b} \\ &\qquad{}\times \frac{(-1)^{b}}{2^{o+p-u-q+w+z+2b}}. \end{aligned}$$
(44)

Consequently, the average with respect to the argument of the node yields that

$$\begin{aligned} {\mathcal{L}}^{(1)}_{0} =& {GM}\sum_{j\geq 2}\sum_{k\geq 0}^{[j/2]} \sum_{p\geq 0}^{j-2k} \sum_{d\geq 0}^{2k+1} \sum_{m\geq 0}^{p}\sum_{u\geq 0}^{p} \sum_{s \geq 0}^{j-2k-p} \sum_{v\geq 0}^{j-1} \sum_{o\geq 0}^{u} \sum_{q \geq 0}^{p-u} \sum_{w\geq 0}^{s} \sum_{z\geq 0}^{j-2k-p-s} \binom{j-2k}{p}\binom{2k+1}{d}\binom{p}{m} \binom{p}{u} \binom{j-2k-p}{s} \\ &{}\times \binom{j-1}{v}\binom{u}{o}\binom{p-u}{q} \binom{s}{w}\binom{j-2k-p-s}{z} (-1)^{d-m-k+u-o+j-z+1} C^{p-o-q+s-w+z} \\ &{}\times \frac{(2j-2k)!}{2^{j} k! (j-k)! (j-2k)!} \frac{a^{j}\eta^{j-2k-p} e^{p+d-m} e_{M}^{v}}{a_{M}^{j+1} \eta_{M} ^{2j-1}}(\cos {g})^{o+q+s-w+z} (\sin {g})^{j-o-q-2k+w-s-z} \\ &{}\times \mathcal{F^{*}}(j,k,p,d,m) \mathcal{F ^{**}}(j,k,u,s,v) \mathcal{F^{***}}(o,q,p,u,j,w,z,k). \end{aligned}$$
(45)

The function \(\mathcal{F^{***}}\) in formula (45) is given by (43) and (44), whereas \(\mathcal{F^{**}}\) appears in (27) and (28) and \(\mathcal{F^{*}}\) in (11) and (12).

The averaged Hamiltonian \({\mathcal{L}}^{(1)}_{0}\) defines an autonomous system of one degree of freedom in the variables \(g\) and \(G\), the other Delaunay coordinates being constant up to first order.

Now we focus on the calculation of the generating function \(\mathcal{Z} _{1}\) associated with this transformation. The corresponding homological equation is

$$ \mathcal{L}^{(1)}_{0} = \mathcal{L}^{(0)}_{1} + \bigl\{ \mathcal{L}^{(0)} _{0}, \mathcal{Z}_{1}\bigr\} . $$
(46)

Taking into account that \(\mathcal{L}^{(0)}_{0} = -n_{M} H\), the equation (46) results in

$$\begin{aligned} \mathcal{L}^{(1)}_{0} = \mathcal{L}^{(0)}_{1} - n_{M} \frac{\partial \mathcal{Z}_{1}}{\partial h}. \end{aligned}$$

Thence,

$$\begin{aligned} \mathcal{Z}_{1} = \frac{1}{n_{M}} \int \bigl(\mathcal{L}^{(0)}_{1} - {\mathcal{L}} ^{(1)}_{0}\bigr)\,\mathrm{d}h, \end{aligned}$$
(47)

where

$$\begin{aligned} {\mathcal{L}}^{(0)}_{1} =& \sum_{j \geq 0} \alpha_{j} \cos (j h) + \beta_{j} \sin (j h) \\ =& \alpha_{0} + \sum_{j \geq 1} \alpha_{j} \cos (j h) + \beta_{j} \sin (j h), \end{aligned}$$

\(\alpha_{i}\) and \(\beta_{i}\) being coefficients that are independent of \(h\).

If we call \({\mathcal{L}}^{(0)}_{1} = {\mathcal{L}}^{(0)}_{1A} + {\mathcal{L}}^{(0)}_{1B}\), with \({\mathcal{L}}^{(0)}_{1B} =\alpha_{0}\) and \({\mathcal{L}}^{(0)}_{1A}\) containing the periodic terms in \(h\), it follows that \(\alpha_{0} = {\mathcal{L}}^{(1)}_{0}\). Then, (47) gets transformed to

$$\begin{aligned} \mathcal{Z}_{1} =&\frac{1}{n_{M}} \biggl( \int {\mathcal{L}}^{(0)}_{1A} \,\mathrm{d}h + \int {\mathcal{L}}^{(0)}_{1B}\,\mathrm{d}h- \int {\mathcal{L}} ^{(1)}_{0}\,\mathrm{d}h \biggr) \\ =&\frac{1}{n_{M}} \int \sum_{j\geq 1} \bigl( \alpha_{j} \cos (j h) + \beta_{j} \sin (j h) \bigr) \,\mathrm{d}h \\ =&\frac{1}{n_{M}} \sum_{j\geq 1}\frac{1}{j} \bigl( \alpha_{j}\sin (j h) - \beta_{j} \cos (j h) \bigr) . \end{aligned}$$

Then, the generating function has the following form:

$$\begin{aligned} \mathcal{Z}_{1} =& \frac{GM}{n_{M}}\sum_{j\geq 2}\sum_{k\geq 0}^{[j/2]}\sum_{p\geq 0} ^{j-2k}\sum_{d\geq 0}^{2k+1} \sum_{m\geq 0}^{p}\sum_{u\geq 0}^{p} \sum_{s\geq 0}^{j-2k-p}\sum_{v\geq 0}^{j-1}\sum_{o\geq 0}^{p-u} \sum_{q\geq 0}^{p-u}\sum_{w\geq 0}^{s}\sum_{z\geq 0}^{j-2k-p-s} \binom{j-2k}{p}\binom{2k+1}{d}\binom{p}{m}\binom{p}{u} \binom{j-2k-p}{s} \\ &{}\times\binom{j-1}{v}\binom{u}{o}\binom{p-u}{q} \binom{s}{w}\binom{j-2k-p-s}{z} (-1)^{d-m+k+u-o+j-z+1} C^{p-o-q+s-w+z} \\ &{}\times \frac{(2j-2k)!}{2^{j}k!(j-k)!(j-2k)!}\frac{a^{j}\eta^{j-2k-p}e ^{p+d-m} e_{M}^{v}}{a_{M}^{j+1}\eta_{M}^{2j-1}} (\cos g)^{o+q+s-w+z} (\sin g)^{j-o-q-2k+w-s-z} \\ &{}\times \mathcal{F^{*}}(j,k,p,d,m) \mathcal{F ^{**}}(j,k,u,s,v) \mathcal{G}^{***}(o,q,p,u,j,w,z,k;h), \end{aligned}$$
(48)

where the function \(\mathcal{G}^{***}(o,q,p,u,j,w,z,k;h)\) is defined as follows:

$$\begin{aligned} &\mathcal{G}^{***}(o,q,p,u,j,w,z,k;h) \\ &\quad= \textstyle\begin{cases} \mathcal{G}_{i_{1}}^{***}(o,q,p,u,j,w,z,k;h) \\ \quad \mbox{if }o+p-u-q+s-w+z\mbox{ is odd,} \\ \mathcal{G}_{i_{2}}^{***}(o,q,p,u,j,w,z,k;h) \\ \quad \mbox{if }o+p-u-q+s-w+z\mbox{ is even and} \\ \quad q+u-o-w+j-2k-p-z\mbox{ is odd,} \\ \mathcal{G}_{p}^{***}(o,q,p,u,j,w,z,k;h) \\ \quad \mbox{if }o+p-u-q+s-w+z\mbox{ is even and} \\ \quad q+u-o-w+j-2k-p-z\mbox{ is even.} \end{cases}\displaystyle \end{aligned}$$
(49)

The expressions of \(\mathcal{G}_{i_{1}}^{***}\), \(\mathcal{G}_{i_{2}} ^{***}\) and \(\mathcal{G}_{p}^{***}\) are

$$\begin{aligned} &\mathcal{G}_{i_{1}}^{***}(o,q,p,u,j,w,z,k;h) \\ &\quad= \sum_{b\geq 0}^{\frac{o+p-u-q+s-w+z-1}{2}}\binom{ \frac{o+p-u-q+s-w+z-1}{2}}{b}(-1)^{b} \\ &\qquad{} \times \frac{(\sin h)^{2b+q+u-o-w+j-2k-p-z+1}}{2b+q+u-o-w+j-2k-p-z+1}, \\ &\mathcal{G}_{i_{2}}^{***}(o,q,p,u,j,w,z,k;h) \\ &\quad = \sum_{b\geq 0}^{\frac{q+u-o-w+j-2k-p-z-1}{2}}\binom{ \frac{q+u-o-w+j-2k-p-z-1}{2}}{b} (-1)^{b+1} \\ &\qquad{} \times \frac{(\cos h)^{2b+o+p-u-q+s-w+z+1}}{2b+o+p-u-q+s-w+z+1}, \\ &\mathcal{G}_{p}^{***}(o,q,p,u,j,w,z,k;h) \\ & \quad= \sum_{b\geq 0}^{\frac{q+u-o-w+j-2k-p-z}{2}} \sum_{c \geq 0}^{\frac{o+p-u-q+w+z}{2}+b-1} \\ &\qquad{} \binom{\frac{q+u-o-w+j-2k-p-z}{2} }{b} \\ &\qquad{} \times \binom{o+p-u-q+w+z+2b}{c} \\ &\qquad{} \times \frac{(-1)^{b}}{2^{o+p-u-q+w+z+2b-1}} \\ &\qquad{} \times \frac{\sin ((o+p-u-q+w+z+2b-2c)h)}{o+p-u-q+w+z+2b-2c}. \end{aligned}$$
(50)

The functions \(\mathcal{G}_{i_{1}}^{***}\) and \(\mathcal{G}_{i_{2}} ^{***}\) can be expressed as combinations of sines and cosines of multiples of \(h\) by using formulae (57) and (58). The function \(\mathcal{G}_{i_{1}}^{***}\) turns out to be

$$\begin{aligned} &\mathcal{G}^{***}_{i_{1}}(o,q,p,u,j,w,z,k;h) \\ &\quad = \sum_{b\geq 0}^{\frac{o+p-u-q+s-w+z-1}{2}}\binom{ \frac{o+p-u-q+s-w+z-1}{2}}{b} \frac{(-1)^{b}}{r} {\mathcal{V}}^{***}, \end{aligned}$$
(51)

where \(r = 2b+q+u-o-w+j-2k-p-z+1\) and

$$ {\mathcal{V}}^{***} = \textstyle\begin{cases} \frac{2}{2^{r}} \sum_{y\ge 0}^{\frac{r-1}{2}} \binom{r}{y} (-1)^{ ( \frac{r-1}{2} - y) } \sin ((r-2y) h) \\ \quad \mbox{if } r \ \mbox{is odd,} \\ \frac{2}{2^{r}} \sum_{y\ge 0}^{\frac{r}{2} - 1} \binom{r}{y} (-1)^{ ( \frac{r}{2} - y) } \cos ((r-2y) h) \\ \quad \mbox{if } r \ \mbox{is even.} \end{cases} $$
(52)

In the case of \(\mathcal{G}_{i_{2}}^{***}\), as the exponent of \(\cos h\) in (50) is always odd, there is only a possible case for \({\mathcal{V}}^{***}\):

$$\begin{aligned} & \mathcal{G}^{***}_{i_{2}}(o,q,p,u,j,w,z,k;h) \\ &\quad= \sum_{b\geq 0}^{\frac{q+u-o-w+j-2k-p-z-1}{2}} \binom{ \frac{q+u-o-w+j-2k-p-z-1}{2}}{b} \\ &\qquad{} \times \frac{(-1)^{b+1}}{r} {\mathcal{V}}^{***}, \end{aligned}$$
(53)

where \(r=2b+o+p-u-q+s-w+z+1\) is odd and

$$ {\mathcal{V}}^{***} = \frac{2}{2^{r}} \sum _{y \ge 0}^{\frac{r-1}{2}} \binom{r}{y} \cos \bigl((r - 2 y) h \bigr). $$
(54)

The function \(\mathcal{G}_{p}^{***}\) in (50) is already expressed as a combination of sines and cosines of multiples of \(h\).

The generating function of the elimination of the node transformation, \({\mathcal{Z}}_{1}\), has been introduced in (48), where \({\mathcal{F}}^{*}\) has been given in (11) and (12) and \({\mathcal{F}}^{**}\) appears in (27) and (28). Additionally, \({\mathcal{G}}^{***}\) has been introduced in (49) through \(\mathcal{G}_{i_{1}}^{***}\), \(\mathcal{G}_{i_{2}}^{***}\) and \(\mathcal{G}_{p}^{***}\), where \(\mathcal{G}_{i_{1}}^{***}\) is given in (50), (51) and (52), while \(\mathcal{G}_{i_{2}}^{***}\) is defined in (50), (53) and (54) and \(\mathcal{G}_{p}^{***}\) appears in (50).

4 Calculations

In order to give the reader an idea of how many terms are involved in the transformations of the preceding sections, we have run the computations for different values of the truncation order \(N\). We show a series of tables with relevant figures: the number of terms appearing in the averaged Hamiltonians and the corresponding generating functions, and the time consumed to compute them. The calculations have been made with Mathematica, Version 11.1.

We have performed two kinds of tests to check the results, namely:

  1. (i)

    First of all, we have checked the validity of the averaged Hamiltonians: \({\mathcal{H}}_{0}^{(2)}\), \({\mathcal{K}}_{0}^{(1)}\) and \({\mathcal{L}}_{0}^{(1)}\), and the associated generating functions, respectively \({\mathcal{W}}_{2}\), \({\mathcal{S}}_{1}\) and \({\mathcal{Z}} _{1}\), calculated by means of routines based in the theory developed in Sect. 3. These routines are available for the interested reader upon request to the authors. They can also be found in Vanegas (2011). The check consists in taking the initial Hamiltonian (2) and truncating the infinite series accounting for the perturbation for the values appearing in the Tables. Then, using the same ideas as the ones appearing in Section 3, we obtain the averagings up to first order directly using the symbolic processor Mathematica. That is, we obtain the averaged Hamiltonians and generating functions in a noncompact way, by truncating the developments at the given values. The results of both procedures agree in all cases.

  2. (ii)

    We have checked that the homological equations in the three transformations, i.e., (14), (30) and (46) are satisfied for the different truncations exhibited in Tables 16.

    Table 1 Averaging over the mean anomaly: averaged Hamiltonian

In Tables 1, 2, 3, 4, 5 and 6 we show the data relative to the averagings with respect to the mean anomaly, the time and the argument of the node, \(h\), together with the corresponding generating functions. As \(N\) is the degree at which we have truncated the expansions then, the value \(j\) ranges from 2 to \(N\) in expression (6) and in the rest of formulae of Sects. 2 and 3.

Table 2 Averaging over the mean anomaly: generating function
Table 3 Averaging over the time: averaged Hamiltonian
Table 4 Averaging over the time: generating function
Table 5 Averaging over the argument of the node: averaged Hamiltonian
Table 6 Averaging over the argument of the node: generating function

5 Conclusions

Compact formulae for three normalisations have been obtained up to the first significant order. These allow us to transform a non-autonomous three-degree-of-freedom Hamiltonian into an autonomous one-degree-of-freedom system.

We could have stopped the averaging procedures after the elimination of the short period terms (the mean anomaly) or after the elimination of the time, but we have preferred to simplify the system as much as possible. Moreover, as we have provided the expressions of all the averaged Hamiltonians and generating functions, readers interested in intermediate steps can make use of them.

We have given an analytical theory that can be the basis for the construction of a semi-analytical approach to deal, for instance, with end-of-life disposal satellite problems.

The fact that our analytic formulae have been obtained in a compact form is advantageous compared to other approaches that proceed by truncation of the initial series and take only a few terms from the beginning. In the case where the quotient between the distance of the small particle to the centre of mass of the two primaries and the distance between the two primaries, though smaller than one, is not very small, only a few terms in the series might not be representative enough.

Our theory can be adapted to other cases, for instance, the comet problem, where the small particle orbits both primaries at a big distance compared to the distance between the two primaries. The model can be also extended by including the zonal terms. Besides, a second order theory departing from the results of this paper can be performed. This can be of interest for the study of Jupiter’s or Saturn’s moons.