1 Introduction

Super-Earths (SE) are planets with a mass between 1 and \(\sim \) 20 Earth masses or a radius between 1 and \(\sim \) 4 Earth radii, and so far discovered with orbital period typically shorter than \(\sim \) 100 days. They are estimated to orbit 30–50% of Sun-like stars (Mayor et al. 2011; Howard et al. 2012; Fressin et al. 2013; Petigura et al. 2013), and multi-planetary systems are not rare. The fact that close-in SE systems form so frequently around stars, but not always (for instance, not in the Solar system) is an interesting constraint on planetary formation models.

It is generally expected that SEs form (mostly) within the lifetime of the protoplanetary disk of gas, and therefore, regardless of whether they form in the inner or outer part of the disk, they should undergo radial migration toward the central star, as a result of planet–disk interactions (Ogihara et al. 2015; Izidoro et al. 2017). Migration brings the SEs to the inner edge of the disk, where inward migration stops (Masset et al. 2006). For this reason, the SEs are captured into mutual mean motion resonances, where the ratios of orbital periods are equal to the ratios of integer numbers. This is observed in all simulations (e.g., Terquem and Papaloizou 2007; Cresswell and Nelson 2008; Morbidelli et al. 2008) and the aforementioned (Ogihara et al. 2015; Izidoro et al. 2017).

Due to this renewed interest in resonant captures, in the first part of this paper we revisit the problem of capture in first-order resonances of two equal-mass coplanar planets in convergent migration, using a semi-analytical approach and numerical simulations. In Sect. 2 we compute analytically the locus of equilibrium points of first-order resonances, where both the resonant and secular oscillations of the planetary orbits have a null amplitude. Our calculations are developed for unexpanded Hamiltonians, which allows to follow the dynamics up to arbitrarily large eccentricities (e.g., Beaugé et al. 2006; Michtchenko et al. 2006). We compare the results with those obtained with first- and second-order expansions of the Hamiltonian in the eccentricity, showing qualitative and quantitative disagreements. The quantitative accuracy of our results is validated with simulations in which planets are forced to migrate toward each other, without any eccentricity damping. These simulations have to follow the loci of the equilibrium points and show perfect agreement with the unexpanded model. Moreover, we calculate the two frequencies of libration around the equilibrium points, therefore obtaining a complete understanding of the system; we again check the validity of the analytical calculations against numerical simulations in which the amplitudes of resonant and secular librations are slightly excited and the frequencies of oscillation of the semimajor axis and the eccentricity are measured. In Sect. 3 we introduce the eccentricity damping exerted by the disk onto the planets. This leads to a final equilibrium configuration where convergent migration stops. The analytic calculation of the equilibrium eccentricities and semimajor axes ratio is presented in “Appendix.” We check against numerical simulations the validity of these analytical predictions, showing excellent agreement.

Although resonant capture is typical of migration simulations, the observed SEs systems show little preference for near-integer period ratios and their orbital separations are usually much wider than those characterizing planets in resonant chains. Izidoro et al. (2017) showed that this observation is not inconsistent with the migration/resonant trapping paradigm. In fact, simulations show that after the removal of the disk of gas, the resonant planetary systems often become unstable. Izidoro et al. (2017) showed that the observations are very well reproduced if the fraction of the resonant systems that eventually become unstable exceeds 90%. The reasons for these instabilities, however, are unexplained.

Matsumoto et al. (2012) studied numerically the stability of resonant multi-planetary systems for high-integer first-order mean motion resonances. They built the desired resonant configuration by simulating the Type I migration phase in a protoplanetary disk of gas; then they slowly depleted the disk. They observed that there is a critical number of planets above which the resonant systems go naturally unstable, with a crossing time comparable to that of non-resonant systems, and studied how this number changes with the planetary masses and resonant order. In other words, they demonstrated that given the planetary masses, there are a limit number of planets that can form a stable resonant chain or, given the number of planets, there is a limit mass for stability. The reason of the instability, however, was not discussed.

Thus, in the second part of this paper we address why resonant planets become unstable if they are too massive. We focus here on a system of two coplanar planets and study the stability of the resonant center as a function of the planets’ masses (assumed to be equal for simplicity). In a subsequent work, we will generalize this study to more populated resonant chains.

Again, we follow a double approach: analytic and numeric. In Sect. 4 we start from a pair of small-mass planets deep in resonance and we slowly increase their masses. The mass growth preserves, by the adiabatic principle, the original small libration amplitude. In this way we can explore the stability of the resonance center up the threshold mass for instability. At the same time, we detail how one can follow analytically the evolution of the system to a good approximation up to high value of the planetary masses. To understand why the planets ultimately become unstable, we compare the numerical evolution of the system with an analytically computed map of secondary resonances (resonances between the libration frequencies or between a libration frequency and one of the short periodic harmonics) as well as a map of minimum approach distance between the planets, finding that one of them matches well the instability limit observed in the numerical simulations. Finally, we summarize our results in Sect. 5.

2 Planetary Hamiltonian

We start by considering the Hamiltonian for the planar three-body problem, in canonical Poincaré coordinates (Poincare 1892), \({\mathbf {p}}_i\), \({\mathbf {r}}_i\), \(i=1,2\):

$$\begin{aligned} {\mathcal {H}}&= {\mathcal {H}}_{\mathrm{kepl}} + {\mathcal {H}}_{\mathrm{pert}},\nonumber \\ {\mathcal {H}}_{\mathrm{kepl}}&= \frac{M_* + m_1}{2 M_*}\frac{{\mathbf {p}}_1^2}{m_1} -\frac{{\mathcal {G}}M_* m_1}{\Vert {\mathbf {r}}_1\Vert } + \frac{M_* + m_2}{2 M_*}\frac{{\mathbf {p}}_2^2}{m_2} -\frac{{\mathcal {G}}M_* m_2}{\Vert {\mathbf {r}}_2\Vert }, \\ {\mathcal {H}}_{\mathrm{pert}}&= \frac{{\mathbf {p}}_1 \cdot {\mathbf {p}}_2}{M_*} - {\mathcal {G}}\frac{m_1 m_2}{\Delta },\nonumber \end{aligned}$$
(2.1)

where \(M_*\) is the mass of the central star, \(m_1\) and \(m_2\) are the masses of the two planets, \({\mathcal {G}}\) is the gravitational constant, and \(\Delta =\Vert {\mathbf {r}}_1 - {\mathbf {r}}_2\Vert \) is the distance between the two planets. Recall that with respect to the positions and velocities \((\mathbf {u}_i, \dot{\mathbf {u}}_i)\) in a barycentric inertial reference frame, the canonical Poincaré coordinates are given by \({\mathbf {r}}_0=\mathbf {u}_0\), \({\mathbf {r}}_i=\mathbf {u}_i - \mathbf {u}_0\), \(i=1,2\) for the positions, and \(\mathbf p_0 = {\tilde{\mathbf {u}}}_0 + {\tilde{\mathbf {u}}}_1 + {\tilde{\mathbf {u}}}_2\), \(\mathbf p_i={\tilde{\mathbf {u}}}_i\), \(i=1,2\) for their conjugated momenta, where \({\tilde{\mathbf {u}}}_0 = M_* \dot{\mathbf {u}}_0\), \({\tilde{\mathbf {u}}}_i = m_i \dot{\mathbf {u}}_i\), \(i=1,2\) are the linear (barycentric) momenta of the bodies. In Cartesian coordinates, for a given planet, the heliocentric positions \({\mathbf {r}}= (x,y)\) and barycentric velocities \({\mathbf {v}}= (v_x, v_y)\) are related to the orbital elements by the usual formal relationships

$$\begin{aligned} x= & {} a (\cos {E} - e) \cos {\varpi } - a \sqrt{1 - e^2} \sin {E} \sin {\varpi }, \nonumber \\ y= & {} a (\cos {E} - e) \sin {\varpi } + a \sqrt{1 - e^2} \sin {E} \cos {\varpi },\nonumber \\ v_x= & {} \left( -a \sin E\cos \varpi - a \sqrt{1 - e^2} \cos E\sin \varpi \right) \frac{n}{1 - e \cos E},\\ v_y= & {} \left( -a \sin E\sin \varpi + a \sqrt{1 - e^2} \cos E\cos \varpi \right) \frac{n}{1 - e \cos E},\nonumber \end{aligned}$$
(2.2)

where a is the semimajor axis, e is the eccentricity, \(E\) is the eccentric anomaly, \(\varpi \) is the longitude of the pericenter, and \(n = \sqrt{{\mathcal {G}}(M_* + m)/a^{3}}\) is the mean motion. Note that the orbital elements defined in this way are different from those usually defined by astronomers, which are built from the same relationships but using the heliocentric velocities. For simplicity we restrict to coplanar motions for the planets, so there is no z component, no inclination and no ascending node. All quantities relative to the inner and outer planet will be denoted with subscripts 1 and 2, respectively. In order to make use of the orbital elements defined from canonical Poincaré variables and at the same time maintain the canonical nature of the system, we introduce the modified Delaunay action-angle variables \((\Lambda , \Gamma , \lambda , \gamma )\) given by

$$\begin{aligned} \Lambda&=\mu \sqrt{{\mathcal {G}}(M_*+m) a},&\quad \lambda = \ell + \varpi , \nonumber \\ \Gamma&=\Lambda (1-\sqrt{1-e^2})\simeq \Lambda e^2/2,&\quad \gamma = -\varpi , \end{aligned}$$
(2.3)

where \(\mu = \frac{M_* m}{M_*+m}\) is the reduced mass, \(\lambda \) is the mean longitude, and \(\ell = E- e\sin E\) is the mean anomaly. In these variables, the Keplerian part \({\mathcal {H}}_\mathrm{kepl}\) of the Hamiltonian (2.1) takes the form

