1 Introduction

In the era of exoplanets and specifically designed space missions, the co-orbital motion in the vicinity of the equilateral points \(L_4\) and \(L_5\) has become again the focus of attention (Kumar and Ishwar 2015; Elshaboury et al. 2016; Singh and Tyokyaa 2016; Barbosu et al. 2017; Zahra et al. 2017; Qian et al. 2018; Singh and Amuda 2019; Suraj et al. 2020). Since the seminal work of Szebehely (1967), the orbits near the libration points have been discussed extensively by the community. The analytic description of the Trojan-like resonant dynamics in the elliptic case of the restricted three-body problem (ERTBP) is based mainly on the averaged motion (Duffy 2012; Liang et al. 2018). Erdi (1977, 1978) showed the perturbation effects up to second order in Jupiter’s eccentricity, perihelion and ascending node precession by using a three-parameter expansion. Morais (2001) considered an averaged disturbing potential to describe the secular variation of the Trojans’ orbital elements in case of an oblate primary. Recently, Robutel et al. (2016) and Páez et al. (2016) have investigated the co-orbital resonance based on Hamiltonian formalism whereby the fast angles have been averaged out. These latter analytic studies are also capable to locate higher-order resonances as well as very slow secular frequencies.

It has been demonstrated (Tschauner 1971; Erdi 1974; Meire 1981; Matas 1982) that the coupled equations of the ERTBP can be written in the form of independent ordinary differential equations with variable coefficients. The primary goal of these studies is to explore the stability map of eccentricity–mass parameter dated back to Danby (1964). Interestingly, the analysis given by Erdi (1977) and Robutel et al. (2016) also leads to a pendulum-like equation; however, they do not attempt to solve it by classical techniques such as Floquet theorem (Lichtenberg and Lieberman 1983). Here we propose a detailed derivation of Hill’s equations of the ERTBP and make a comprehensive analysis of their applicability which is still out of literature. Furthermore, analytic expressions for the solution of Hill’s equations are given in the regime of moderate eccentricities and mass parameter with good agreement with numerical calculations.

2 Basic context

In this paper, we mainly follow the notations used in, e.g., Tschauner (1971), Meire (1980), Meire (1982). We use a dimensionless non-uniformly rotating coordinate system \((x_1,x_2)\) fixed to the primaries. The primaries having the mass \(m_1\) and \(m_2\) are located at \((-\mu , 0)\) and \((1-\mu , 0)\), respectively, where \(\mu \) is the mass ratio, \(\mu =m_2/(m_1+m_2)\) (the origin coincides with the center of mass). The dimensionless \((x_1,x_2)\) coordinates are obtained by dividing the original dimensional coordinates of the problem by the variable distance between the primaries. The linear motion of the third body around the Lagrangian points \(L_4\) and \(L_5\) is determined by the coupled differential equations (Szebehely 1967)

$$\begin{aligned}&x_1''-2 x_2' = r \cdot c_1 \cdot x_1, \end{aligned}$$
(1)
$$\begin{aligned}&x_2''+2 x_1' = r \cdot c_2 \cdot x_2, \end{aligned}$$
(2)

where \(x_1\) and \(x_2\) are the synodic Cartesian rectangular dimensionless coordinates of the third body; furthermore,

$$\begin{aligned}&r = \frac{1}{ 1 + e \cos (v) }, \quad g = 3\mu (1-\mu ) \quad \text {and} \quad c_i =\frac{3}{2} \left( 1 + (-1)^i \sqrt{1-g} \right) \quad (i=1,2). \end{aligned}$$
(3)

Here primes denote the derivation with respect to the true anomaly v. A new form of Eqs. (1) and (2) can be introduced as

$$\begin{aligned} {\mathbf {x}}' = {\mathbf {M}} \cdot {\mathbf {x}}, \end{aligned}$$
(4)

where \({\mathbf {x}} = (x_1, x_2, x_1', x_2')^T\), and

$$\begin{aligned} {\mathbf {M}} = \begin{pmatrix} 0 &{} 0 &{} 1 &{} 0\\ 0 &{} 0 &{} 0 &{} 1\\ r c_1 &{} 0 &{} 0 &{} 2\\ 0 &{} r c_2 &{} -2 &{} 0 \end{pmatrix} = \begin{pmatrix} {\mathbf {0}} &{} \mathbb {1}_2 \\ r{\mathbf {C}} &{} 2{\mathbf {D}} \end{pmatrix}, \quad \text {with} \quad {\mathbf {C}} = \begin{pmatrix} c_1 &{} 0 \\ 0 &{} c_2 \end{pmatrix}, \quad {\mathbf {D}} = \begin{pmatrix} 0 &{} 1 \\ -1 &{} 0. \end{pmatrix}. \end{aligned}$$
(5)