$$\begin{aligned} {\mathcal {H}}_\mathrm{kepl} = -\frac{{\mathcal {G}}^2 (M_* + m_1)^2 \mu _1^3}{2\Lambda _1^2} -\frac{{\mathcal {G}}^2 (M_* + m_2)^2 \mu _2^3}{2\Lambda _2^2}. \end{aligned}$$
(2.4)

We impose a first-order mean motion resonance between the two planets, that is we assume that the two mean motions \(n_1=\sqrt{{\mathcal {G}}(M_*+m_1)/a_1^3}\) and \(n_2=\sqrt{{\mathcal {G}}(M_*+m_2)/a_2^3}\) satisfy the resonance condition \(k n_2 - (k-1) n_1 \sim 0\), where \(k\in \mathbb {Z}\) is a positive integer, \(k\ge 2\). We now average the Hamiltonian over the fast angles. In fact, since the Keplerian part \({\mathcal {H}}_\mathrm{kepl}\) does not depend on the angles, only the perturbation Hamiltonian \({\mathcal {H}}_\mathrm{pert}\) needs averaging. We note that we need to integrate \({\mathcal {H}}_\mathrm{pert}\), e.g., with respect to the angle \(\lambda _1\) over the interval \([0,2 k \pi ]\), corresponding to k revolutions of the inner planet around the star (which in turn by the resonance condition is equivalent to \((k-1)\) revolutions of the outer planet), in order to fully recover the periodicity of the Hamiltonian. This leads to a new averaged perturbing Hamiltonian which we denote with \({\mathcal {H}}_\mathrm{res}\):

$$\begin{aligned} {\mathcal {H}}_\mathrm{res} := {\bar{{\mathcal {H}}}}_\mathrm{pert} = \frac{1}{2k\pi }\int _0^{2k\pi } {\mathcal {H}}_\mathrm{pert} {\text {d}{\lambda }}_1; \end{aligned}$$
(2.5)

the full averaged Hamiltonian is therefore

$$\begin{aligned} {\bar{{\mathcal {H}}}} = {\mathcal {H}}_\mathrm{kepl} + {\mathcal {H}}_\mathrm{res}. \end{aligned}$$
(2.6)

From an analytical perspective, we remark that only certain combinations of the angles will appear in the Fourier expansion of the averaged Hamiltonian \({\bar{{\mathcal {H}}}}\). Indeed, by the d’Alembert rules, after the averaging procedure, of all angles depending explicitly on \(\lambda _1\) and \(\lambda _2\), only those of the form

$$\begin{aligned} j \big (k \lambda _2 - (k-1)\lambda _1\big ) + j_1\gamma _1 + j_2\gamma _2, \quad j, j_1, j_2\in \mathbb {Z}^{+}, j_1+j_2=j, \end{aligned}$$
(2.7)

will survive. With this in mind, in order to simplify the expression of the resonant harmonics appearing in the Hamiltonian \({\mathcal {H}}_\mathrm{res}\) one can introduce the following canonical action-angle variables (Sessin and Ferraz-Mello 1984):

$$\begin{aligned} \mathcal {K}&=\Lambda _1 + \frac{k-1}{k}\Lambda _2, \quad \kappa = \lambda _1, \nonumber \\ \Theta&=\Lambda _2/k, \quad \theta = k\lambda _2-(k-1)\lambda _1. \end{aligned}$$
(2.8)

The newly defined angle \(\kappa \) does not appear explicitly in the Hamiltonian, making its conjugated action \(\mathcal {K}\) a constant of motion. The significance of the conservation of \(\mathcal {K}\) is already explained in Batygin and Morbidelli (2013); in particular, it yields the location of exact Keplerian resonance from the observed values of semimajor axes. As we will see, especially at low eccentricities the semimajor axes of the two planets deviate away from the nominal commensurability, by an amount which also depends on the planetary masses. Therefore, the observed values of \(a_1\) and \(a_2\) do not alone reveal how close the planets are to resonance, nor they represent the nominal values \({\bar{a}}_1\) and \({\bar{a}}_2\) of the semimajor axes that satisfy the exact Keplerian resonant relationship \({\bar{a}}_1/{\bar{a}}_2=((k-1)/k)^{2/3}\). However, by calculating from their observed values the value of the constant \(\mathcal {K}\), and imposing in the formula

$$\begin{aligned} \frac{\mathcal {K}}{\Lambda _2} = \frac{\mu _1}{\mu _2} \sqrt{\frac{(M_*+m_1)}{(M_*+m_2)}\frac{a_1}{a_2}} + \frac{k-1}{k}, \end{aligned}$$
(2.9)

the condition of exact resonance, \(\alpha =a_1/a_2=((k-1)/k)^{2/3}\), one can obtain \({\bar{a}}_2\) from \({\bar{a}}_2 = ({\bar{\Lambda }}_2/\mu _2)^2 / ({\mathcal {G}}(M_* + m_2))\) and \({\bar{a}}_1\) from \({\bar{a}}_1=((k-1)/k)^{2/3} {\bar{a}}_2\).

Considering now the remaining three pairs of canonical action-angle variables, a final canonical transformation is made:

$$\begin{aligned} \Psi _1&=\Gamma _1+\Gamma _2, \quad \psi _1 = \theta +\gamma _1, \nonumber \\ \Psi _2&=-\Gamma _2, \quad \delta {\gamma }= \gamma _1-\gamma _2,\\ \Omega&=\Theta -\Gamma _1-\Gamma _2, \quad \theta '= \theta . \nonumber \end{aligned}$$
(2.10)

Using again (2.7), it is trivial to see that in the Hamiltonian \({\bar{{\mathcal {H}}}}\) only angles of the form

$$\begin{aligned} j\psi _1 + j_2\delta {\gamma }, \quad j,j_2\in \mathbb {Z}^{+} \end{aligned}$$
(2.11)