By introducing the notation \({{\tilde{x}}} = (x_1,x_2)^T\) and the vector \({\mathbf {x}} =({{\tilde{x}}}, {{\tilde{x}}}')^T\), the system of Eqs. (1) and (2) can be written in a more compact hypermatrix form as

$$\begin{aligned} {\mathbf {x}}'= \begin{pmatrix} {{\tilde{x}}} \\ {{\tilde{x}}}' \end{pmatrix}' = \begin{pmatrix} {\mathbf {0}} &{} \mathbb {1}_2 \\ r{\mathbf {C}} &{} 2{\mathbf {D}} \end{pmatrix} \cdot \begin{pmatrix} {{\tilde{x}}} \\ {{\tilde{x}}}^{\,\prime } \end{pmatrix} = \begin{pmatrix} {\mathbf {0}} &{} \mathbb {1}_2 \\ r{\mathbf {C}} &{} 2{\mathbf {D}} \end{pmatrix} \cdot {\mathbf {x}}, \end{aligned}$$
(6)

where \(\mathbb {1}_2\) is the two-dimensional identity matrix and \({\mathbf {0}}\) is the zero matrix.

2.1 Hill’s equation

Hill’s equation has the form of

$$\begin{aligned} \xi ''(v) + J(v) \cdot \xi (v) = 0, \end{aligned}$$
(7)

where J(v) is a periodic function—in our case—with the minimal period of \(2\pi \). It is important to note that the first derivative term, \(\xi '\), is missing in Eq. (7). In order to obtain Eq. (7) from a general second-order ODE

$$\begin{aligned} y''(v) + a(v) \cdot y'(v) + b(v) = 0, \end{aligned}$$
(8)

the term of \(y'\) can be eliminated by the substitution

$$\begin{aligned} y(v)= A \cdot \xi (v) \cdot e^{-\frac{1}{2} \int \limits _{v_0}^v a(x) \mathrm {dx}}, \end{aligned}$$
(9)

where A and \(v_0\) are arbitrary constants.

We will show that Eqs. (1) and (2) can be rewritten as four coupled second-order differential equations. Let us introduce four new functions \(y_1^{(1)}(v)\), \(y_2^{(1)}(v)\), \(y_1^{(2)}(v)\), \(y_2^{(2)}(v)\) and their matrix functions as \(\tilde{y}_i = (y_1^{(i)},y_2^{(i)})^T\), \(i=1,\) 2 and \({\mathbf {y}} = (\tilde{y}_1, {{\tilde{y}}}_2)^T\) with the following two properties. The first property makes possible that the new system of differential equations of y-s splits into two independent parts, namely

$$\begin{aligned} {{\tilde{y}}}_i {'} = {\mathbf {P}}_i \cdot {{\tilde{y}}}_i, \text { i = 1, 2} \quad \text {where} \quad {\mathbf {P}}_i = \begin{pmatrix} p_{11}^{(i)} &{} p_{12}^{(i)} \\ p_{21}^{(i)} &{} p_{22}^{(i)} \end{pmatrix}. \end{aligned}$$
(10)

The separation is more obvious if we write Eq. (10) in the form of

$$\begin{aligned} {\mathbf {y}} '= \begin{pmatrix} {{\tilde{y}}}_1 {'}\\ {{\tilde{y}}}_2 {'} \end{pmatrix} = \begin{pmatrix} {\mathbf {P}}_1 &{} {\mathbf {0}} \\ {\mathbf {0}} &{} {\mathbf {P}}_2 \end{pmatrix} \cdot \begin{pmatrix} {{\tilde{y}}}_1 \\ {{\tilde{y}}}_2, \end{pmatrix} = \begin{pmatrix} {\mathbf {P}}_1 &{} {\mathbf {0}} \\ {\mathbf {0}} &{} {\mathbf {P}}_2 \end{pmatrix} \cdot {\mathbf {y}}. \end{aligned}$$
(11)

The second property links the new and original variables,

$$\begin{aligned} {{\tilde{x}}} = {{\tilde{y}}}_1 + {{\tilde{y}}}_2 = \begin{pmatrix} \mathbb {1}_2&\mathbb {1}_2 \end{pmatrix} \cdot \begin{pmatrix} {{\tilde{y}}}_1 \\ {{\tilde{y}}}_2, \end{pmatrix}, \end{aligned}$$
(12)

or simply \(x_i = y_i^{(1)} + y_i^{(2)}\). We will see that by this choice, the equations of the system can be rewritten into the form of Hill’s equation. From the first (10) and second (12) properties, we have

$$\begin{aligned} \tilde{x_{ }} { '} = {{\tilde{y}}}_1 {'} + {{\tilde{y}}}_2 {'} = {\mathbf {P}}_1 \cdot {{\tilde{y}}}_1 + {\mathbf {P}}_2 \cdot {{\tilde{y}}}_2 = \begin{pmatrix} {\mathbf {P}}_1&{\mathbf {P}}_2 \end{pmatrix} \cdot \begin{pmatrix} {{\tilde{y}}}_1 \\ {{\tilde{y}}}_2, \end{pmatrix} \end{aligned}$$
(13)

which means that from Eq. (12) and Eq. (13) the relationship between \({\mathbf {x}}\) and \({\mathbf {y}}\) can be written as

$$\begin{aligned} {\mathbf {x}} = \begin{pmatrix} \tilde{x_{ }} { } \\ \tilde{x_{ }} { '} \end{pmatrix} = {\mathbf {T}} \cdot \begin{pmatrix} {{\tilde{y}}}_1 \\ {{\tilde{y}}}_2, \end{pmatrix} = {\mathbf {T}} \cdot {\mathbf {y}} \quad \text {with} \quad {\mathbf {T}} = \begin{pmatrix} \mathbb {1}_2 &{} \mathbb {1}_2 \\ {\mathbf {P}}_1 &{} {\mathbf {P}}_2 \end{pmatrix}. \end{aligned}$$
(14)

We have to calculate the elements of the matrices \({\mathbf {P}}_i\). On the one hand from Eq. (6) and Eq. (14),

$$\begin{aligned} {\mathbf {x}}' = \begin{pmatrix} {\mathbf {0}} &{} \mathbb {1}_2 \\ r{\mathbf {C}} &{} 2{\mathbf {D}} \end{pmatrix} \cdot {\mathbf {x}} = \begin{pmatrix} {\mathbf {0}} &{} \mathbb {1}_2 \\ r{\mathbf {C}} &{} 2{\mathbf {D}} \end{pmatrix} \cdot \begin{pmatrix} \mathbb {1}_2 &{} \mathbb {1}_2 \\ {\mathbf {P}}_1 &{} {\mathbf {P}}_2 \end{pmatrix} \cdot {\mathbf {y}} = \begin{pmatrix} {\mathbf {P}}_1 &{} {\mathbf {P}}_2 \\ r{\mathbf {C}} + 2{\mathbf {D}} {\mathbf {P}}_1 &{} r{\mathbf {C}} + 2{\mathbf {D}} {\mathbf {P}}_2 \end{pmatrix} \cdot {\mathbf {y}}; \end{aligned}$$
(15)

on the other hand from the derivatives of Eq. (11) and Eq. (14),

$$\begin{aligned} {\mathbf {x}} '&= \begin{pmatrix} \mathbb {1}_2 &{} \mathbb {1}_2 \\ {\mathbf {P}}_1 &{} {\mathbf {P}}_2 \end{pmatrix}' {\mathbf {y}} + \begin{pmatrix} \mathbb {1}_2 &{} \mathbb {1}_2 \\ {\mathbf {P}}_1 &{} {\mathbf {P}}_2 \end{pmatrix} {\mathbf {y}}' = \begin{pmatrix} {\mathbf {0}} &{} {\mathbf {0}} \\ {\mathbf {P}}_1 {'} &{} {\mathbf {P}}_2 {'} \end{pmatrix} {\mathbf {y}} \nonumber \\&\quad + \begin{pmatrix} \mathbb {1}_2 &{} \mathbb {1}_2 \\ {\mathbf {P}}_1 &{} {\mathbf {P}}_2 \end{pmatrix} \begin{pmatrix} {\mathbf {P}}_1 &{} {\mathbf {0}} \\ {\mathbf {0}} &{} {\mathbf {P}}_2 \end{pmatrix} {\mathbf {y}} = \begin{pmatrix} {\mathbf {P}}_1 &{} {\mathbf {P}}_2 \\ {\mathbf {P}}_1 {'}+{\mathbf {P}}_1^2 &{} {\mathbf {P}}_2 {'} + {\mathbf {P}}_2^2 \end{pmatrix} {\mathbf {y}}. \end{aligned}$$
(16)

In the last two equations, the multiplication factors of \({\mathbf {y}}\) must be equal; thus, from the equality of the elements in the second rows we can write

$$\begin{aligned} {\mathbf {P}}_i {'}+{\mathbf {P}}_i^2 = r{\mathbf {C}} + 2{\mathbf {D}} {\mathbf {P}}_i, \end{aligned}$$
(17)

which are matrix differential equations of Riccatti type. Based on Tschauner’s argument (Tschauner 1971), the following matrix elements satisfy Eq. (17)

$$\begin{aligned} p_{11}^{(i)}&= -\frac{1}{2} re\sin (v)(1+ke\cos (v)), \end{aligned}$$
(18)
$$\begin{aligned} p_{12}^{(i)}&= r\left( a_2^{(i)}+e\cos (v)-\frac{1}{4} ke^2\cos (2v) \right) ,\end{aligned}$$
(19)
$$\begin{aligned} p_{21}^{(i)}&= -r\left( a_1^{(i)}+e\cos (v)+\frac{1}{4} ke^2\cos (2v) \right) ,\end{aligned}$$
(20)
$$\begin{aligned} p_{22}^{(i)}&= -\frac{1}{2} re\sin (v)(1-ke\cos (v)), \end{aligned}$$
(21)

where

$$\begin{aligned} k = \frac{1}{\sqrt{1-g}}, \quad c = \sqrt{1 - 9 g + 2 e^2 + k^2 e^4}, \quad a_j^{(i)} = \frac{1}{4} \left( 1 + 2 c_j + (-1)^i c \right) \end{aligned}$$
(22)

Using these results, the inverse of the matrix \({\mathbf {T}}\) (\({\mathbf {T}}^{-1}\)) can be calculated. This matrix is necessary to get the vector \({\mathbf {y}}\) from the vector \({\mathbf {x}}\) (\({\mathbf {y}} =\mathbf {T^{-1}} \cdot {\mathbf {x}}\)), see Eq. (14). It is easy to verify that

$$\begin{aligned} \det {\mathbf {T}} = \left( \frac{r \cdot c}{2}\right) ^2, \end{aligned}$$
(23)

and

$$\begin{aligned} \mathbf {T^{-1}} = \frac{2}{r \cdot c} \begin{pmatrix} -p_{21}^{(2)} &{} -p_{22}^{(2)} &{} 0 &{} 1\\ p_{11}^{(2)} &{} p_{12}^{(2)} &{} -1 &{} 0\\ p_{21}^{(1)} &{} p_{22}^{(1)} &{} 0 &{} -1\\ -p_{11}^{(1)} &{}-p_{12}^{(1)} &{} 1 &{} 0 \end{pmatrix}. \end{aligned}$$
(24)

Since all elements of \({\mathbf {P}}_i\) contain a multiplicative factor of r,  we can define the matrices \(\mathbf {Q_i}\) as \(\mathbf {Q_i}=\mathbf {P_i}/r\) with the following elements

$$\begin{aligned} q_{11}^{(i)}&= -\frac{1}{2} e\sin (v)(1+ke\cos (v)) \end{aligned}$$
(25)
$$\begin{aligned} q_{12}^{(i)}&= a_2^{(i)}+e\cos (v)-\frac{1}{4} ke^2\cos (2v)\end{aligned}$$
(26)
$$\begin{aligned} q_{21}^{(i)}&= -\left( a_1^{(i)}+e\cos (v)+\frac{1}{4} ke^2\cos (2v) \right) \end{aligned}$$
(27)
$$\begin{aligned} q_{22}^{(i)}&= -\frac{1}{2} e\sin (v)(1-ke\cos (v)). \end{aligned}$$
(28)

Let \(\det {\mathbf {Q}}_i\) be the determinant of matrix \({\mathbf {Q}}_i\) with the above elements. It can be shown that

$$\begin{aligned} \det {\mathbf {Q}}_i = \frac{1}{2r} \left[ (-1)^i c + 1 + 3 e \cos (v) \right] . \end{aligned}$$
(29)

According to Eq. (10) \({{\tilde{y}}}_i {'} = {\mathbf {P}}_i {{\tilde{y}}}_i\), its derivative reads \({{\tilde{y}}}_i {''} = {\mathbf {P}}_i {'}{{\tilde{y}}}_i + {\mathbf {P}}_i {{\tilde{y}}}_i {'} = ({\mathbf {P}}_i {'} + {\mathbf {P}}_i^2) {{\tilde{y}}}_i = (r{\mathbf {C}} + 2{\mathbf {D}}\mathbf{P}_i){{\tilde{y}}}_i .\) Consequently,

$$\begin{aligned} {y_1^{(i)}}''&= \big ( r c_1 + 2p_{21}^{(i)} \big ) y_1^{(i)} + 2p_{22}^{(i)} y_2^{(i)}, \end{aligned}$$
(30)
$$\begin{aligned} {y_2^{(i)}}''&= - 2p_{11}^{(i)} y_1^{(i)} + \big ( r c_2 - 2p_{12}^{(i)} \big ) y_2^{(i)}. \end{aligned}$$
(31)

If we use the relations

$$\begin{aligned} y_1^{(i)} = \frac{{y_2^{(i)}}'-p_{22}^{(i)} y_2^{(i)}}{p_{21}^{(i)}} \end{aligned}$$
(32)

and

$$\begin{aligned} y_2^{(i)} = \frac{{y_1^{(i)}}'-p_{11}^{(i)} y_1^{(i)}}{p_{12}^{(i)}} \end{aligned}$$
(33)

derived from Eq. (11), we get

$$\begin{aligned} {y_1^{(i)}}''&- \frac{2q_{22}^{(i)}}{q_{12}^{(i)}}{y_1^{(i)}}' - \frac{1}{q_{12}^{(i)}} \left( q_{12}^{(i)}r c_1-2r\det {\mathbf {Q}}_i \right) y_1^{(i)} = 0,\quad \text {and} \end{aligned}$$
(34)
$$\begin{aligned} {y_2^{(i)}}''&+ \frac{2q_{11}^{(i)}}{q_{21}^{(i)}} {y_2^{(i)}}' - \frac{1}{q_{21}^{(i)}} \left( q_{21}^{(i)} r c_2 + 2 r \det {\mathbf {Q}}_i\right) y_2^{(i)} = 0. \end{aligned}$$
(35)

We have to emphasize that these two equations are not independent from each other. Equations (32) and (33) make connection between them. For this reason, to solve the problem, it is not necessary to integrate both of them. For example, we can integrate the equations for \(y_1^{(1)}\) and \(y_1^{(2)}\); then, by using the relation Eq. (33) the calculations of \(y_2^{(1)}\) and \(y_2^{(2)}\) are possible without any integration.

According to Eq. (9), the elimination of the first-order terms in Eqs. (34) and (35) is possible. The coefficient is \(a(v)=-{2q_{22}^{(i)}}/ {q_{12}^{(i)}}\) in case of \(y_1^{(i)}\). Furthermore, as we know that \({2q_{22}^{(i)}}=q_{12}^{(i)'}\), one can write

$$\begin{aligned} y_1^{(i)}= & {} A \cdot \xi _1^{(i)}(v) \cdot \exp \left( \frac{1}{2} \int \limits _{v_0}^v \frac{q_{12}^{(i)'}(x)}{q_{12}^{(i)}(x)} \mathrm {dx} \right) \nonumber \\= & {} A \cdot \xi _1^{(i)}(v) \cdot \exp \left( \frac{1}{2} \left[ \log {q_{12}^{(i)}}(x) \right] _{v_0}^v \right) = \sqrt{q_{12}^{(i)}} \cdot \xi _1^{(i)}, \end{aligned}$$
(36)

where we chose \(A=\sqrt{q_{12}^{(i)}(v_0)}\) (and similarly, \(y_2^{(i)} = \sqrt{q_{21}^{(i)}} \cdot \xi _2^{(i)}\)). Equation (36) describes the original transformation used by Tschauner (Tschauner 1971). The derivatives of \(y_1^{(i)}\) are

$$\begin{aligned} \begin{aligned} {y_1^{(i)}}'&= \frac{q_{22}^{(i)}}{\sqrt{q_{12}^{(i)}}}\xi _1^{(i)} + \sqrt{q_{12}^{(i)}}{\xi _1^{(i)}}',\quad \text {and}\\ {y_1^{(i)}}''&= \frac{{q_{22}^{(i)}}'q_{12}^{(i)} - {q_{22}^{(i)}}^2}{{q_{12}^{(i)}}^{3/2}}\xi _1^{(i)}+\frac{2q_{22}^{(i)}}{\sqrt{q_{12}^{(i)}}}{\xi _1^{(i)}}'+\sqrt{q_{12}^{(i)}}{\xi _1^{(i)}}''. \end{aligned} \end{aligned}$$
(37)

By using the above equations, and similar derivatives for \(y_2^{(i)}\), finally, Eqs. (34) and (35) can be written in the form of Hill’s equation as

$$\begin{aligned} {\xi _1^{(i)}}''&+ J_1^{(i)} \cdot \xi _1^{(i)} = 0, \quad \text {where} \quad J_1^{(i)} = -\left( r c_1 + 2 -\frac{3 r \det {\mathbf {Q}}_i + c_2}{q_{12}^{(i)}} + \frac{3 {q_{22}^{(i)}}^2}{{q_{12}^{(i)}}^2} \right) , \end{aligned}$$
(38)
$$\begin{aligned} {\xi _2^{(i)}}''&+ J_2^{(i)}\cdot \xi _2^{(i)} = 0, \quad \text {where} \quad J_2^{(i)} = -\left( r c_2 + 2 + \frac{3r\det {\mathbf {Q}}_i + c_1}{q_{21}^{(i)}} + \frac{3{q_{11}^{(i)}}^2}{{q_{21}^{(i)}}^2}\right) , \end{aligned}$$
(39)

where the coefficients \(J_j^{(i)}\) (\(i,j = 1,2\)) are periodic functions with period of \(2\pi \). At this point, it is necessary to consider the numerical solvability of these equations. In this study, we focus on the parameter range only where the value of \(c(\mu , e)\) in Eq. (22) is a strictly positive real number (\(c>0\)) and \(\mu < 1/3.\) This parameter range is the shaded region in Fig. 1.

Fig. 1
figure 1

Studied region in the \((\mu ,e)\) parameter plane (shaded), and its subregions I, II and III defined by the sign of the minima and maxima of \(q_{21}^{(1)}\) and \(q_{21}^{(2)}\). The curved border line of the shaded region is determined by the equation \(c(\mu , e ) = 0\). This border and the solid black line(s) are tangential at red star. Below and above the tangential point, the solid black line is determined by the equations \(\min q_{21}^{(1)}=0\) and \(\max q_{21}^{(2)}=0,\) respectively

The numerical solvability of Eqs. (38) and (39) depends on the denominators of the factors \(J_j^{(i)}\). The numerical solution cannot be stable if the denominator ever goes through zero or just reaches it, because then the factor \(J_j^{(i)}\) diverges. For this reason, we have studied the sign of the minima and maxima of expressions \(q_{12}^{(i)}\) and \(q_{21}^{(i)}\). We have found that \(q_{12}^{(i)}\)-s are always strictly positive, which means that Eqs. (38) are always solvable in the shaded region.

In contrast to the analysis of \(q_{21}^{(i)},\) the shaded region can be divided into three subregions, which are denoted by I, II and III in Fig. 1. For brevity, Table 1 shows the signs of the minimum and maximum values in the different subregions. We can see that \(q_{21}^{(1)}\) changes its sign (and therefore goes through zero) in the subregions II and III during the integration, which means that it is not recommended to solve the equation for \(\xi _2^{(1)}\) in these subregions. It is interesting to note that in the subregion I the sign is always negative, which means that \(\sqrt{q_{21}^{(1)}}\) is purely imaginary. Because of the former equality \(y_2^{(1)} = \sqrt{q_{21}^{(1)}} \cdot \xi _2^{(1)}\), where \(y_2^{(i)}\) is real, \(\xi _2^{(1)}\) must also be purely imaginary. Fortunately, this does not mean that the equation for \(\xi _2^{(1)}\) is unsolvable but we have to consider that \(\xi _2^{(1)}\) remains always purely imaginary; thus, multiplying the equation by the imaginary unit solves this problem. The situation is similar in the case of \(q_{21}^{(2)}\), but the sign change happens only in the subregion III (see Table 1).

Table 1 Signs of the minimum and maximum values of the functions \(q_{21}^{(i)}.\)

Following the above analysis, the numerical integration has been performed in order to validate the results. Figure 2 depicts the trajectory for \(e=0.048\), \(\mu =0.000954\) (the case of Jupiter). The solution of Eqs. (1) and (2) and Eqs. (38) originating from the appropriate initial conditions perfectly overlap. This means that Hill’s equations can be applied to solve the equations of motion around the \(L_4\) and \(L_5\) points.

Fig. 2
figure 2

Numerical solutions around the \(L_4\) and \(L_5\) points. The parameters are \(e=0.048\), \(\mu =0.000954\) (the case of Jupiter), and the initial conditions are \(v = 0\), \(x_1 = 1\), \(x_2 = 1\), \(x_1'= 0\), \(x_2'= 0\)

3 Perturbative solution

In this section, we give the perturbative solution of the differential equations. Hill’s equations (Eqs. (38) for \(i=1,2\)), as they are second-order differential equations with periodic coefficients, can be solved by Floquet theorem (Hagel 1992). We seek the solution in the form of

$$\begin{aligned} \xi (v) = a w(v) \cos (\psi (v)+b), \end{aligned}$$
(40)

where w(v) is the so-called Floquet function, which has the same period as J(v). Constants a and b are determined by the initial conditions. Since the derivation for both \(\xi _1^{(1)}\) and \(\xi _1^{(2)}\) are the same, we omit the indices in the rest part of the paper. Let us rewrite Eqs. (38) for w(v) and \(\psi (v)\)

$$\begin{aligned} \xi '(v)&= a w'(v)\cos (\psi (v)+b)-aw(v)\sin (\psi (v)+b)\psi '(v), \end{aligned}$$
(41)
$$\begin{aligned} \xi ''(v)&= a w''(v)\cos (\psi (v)+b)-2aw'(v)\sin (\psi (v)+b)\psi '(v)\nonumber \\&\quad -aw(v)\cos (\psi (v)+b){\psi '}^2(v)-aw(v)\sin (\psi (v)+b)\psi ''(v). \end{aligned}$$
(42)

The above differential equations split into two parts with the coefficients of \(\sin \) and \(\cos \)

$$\begin{aligned}&w''(v)-w(v){\psi '}^2(v)+J(v)w(v) = 0, \end{aligned}$$
(43)
$$\begin{aligned}&2w'(v)\psi '(v)+w(v)\psi ''(v) = 0. \end{aligned}$$
(44)

From Eq. (44), we obtain

$$\begin{aligned} 2\frac{w'(v)}{w(v)} = -\frac{\psi ''(v)}{\psi '(v)} \quad \Rightarrow \quad \log (w^2(v)) = \log \left( \frac{1}{\psi '(v)}\right) + C, \end{aligned}$$
(45)

where C is a constant of integration. At the end of the calculation, we will see that \(a^2=e^C\) that is

$$\begin{aligned} \psi '(v) = \frac{a^2}{w^2(v)}. \end{aligned}$$
(46)

With this equation, Eq. (43) becomes

$$\begin{aligned} w(v)''+J(v)w(v)-\frac{a^4}{w^3(v)}=0. \end{aligned}$$
(47)

Now we are looking for the solution of w(v) in a third-order Taylor series in the eccentricity e

$$\begin{aligned} w(v) = w^{(0)}(v)+ew^{(1)}(v)+e^2w^{(2)}(v)+e^3 w^{(3)}(v)+\mathcal O (e^4), \end{aligned}$$
(48)

where \(w^{(i)}\) are \(2\pi \) periodic functions of v.

3.1 Taylor series of \(J_1^{(1)}(v)\) and \(J_1^{(2)}(v)\)

The periodic coefficients to be solved have complicated forms; therefore, the solution can be obtained by a third-order Taylor expansion in the eccentricity. Let us utilize \(J_1^{(1)}\) and \(J_1^{(2)}\) together (\(J_1^{(i)}\)), as the expressions are really similar:

$$\begin{aligned} J_1^{(i)}(v)&{=} {-}\left\{ c_1 r {+}2 {-}\frac{\frac{3}{2} (1{+}({-}1)^ic{+}3e\cos (v)){+}c_2}{\frac{1}{4} (2c_2{+}1{+}({-}1)^ic){+}e\cos (v){-}\frac{1}{4} ke^2\cos (2v)}\right. \nonumber \\&\quad \left. {+}\ 3\left( \frac{{-}\frac{1}{2} e\sin (v)(1{-}ke\cos (v))}{\frac{1}{4}(2c_2{+}1{+}({-}1)^ic){+}e\cos (v){-}\frac{1}{4} ke^2\cos (2v)}\right) ^2\right\} , \end{aligned}$$
(49)

by using the earlier introduced notations. Useful expressions will be \(B_i{\equiv }(2c_2~{+}~1~+~({-}1)^i~\lambda )^{-1}\) and \(\lambda \equiv \sqrt{1-9g}\). The third-order Taylor expansion of \(J_1^{(i)}\) is then

$$\begin{aligned} J_1^{(i)}(v;e,\mu )&= \alpha _i+\beta _i\cos (v)e+(\gamma _i+\delta _i\cos (2v))e^2+(\varepsilon _i\cos (v)+\eta _i\cos (3v))e^3+\mathcal O(e^4), \end{aligned}$$

where

$$\begin{aligned} \alpha _i&= -c_1-2+B_i(6+(-1)^i6\lambda +4c_2),\\ \beta _i&= c_1+18B_i-8B_i^2(3+(-1)^i3\lambda +2c_2),\\ \gamma _i&= \frac{B_i^2}{\lambda }\big ((-1)^{i+1}(6+4c_2)-12\lambda \big )+(-1)^i\frac{6B_i}{\lambda }-\frac{c_1}{2}-4B_i^3(10c_2-3+(-1)^{i+1}3\lambda ),\\ \delta _i&= B_i^2 k \left( 6+(-1)^i6\lambda +4c_2+\frac{6}{k}\right) -\frac{c_1}{2}-4B_i^3(10c_2-3+(-1)^{i+1}3\lambda ),\\ \varepsilon _i&= \frac{B_i^4}{\lambda }\Bigg \{\frac{(-1)^{i+1}(20c_2-6+3\lambda ^2 k)+30\lambda +10c_2\lambda k-3\lambda k}{B_i}\\&\quad +\frac{6k\lambda }{B_i^2}+(-1)^{i+1}\big (64c_2^2+32c_2+\\&\quad +24k-216gk+32c_2k-288kc_2g+72-648g\big )+208c_2\lambda \\&\quad -32c_2k\lambda -12k\lambda -12k\lambda ^3-16c_2^2k\lambda -\\&\quad -72\lambda \Bigg \}+\frac{3c_1}{4},\\ \eta _i&= \frac{B_i^4}{\lambda }\Bigg \{\frac{10c_2\lambda k-3\lambda k+(-1)^{i+1}3 \lambda ^2 k+24\lambda }{B_i}+\frac{6k\lambda }{B_i^2}\\&\quad +(-1)^{i+1}\big (24k-216gk+32c_2k-288c_2 gk+\\&\quad +24-216g\big )-32c_2k\lambda -12k\lambda -12k\lambda ^3-16c_2^2k\lambda +80\lambda c_2-24\lambda \Bigg \}+\frac{c_1}{4}. \end{aligned}$$

Let us write back the results of the Taylor expansions into Eq. (46), and use the fact that

$$\begin{aligned} \begin{aligned}&\frac{1}{(w^{(0)}(v){+}ew^{(1)}(v){+}e^2w^{(2)}(v){+}e^3 w^{(3)}(v))^3}{=}\frac{1}{w^{(0)^3}(v)}\\&\quad {-}\frac{3w^{(1)}(v)}{w^{(0)^4}(v)}e{+}\frac{6w^{(1)^2}(v){-}3w^{(0)}(v)w^{(2)}(v)}{w^{(0)^5}(v)}e^2+\\&\quad +\frac{-3w^{(0)^2}(v)w^{(3)}(v)+12w^{(0)}(v)w^{(1)}(v)w^{(2)}(v)-10w^{(1)^3}(v)}{w^{(0)^6}(v)}e^3+\mathcal O(e^4). \end{aligned} \end{aligned}$$
(50)

Then we can collect the terms for \(e^0\), \(e^1\), \(e^2\) and \(e^3\); thus, 4 new differential equations can be obtained (also for \(i=1,2\), so for simplicity we omit index i) for the terms of w(v):

$$\begin{aligned} w^{(0)''}(v)&+w^{(0)}(v)\alpha -\frac{a^4}{w^{(0)^3}(v)} =0, \end{aligned}$$
(51)
$$\begin{aligned} w^{(1)''}(v)&+w^{(0)}(v)\beta \cos (v)+w^{(1)}(v)\alpha +\frac{3a^4w^{(1)}(v)}{w^{(0)^4}(v)}=0,\end{aligned}$$
(52)
$$\begin{aligned} w^{(2)''}(v)&+w^{(0)}(v)\Big (\gamma +\delta \cos (2v) \Big )+w^{(1)}(v)\beta \cos (v)+w^{(2)}(v)\alpha \nonumber \\&-\frac{6a^4w^{(1)^2}(v)}{w^{(0)^5}(v)} + \frac{3a^4w^{(2)}(v)}{w^{(0)^4}(v)}=0,\end{aligned}$$
(53)
$$\begin{aligned} w^{(3)''}(v)&+w^{(0)}(v)\Big (\varepsilon \cos (v)+\eta \cos (3v) \Big )+w^{(1)}(v)\Big (\gamma +\delta \cos (2v)\Big )\nonumber \\&+w^{(2)}\beta \cos (v)+w^{(3)}(v)\alpha + \nonumber \\&+\frac{3a^4w^{(3)}(v)}{w^{(0)^4}(v)}-\frac{12a^4w^{(1)}(v)w^{(2)}(v)}{w^{(0)^5}(v)}+\frac{10a^4w^{(1)^3}(v)}{w^{(0)^6}(v)}=0. \end{aligned}$$
(54)

It can be seen that a particular solution corresponding to \(2\pi \) periodicity for Eq. (51) is

$$\begin{aligned} w^{(0)}(v)=\frac{a}{\alpha ^{1/4}}\equiv w_{0,0}. \end{aligned}$$
(55)

The differential equations (52)–(54) are second-order linear differential equations; therefore, the solution can be written up as the sum of the solution of the homogeneous equation, \(w^{(j)}_h(v),\) and a particular solution of the inhomogeneous equation, \(w^{(j)}_{ih}(v)\). The homogeneous part of Eq. (52) is

$$\begin{aligned} w^{(1)''}_h(v)+4\alpha w^{(1)}_h(v)=0, \end{aligned}$$
(56)

which is a harmonic oscillator with frequency \((4\alpha )^{1/2}\); thus, the solution of the equation is

$$\begin{aligned} w^{(1)}_h(v) = K_1\sin (\sqrt{4\alpha }v)+K_2\cos (\sqrt{4\alpha }v). \end{aligned}$$
(57)

Generally, in order to fulfill the \(2\pi \) periodicity of w(v), the constants must be chosen as follows \(K_1=K_2\equiv 0\). For the inhomogeneous solution, we use the following trial function

$$\begin{aligned} w^{(1)}_{ih}(v)=w_{1,1}\cos (v)+w_{1,0}, \end{aligned}$$
(58)

where \(w_{1,1}\) are \(w_{1,0}\) constants. By calculating the derivatives from the coefficients, we can simply obtain the values of \(w_{1,1}\) and \(w_{1,0}\), namely

$$\begin{aligned} w_{1,1} = -\dfrac{w_{0,0}\beta }{4\alpha -1},\qquad w_{1,0}=0. \end{aligned}$$
(59)

We use the same steps for the solution of Eq. (53). By using trigonometric identities, it can be seen that the differential equation has the following form

$$\begin{aligned}&w^{(2)''}(v){+}4\alpha w^{(2)}(v) {=} \left( {-}w_{0,0}\gamma {-}\frac{1}{2}w_{1,1}\beta {+}\frac{3\alpha w_{1,1}^2}{w_{0,0}} \right) \nonumber \\&\qquad {-}\left( w_{0,0}\delta {+}\frac{1}{2}w_{1,1}\beta {-}\frac{3\alpha w_{1,1}^2}{w_{0,0}}\right) \cos (2v). \end{aligned}$$
(60)

Like in the previous case the solution of the homogeneous part is

$$\begin{aligned} w^{(2)}_h(v) = K_1\sin \left( \sqrt{4\alpha }v\right) +K_2\cos \left( \sqrt{4\alpha }v\right) , \end{aligned}$$
(61)

where again \(K_1\) and \(K_2\) must disappear for the \(2\pi \) periodicity, \(K_1=K_2\equiv 0\). The trial function of the particular solution of the inhomogeneous equation is:

$$\begin{aligned} w^{(2)}_{ih}(v)=w_{2,2}\cos (2v)+w_{2,0}. \end{aligned}$$
(62)

Again by calculating the appropriate derivatives, the equality of the coefficients implies:

$$\begin{aligned} w_{2,2} = \dfrac{\dfrac{3\alpha w_{1,1}^2}{w_{0,0}}-w_{0,0}\delta -\dfrac{1}{2}w_{1,1}\beta }{4\alpha -4},\quad w_{2,0} = \dfrac{\dfrac{3\alpha w_{1,1}^2}{w_{0,0}}-w_{0,0}\gamma -\dfrac{1}{2} w_{1,1}\beta }{4\alpha }. \end{aligned}$$
(63)

Only the solution of Eq. (54) is left

$$\begin{aligned} \begin{aligned}&w^{(3)''}(v)+4\alpha w^{(3)}(v){=}{-}\Bigg (w_{0,0}\varepsilon +w_{1,1}\gamma +\frac{1}{2} w_{1,1}\delta +w_{2,0}\beta +\frac{1}{2}w_{2,2}\beta {-} \frac{12\alpha w_{1,1}w_{2,0}}{w_{0,0}}-\\&\quad -\frac{6\alpha w_{1,1}w_{2,2}}{w_{0,0}}+\frac{15\alpha w_{1,1}^3}{2w_{0,0}^2}\Bigg )\cos (v)\\&\quad -\Bigg (w_{0,0}\eta +\frac{1}{2}w_{1,1}\delta +\frac{1}{2} w_{2,2}\beta - \frac{6\alpha w_{1,1}w_{2,2}}{w_{0,0}}+\frac{5\alpha w_{1,1}^3}{2w_{0,0}^2} \Bigg )\cos (3v). \end{aligned} \end{aligned}$$
(64)

The homogeneous solution reads

$$\begin{aligned} w^{(3)}_h(v) = K_1\sin (\sqrt{4\alpha }v)+K_2\cos (\sqrt{4\alpha }v), \end{aligned}$$
(65)

where again the constants are \(K_1=K_2\equiv 0\) due to the periodicity of w(v). The trial function for the particular solution of the inhomogeneous equation is

$$\begin{aligned} w^{(3)}_{ih}(v)=w_{3,1}\cos (v)+w_{3,3}\cos (3v), \end{aligned}$$
(66)

where the forms for \(w_{3,1}\) and \(w_{3,3}\) coefficients are

$$\begin{aligned} \begin{aligned} w_{3,1}&=-\dfrac{w_{0,0}\varepsilon +w_{1,1}\gamma +\dfrac{1}{2} w_{1,1}\delta +w_{2,0}\beta +\dfrac{1}{2}w_{2,2}\beta -\dfrac{12\alpha w_{1,1}w_{2,0}}{w_{0,0}}-\dfrac{6\alpha w_{1,1}w_{2,2}}{w_{0,0}}+\dfrac{15\alpha w_{1,1}^3}{2w_{0,0}^2}}{4\alpha -1},\\ w_{3,3}&=-\dfrac{w_{0,0}\eta +\dfrac{1}{2}w_{1,1}\delta +\dfrac{1}{2}w_{2,2}\beta -\dfrac{6\alpha w_{1,1}w_{2,2}}{w_{0,0}}+\dfrac{5\alpha w_{1,1}^3}{2w_{0,0}^2}}{4\alpha -9}. \end{aligned} \end{aligned}$$
(67)

Then by using the fact that \(\psi '(v) = a^2w^{-2}(v)\) (see Eq. (46)), \(\psi (v)\) can be calculated if we again expand \(\psi '(v)\) into Taylor series in e up to third order

$$\begin{aligned} \frac{1}{a^2}\psi (v)&=\frac{v}{w_{0,0}^2}{-}2\frac{w_{1,1}\sin (v)}{w_{0,0}^3}e\nonumber \\&\quad {+}\frac{1}{w_{0,0}^4}\Bigg \{3w_{1,1}^2\left( \frac{\sin (2v)}{4}{+}\frac{v}{2}\right) {-}w_{0,0}w_{2,0}v{-}\frac{\sin (2v)w_{0,0}w_{2,2}}{2}\Bigg \}e^2{-}\nonumber \\&\quad -\frac{1}{w_{0,0}^5}\Bigg \{\frac{2}{3} w_{1,1}^3\left( \frac{9}{4}\sin (v){+}\frac{\sin (3v)}{4}\right) \nonumber \\&\quad {+}\sin (v)w_{0,0}^2w_{3,1}{+}\frac{\sin (3v)w_{0,0}^2w_{3,3}}{3}{-}2\sin (v)w_{0,0}w_{1,1}w_{2,0}{-}\nonumber \\&\quad -2w_{0,0}w_{1,1}w_{2,2}\left( \frac{\sin (v)}{2}+\frac{\sin (3v)}{6}\right) +\frac{2}{3} w_{1,1}\left( \frac{w_{1,1}^2}{4}-\frac{w_{0,0}w_{2,2}}{2}\right) \sin (3v)+\nonumber \\&\quad +2w_{1,1}\left( \frac{3}{4}w_{1,1}^2-\frac{1}{2} w_{0,0}w_{2,2}-w_{0,0}w_{2,0}\right) \sin (v)\Bigg \}e^3+\mathcal O(e^4). \end{aligned}$$
(68)

Now we have the expressions for w(v) and \(\psi (v)\); thus, \(\xi (v) = aw(v)\cos \big (\psi (v)+b\big )\) can be calculated. It is left to determine the constants a and b, which are controlled by the initial conditions \(\xi (0)\equiv \xi _0\) and \(\xi '(0) \equiv \xi '_0\). As the differential equations are second-order linear differential equations with periodic coefficients, the initial conditions can be arbitrary; therefore, we use the simple conditions of \(x_0 = 1\), \(y_0 = 1\), \(v_{x0} = 0\), \(v_{y0} = 0\), from which \(\xi _{1,0}\), \(\xi _{1,0}'\), \(\xi _{2,0}\) and \(\xi _{2,0}'\) can be easily achieved. By using the values \(\xi _0\) and \(\xi _0'\),

$$\begin{aligned} \begin{aligned} \xi _0&= aw(0)\cos \big (\psi (0)+b\big ),\quad \xi _0' =aw'(0)\cos \big (\psi (0)+b\big )-\frac{1}{w(0)}\sin \big (\psi (0)+b\big ),\quad \text {therefore}\\ a&= \sqrt{\big (w'(0)\xi _0-\xi _0'w(0)\big )^2+\left( \frac{\xi _0}{w(0)}\right) ^2},\quad b = \arccos \left( \frac{\xi _0}{aw(0)}\right) -\psi (0). \end{aligned} \end{aligned}$$
(69)

At the end, the only task is to use the transformations detailed in Eqs. (37), calculate \(y_2^{(1)}\) and \(y_2^{(2)}\) with Eq. (33), then turn back to the xy coordinates as \(x=y_1^{(1)}+y_1^{(2)}\) and \(y = y_2^{(1)}+y_2^{(2)}\).

4 Illustrations and discussion

The prominent example of co-orbital dynamics is the Sun–Jupiter–Trojan configuration in our own Solar system. We apply the perturbative solution described in Sect. 3.1 to this structure first. Figure 3 depicts the trajectory around the Sun–Jupiter triangular Lagrangian point. The integration time is 20 periods of Jupiter (ca. 240 years). The analytic and numerical solutions match perfectly, although after some time (\(\sim 38-40\) periods) they start to deviate.

Fig. 3
figure 3

Analytic and numerical solution in the Sun–Jupiter system. The relative difference, \(\varDelta r/r,\) of the two methods until the integration time (T=20) is \(\lessapprox \)5%. Initial conditions are the same as in Fig. 2

Recently, Lillo-Box et al. (2018) have studied the physical parameters and dynamical properties of possible exo-Trojans in systems with close-in (orbital period < 5 days) planets. We selected two of them, HAT-P-20b (\(e=0.015,\;\mu =0.0091\)) and WASP-36b (\(e=0.0,\;\mu =0.0021\)), to provide the analytic solution in these regimesFootnote 1. The orbits are plotted in Fig. 4a and b, respectively. The panels show the paths for T=20 periods again. Due to the zero eccentricity of the planet, the analytic solution for WASP-36b remains very close to the numerical outcome for much longer times.

Fig. 4
figure 4

Perturbative solution for particular exoplanetary systems. Initial conditions are the same as in Fig. 2. For parameters, see the main text

Considering the Earth–Moon system with \(e=0.054\) and \(\mu =0.012\), it falls close to the limit of third-order solution. The analytic solution diverges after 5–6 revolutions (\(\sim 130-150\) days) of the Moon. We have seen that for the Sun–Jupiter system the analytic curve traces the numerical method reasonably well, while the eccentricity falls into the same range. In addition, we have found that the rather large mass parameter—compared to planetary systems—does not affect the precision of the analytic solution provided the eccentricity is small enough, practically zero. This is, however, not the case for the Moon. Consequently, systems with moderate nonzero eccentricity and mass parameter of the same size require an improved analytical solution, e.g., higher-order expansion in mass.

In this work, we described the motion around the triangular Lagrangian points using Hill’s equations. As a perturbative solution, a third-order expansion of Floquet function w(v) in eccentricity was presented. This method is capable to follow analytically the orbit of a massless particle around the equilibrium points \(\mathrm {L}_4\) and \(\mathrm {L}_5\) in the ERTBP. A precise trajectory forecast for moderate eccentricity (\(e\le 0.05\)) and mass parameter (\(\mu \le 0.005\)) is achievable for tens of secondary’s orbital periods.