will appear, i.e., angles in which \(\theta '\) does not enter explicitly, making \(\Omega \) our second constant of motion and thus reducing to two the degrees of freedom of our system. Note that the two constants of motion \(\Omega \) and \(\mathcal {K}\) are linked to the total angular momentum \(\mathcal {L}\), which in these mixed variables (orbital elements derived from heliocentric positions and barycentric velocities) is given by

$$\begin{aligned} \mathcal {L}= m_1\sqrt{{\mathcal {G}}(M_*+m_1)a_1(1-e_1^2)} + m_2\sqrt{{\mathcal {G}}(M_*+m_2)a_2(1-e_2^2)}; \end{aligned}$$
(2.12)

to first order in the masses, we have \(\mathcal {K}+\Omega =\mathcal {L}\).

2.1 First- and higher-order expansions of the Hamiltonian

An analytical treatment of first-order resonances making use of an expansion of the Hamiltonian up to first order in the eccentricities was presented in Batygin and Morbidelli (2013), yielding a qualitative description of the resonant dynamical evolution of two planets. Following this approach, the resonant Hamiltonian \({\mathcal {H}}_\mathrm{res}\) in variables (2.3) takes the form

$$\begin{aligned} \begin{aligned} {\mathcal {H}}_\mathrm{res}&= -\frac{{\mathcal {G}}^2 M_* m_1 m_2^3}{\Lambda _2^2}\left( f_\mathrm{res}^{(1)}\sqrt{\frac{2\Gamma _1}{\Lambda _1}} \cos \big (k\lambda _2-(k-1)\lambda _1 + \gamma _1\big )\right. \\&\quad \left. +\, f_\mathrm{res}^{(2)}\sqrt{\frac{2\Gamma _2}{\Lambda _2}} \cos \big (k\lambda _2-(k-1)\lambda _1 + \gamma _2\big )\right) , \end{aligned} \end{aligned}$$
(2.13)

where the coefficients \(f_\mathrm{res}^{(1)}\) and \(f_\mathrm{res}^{(2)}\) depend (weakly) on the semimajor axis ratio. Note that since this is an expansion up to first order in e and the two terms in parenthesis are already of order \(\sqrt{\Gamma }=\mathcal {O}(e)\), we can evaluate \(\Lambda \) on the nominal values of the semimajor axis, thus fixing them to \({\bar{\Lambda }}_1\) and \({\bar{\Lambda }}_2\). By doing so, the coefficients \(f_\mathrm{res}\) can be truly considered constant; one may find in Murray and Dermott (2000) formulae to obtain their numerical value in the case of different resonances. After the change of variable (2.8) the resonant Hamiltonian \({\mathcal {H}}_\mathrm{res}\) takes the simple form

$$\begin{aligned} {\mathcal {H}}_\mathrm{res}=-\frac{{\mathcal {G}}^2 M_* m_1 m_2^3}{\bar{\Lambda }_2^2}\left( \alpha _1 \sqrt{2\Gamma _1}\cos (\theta +\gamma _1) + \alpha _2 \sqrt{2\Gamma _2}\cos (\theta +\gamma _2)\right) , \end{aligned}$$
(2.14)

where \(\alpha _i = f_\mathrm{res}^{(i)}/\sqrt{\bar{\Lambda }_i}\), \(i=1,2\). The full Hamiltonian still of course retains the form \({\bar{{\mathcal {H}}}} = {\mathcal {H}}_\mathrm{kepl} + {\mathcal {H}}_\mathrm{res}\) as in (2.6). While this Hamiltonian contains at the moment two harmonics, it is actually integrable, since it is possible to carry out a series of canonical changes of variables, following, e.g., the approach in Sessin and Ferraz-Mello (1984), which makes it dependent on only one harmonic and extracts another integral of motion. This advantageous reduction can be used to obtain a general description of the dynamics (e.g., Batygin and Morbidelli 2013; Ramos et al. 2017). However, it is insufficient when one confronts even qualitatively the prediction of this theoretical model with results from numerical simulations, as we will see in the next section, where we compute the locus of equilibrium points (i.e., periodic orbits of the full problem) as a function of the system’s angular momentum.

Higher-order expansions are possible. However, the Hamiltonian can no longer be reduced to one depending on a single combination of angles, i.e., it will not be integrable. Moreover, while they represent a more faithful representation of the real dynamics, it is still not adequate enough for good quantitative accord with the results of numerical simulations, as we will see in the next section. Therefore, we develop below the formalism for unexpanded Hamiltonians, using a semi-analytical approach (i.e., computing the integral (2.5) numerically), already employed, e.g., in Moons and Morbidelli (1993), Moons and Morbidelli (1995), Sidorenko (2006), Pichierri et al. (2017) for the restricted problem and in Beaugé et al. (2006) and Michtchenko et al. (2006) for the full three-body problem.

2.2 Equilibrium points of the averaged Hamiltonian

We now consider the averaged Hamiltonian \(\bar{{\mathcal {H}}}(\Psi _1,\Psi _2,\psi _1,\delta {\gamma };\Omega )\) as a system with two degrees of freedom with parametric dependence on the value of \(\Omega \), the action defined in (2.10) (note that the symbol \(\Omega \) usually denotes the longitude of the node, which is not defined in this case given the planar nature of the problem), and look for its equilibrium points. The Hamiltonian also parametrically depends on \(\mathcal {K}\), but as we have seen this variable encodes the location of exact resonance, for which \(a_2/a_1 = {\bar{a}}_2/{\bar{a}}_1 = (k/(k-1))^{2/3} =: {\bar{R}}\), as well as the value of the planetary masses. Once we have fixed \(m_1\), \(m_2\) and k, we can choose units in which \({\bar{a}}_2 = 1\), so that \(\mathcal {K}\) obtains a natural value relative to the problem at hand.

Equilibrium points correspond to stationary solutions and are therefore found by solving simultaneously in the variables \((\Psi _1,\Psi _2,\psi _1,\delta {\gamma }) = \mathbf x\) the set of equations

$$\begin{aligned} \frac{\partial {\mathcal {H}}}{\partial \Psi _1}=0,\quad \frac{\partial {\mathcal {H}}}{\partial \Psi _2}=0,\quad \frac{\partial {\mathcal {H}}}{\partial \psi _1}=0,\quad \frac{\partial {\mathcal {H}}}{\partial \delta {\gamma }}=0, \end{aligned}$$
(2.15)

for different values of the constant of motion \(\Omega \). Because of the analytical properties of the Hamiltonian \({\bar{{\mathcal {H}}}}\), namely the fact that it contains only cosines of angles of the form (2.11), any combination of equilibrium values \(\psi _\mathrm{1,eq} = 0,\pi \) and \(\delta {\gamma }_\mathrm{eq} = 0,\pi \) will satisfy the last two equations in (2.15). Taking any of these possible combination, we solve the first two equations in (2.15) for \(\Psi _1\) and \(\Psi _2\), and we find two values \((\Psi _\mathrm{1,eq},\Psi _\mathrm{2,eq})\). We then have to check that the point \(\mathbf x_\mathrm{eq} = (\Psi _\mathrm{1,eq},\Psi _\mathrm{2,eq},\psi _\mathrm{1,eq},\delta {\gamma }_\mathrm{eq})\) is a stable equilibrium point for the Hamiltonian \({\bar{{\mathcal {H}}}}\). In principle, the last two equations in (2.15) could be satisfied for a combination of values of \(\psi _1\) and \(\delta {\gamma }\) different from \(0, \pi \) (asymmetric equilibria), but this is the case only if all symmetric equilibria are unstable. This is because in the adiabatic limit in which one takes the second (slower) degree of freedom \((\Psi _2,\delta {\gamma })\) as fixed, the Hamiltonian can be considered as describing an integrable one-degree-of-freedom system in the pair of (faster) variables \((\Psi _1,\psi _1)\), with slowly varying parameters corresponding to the slow degree of freedom. It is well known that for a one-degree-of-freedom system and at the relatively low eccentricities that are obtained in the process of capturing into resonance, asymmetric equilibria are possible only if a bifurcation occurs which changes the nature of the symmetric equilibria (which always exist) from stable to unstable. Thus, if one finds a stable symmetric equilibrium, the search for asymmetric stable equilibria can be avoided. The condition for stability of the equilibria is discussed in the next section and is the usual criterion whereby one imposes that the eigenvalues of the matrix which describes the linear approximation of the system around the equilibrium be purely imaginary.

By changing the value of the constant \(\Omega \) we obtain different equilibrium configurations, and once an equilibrium point in the canonical variables \((\Psi _1,\Psi _2,\psi _1,\delta {\gamma })\) is obtained, we can easily work our way back through the canonical transformation and obtain the equilibrium values for the semimajor axes and eccentricities of the two planets, which we denote with \(a_\mathrm{1,eq}\), \(a_\mathrm{2,eq}\), \(e_\mathrm{1,eq}\), \(e_\mathrm{2,eq}\). This results in the stable equilibrium curves shown in Figs. 1 and 2, which are found for \(\psi _\mathrm{1,eq} = 0\) and \(\delta {\gamma }_\mathrm{eq} = \pi \).

Fig. 1
figure 1

Equilibrium curves for three different first-order mean motion resonance, calculated as described in the text using the first-order expansion (2.13) (dashed blue line), a second-order expansion (dotted red line) and the full averaged Hamiltonian (2.5) (continuous green line). Here we put \(m_1 = m_2 = m = 10^{-5} M_*\). The equilibrium values for the angles are \(\psi _\mathrm{1,eq} = 0\) and \(\delta {\gamma }_\mathrm{eq} = \pi \). The orange vertical line indicates the location of exact Keplerian resonance, \(a_2/a_1 = {\bar{a}}_2/{\bar{a}}_1 = (k/(k-1))^{2/3}\). Note the discrepancy between the equilibrium curves with and without the expansion of the resonant Hamiltonian, due to the presence of higher-order harmonics which are not taken into account in the expanded Hamiltonians. a 2–1 mean motion resonance, b 3–2 mean motion resonance, c 4–3 mean motion resonance

Fig. 2
figure 2

Equilibrium curves for the three different first-order mean motion resonance, calculated as described in the text using the full averaged Hamiltonian (2.5), with different values for the planetary masses \(m_1 = m_2 = m\). Here again we have fixed \(\psi _\mathrm{1,eq} = 0\) and \(\delta {\gamma }_\mathrm{eq} = \pi \). The orange vertical line indicates the location of exact Keplerian resonance, \(a_2/a_1 = \bar{a}_2/\bar{a}_1 = (k/(k-1))^{2/3}\). a 2–1 mean motion resonance, b 3–2 mean motion resonance, c 4–3 mean motion resonance

We should immediately remark one property of these curves. As one can see from the first-order expansion (2.13), the rates of precession of the perihelia are estimated by \({\dot{\gamma }} \propto 1/\sqrt{\Gamma } \sim 1/e\), which grows substantially as \(e \rightarrow 0\). Therefore, in order to preserve the resonant condition \(\dot{(\theta +\gamma )}\sim 0\), it is necessary to have \({\dot{\theta }} = k{\dot{\lambda }}_2 - (k-1){\dot{\lambda }}_1 \not \sim 0\), i.e., \(a_2/a_1 \not \sim {\bar{R}} = (k/(k-1))^{2/3}\). Indeed, we see from Fig. 1 that as the eccentricities vanish the equilibrium points deviate away from exact Keplerian commensurability, in a way that the semimajor axis ratio \(a_2/a_1\) grows as \(e\searrow 0\). This effect, as is shown in Fig. 2, is more and more evident as the planetary mass increases, since \({\dot{\gamma }}\propto m\). As a consequence, to sample these low-eccentricity equilibrium points with the correct value of \(\Omega \), it is necessary to plug into its analytical formula values of the semimajor axes such that \(a_2/a_1 = {\bar{R}} + \delta {(a_2/a_1)}\).

We also point out the different equilibrium curves that one obtains using the expanded Hamiltonians and the non-expanded averaged Hamiltonian (Fig. 1). The case of the 2–1 mean motion resonance is the most striking. Using a first-order expansion, as the semimajor axis ratio approaches the exact Keplerian ratio one finds equilibrium points with increasing values of \(e_2\) (and \(e_1\)). This is qualitatively different from the result obtained with higher-order expansions and the averaged Hamiltonian: we see that \(e_2\) reaches a maximum value and then starts approaching zero again. (Note that although \(e_2 \sim 0\), \(e_1\) is large, so high-order terms are important.) This fact is known [e.g., Beaugé et al. (2006) and Michtchenko et al. (2006) using the numerical averaging of the Hamiltonian, Hadjidemetriou (2002) and Antoniadou and Voyatzis (2014) tracking periodic orbits]. We further note that while the expansion to order 2 in the eccentricities captures this behavior, it does not agree quantitatively with the averaged Hamiltonian. On the other hand, the analytical curve obtained with the full averaged Hamiltonian is in perfect agreement with a simulation in which two planets on initially circular orbits are subjected to convergent migration resulting in resonant capture (Fig. 3). These simulations will be detailed in Sect. 3, but they are expected to track the locus of equilibrium points as the semimajor axis ratio \(a_2/a_1\) decreases toward the Keplerian resonant ratio. Because here we apply no damping on the eccentricities, the latter are a priori free to grow toward unity. We observe that at the point in which \(e_2\) vanishes, \(\delta \varpi \) flips from \(\pi \) to 0, which is evident from Fig. 3c. Indeed, the equilibrium point on the \(e_2 \cos (\delta \varpi )\) axis is initially on the negative side, and as the angular momentum decreases it moves to the positive axis. This transition from \(\delta \varpi =\pi \) to 0 is smooth, and this is why the planets stay at the equilibrium point, without triggering secular oscillations.

We note that at higher values of e these equilibrium points found for \(\delta {\gamma }=\pi \) (or \(\delta {\gamma }=0\) in the case of the 2–1 resonance) might be unstable, and stable asymmetric equilibrium points for different values of \(\delta {\gamma }\) are possible (see for example Beaugé et al. 2003, 2006, for a detailed study on the 2–1 mean motion resonance); in the case reported here, they are unstable for \(e_1\) between about 0.28 and 0.35 corresponding to \(e_2\) between about 0.08 and 0.11. We should also note that a similar behavior of the equilibrium curves, where they reach a maximum value in e and then bend down to reach 0, is also present in the other resonances that we have considered, but that this happens at much higher values of e. In the case of the 3–2 and 4–3 resonances, it is \(e_1\) that reaches a maximum value, of \(e_1 \simeq 0.22\) and \(e_1 \simeq 0.12\), respectively. However, these circumstances occur at high values of the eccentricities and are beyond the scope of this work.

Fig. 3
figure 3

Result of a numerical simulation for two planets in the 2–1 mean motion resonance, with planetary masses \(m_1 = m_2 = m = 10^{-5} M_*\). In panel a we show both eccentricities \(e_1\) (in blue) and \(e_2\) (in black); in panel b the resonant angles \(\psi _1 = \theta + \gamma _1\) (in blue) and \(\psi _2 = \theta + \gamma _2\) (in black); in panel c the angle \(\delta {\gamma }\). In all panels the quantities are given in terms of the semimajor axes ratio \(a_2/a_1\), to easily compare the results with the panels in Fig. 1a; in panel a we also superimpose the equilibrium curves, shown in dotted gray lines, for \(\delta {\gamma }=\pi \) and \(\delta {\gamma }=0\). We again indicate in all plots the location of exact Keplerian resonance with an orange vertical line. The green points correspond to the equilibrium configuration of this system when \(e_2 \simeq 0.006\) is maximal; the red points correspond to the equilibrium configuration of the system when \(e_2\) has then reached the value 0. We observe that the evolution of the orbital parameters is very well described by our analytical curves; the large oscillations, visible especially in panel a, are short periodic, due mainly to the fast synodic angle \(\lambda _1-\lambda _2\), which is averaged out in the analytical model. We notice that when \(e_2\) reaches 0 (red point) the value of \(\delta {\gamma }\) is changing from \(\pi \) to 0. This happens without triggering large oscillations as the system is still smoothly following the curve of stable equilibrium points, see text for details. a \(e_1\) and \(e_2\), b resonant angles \(\psi _i = \theta +\gamma _i\), c angle \(\delta {\gamma }\)

2.3 Frequencies in the limit of small amplitude of libration

In this section we calculate the frequencies of the system around an equilibrium point assuming small amplitude of libration by considering the linearized system near the equilibrium point. As we will see in the next section, we expect that in our numerical simulations the planets will be very close to the equilibrium in the variables (2.10), and will move from an equilibrium corresponding to some value of the constant of motion \(\Omega \) to the next while preserving a small amplitude of libration. We then discuss how we can check numerically the validity of our calculations.

Near the equilibrium point \(\mathbf x_\mathrm{eq}\) the Hamiltonian \(\bar{{\mathcal {H}}}(\Psi _1,\Psi _2,\psi _1,\delta {\gamma }) = \bar{{\mathcal {H}}}(\mathbf x)\) can be approximated as

$$\begin{aligned} {\bar{{\mathcal {H}}}}(\mathbf x) = {\bar{{\mathcal {H}}}}(\mathbf x_\mathrm{eq}) + {\bar{{\mathcal {H}}}}_\mathrm{lin}(\mathbf x) + {\bar{{\mathcal {H}}}}_\mathrm{quad}(\mathbf x) + \mathcal O(\mathbf x^3). \end{aligned}$$
(2.16)

The linear part \({\bar{{\mathcal {H}}}}_\mathrm{lin}(\mathbf x) \equiv 0\) by definition of equilibrium point, and the quadratic part is given by

$$\begin{aligned} {\bar{{\mathcal {H}}}}_\mathrm{quad}(\mathbf x) = \frac{1}{2} (\mathbf x - \mathbf x_\mathrm{eq})^{\intercal } C (\mathbf x - \mathbf x_\mathrm{eq}), \end{aligned}$$
(2.17)

where \(C := {\mathbb {H}}({\bar{{\mathcal {H}}}}(\mathbf x_\mathrm{eq}))\) is the Hessian of \({\bar{{\mathcal {H}}}}\) at the equilibrium point \(\mathbf x_\mathrm{eq}\). Dropping the unimportant constant term \({\bar{{\mathcal {H}}}}(\mathbf x_\mathrm{eq})\) and ignoring the higher-order terms, the linearized Hamiltonian system of equation then becomes

$$\begin{aligned} \frac{{\text {d}{}}}{{\text {d}{t}}}{(\mathbf x-\mathbf x_\mathrm{eq})} = J\nabla {\bar{{\mathcal {H}}}}_\mathrm{quad} = J C (\mathbf x-\mathbf x_\mathrm{eq}), \end{aligned}$$
(2.18)

where \(\nabla =\nabla _{\mathbf x}\), and J is the symplectic matrix

$$\begin{aligned} J = \left( \begin{matrix} {\mathbf {0}} &{} -{\mathbb {I}} \\ {\mathbb {I}} &{} {\mathbf {0}} \end{matrix} \right) . \end{aligned}$$
(2.19)

The study of the stability of the equilibrium then reduces to writing the matrix JC and finding its eigenvalues. Moreover, given that the system is Hamiltonian, it is well known that the four purely imaginary eigenvalues come in pairs, \((+\,i \omega _1, -\,i \omega _1)\) and \((+\,i\omega _2, -\,i\omega _2)\), with \(\omega _{1,2}>0\). These \(\omega _1\) and \(\omega _2\) are the two characteristic frequencies of the system at vanishing amplitude of libration around the equilibrium point: they are associated, respectively, with the (faster) libration of the resonant pair \((\Psi _1,\psi _1)\), and with the (slower) secular libration to which the pair of variables \((\Psi _2,\delta {\gamma })\) is subjected. We expect that \(\omega _1\) will be much higher than \(\omega _2\), except at vanishing eccentricities, where the system exhibits a fast precession of the perihelia.

We check that our analytical calculations of the frequencies are correct as follows. We first take a system of two planets well in resonance, e.g., in the 3–2 mean motion resonance, \({\dot{\lambda }}_1 \simeq \frac{3}{2}{\dot{\lambda }}_2\), but not exactly on the equilibrium point. Here we take \(m_1 = m_2 = 10^{-5} M_*\). We then observe the evolution of the orbital elements a and e, from which we obtain that of the four actions, and we record \({\bar{\Psi }}_1\), \({\bar{\Psi }}_2\), \({\bar{\mathcal {K}}}\), \({\bar{\Omega }}\) their mean values. Note that the mean values are needed because the system is undergoing a fast evolution due to the non-resonant angles, which have been averaged out in our analytical model. In particular, e.g., in Fig. 4a we notice the prominent effect of the harmonic relative to the circulating angle \(\lambda _1-\lambda _2\), with a frequency that can be calculated as \(\omega _{\lambda _1-\lambda _2} = ({\dot{\lambda }}_1-{\dot{\lambda }}_2)=\frac{1}{3}{\dot{\lambda }}_1 = \frac{1}{3} 2\pi /(a_1^{3/2})\simeq 65.4\), for the actual value of \(a_1 = 0.1008\) AU and assuming \({\mathcal {G}}M_* = (2\pi )^2\), that is a period \(T_{\lambda _1-\lambda _2}\simeq 0.096\) years for \(M_* = M_\odot \). We then look at the two angles, checking that the resonant angle \(\psi _1\) is librating (around 0) and noticing that \(\delta {\gamma }\) librates (around \(\pi \)); we therefore fix \({\bar{\psi }}_1=0\) and \({\bar{\delta {\gamma }}}=\pi \). Using the values for \({\bar{\mathcal {K}}}\), \({\bar{\Omega }}\) and of the two angles \({\bar{\psi }}_1 = 0\), \({\bar{\delta {\gamma }}} = \pi \), we calculate analytically an equilibrium point \(\mathbf x_\mathrm{eq}\) as explained above. This equilibrium point well represents the state of the system, with \(\Psi _\mathrm{1,eq}\) and \(\Psi _\mathrm{2,eq}\) differing from the observed mean values \({\bar{\Psi }}_1\), \({\bar{\Psi }}_2\) by less that 0.03%. For this equilibrium point we calculate the two frequencies \(\omega _1 \simeq 0.62\) and \(\omega _2 \simeq 0.23\), i.e., periods of \(T_1 = 2\pi /\omega _1 \simeq 10.5\) years and \(T_2 = 2\pi /\omega _2 \simeq 26.9\) years. In order to clearly see these two frequencies in a numerical simulation, we excite the system’s initial condition, in the semimajor axes ratio and in eccentricity, respectively, thereby increasing the amplitude of librations relative to the resonant angle \(\psi _1\) and the angle \(\delta {\gamma }\). In practice, we first take the same initial conditions of the original unexcited system, and slightly excite the value of \(R = a_2/a_1\), e.g., by forcingly change the initial value \(a_2(0)\) of \(a_2\) to \((1+\epsilon ) a_2(0)\), where \(\epsilon \) is a small number. We plot the resulting evolution of the semimajor axis and eccentricity for the inner planet in Fig. 4, where we see clearly an oscillation with period \(T_1 \simeq 10.5\) years (panels b, d). Similarly, we take again the same initial condition of the unexcited system and slightly excite the value of \(e_2(0)\) to \((1+\tilde{\epsilon }) e_2(0)\), where \(\tilde{\epsilon }\) is a small number. We plot the resulting evolution of the semimajor axis and eccentricity for the inner planet in Fig. 5, where we now also see an oscillation with period \(T_2 \simeq 26.9\) years on top of the one with period \(T_1 \simeq 10.5\) years (panel d). In both Figs. 4 and 5 we overplot the result of the analytical explicit integration of the linearized equations of motion (2.18) around the equilibrium point. These follow very closely the evolution of the three-body integrations.

Fig. 4
figure 4

Evolution of \(a_1\) and \(e_1\) on different timescales for a system in the 3–2 mean motion resonance, after a forced small excitation of \(R=a_2/a_1\). Here \(m_1 = m_2 = 10^{-5} M_*\), \(M_* = M_\odot \), in units where \({\mathcal {G}}M_* = (2\pi )^2\). We notice the fast evolution on the two left panels due to the synodic period \(T_{\lambda _1-\lambda _2}\simeq 0.096\) years (green vertical lines). On the right panels, we notice the oscillations with a longer period of \(T_1 = 2\pi /\omega _1 \simeq 10.5\) years (orange vertical lines), as predicted by the analytical calculation of \(\omega _1\), see text. The thick purple curve is the result of direct integration of the linearized equations of motion around the equilibrium point for the averaged Hamiltonian, Eq. (2.18); the initial conditions are the same as those for the numerical simulations. One sees that the analytical model follows very closely the averaged evolution obtained via three-body numerical integration. a \(a_1\), short-period oscillations, b \(a_1\), long-period oscillations, c \(e_1\), short-period oscillations, d \(e_1\), long-period oscillations

Fig. 5
figure 5

Evolution of \(a_1\) and \(e_1\) on different timescales for a system in the 3–2 mean motion resonance, after a forced small excitation of \(e_2\). Here \(m_1 = m_2 = 10^{-5} M_*\), \(M_* = M_\odot \), in units where \({\mathcal {G}}M_* = (2\pi )^2\), as in Figure 4. We notice again the fast evolution on the two left panels due to the synodic period \(T_{\lambda _1-\lambda _2}\simeq 0.096\) years (green vertical line). On the right panels, we notice still the oscillations with a longer period of \(T_1 = 2\pi /\omega _1 \simeq 10.5\) years (orange vertical lines); in addition, in panel d we notice how \(e_1\) is now also effected by libration of \(\delta {\gamma }\), with characteristic period of \(T_2 = 2\pi /\omega _2 \simeq 26.9\) years (red vertical lines), as predicted by the analytical calculation of \(\omega _2\), see text. The thick purple curve is again the result of direct integration of equation (2.18), with the same initial conditions as the numerical simulations, showing again good fit. a \(a_1\), short-period oscillations, b \(a_1\), long-period oscillations, c \(e_1\), short-period oscillations, d \(e_1\), long-period oscillations

3 Convergent inward migration in disk and resonant capture

With our resonant model at hand, we now proceed with the study of our first step in our numerical and analytical investigations, that of resonant capture in a protoplanetary disk. This is an efficient method to obtain planets deeply in mutual mean motion resonance (e.g., Matsumoto et al. 2012; Ramos et al. 2017). We start with two planets of equal mass, \(m_1=m_2=m\), typically \(m/M_*=10^{-5} - 10^{-2}\), on coplanar orbits, embedded in a protoplanetary disk. We also write \(\mu _1=\mu _2=\frac{M_* m}{M_*+m}=:\mu \). Our numerical simulations consist of the implementation of a symplectic three-body integrator (swift_symba) to which fictional analytical dissipative forces are added that describe, in the limit of the purposes of this study, the interaction between the planets and a protoplanetary disk. In what follows, we describe these forces, dropping for ease of reading the index \(i = 1,2\) to denote the planets’ elements and parameters.

For each planet, the effect of the disk–planet interaction can be viewed as composed of two separate contributions, one operating on the eccentricity e and one operating on the semimajor axis a. Concerning the effect of the gas on the eccentricity e, our code implements a damping effect of the disk as

$$\begin{aligned} \dot{e}_\mathrm{damp} := -\frac{e}{\tau _e}, \end{aligned}$$
(3.1)

where \(\tau _e\) is given, in the limit of vanishing eccentricities, by

$$\begin{aligned} \tau _e \simeq \frac{\tau _\mathrm{wave}}{0.780}, \end{aligned}$$
(3.2)

and \(\tau _\mathrm{wave}\) is the typical Type I migration timescale, given by

$$\begin{aligned} \tau _\mathrm{wave} = \frac{M_*}{m} \frac{M_*}{\Sigma a^2} \frac{h^4}{\sqrt{{\mathcal {G}}M_*/a^3}} \end{aligned}$$
(3.3)

(see, e.g., Cresswell and Nelson 2006; Baruteau et al. 2014). The parameters \(\Sigma =\Sigma (r) = \Sigma _0 r^{-\alpha }\) and \(h = h(r) = H/r \propto (r/r_0)^\beta \) are the surface density and aspect ratio of the disk, respectively, and are evaluated at the position of the planet. The flaring index \(\beta \) is taken to be \(\beta = 0.25\) and \(H = H(r) = z_\mathrm{scale} (r/r_0)^\beta r\) is the scale height. We take \(\left. h\right| _{5.2 \text {AU}} = 5\%\) so that \(z_\mathrm{scale} = 0.05 \times (5.2 \text { AU}/r_0)^{-\beta }\). The parameter \(\alpha \) sets the surface density profile of the disk; here we take \(\alpha = 1\).

Secondly, the disk–planet interaction results in a torque and therefore in an exchange of angular momentum \(\mathcal {L}\). For a planet,

$$\begin{aligned} \mathcal {L}= m \sqrt{{\mathcal {G}}(M_*+m) a (1-e^2)}. \end{aligned}$$
(3.4)

The torque \(T:={\dot{\mathcal {L}}}\) is taken here to be negative, so that the effect on the semimajor axis a is that of inward, Type I migration. It is modeled in our simulations as

$$\begin{aligned} {\dot{\mathcal {L}}}_{\mathrm{mig}} = -\frac{\mathcal {L}}{\tau _{mig}}, \end{aligned}$$
(3.5)

where \(\tau _{mig}\) is given, again in the limit of vanishing eccentricities, by

$$\begin{aligned} \tau _{\mathrm{mig}}\simeq 2 \frac{\tau _\mathrm{wave}}{(2.7 + 1.1 \alpha )} h^{-2}, \end{aligned}$$
(3.6)

where again we take \(\alpha = 1\). To calculate the resulting effect on the semimajor axis a due to this planet–disk interaction, we take

$$\begin{aligned} {\dot{\mathcal {L}}}=\frac{{\text {d}{\mathcal {L}}}}{{\text {d}{t}}} = m\sqrt{{\mathcal {G}}(M_* +m)} \left( \frac{\dot{a}}{2\sqrt{a}}\sqrt{1-e^2} - \frac{\sqrt{a}}{\sqrt{1-e^2}}e \dot{e} \right) , \end{aligned}$$
(3.7)

and dividing by \(\sqrt{a}\) we obtain

$$\begin{aligned} \frac{\dot{a}}{a} = 2\frac{\dot{\mathcal {L}}}{\mathcal {L}} + \frac{2 e \dot{e}}{1-e^2} = - \frac{1}{\tau _a} - p \frac{e^2}{\tau _e}, \end{aligned}$$
(3.8)

where \(\tau _a=\tau _{mig}/2\) and \(p\simeq 2\) for small e. It is customary to introduce the quantity \(K = {\tau _{a}}/{\tau _{e}}\) which we call K-factor (cfr. Ramos et al. 2017). Note that

$$\begin{aligned} K = \frac{\tau _{a}}{\tau _{e}} \simeq \frac{0.780}{2.7+1.1} h^{-2}: \end{aligned}$$
(3.9)

given that disks are very thin, e.g., here \(h = \mathcal O(5 \times 10^{-2})\), we see that the K-factor is very large, of the order of at least \(K = \mathcal O(10^{2})\), meaning that the typical timescale of eccentricity damping is much shorter than that of migration. This allows us to assume that the planets approach the resonance on circular orbits, as any finite (but relatively small) initial eccentricity would be immediately damped by the disk.

In order to insure convergent migration and resonant capture, we need to stop the migration of the inner planet, since two equally massive planets would migrate inward at roughly the same rate and resonant capture would not occur (e.g., Ramos et al. 2017). To do this, we simulate the effect of a disk edge, which corresponds to a sharp drop in \(\Sigma \) as r decreases. In this conditions, Masset et al. (2006) showed that a coorbital corotation torque is activated, which is positive and dominates the inward Type I torque. Thus inward migration stops at the inner edge of the disk. Masset et al. (2006) called this a planet trap and we follow this terminology here. For simplicity, the trap is modeled here by smoothly reversing the Type I torque. This is not what happens in reality. Modeling the real effects would require an appropriate implementation of the corotation torque, and that would depend on the \(\Sigma \) profile at the edge. Our recipe, however, is effective to stop the inward migration of the innermost planet and to retain the second planet in resonance, that is to exhibit the same effects observed in hydrodynamical simulations (Morbidelli et al. 2008). As we approach the disk edge \(d_\mathrm{edge}\) (at 0.1 AU in our simulations), we implement the planetary trap by smoothly reversing the sign of the migration in order to stop the inner planet from migrating all the way into the star. This is achieved by dividing \(\tau _{a}\) by a factor \(\tau _{a,{\mathrm{red}}}\) given by

$$\begin{aligned} \tau _{a,{\mathrm{red}}} = {\left\{ \begin{array}{ll} 1 &{} a\ge d_\mathrm{edge} (1+h_\mathrm{edge}), \\ 5.5 \times \cos \left( \frac{((d_\mathrm{edge}\times (1.+h_\mathrm{edge})-a) 2 \pi )}{(4 h_\mathrm{edge}\times d_\mathrm{edge})}\right) - 4.5 &{} d_\mathrm{edge}(1-h_\mathrm{edge}) \le a \le d_\mathrm{edge}(1+h_\mathrm{edge}), \\ -10 &{} 0 \le a\le d_\mathrm{edge}(1-h_\mathrm{edge}), \end{array}\right. }\nonumber \\ \end{aligned}$$
(3.10)

where \(h_\mathrm{edge}= z_\mathrm{scale} (d_\mathrm{edge}/r_0)^{0.25}\) is the aspect ratio of the disk at the edge.

Fig. 6
figure 6

Typical evolution of a system during capture into 3–2 mean motion resonance, for two planets of equal mass \(m_1 = m_2 = m = 10^{-5} M_*\). All quantities are given as a function of the semimajor axes ratio \(a_2/a_1\) in order to compare with the analytical calculations carried out in Sect. 2; to further aid the comparison, we superimposed to all plots the analytical values found using our averaged model with dashed lines. Note that the initial configuration is at the far right of the plots and with vanishing eccentricity, so we are very close to the equilibrium point, i.e., in a configuration of small amplitude of libration; this property of the system is conserved during its evolution as explained in the text. In this simulation, both the migration and eccentricity damping effects of the disk on the planets are active, so that the system eventually reaches a final configuration of low-amplitude libration around an equilibrium point for some value of the angular momentum. This final configuration is stable, see text for details. Note that the amplitude of libration of \(\psi _1\), \(\psi _2\) and \(\delta {\gamma }\) shrinks as \(a_2/a_1\) decreases. This is because initially the eccentricity is very small and therefore even a small oscillation around the equilibrium point can cause a large excursion in the angles. a \(e_2\), b resonant angles \(\psi _i = \theta +\gamma _i\), c angle \(\delta {\gamma }\)

As initial conditions in our simulations, we first assume circular orbits, \(e_\mathrm{1,init} = e_\mathrm{2,init}=0\), see above. Secondly, we choose the initial semimajor axes to be just outside a specific first-order mean motion resonance, \(a_\mathrm{2,init} \gtrsim (k/(k-1))^{2/3} a_\mathrm{1,init}\), \(k=2,3,\dots \). The two planets will migrate inward at roughly the same rate due to their interaction with the disk; the first planet will then reach the disk edge, where our imposed reversal of the sign of migration will cause it to stop migrating. The still migrating outer planet approaches the first planet and is then automatically locked in the desired mean motion resonance as a result of convergent Type I migration. The behavior of the planets as they approach resonance can be understood using adiabatic theory, provided that the migration timescale is much longer than the resonant libration timescale (see Sect. 2.3 for the latter). When the planets are far from resonance, the damping effect of the disk ensures that their orbits are circular. But the circular orbit is also the limit of the curve of the resonant equilibria for large \(a_2/a_1\) ratio (see Figs. 1, 2). Thus, the planets are very close to the equilibrium in the variables (2.10) corresponding to their large \(a_2/a_1\) ratio. If the evolution is adiabatic, the amplitude of libration around the equilibrium point (more precisely the value of the libration action—(Arnold 1963)) is preserved (Neishtadt 1999; Neishtadt et al. 2008; Henrard 1993). Given that initially this amplitude is close to zero, it will remain close to zero throughout the evolution. In reality, the application of the adiabatic principle can be done only if the non-conservative forces change the parameters of the Hamiltonian, and not if they affect directly its variables. If there is no damping on the eccentricities but only a drag on the semimajor axes, Deck and Batygin (2015) show that at low order in e, the dissipation only acts on the otherwise constant of motion \(\Omega \) (see 2.10) and does not act on the dynamical variables \(\Psi _1, \Psi _2, \psi _1, \delta {\gamma }\). In this case, the adiabatic principle can be used. Thus, as the planets approach each other, they have to follow the locus of equilibrium points computed in Sect. 2.2 and shown in Figs. 1 and 2. This is precisely what we observed in Fig. 3 for the 2–1 resonance. Thus, as the planets approach each other, their eccentricities start to grow. As shown in Fig. 3, if there were no eccentricity damping, at least one of the two planets’ eccentricities would grow indefinitely. However, as discussed above, the disk exerts an eccentricity damping. This has two effects. On the one hand, it stops the eccentricity growth and keeps the planets at a fixed semimajor axes ratio. That is, the mutual planet configuration freezes out, as we show in Fig. 6 for the 3–2 mean motion resonance. We discuss how to describe analytically this equilibrium configuration in “Appendix A.” On the other hand, it breaks the adiabatic approximation. The orbit either shrinks toward the equilibrium point, which becomes an attractor, or spiral away from the equilibrium, increasing the libration amplitude until it escapes from the resonance or reaches a limit cycle (Goldreich and Schlichting 2014). The conditions for one or the other behavior are quantified in Delisle et al. (2015) and Deck and Batygin (2015) as a function of planetary masses, damping forces, resonance index k. We come back to this in “Appendix A”, where we briefly discuss how, for the purposes of this work, we can ensure that the eventual instability would occur on very long timescales and by removing the gas early enough we can ignore this complication.

4 Limits of stability as a function of planetary mass

After the equilibrium configuration is attained, we slowly deplete the gas (that is have \(\Sigma \) decrease exponentially in Eq. (3.3)). This is done slowly enough and the system does not move considerably from the equilibrium configuration calculated in the previous section. We should only note that the damping in the eccentricities has the effect of changing the equilibrium values of the angles \(\psi _1\) and \(\delta {\gamma }\) from the ones which are found in the purely conservative planetary system [see, e.g., Batygin and Morbidelli (2013) for a formula of this shift, linking \(\psi _\mathrm{1,eq}\), and \(\delta {\gamma }_\mathrm{eq}\) to \(\tau _{e}\)]. This means that when the latter admits stable symmetric equilibrium points, \(\psi _\mathrm{1,eq},\delta {\gamma }_\mathrm{eq} = 0,\pi \), the non-conservative system might seem to contradict this; however, these are not asymmetric equilibrium points, as they are only due to the damping effect: when this is removed the system reaches the expected equilibrium values of the angles.

Now that we have an effective method for obtaining numerically a planetary system in mean motion resonance, and to describe its properties analytically, we intend to investigate its stability. In particular, we study the stability of pairs of equally massive, \(m_1 = m_2 = m\), resonant planets by considering their mass as a free parameter. We maintain the notation \(\mu = m M_*/(m+M_*)\) for the common reduced mass of the planets.

To perform this study, we can take the resonant equilibrium configurations obtained as described in the previous section, slowly deplete the gas, and then perform long-term integrations with the resulting orbital configuration as initial conditions, checking if the system exits the resonance, in which case the resonant configuration is deemed unstable; this analysis can be then performed for different masses. One might start with the planets already as massive as desired and repeat the exercise of capture in resonance through interaction with a disk of gas and then depletion of the gas (e.g., Matsumoto et al. 2012). However, if the region of high amplitude of libration around the equilibrium point is chaotic, the capture might not lead to an orbit near the resonant center, so that once the gas is removed an instability may develop, whereas the orbits might have remained stable if they had had a smaller amplitude of libration. If instead we take a system of planets deep in resonance and slowly increase their masses until the system shows instability, we can ensure that we are indeed probing the region of the phase space around the resonant equilibrium point. For, as long as the rate at which this increase is performed is small enough, the amplitude of libration around the equilibrium point will be an adiabatic constant and will be preserved. For simplicity, we chose a linear law \(m(t) = m(0) + M t\), where M is a constant (in practice, for the results shown below, we chose to increase the planetary mass so that it grows by 3 orders of magnitude in \(5\times 10^4\) years; changing m slowly enough, we notice no noticeable difference in the resulting evolution if one uses different laws or rates of change for m(t)); in our code, we increase the planetary mass at each integration step. We should stress here that the increase in the planetary parameter is a purely numerical exercise: one should assign no physical meaning to it, and the fact of changing the value of m is just a way to explore the stability of deeply resonant systems as a function of planetary masses starting from one system that is well in resonance, the configuration of which one can describe analytically.

Indeed, another advantage of operating this way is that we can follow analytically the evolution of the system as the mass increases, at least to a very good approximation. To do this, we look at the quantity

$$\begin{aligned} \mathcal {L}_\mathrm{spec} := \frac{\mathcal {L}}{\mu } = \frac{m}{\mu }\left( \sqrt{{\mathcal {G}}(m+M_*) a_1 (1-e_1^2)} + \sqrt{{\mathcal {G}}(m+M_*) a_2 (1-e_2^2)}\right) , \end{aligned}$$
(4.1)

which we (improperly) call specific angular momentum. This quantity is not exactly constant as the planetary mass increases, but its value changes very little up to high enough values of \(m/M_*\), cfr. Fig. 7a.

In the approximation \(\mathcal {L}_\mathrm{spec} = \hbox {const}\), we can follow analytically the evolution of a resonant system in which the planetary mass parameter m is slowly changing. To do this, consider a resonant system in the vicinity of an equilibrium point \((\Psi _\mathrm{1,eq}', \Psi _\mathrm{2,eq}', \psi _\mathrm{1,eq}', \delta {\gamma }_\mathrm{eq}')\) for some value \(m'\) of m and some value of the integrals of motion \(\mathcal {K}'\) and \(\Omega '\). Note now that \(\mathcal {L}= \frac{m}{\mu }(\mathcal {K}+ \Omega )\), i.e., \(\mathcal {L}_\mathrm{spec} = \frac{m}{\mu ^2}(\mathcal {K}+ \Omega )\). We can then obtain the values of these actions when we change m to \( m''\), by setting

$$\begin{aligned} \mathcal {K}'' = \frac{m'/(\mu ')^2}{m''/(\mu '')^2} \mathcal {K}',\quad \Omega '' = \frac{m'/(\mu ')^2}{m''/(\mu '')^2} \Omega ', \end{aligned}$$
(4.2)

where \(\mu '\) and \(\mu ''\) are the reduced masses relative to the planetary masses \(m'\) and \(m''\), respectively. Finally, we find the new equilibrium point \((\Psi _\mathrm{1,eq}'', \Psi _\mathrm{2,eq}'', \psi _\mathrm{1,eq}'', \delta {\gamma }_\mathrm{eq}'')\) with the new planetary mass \(m''\) and these two actions \(\mathcal {K}''\) and \(\Omega ''\) in the same manner as in Sect. 2.2. We can then closely follow the evolution of the system as we show in Fig. 7, where we have superimposed the results of a numerical simulation in the case of the 3–2 mean motion resonance and our analytical predictions. At the same time we plot the real evolution of \(\mathcal {L}_\mathrm{spec}\), against the fixed value used for the analytical calculations.

Fig. 7
figure 7

Evolution of a system deep in the 3–2 mean motion resonance as the planetary mass \(m_1 = m_ 2 = m\) increases. The initial configuration of the averaged system is \(a_2/a_1 = 1.31093\), \(e_1 = 0.01112 \), \(e_2 = 0.01195\) and \(m/M_* = 1 \times 10^{-5}\). The true evolution of \(\mathcal {L}_\mathrm{spec}\) along the simulation is plotted in panel a as a function of \(m/M_*\), see the colored line (the color-coding is reproduced only to indicate the value of m in panels b and c). The black line represents the approximation \(\mathcal {L}_\mathrm{spec} = const\) used in the analytical calculations, showing relatively good agreement up to high values of \(m/M_*\). The plot is interrupted at \(m/M_* \simeq 5.64 \times 10^{-3}\), at which point the system goes unstable. In panels b and c we plot both eccentricities as a function of the semimajor axes ratio, as they evolve while m increases. We color-code the points based on the value of the planetary mass (with the same colors used in panel a). We superimpose, with a black line, the result of an analytical calculation aimed at reproducing the evolution of the system as explained in the text, assuming \(\mathcal {L}_\mathrm{spec} = \hbox {const}\). Note that the simulation follows closely the analytical prediction. The oscillations around the equilibrium points become larger and larger as m increases, but they are short periodic ones, i.e., they are due to the evolution of the fast angles (the same as those shown in Figs. 4c and  5c) which are averaged out in the analytical model and are not linked to a growth in the amplitude of resonant libration, which is conserved adiabatically until the system becomes unstable. Panels df show the evolution of the orbital elements as the mass increases, with again a black line being the result of analytical calculations; since we imposed a linear increase of the mass with time, this can be seen as an evolution in time. Notice that in this case the outcome of the instability is a collision, as the two planets eventually merge. a \(m/M_*\) versus \(\mathcal {L}_\mathrm{spec}\), b \(a_2/a_1\) versus \(e_1\), c \(a_2/a_1\) versus \(e_2\), d \(e_1\) versus \(m/M_*\), e \(e_2\) versus \(m/M_*\), f \(a_1\), \(a_2\) versus \(m/M_*\)

At this point, a remark is in order. The eccentricity of the equilibrium configurationFootnote 1 grows with the planetary masses, as shown in Fig. 7, following roughly a line of constant specific angular momentum. Instead, the equilibrium eccentricity of planets captured in resonance by planet–disk interaction is independent of the planetary mass (see Eq. A.20). This means that capturing planets in the resonance with a mass \(m'\) or capturing them with a smaller mass \(m''\), which is then grown to \(m'\) after capture, leads to two different configurations. In other words, the two processes of (a) first capturing the planets in mean motion resonance and then increasing their masses, and (b) first increasing their masses and then putting them in resonance, do not commute. Nevertheless, by assuming different scale heights of the disk when the planets are captured and then growing the planetary masses, we can explore numerically the full m, \(e_2\) parameter space characterizing the resonant equilibrium. We will take initial values of m ranging from \(10^{-5} M_*\) to \(10^{-4} M_*\), and initial values of the eccentricities up to \(\sim ~0.2\). Higher values of e are physically unrealistic as \(e_\mathrm{eq,2} \propto h\) (cfr. Eq. A.20) and disks with high aspect ratios are not expected.

The colored dots in Figs. 9 and 10 show the evolution of \(e_2\) as the planetary mass grows, starting from different initial values, for systems in the 3–2 mean motion resonance. We let the masses grow until an instability occurs. Denoting by \(m_\mathrm{crit}\) the mass at which the discontinuity happens, we do a long-term simulation, over \(3\times 10^{7}\) revolutions of the inner planets, with a fixed mass \(m= 0.995\times m_\mathrm{crit}\) to check that the dynamics was still stable up to that point. Simulations with higher planetary masses go unstable immediately, after \(\simeq 125\) revolutions of the inner planet. This is shown in Fig. 8.

Fig. 8
figure 8

Two different evolutions of semimajor axis ratio \(a_2/a_1\) for a system which starts in a 3–2 mean motion resonance, where the planetary masses \(m_1=m_2=m\) are kept constant. In panel a \(m =0.995~m_\mathrm{crit}\) and the system shows long-time stable quasi-periodic evolution; in panel b, \(m = m_\mathrm{crit}\) and the system immediately proves unstable (note that the timescales reported on the horizontal axes differ by 6 orders of magnitude). a \(m = 0.995~m_\mathrm{crit}\), b \(m = m_\mathrm{crit}\)

We test two possible origins of the instability of the system. The first one is that of a low-order secondary resonance between the frequency of libration of the resonant angles and that of the synodic angle \(\lambda _1-\lambda _2\), which has the most noticeable effect on the faster, short-period dynamics of the system (cfr. Figs.  4a, 5a). Note that as the planetary mass increases the frequency \(\omega _{\lambda _1-\lambda _2}\) of \(\lambda _1-\lambda _2\) does not change considerably, as it is fixed by the resonance index k, the location of the planetary system and stellar mass; only the amplitude of this frequency grows with m. This is visible already in Fig. 7 and shown again in Fig. 9. Instead, the frequency of libration around the equilibrium point increases with m, so that for high enough planetary masses it can reach a \(l-(l-1)\) resonance with \(\omega _{\lambda _1-\lambda _2}\), where \(l\ge 2\) is an integer, and this might destabilize the system. To check this first hypothesis we build a map of the libration frequencies as a function of the planetary mass and the eccentricity. To do this, we first fix a planetary mass m and obtain equilibrium points for different values of the constant of motion \(\Omega \), as detailed in Sect. 2.2, and for each point we calculate the frequencies of libration \(\omega _1\), \(\omega _2\) as explained in Sect. 2.3; finally, we change the value of m. When we do this, the value of \(\mathcal {K}\) is adjusted in order to keep fixed the location of the exact Keplerian resonance. For, e.g., the 3–2 mean motion resonance, for each fixed value of m, each equilibrium point is univocally characterized by the value of \(e_2\), so we can write \(\omega _i (m,e_2)\), \(i=1,2\). We then compare it with the frequency \(\omega _{\lambda _1-\lambda _2}\) of the synodic angle \(\lambda _1-\lambda _2\). We show in Fig. 9 a contour plot of \(\omega _1\) and \(\omega _2\) as the background of the aforementioned numerical simulations. Since \(\omega _1>\omega _2\), as we saw in Sect. 2.3, we can focus on secondary resonances between \(\omega _1\) and \(\omega _{\lambda _1-\lambda _2}\). We notice that some systems become unstable before the frequency \(\omega _1\) reaches the 2–1 resonance with \(\omega _{\lambda _1-\lambda _2}\), while others pass through this low-order secondary resonance unaffected. We therefore conclude that these secondary resonances do not play a role in the dynamics of the system, at least at small libration amplitudes.

Fig. 9
figure 9

We show contour plots for the frequencies \(\omega _1\), panel a and \(\omega _2\), panel b, as functions of the planetary mass m and the eccentricity \(e_2\) in the case of the 3–2 mean motion resonance. Lighter colors indicate a higher value of the frequencies. The black lines indicate, respectively, a 2–1, 3–2, 4–3 and 1–1 resonance with the fast synodic frequency \(\omega _{\lambda _1-\lambda _2}\), see the legend. As expected, the frequency \(\omega _2\) is smaller than \(\omega _1\), except for extremely small values of e; we can therefore concentrate on \(\omega _1\), panel a, when looking for secondary resonances in the system. The dots represent the result of the numerical simulations carried out as explained in the text. The simulations are interrupted when the system becomes unstable. Note that the red and yellow simulations go unstable even before encountering the first resonance with \(\omega _{\lambda _1-\lambda _2}\) (green line). Instead, the green and blue simulations cross it undisturbed and do not go unstable near any particular resonance

Fig. 10
figure 10

Contour plots of \(d/d_\mathrm{crit}\), where d is the minimal distance between the planets on their orbits around the star, and \(d_\mathrm{crit}\) is the critical distance defined in (4.3) in terms of the mutual Hill radius. In both panels, lighter colors indicate higher values of \(d/d_\mathrm{crit}\), and the dashed black line indicates the level \(d/d_\mathrm{crit} = 1\). In panel a we superimpose the same numerical simulations as in Fig. 9. We show that the systems cross this line undisturbed and reach configurations where \(d/d_\mathrm{crit} < 1\). We note, however, that the instability occurs roughly at the same level, indicated by a solid black line, and corresponding to \(d/d_\mathrm{crit} \simeq 0.78\). In panel b, se choose two simulations, but we also use initial conditions where we have excited the amplitude of libration of the resonant angles. In both cases, the yellow dots indicate the unexcited case, and the red and green dots show increasing excitation of the libration. We see that with higher degrees of excitation the instabilities occur closer and closer to the usual condition \(d = d_\mathrm{crit}\). As the area enclosed by the libration around the equilibrium is an adiabatic constant with respect to the slowly changing parameter m, as soon as the stable region becomes too small when increasing the planetary mass the system exits the resonance. a Small libration amplitude, b different libration amplitudes

The second hypothesis for the onset of instability is inspired by the criterion of minimal distance between the planets, first proposed by Gladman (1993), then revised (see, e.g., Obertas et al. 2017). These studies show that two non-resonant planets go unstable when their orbital configuration is such that they come closer to each other than a critical distance

$$\begin{aligned} d_\mathrm{crit} = 2\sqrt{3} r_\mathrm{H}, \end{aligned}$$
(4.3)

where

$$\begin{aligned} r_\mathrm{H} = \left( \frac{m_1 + m_2}{3 M_*}\right) ^{1/3} \frac{a_1+a_2}{2} \end{aligned}$$
(4.4)

is the mutual Hill radius. Note that for non-resonant configurations, the closest distance of approach between the two planets coincides with the orbital distance, but for resonant ones this is not the case. Therefore, in this case we consider applying Gladman’s criterion not to the orbital distance, but to the actual closest approach of the two planets during the evolution in the resonant configuration. We can estimate this closest distance analytically as follows. As before we find for a fixed planetary mass and a fixed value of \(\Omega \) an equilibrium point, which can again be identified in terms of the eccentricity. We then evaluate the real minimal distance d of the two planets in such orbital configuration, by sampling the distance between the planets at different values of \(\lambda _1\) in \([0, 2 k \pi ]\) (recall that the full Hamiltonian is periodic in this angle with period \(2 k \pi \)), and taking the minimum of these distances. We thus plot in the background of Fig. 10 the value \(d/d_\mathrm{crit}\) in the case of the 3–2 resonance, as a function again of m and \(e_2\), where \(d_\mathrm{crit}\) is given by (4.3). In Fig. 10a we superimpose the same numerical simulations as in Fig. 9. We observe that the planetary systems reach the critical distance \(d_\mathrm{crit}\) (black dashed line) without displaying any instability. Therefore, we see that resonant are more stable against close encounters than systems with randomly chosen angular parameters. It is well known that given values of \(a_1\), \(e_1\), \(a_2\), \(e_2\) a pair of resonant planets has a minimum approach distance which is larger than if the planets are not in resonance. Here we show, in our knowledge for the first time, that the center of a resonance is more stable given an actual minimum approach distance (not an orbital distance), than a non-resonant configuration. In fact, we notice that the instability occurs when the planets reach an analytically estimated closest distance d such that \(d/d_\mathrm{crit} \simeq 0.78\), see the black continuous line. We should note, however, that as the planetary masses increase and the planets reach \(d/d_\mathrm{crit}\sim 1\), one is approaching a singularity (a collision) so that the remainder of the averaged Hamiltonian grows (e.g., Pousse et al. 2017), meaning that the closest approach calculated along the trajectories of the averaged model might be incorrect. However, we checked against the actual minimal approach distance that is obtained along a simulation and we saw that at \(d/d_\mathrm{crit}\simeq 1\) the analytically calculated distance is slightly bigger than the real one but correct within an error of \(\sim ~3\%\), and even close to the instability, i.e., for \(d<d_\mathrm{crit}\) but \(m \lesssim m_\mathrm{crit}\), it is again slightly bigger than the real minimal distance but correct within a \(\sim ~6\%\) error. The actual minimal distance at which planets in a 3–2 mean motion resonance go unstable is therefore \(d/d_\mathrm{crit} \simeq 0.74\); this is slightly smaller than the number obtained analytically and well smaller than 1. We repeated the analysis for the 4–3 resonance, and we find that the instability occurs when \(d/d_\mathrm{crit} \simeq 0.6\). We also run simulations where we took systems initially deep in resonance and slightly excited their amplitude of libration of the resonant angles, as we did in Sect. 2.3. With these systems, we repeat the numerical exercise of increasing the planetary mass, see the resulting evolutions for two of them in Fig. 10b. We see that the instabilities occur now closer and closer to the usual criterion, where the \(d/d_\mathrm{crit} = 1\). This indicates that as the mass increases the stable region of stability around the equilibrium point shrinks. We further test this explanation by taking a system that is deep in resonance, with low amplitude of libration of the resonant angles, and with a mass that is just below the critical mass \(m_\mathrm{crit}\). Recall that such a system was long-time stable. We then perturb the system to sightly excite the amplitude of libration, as explained before. We see that the system immediately goes unstable after \(\sim ~150\) revolutions of the inner planet, indicating that at values of \(m \sim m_\mathrm{crit}\) the whole stable region of stability has shrunk to the equilibrium point itself. This behavior is similar to what is shown in Fig. 8. The sharp transition between stability and a short instability timescale should not surprise. In a planar model, the closest approach distance is achieved very soon. This is true for both the stable and the unstable case. The difference is that in the first case the closest approach distance is large enough not to destabilize the orbit. The closest encounters can then repeat every few years, but the orbit remains stable forever. In the second case, instead, the first closest encounter makes the semimajor axes of the planets jump out of resonance.

5 Summary

In this work, we investigated the dynamics of resonant planetary system, from the capture in mean motion resonance via convergent migration in a protoplanetary disk, to the stability of systems with low-amplitude libration of the resonant angles. We treat the simple case of the planar three-body problem, with two equally massive planets.

We present the analytical techniques needed to describe the system in Sect. 2. There, we develop the theory for unexpanded Hamiltonians and find semi-analytically the equilibrium points; we validate numerically the analytical calculations, showing perfect agreement. We compare these with equilibrium points resulting from low-order expansions in the eccentricities, showing that the latter they do not capture qualitatively or quantitatively the simulations. Since we are interested in the dynamics in the region of the phase space around the equilibrium points, we calculate the frequencies of librations in the regime of vanishing amplitude of libration, and check again the results with numerical simulations.

In Sect. 3 we describe the forces which result from the interactions between the planets and a disk of gas, which is used in the numerical simulations in order to capture the planets in first-order mean motion resonance. These interactions include a damping in the eccentricity and a torque which results in an inward Type I migration. To ensure convergent migration and resonant trapping, a planetary trap (Masset et al. 2006) is implemented at the edge of the disk of gas. These dissipative forces are implemented in our code using simple analytical formulae which simulate the disk–planet interactions of real hydrodynamical simulations (e.g., Cresswell and Nelson 2006). We present in “Appendix A” an analytical description of the capture in mean motion resonance following a general approach, and derive formulae to calculate analytically the final equilibrium configuration. We compare our formulae with similar ones from previous works and validate our results with numerical simulations, showing perfect agreement.

In Sect. 4 we investigate the stability of resonant systems at low amplitude of libration. We describe our numerical experiments where we fictitiously increase the planetary mass to follow the low-amplitude regime until the onset of instability. At the same time, we detail how one can follow analytically the evolution of the system to a good approximation up to high value of the planetary masses. We test against two possible reasons for instability. The first is that of a secondary low-order resonance between the frequency of libration of a resonant angle (which grows with the planetary mass, while maintaining adiabatically the same amplitude around the equilibrium point) and the frequency of the fast synodic angle \(\lambda _1-\lambda _2\) (which is constant with the planetary mass), where \(\lambda _i\) is the mean longitude of a planet. We construct a map of the frequency of libration of the resonant angles as a function of the planetary mass and the eccentricity and compare the calculated values with the frequency of the synodic angle. We see that some systems become unstable before reaching the 2–1 resonance between the libration and the synodic frequency, while others cross it unaffected. We therefore conclude that these secondary resonances do not play a significant role in the instability of pairs of planets in first-order mean motion resonance at low amplitude of libration. The second hypothesis is that of instability due to close encounters between planets, inspired by the mutual Hill radius stability criterion (Gladman 1993). In this case we build a map of the minimal distance reached by the planets in their orbital configuration as a function of the mass and the eccentricity. We see that resonant planetary systems are more stable than those with randomly chosen orbital parameters, as they can reach a minimal distance that is smaller then the critical distance \(d_\mathrm{crit} = 2 \sqrt{3} r_\mathrm{H}\), where \(r_\mathrm{H}\) is the mutual Hill radius, which is the usual critical distance below which two planets go unstable (cfr. Gladman 1993; Obertas et al. 2017). We find nonetheless that there is a critical distance after which the system goes unstable, which is a fraction of the usual \(d_\mathrm{crit}\). We see that for systems with bigger amplitude of libration of the resonant angles this critical distance approaches more and more the usual \(d_\mathrm{crit}\). This indicates that the region of stability around the equilibrium point shrinks as the mass increases, until the point itself becomes unstable and the system exits the resonance.