Typeset using LATEX twocolumn style in AASTeX62 Draft version July 30, 2020

Modeling Data of Resonant Planets to Infer Migration Histories

Sam Hadden1 and Matthew J. Payne1

1Harvard-Smithsonian Center for Astrophysics, 60 Garden St., MS 51, Cambridge, MA 02138, USA

(Accepted 16 July 2020) Submitted to AJ

ABSTRACT A number of giant-planet pairs with period ratios . 2 discovered by the radial velocity (RV) method may reside in mean motion resonances. Convergent orbital migration and resonant capture at the time of formation would naturally explain the present-day resonant orbital configurations of these systems. Planets that experience smooth migration and eccentricity-damping forces due to a protoplanetary disk should not only be captured into mean motion resonances but also end up in a specific dynamical configuration within the resonance, sometimes referred to as apsidal corotation resonance (ACR). Here we develop a method for testing the hypothesis that a planet pair resides in an ACR by directly fitting RV data. The ACR hypothesis strongly restricts the number of free parameters describing the RV signal and we compare fits using this highly restricted model to fits using a more conventional two- planet RV model by using nested sampling simulations. We apply our method to HD 45364 and HD 33844, two systems hosting giant-planet pairs in 3:2 and 5:3 resonances, respectively. The observations of both systems are consistent with ACR configurations, which are formally preferred based on the Bayes factors computed from nested sampling simulations. We use the results of our ACR model fits to constrain the possible migration histories of these systems. 1. INTRODUCTION planet–disk interactions in shaping the architectures of The potential for planets to experience large-scale mi- planetary systems. gration due to interactions with their protoplanetary The discovery of two giant planets in a 2:1 MMR disk has been understood for decades (Goldreich & around GJ 876 (Marcy et al. 2001) provided the first Tremaine 1980; Lin & Papaloizou 1986). However, due observed example of an exoplanetary system in reso- 1 to the theoretical uncertainties and numerical difficul- nance around a main-sequence . Subsequent stud- ties associated with simulating realistic protoplanetary ies showed that the configuration of this resonant system disks, rates and even the directions of planet migration could be reproduced by convergent migration in a disk remain uncertain and planet–disk interactions have re- (Snellgrove et al. 2001; Lee & Peale 2002). There have mained an active area of research (Kley & Nelson 2012; since been numerous examples of radial-velocity (RV)- Baruteau et al. 2014). It is well known that conver- discovered planetary systems hosting closely spaced gent orbital migration generally causes migrating plan- pairs of massive planets with period ratios . 2 that ets to capture into mean motion resonances (MMRs; are in or suspected to be in MMR (e.g. Mayor et al. e.g., Goldreich 1965) and, despite the theoretical uncer- 2004; Lee et al. 2006; Tinney et al. 2006; Correia et al. tainties, disk-induced migration is expected to produce 2009; Niedzielski et al. 2009; Johnson et al. 2011a,b; Wright et al. 2011; Robertson et al. 2012; Wittenmyer arXiv:2005.03034v2 [astro-ph.EP] 28 Jul 2020 resonant orbital configurations in at least some plane- tary systems during their formation. Exoplanetary sys- et al. 2014, 2016; Giguere et al. 2015; Luque et al. 2019; tems hosting planet pairs in MMRs are generally inter- Trifonov et al. 2019). preted as the by-products of orbital migration since such Most previous studies have concluded that specific resonant configurations are unlikely to arise by chance. systems occupy resonant configurations by conducting Systems with resonant orbital configurations are there- postfitting analyses. This has usually involved fitting fore ideal targets for better understanding the role of 1 The pulsar planets orbiting PSR 1257+12 can claim the si- multaneous distinctions of being the first exoplanetary system dis- Corresponding author: Sam Hadden covered (Wolszczan & Frail 1992) and the first (near-)resonant [email protected] exoplanetary system discovered (Malhotra et al. 1992). 2 Hadden & Payne

RV data using a Markov chain Monte Carlo (MCMC) reproducing the observed system, though many of the approach, then initializing N-body integrations with ini- details of their method differ from ours. tial conditions drawn from their MCMC posterior sam- Our paper is structured as follows: Section2 reviews ples, and finally analyzing the behavior of resonant an- the dynamics of resonant capture and ACRs. In Sec- gles in these N-body integrations. The goal of this paper tion3, we present our method for Bayesian model com- is to develop a different approach to analyzing the evi- parison and show that the two systems we consider are dence for MMRs among RV planets: we ask whether the consistent with an ACR configuration. We discuss our observed RV signals of a given planet pair can be ade- results in Section4 including inferences about the possi- quately explained by a model that presumes the system ble migration histories of the systems and the prospects resides in a resonant configuration reached by smooth for better determining the resonant state of the planets migration and eccentricity damping. More precisely, we with future observations. Finally, Section5 summarizes assess the evidence for whether a given system resides in our conclusions. a particular dynamical MMR configuration referred to as an ‘apsidal corotation resonance’ or ACR (the libra- 2. THE DYNAMICS OF RESONANCE CAPTURE tion of the relative position of the periastra is referred to The capture of migrating planets into MMR is a as apsidal corotation). ACRs are the natural outcome well-studied problem (e.g. Goldreich 1965; Yoder 1973; of resonant capture under the influence of migration and Henrard & Lamaitre 1983; Peale 1986; Murray & Der- eccentricity-damping forces that planets are expected to mott 1999). Migrating planets will be captured into experience in a disk. The benefit of this approach is that an MMR when the net effect of their migration drives it allows us to use RV observations as a direct test of a them toward one another, provided the migration is suf- precisely formulated, falsifiable hypothesis rather than ficiently slow and the planets’ eccentricities are small simply interpreting possibly resonant configurations as at the time they encounter the resonance. Upon cap- circumstantial evidence of past migration. Planet pairs ture into resonance, the planets’ period ratio remains that are consistent with an ACR configuration support fixed at the resonant period ratio while their eccentric- the hypothesis that the system was shaped by planet– ities grow. The planets’ eccentricities will continue to disk interactions. Moreover, the specifics of the dynam- grow until they escape the resonance or, if the planets ical state of such systems can be used to constrain the are also subject to eccentricity-damping, the resonance migration and eccentricity damping caused by those in- forcing is counterbalanced by the eccentricity damping teractions. Conversely, resonant planet pairs exhibiting forces. Figure1 shows illustrative N-body simulations RVs inconsistent with an ACR configuration would de- of this process for a selection of different planet- mand an explanation for their current configuration be- ratios. The N-body integrations were carried out with yond simple capture by smooth migration such as forc- the (Rein & Liu 2012) code using the ing by turbulent fluctuations of the protoplanetary disk rebound IAS15 integrator (Rein & Spiegel 2015) with the precision pa- (Adams et al. 2008) or gravitational interactions with rameter set to its default value,  = 10−9. Eccentricity- additional planets. b damping and migration forces were included using the Baluev(2008) and Baluev & Beaug(2014) have pre- routine of the package viously adopted the approach of fitting RV signals while modify orbits direct reboundx (Tamayo et al. 2020). All subsequent N-body integra- constraining resonant planets to reside in an ACR con- tions presented in this paper are carried out in the same figuration. We expand upon their methods by incorpo- manner unless explicitly stated otherwise. rating an ACR model into Bayesian inference and model In the examples shown in Figure1, the dissipative comparison frameworks using MCMC and nested sam- forces quickly drive the system toward an equilibrium pling simulations. We also use fits with these models to configuration where the planets’ period ratio and eccen- constrain planet–disk interactions and infer the migra- tricities remain fixed while the planet pair continues to tion histories of the systems. Delisle et al.(2015) pre- migrate together in lockstep. The particular equilibrium viously attempted to constrain planet–disk interactions configuration reached by a migrating planet pair can be in systems hosting resonant giant planets, though they predicted by examining the equations of motion govern- used previously reported orbital solutions rather than ing the resonant dynamics of the system. We give a brief re-fitting RVs assuming an ACR configuration. Silburt overview of these equations here; a complete description & Rein(2017) studied the pair of resonant planets in is given in AppendixA. the HD 155358 system using a Bayesian model compari- To study the dynamics of a j:j−k resonance, we adopt son framework to infer migration parameters capable of a Hamiltonian formulation of the equations of motion in terms of canonical coordinates σi = (1+s)λ2 −sλ1 −$i, RVs of Resonant Planets 3 where s = (j − k)/k, and their conjugate momenta where I ∼ e2.2 We use a numerical averaging procedure de- ! i i 0 scribed in AppendixA to compute the resonant Hamil- Ω = I2 tonian and its derivatives, and consequently, the validity −I2 0 2 of our study is not limited to small eccentricities (unlike X  1 ∂z 1 ∂z  studies that employ truncated series expansions to ap- fdis(z, D) = − + τe,i ∂ ln ei τa,i ∂ ln ai proximate the Hamiltonian). For compactness, we write i=1 2 the dynamical variables of our Hamiltonian system as X  1 ∂D 1 ∂D  fdis,D(z, D) = − + . a vector z ≡ (σ1, σ2,I1,I2). The governing Hamilto- τ ∂ ln e τ ∂ ln a i=1 e,i i a,i i nian, H¯ (z; D), depends on the planet–star mass ratios, The equilibrium configuration for a given set of planet mi/M∗, as well as a parameter, D, the normalized an- gular momentum deficit (AMD), which is approximately and dissipation timescales can be determined by given by finding stationary solutions to Equation (3). Provided the dissipation timescales are long compared to the char- acteristic timescales of the resonant dynamics, the equi- 2 2 √ √ e1 e2 kβ2β1 α librium configuration will be close to a fixed point of the D ≈ β1 α + β2 − √ ∆ (1) 2 2 3 (jβ1 α + (j − k)β2) dissipation-free resonant dynamics, i.e., a point satisfy- ing ∇zH¯ (z; D) = 0. These fixed-point configurations of the resonant dynamics have been the subject of numer- j−k P2 where βi = mi/(m1 +m2), α = a1/a2, and ∆ = − ous studies (e.g., Lee & Peale 2002; Beaug´eet al. 2003; j P1 1. For planets deep in resonance such that ∆ ≈ 0, D Haghighipour et al. 2003; Michtchenko et al. 2006; An- can be interpreted as a mass-weighted measure of the toniadou & Voyatzis 2014) and are frequently referred planets’ eccentricities. D is conserved by the resonant to as apsidal corotation resonances (ACRs). As equilib- dynamics in the absence of dissipation. rium points of a Hamiltonian system with two degrees We also consider dissipative forces with a simple pa- of freedom, ACRs can be either elliptic equilibria, where rameterized model that imposes migration and eccen- the Jacobian matrix of the equations of motion has two tricity damping as purely imaginary eigenvalue pairs, or (partially) hyper- bolic equilibria where at least one eigenvalue pair has a nonzero real parts. However, because hyperbolic equilib- d ln e 1 i = − ria are unstable to arbitrarily small perturbations, only dt τ e,i elliptic ACR equilibria represent plausible dynamical d ln a  1 2pe2  1 i = − + i ≡ − , (2) configurations for real planetary systems and hereafter dt τm,i τe,i τa,i(ei) references to ACRs should be implicitly understood as referring only to these stable equilibria. These configu- rations are characterized by zero libration amplitudes of where p is a parameter that couples eccentricity damp- the pair’s resonant angles and antialignment of planets’ ing to the semi-major axis damping, with p = 1 cor- apsidal lines.3 For fixed planet masses, ACR configura- responding to eccentricity damping at constant angular tions of a given MMR form a one-parameter family of momentum (e..g, Goldreich & Schlichting 2014; Deck & orbital configurations that can be parameterized by D, Batygin 2015). the normalized AMD (Delisle et al. 2015). The equations of motion governing the dynamics of Figure1 shows the equilibrium eccentricities for the the resonance are ACR configuration of the 3:2 MMR for three different planet masses in panel (g). Upon encountering the reso- nance, the migrating planet pairs’ period ratios become z˙ = Ω · ∇zH¯ (z; D) + fdis(z, D) locked at the resonant value and their AMD increases, D˙ = f (z, D) (3) dis,D with their eccentricities following along the family of ACR configurations as shown in Figure1. The planets 2 Strictly speaking, our equations describe the dynamical evolu- tion of the planets’ mean elements. These differ from the planets’ 3 osculating elements by a small amount, of order (m1 + m2)/M∗. Some ACR configurations, such as those of N:1 MMRs, can In AppendixA, we distinguish between mean and osculating el- exhibit aligned apsidal lines or even asymmetric configurations. ements and derive the transformation between the two sets of Resonant capture into the 3:2 and 5:3 MMRs considered in this orbital elements. For simplicity, we will ignore the distinction in paper leads to antialigned ACR configurations, so we restrict our the main text. considerations to these configurations. 4 Hadden & Payne 3:2 Resonance m2/m1 = 0.2 m2/m1 = 1 m2/m1 = 5 ACR Configurations 1.65 0.4 (a) (b) (c) 1 (g) 1.60 1 P / 1.55 3 0.3 2 P 1.50 / e = 1

1.45 0.2 2 10 e 0.3 (d) (e) (f) 3 0.2 0.1 e 10 1 0.1 3 10 0.0 0.0 0 1 2 0 1 2 0 1 2 0.0 0.1 0.2 0.3 Time [ m, 2] Time [ m, 2] Time [ m, 2] e1

−4 Figure 1. Panels (a)–(f) show N-body migration simulations for pairs of planets with m1 + m2 = 5 × 10 M∗ and different 3 mass ratios. The simulations are initialized with coplanar planets on initially circular orbits with P2 = 1.1 × 2 P1 and random m2 3 initial orbital phases. Dissipative forces are included according to Equation (2) with τe,1 = τe,2 = 3 × 10 P1, τm,2 = 3τe,1, m1 τm,1 = ∞, and p = 0. Panels (a)–(c) show the period ratios and panels (d)–(f) show the eccentricities of the planets. In panels (d)–(f), the eccentricity of the outer planet is shown as a dashed curve while the eccentricity of the inner planet is shown as a solid curve. Equilibrium values of the eccentricities predicted with our semianalytic equations of motion are plotted as thin horizontal lines. In panel (g), colored curves show inner and outer planet eccentricities along families of ACR configurations of the 3:2 MMR for the different planet-mass ratios used in the simulations shown in panels (a)–(f). Black points indicate dissipative equilibria for different ratios of τα/τe,1 with τe,2 = (m1/m2)τe,1. Results of N-body migration simulation with τα/τe,1 = 3 are shown as circles. See text for additional details. continue to follow these ACR tracks until they reach an bility of a particular equilibrium configuration can be equilibrium set by a balance between the strengths of determined by computing the Jacobian matrix, the forcing causing migration and eccentricity-damping T ! ˙ Ω · ∇2H + ∇ f ∂ Ω · ∇ H¯ + f  so that D = 0. Locations of these equilibria for different J = z z dis ∂D z dis , (4) 4 −1 −1 −1 ∂fD,dis ratios of the migration timescale, τα = (τm,2 − τm,1) , ∇zfD,dis ∂D to the eccentricity-damping timescales, τe,i, evaluated at different planet mass ratios, are illustrated in Fig- of Equations (3). The stability of the equilibrium is then ure1 by the series of black points indicating equilib- determined by the eigenvalues of J. At an equilibrium near an elliptic fixed point of the dissipation-free sys- rium configurations for different ratios of τα/τe,1 with tem, J will have two eigenvalues of the form ±iωj + ρj τe,2 = (m1/m2)τe,1. Depending on the planets’ mass ratio and the details with |ρj| ∼ 1/τα. If either ρj > 0, then the equilib- of the eccentricity damping mechanisms, the equilibrium rium is an unstable spiral and any small displacement configuration reached by the planets may not be stable: from equilibrium will be amplified on a timescale 1/ρj. upon reaching the equilibrium, the resonant libration In this paper, we will determine the stability of equi- amplitude can actually grow (Meyer & Wisdom 2008; librium configurations by numerical eigenvalue determi- Goldreich & Schlichting 2014; Deck & Batygin 2015; nation after evaluating the Jacobian in Equation (4) by Delisle et al. 2015; Xu & Lai 2017; Xu et al. 2018). This means of automatic differentiation. We refer the reader growth continues until the the planets escape the res- to previous studies for approximate analytic equilibrium onance or the system reaches a limit cycle and their stability criteria (Goldreich & Schlichting 2014; Deck & resonant librations saturate at a finite value. The sta- Batygin 2015; Delisle et al. 2015; Xu & Lai 2017; Xu et al. 2018).

4 Resonant dynamics depend only on a planet pair’s semi-major 3. RADIAL VELOCITY FITTING axis ratio and not the absolute scale of the planets’ semi-major Resonant planet pairs that owe their dynamical con- axes, which merely determines the timescale of the evolution. Therefore, the ACR equilibrium reached by a planet pair depends figuration to smooth convergent migration in their pro- on the planets’ individual migration timescales τm,i only through toplanetary disk should reside in or very near an ACR the combination τα. configuration. In Section 3.1 we describe an RV-fitting RVs of Resonant Planets 5 method for testing the hypothesis that a given set of RVs 2π, we restrict the range of our priors in the variables are produced by a system residing in an ACR configura- Pi and mi: priors on Pi are uniform within ±25% of tion. We then apply this method in Section 3.2 to two values determined by a maximum likelihood fit and pri- RV systems hosting pairs of giant planets, HD 45364 ( ors on mi are log uniform within a factor of 1/5 and 5 3.2.1) and HD 33844 ( 3.2.2). We show that these sys- times the maximum likelihood fit values.5 In addition tems’ RVs are consistent with ACR configurations and to the planets’ orbital parameters, the model includes that ACR configurations are formally preferred in both an RV zero point, γk, and instrumental jitter term, σk, cases. for each set of RV observations. We adopt uniform pri- ors for the zero points, γk, between the minimum and 3.1. Methods maximum values of each instrument’s reported radial Our first goal is to develop a method to evaluate velocity measurements. We adopt log uniform priors for −3 whether a planetary system’s RV observations can be the jitter terms, σk, ranging between 10 and 30 times explained by a pair of planets in an ACR configuration. each instrument’s median reported uncertainty. Param- In order to do so, we adopt a Bayesian model comparison eters in the N-body model that lead to close encounters framework (e.g., Gregory 2005). Given a set of observa- within 3 planet Hill radii or less during the integration tional data D and a model Mi for how that data depend are automatically rejected. For simplicity, we fix the on a set of model parameters θ, Bayes theorem states host star mass to the reported best-fit value from the lit- erature and assume the planets’ orbits are coplanar with p(D|θ, Mi)p(θ|Mi) an inclination of 90◦, i.e., the system is observed edge p(θ|D, Mi) = . p(D|Mi) on. We will refer to this model as the “unrestricted” model. In standard Bayesian parlance, p(θ|D, M ) is referred to i The second model class presumes that the RV data as the posterior, p(D|θ, M ) as the likelihood, p(θ|M ) i i are the product of a pair of planets residing in an ACR as the prior, and p(D|M) as the evidence. Parameter configuration. This model is similar to the RV model inference methods such as MCMC compute or approxi- developed by Baluev(2008). Restricting planets to an mate the posterior distribution, p(θ|D, M ), which rep- i ACR configuration reduces the degrees of freedom of resents one’s beliefs about the underlying system param- the model. We parameterize an ACR model for a given eters, conditioned on the observation. In model compar- j:j −k resonance in terms of the inner planet’s RV semi- ison problems, one is instead interested in determining amplitude, K , period P , time of transit T , and ar- evidences, p(D|M ), for two or more competing models. 1 1 c,1 i gument of periapse ω , along with m /m , the mass Two models M and M can be compared by computing 1 2 1 i j ratio of the outer planet relative to the inner, and a their Bayes factor, p(D|M )/p(D|M ), the ratio of the i j parameter, s, described below that sets the normalized two models’ posterior probabilities in light of the data, AMD of the planet pair. Our ACR models also include under the assumption that the two theories are equally the same instrumental parameters, γ and σ , used in likely to be true a priori. k k the unrestricted model, and we adopt the same priors We sample posteriors and compute evidences for two for these parameters in the ACR model as in the unre- classes of models for each planet pair’s RV data. The stricted model. The parameter s ∈ [0, 1] sets the AMD first model class is a conventional N-body model that of a planet pair to be D = s2 D where D is the computes the RV signal by integrating the equations of max max AMD at the point where all the ACR tracks for differ- motion governing the planetary system. The N-body ent planet-mass ratios intersect at a global maximum of model’s parameters include the planets’ masses m and i the averaged disturbing function (see Michtchenko et al. orbital parameters at a reference , chosen to be 2006).6 Because, at small to moderate eccentricity the median time of the RV observations. We parame- √ values, ACR configurations obey β αe ∝ β e (e.g., terize the planets’ orbits in terms of their orbital periods 1 1 2 2 Pi, mean anomalies Mi, eccentricities ei, and arguments 5 of periapse ωi. Our model’s prior probabilities are uni- These prior ranges in period and planet mass are significantly form in the planets’ orbital parameters and log uniform larger than the ranges over which the posterior has non-negligible probability density, as determined from our MCMC fits. In nu- in the planets’ masses. We adopt the usual strategy √ √ merical tests we found that extending the prior ranges for planet of sampling in variables ei cos ωi and ei sin ωi in our periods and masses led to moderately higher Bayes factors in favor MCMC fitting to improve convergence behavior. The of the ACR model described below. 6 nested sampling algorithm that we use requires variables While ACR tracks generally extend to AMDs greater than Dmax, we find that, in practice, the posterior density of the sys- be normalizable, so, in addition to restricting ei ∈ [0, 1) tems we fit is already negligible at smaller eccentricities. and restricting angular variables to lie between 0 and 6 Hadden & Payne

Deck & Batygin 2015) this definition of s implies that 3.2. Results e ∝ s for small to moderate eccentricities. In our ACR i √ In this section we fit and compare our N-body and model MCMC fits, we sample in the variables s cos ω √ 1 ACR models to two systems hosting potentially resonant and s sin ω1 rather than s and ω1. Consequently, our giant-planet pairs. priors are uniform in s and ω1. We adopt uniform priors in P1 and Tc,1. The of the outer planet’s 3.2.1. HD 45364 RV signal is set to P = j P , and the semiamplitude 2 j−k 1 The first system we fit is HD 45364, a system of of the outer planet is given by two planets in a 3:2 MMR orbiting a K0 star of mass  1/3 p 2 M∗ = 0.82 M originally discovered by Correia et al. m2 j − k 1 − e1 K2 = p K1 . (2009). The best-fitting solution reported by Correia m1 j 1 − e2 2 et al.(2009) displays large resonant angle libration The argument of periapse of the outer planet is set to amplitudes and secular eccentricity variations and is therefore not in an ACR configuration. A number of ω2 = ω1 + π. The ACR model includes, in addition to the continuous parameters just described, a discrete subsequent studies have further explored the dynamics degree of freedom that fixes the relative orbital phases and possible formation histories of the HD 45364 sys- of the planet pair. Specifically, with the resonant angle tem. Rein et al.(2010) perform a suite of hydrody- namical simulations of planet–disk interactions in order σ1 fixed at its equilibrium value σ1 = 0 (when k is odd) to explore potential migration histories leading to the or σ1 = π/k (when k is even), the orbital phase of the outer planet is related to the orbital phase of the inner present-day orbital configuration of HD 45364 system. planet by Their simulations produce systems with orbital parame- ters significantly different from the Correia et al.(2009)  k  1 − j + k 2π best-fit solution but with RV signals that fit the obser- M = 1 − M + π + n (5) 2 j 1 j j vations with approximately equal statistical significance. Correa-Otto et al.(2013) show that the dynamical con- for n = 0, 1, ...j − 1. We handle this discrete degree of figurations similar to those found by both Correia et al. freedom by running multiple nested sampling fits, each (2009) and Rein et al.(2010) can be obtained through with n fixed to one of the j possible values. Then, as- simple parameterized migration simulations with expo- suming that any of the j possible values are equally likely nential migration and eccentricity-damping forces. As a priori, the evidence of the ACR model computed ac- expected, the planets in the simulations of Correa-Otto cording to et al.(2013) are driven into ACR configurations. While Correa-Otto et al.(2013) note that the ACR configura- j−1 1 X tions’ lack of libration amplitude is at odds with the or- p(D|M ) = p(D|M , n = m) (6) ACR j ACR bital solutions reported by Correia et al.(2009) and Rein m=0 et al.(2010), they do not attempt to determine whether where p(D|MACR, n = m) is the evidence computed the RVs of HD 45364 can be adequately fit with plan- with n in Equation (5) fixed to m. ets in a zero libration amplitude configuration. Delisle Likelihoods for both models are computed in the stan- et al.(2015) also analyze the HD 45364 system in order dard way from a χ2 value that includes jitter terms to constrain properties of the system’s migration during added in quadrature to the reported measurement un- formation, similar to Section 4.2 below. However, their certainties. We use the radvel (Fulton et al. 2018) constraints are derived under the assumption that the code, modified to include our N-body and ACR mod- system possesses the nonzero libration amplitude mea- els, to forward-model RVs, evaluate model likelihoods, sured by Correia et al.(2009) and they do not explore and run MCMC simulations. We use the nested sam- the possibility that the system may in fact reside in an pling code dynesty (Speagle 2020) to estimate the ACR configuration. Bayesian evidence of each model. Specifically, we use Figure2 summarizes our fit results for HD 45364. The the dynesty.NestedSampler class with default settings. ACR model is formally preferred by our nested sam- For the ACR model, RV signals are synthesized as the pling simulations, with a log Bayes factor of ∼ 7. The sum of two planets’ Keplerian RV signals rather than by rightmost panel of Figure2 shows that the posterior dis- means of N-body simulation. We discuss the validity tribution of the N-body model planet eccentricities are of this approximation in AppendixB where we demon- concentrated quite close to the ACR values. We inte- strate that it has negligible impact over the timescales grate 1500 initial conditions randomly selected from the spanned by the observations we fit. unrestricted model MCMC posterior sample for 100 or- RVs of Resonant Planets 7

HD 45364 Period Ratio Resonant Angles Eccentricities 40 1.0 0.4 N-body 200 b ACR c HARPS 175 20 0.8 150 0.3 0 125 0.6 c

0.2 e 20 100 0.4 Probability

Radial Velocity [m/s] 75 40 50 0.1 Cumulative fraction 2.5 0.2 0.0 25 2.5 0 0.0 53000 53500 54000 54500 1.50 1.52 1.54 0 /4 /2 3 /4 0.0 0.1 0.2 0.3 0.4 JD-2400000 [days] Pc/Pb Libration amplitude eb

ACR N-body

log [p(D|Mi)] 249 242 5% 50% 95% 5% 50% 95%

mb sin i [MJ ] 0.17 0.18 0.20 0.16 0.18 0.20

Pb [days] 227.04 227.75 228.51 222.86 224.83 226.61

eb 0.09 0.18 0.25 0.05 0.17 0.28

Mb 1.13 1.47 1.75 1.40 2.10 2.60

ωb -2.73 -2.52 -2.27 -3.10 2.64 3.10

mc sin i [MJ ] 0.54 0.58 0.63 0.55 0.60 0.65

Pc [days] 340.55 341.62 342.77 342.47 343.96 345.55

ec 0.03 0.08 0.13 0.02 0.08 0.14

Mc 3.89 4.12 4.31 3.91 4.55 5.11

ωc 0.41 0.62 0.87 -0.33 0.22 0.85

γHARP S − 16, 500 [m/s] -35.02 -34.17 -33.24 -34.74 -33.87 -32.94

σHARP S [m/s] 1.62 1.97 2.42 1.48 1.84 2.29

Figure 2. Summary of fit results for HD 45364. Top: comparison of unrestricted model fits against 3:2 ACR model fits for HD 45364. For all plots, N-body model results are plotted in black, while the ACR model results are plotted in red. The leftmost panel shows the RV solutions derived from both models, using shaded regions to illustrate the 1σ, 2σ, and 3σ distributions for each. The bottom of the panel shows the normalized residuals of each model, i.e., the model residuals divided by the model error bars including the allowance for jitter. Points and error bars indicate the median and 1σ range of the normalized residuals. The middle-left panel shows the distribution of average period ratios derived from both models. The middle-right panel shows the cumulative distribution of resonant angle libration amplitudes measured via N-body integrations. The rightmost panel shows the eccentricity posteriors for the two planets. The dashed orange lines in the right-hand plot indicate the ACR tracks that encompass the full range of the planet mass ratios in the ACR model posterior sample. Bottom: table giving log evidences from nested sampling simulations and percentiles of parameters’ marginalized posterior distributions from MCMC. bits of planet b in order to determine the resonant angle inferred when fitting the unrestricted model may ini- libration amplitudes and average period ratios plotted tially appear to be at odds with the preference for the in the middle panels of Figure2. Resonant angle li- zero libration amplitude ACR model inferred from the bration amplitudes were recorded by determining the Bayesian evidence calculations. This apparent contra- maximum deviations of the angles θb = 3λc − 2λb − $b diction suggests that the inference of large libration am- and θc = 3λc − 2λb − $c from their respective equilib- plitudes in the unrestricted model is principally driven rium values of 0 and π over the course of the integra- by the larger phase-space volume occupied by these con- tion. Cumulative distributions of libration amplitudes figurations and not by any significant improvement in fit are plotted in the center-right panel of Figure2. While derived from large libration amplitude solutions. This the majority of initial conditions show resonant libra- example serves to illustrate that the influence of priors tion for both angles with amplitudes . π/2, neither must be carefully considered when deriving conclusions cumulative distribution reaches 1 due to a small frac- about the dynamics of planetary systems from RV fits. tion of simulations in which one or both resonant angles circulate. The moderate to large libration amplitudes 3.2.2. HD 33844 8 Hadden & Payne

HD 33844 Period Ratio Resonant Angles Eccentricities 1.0 0.4 75 N-body res ACR 70 50 AAT 0.8 FEROS 60 25 Keck 0.3

0 50 0.6

25 40 c

0.2 e 50 30 0.4 Probability Radial Velocity [m/s] 75 20 0.1 Cumulative fraction 2.5 0.2 0.0 10 2.5 0 0.0 55000 56000 1.6 1.7 1.8 0 /4 /2 3 /4 0.0 0.1 0.2 0.3 0.4 JD-2400000 [days] Pc/Pb Libration amplitude eb

ACR N-body

log [p(D|Mi)] −264 −270 5% 50% 95% 5% 50% 95%

mb sin i [MJ ] 1.72 1.87 2.02 1.73 1.89 2.05

Pb [days] 542.33 549.49 556.31 543.71 551.56 558.44

eb 0.01 0.07 0.12 0.02 0.10 0.19

Mb 1.08 1.41 1.79 0.23 1.01 5.76

ωb 2.87 3.20 3.48 2.79 3.68 4.73

mc sin i [MJ ] 1.39 1.58 1.78 1.35 1.56 1.77

Pc [days] 903.88 915.81 927.18 889.82 918.75 953.82

ec 0.02 0.10 0.19 0.01 0.05 0.15

Mc 3.16 3.36 3.59 0.16 1.69 6.10

ωc 0.02 0.26 6.26 0.59 2.91 5.38

γF EROS [m/s] -8.99 -2.08 5.02 -8.19 -0.62 6.75

γAAT [m/s] -14.08 -11.60 -9.01 -15.53 -12.83 -10.05

γKeck [m/s] -10.77 -8.39 -6.05 -10.63 -8.21 -5.78

σF EROS [m/s] 7.80 11.79 19.45 7.85 12.22 20.66

σAAT [m/s] 4.20 5.75 8.16 3.69 5.36 7.95

σKeck [m/s] 6.37 7.81 9.86 6.25 7.80 10.09

Figure 3. Summary of fit results for HD 33844. Top: comparison of unrestricted model fits against 5:3 ACR model fits for HD 33844. For all plots, N-body model results are plotted in black, while the ACR model results are plotted in red. The leftmost panel shows the RV solutions derived from both models, using shaded regions to illustrate the 1σ, 2σ, and 3σ distributions for each. The bottom of the panel shows the normalized residuals of each model, i.e., the model residuals divided by the model error bars including the allowance for jitter. Points and error bars indicate the median and 1σ range of the normalized residuals. The middle-left panel shows the distribution of average period ratios derived from both models. The middle-right panel shows the cumulative distribution of resonant angle libration amplitudes measured via N-body integrations. The rightmost panel shows the eccentricity posteriors for the two planets. The dashed orange lines in the right-hand plot indicate the ACR tracks that encompass the full range of the planet mass ratios in the posterior sample. Bottom: table giving log evidences from nested sampling and the percentiles of parameters’ marginalized posterior distributions from MCMC. The second system we fit, HD 33844, consists of two configurations in the neighborhood of their best-fit so- giant planets orbiting in or near a 5:3 MMR and was lution reside in the 5:3 MMR.7 originally reported by Wittenmyer et al.(2016). We Figure3 summarize our fit results for HD 33844. Our adopt the of M∗ = 1.84 M for HD 33844 inferred planet masses and orbital parameters are in based on the best-fit value reported by Stassun et al. (2017). Combining RV fits with longer-term N-body 7 Wittenmyer et al.(2016) find that the angle 5 λc−3λb−ωb+ωc simulations to rule out RV solutions leading to dynam- alternates between libration and circulation in their simulations. ical instabilities on timescales less than 100 Myr, Wit- This combination, however, is not a dynamically meaningful reso- tenmyer et al.(2016) find that many of the stable orbital nant angle as it is not invariant under rotational transformations of the coordinate system. RVs of Resonant Planets 9 good agreement with values reported by Wittenmyer with masses equal to the median planet masses derived et al.(2016). The unrestricted and ACR models provide from our MCMC fits and orbital elements corresponding similar quality fits to the data and, due to its lower di- to an ACR equilibrium, except that we vary the plan- mensionality, the ACR model is formally preferred with ets’ period ratio away from the equilibrium value. We a log Bayes factor of ∼ 6 based on the results of our explore a range of planet eccentricities by running inte- nested sampling simulations. grations over a grid of normalized AMD values up to the In order to more clearly interpret the resonant state value Dmax described in Section 3.1. Each integration of RV solutions inferred with the unrestricted model, we is initialized with λ2 = λ1, and all osculating orbital turn to the analytic resonance model of Hadden(2019). elements are set to their ACR values, except for the While the full dynamics of a 5:3 MMR are captured planets’ period ratios, which we vary along the x-axes by a two-degree-of-freedom system with two resonant of the maps. The planets’ osculating elements in the angles, σ1 and σ2 defined in Section2, Hadden(2019) ACR configuration are computed using the transforma- shows that, to an excellent approximation, the dynam- tion from mean to osculating elements described in Ap- ics of the MMR only depend on a single resonant angle pendix A.2. The simulations are run using the WHFast i$c i$ θres = 5λc − 3λb − 2z, where z ≈ arg(ece − ebe b ). integrator (Rein & Tamayo 2015) with time steps set To determine the resonant behavior of the RV solutions to 1/30 of the periapse passage timescale of the inner ˙ ˙ fit with the unrestricted model, we again integrate 1500 planet, Tperi = 2π/fmax, where fmax is the time deriva- initial conditions randomly selected from the MCMC tive of the true anomaly at pericenter (Wisdom 2015). posterior sample for 100 orbits of planet b and record Regular and chaotic trajectories are identified based on angle libration amplitudes as the maximum deviation of the MEGNO chaos indicator (Cincotta et al. 2003). the angle θres from its equilibrium value, π. (ACR so- From Figure4, we see that, in the case of HD 45364, lutions have periodic variations in θres on the synodic the 3:2 ACR provides a large island of stability in a timescale about the equilibrium of the averaged system phase space that is otherwise unstable except for a small with an amplitude of approximately ∼ 0.1π.) Approx- pocket of stability just wide of the resonance at low ec- imately 50% of these initial conditions show librating centricity. This is in agreement with the original analysis behavior, and the cumulative distribution of their libra- of Correia et al.(2009). The structure of the 5:3 ACR tion amplitudes are recorded in the middle-right panel in the HD 33844 system, on the other hand, is some- of Figure3. The rightmost panel shows that the N-body what more complicated. The ACR shows two separate model prefers a larger eccentricity for planet b when the islands of stability separated by a thin chaotic region system is not restricted to lie inside the ACR. near D ≈ 0.1 along with a small pocket of stability wide of the resonance at low eccentricity. 4. DISCUSSION Irrespective of whether or not the HD 45364 and HD 4.1. Dynamical stability 33844 systems are truly in ACR configurations we can conclude that they most likely reside in resonance since So far, we have not considered the long-term stabil- the local phase space outside of these resonances is al- ity of planets’ orbital configurations in our fits. The most entirely chaotic and unstable. The stability maps high planet masses and close spacings of the HD 45364 shown in Figure4 highlight how knowledge of ACR and HD 33844 systems place them near the boundary of structure allows much more efficient identification of sta- dynamical instability. This dynamical fragility can be ble parameter space than a brute-force grid search of the leveraged to derive tighter constraints on the planets’ high-dimensional parameter space of planets’ orbital el- masses and orbital properties by rejecting any orbital ements when fitting RVs. It is well known that MMRs configurations that rapidly go unstable (rejection sam- can provide phase protection from close encounters that pling based on long-term stability is common practice in would otherwise destabilize strongly interacting plan- the literature: e.g., Wittenmyer et al. 2016). Because we ets. Because ACR configurations are elliptic equilibria are primarily interested in evaluating whether systems’ of the averaged dynamical system describing the plan- RVs can be explained by planets in an ACR configura- ets’ resonant motion, they should be the most dynami- tion rather than deriving precise orbital constraints, we cally stable resonant configurations possible: the degree will not apply this rejection sampling procedure here. of nonlinearity in the neighborhood of an elliptic equi- Instead, we explore the dynamical stability in the vicin- librium, and thus the potential for chaos and dynamical ity of ACR configurations by means of the dynamical instability, increases with distance from the equilibrium maps shown in Figure4. The maps in Figure4 indicate (Giorgilli et al. 1989). Therefore, vicinities of ACR con- dynamical stability results for a grid of short N-body figurations provide good starting points for any search integrations. In each integration, planets are initialized 10 Hadden & Payne

HD 45364 3:2 MMR HD 33844 5:3 MMR 0.25 0.35 0.175 0.35 0.30 0.20 0.30 0.150 0.25 0.25 0.125 0.20 0.15 0.20 c 0.100 c e e 0.15 0.15 0.075 0.10 0.10 0.10 0.050

0.05 0.05 0.05 0.025

0.050 0.025 0.000 0.025 0.050 0.04 0.02 0.00 0.02 0.04 2 3 3 [(Pc/Pb) (Pc/Pb)eq. ] 5 [(Pc/Pb) (Pc/Pb)eq. ]

Figure 4. Stability maps in the vicinity of the 3:2 ACR of HD 45364 (left) and the 5:3 ACR of HD 33844 (right), respectively. Planet masses are set to their median values from the ACR model MCMC. Each panel shows results from a grid of simulations run for 3000 orbits of the outer planet. Black indicates regular trajectories, white indicates chaotic trajectories, and red indicates trajectories that experienced a close encounter during the simulation. We use a grayscale stretching from MEGNO values of 1.9 to 5 in order to color regular and chaotic points. for dynamically stable orbital configurations when mod- rectly to a ratio of migration timescale to eccentricity- eling strongly interacting planet pairs. In their analy- damping timescale at the time the equilibrium was es- sis of the HD 82943 system, Baluev & Beaug(2014) tablished. This is illustrated in Figure5. The figure previously noted the utility of enforcing ACR configu- shows the posterior distributions of each planet pair’s rations to ensure dynamical stability when fitting RV eccentricities from our MCMC fits with ACR models. In data. Conversely, if no stable ACR configuration exists different colored lines, we plot the loci of equilibria along for a given set of planet masses, then stable orbital con- these ACR tracks for different values of τα/τe where we −1 −1 −1 figurations likely do not exist in the nearby phase space. define τe ≡ τe,1 +τe,2 and assume that m2τe,2 = m1τe,2 so that the strength of eccentricity damping experienced 4.2. Inferring Migration History by a planet is proportional to its mass. This simple In this section we explore how the present-day dy- prescription approximately matches the expected scal- namical configurations can be used to glean information ing of eccentricity damping experienced due to type I about planet–disk interactions that presumably estab- migration (Kley & Nelson 2012) or dynamical friction lished these configurations during the planet formation from interactions with planetesimals (Ida 1990). For process. Because theoretical understanding of planet each system, Figure5 also shows the distribution of migration is incomplete, we rely on our simple param- τα/τe values inferred by mapping our posterior samples eterized model of eccentricity damping and migration of mass ratios and eccentricities to values of τα/τe. For +8 in Equation (2). While the migration and eccentricity HD 45364 we infer τα/τe = 8−3 and for HD 33844 we +65 damping rates experienced by planets may vary over the find τα/τe = 20−12. course of the formation process in ways that are not cap- Of course, the planet pairs could have failed to reach tured by our simple parameterized damping model, the an equilibrium between migration and eccentricity- model is still useful for capturing qualitative aspects of damping forces and instead have been stranded at their planet–disk interactions during the formation process. current resonant configurations if the gas disk dissipated The quantitative constraints derived with our simple before any equilibrium was reached. In this case, the migration model provide useful metrics against which posterior distributions of τα/τe derived from our ACR predictions of more rigorous theoretical and numerical model fits would serve as lower limits on the timescale of studies of planet migration can be compared. eccentricity damping relative to the migration rate: had If it is assumed that planet pairs were subject to mi- the eccentricity damping been stronger, the systems gration and eccentricity-damping forces for a time pe- would have reached equilibria at lower eccentricities riod sufficiently long to reach dynamical equilibrium, while D increased monotonically after capture into the a given ACR equilibrium configuration corresponds di- resonance. Far from an equilibrium between migra- RVs of Resonant Planets 11

HD 45364 3:2 ACR HD 33844 5:3 ACR

0.40 0.40 / e 1.25 / e 1 3 0.8 0.35 0.35 3 1.00 10 10 30 0.6 0.75 0.30 30 0.30 100 0.4 100 0.50 Probability Probability 0.25 0.25 0.25 0.2

0.00 0.0 2 0.20 1 3 10 30 100 300 2 0.20 3 10 30 100 300 e e 5 5.0 3:2 5:3 0.15 2:1 0.15 2:1 × × 2.5 5:3 0 e e t t

0.10 a 0.10 a R 0.0 R 5 h h t t w w 0.05 Instability 2.5 0.05 Instability o o

r r 10 G 5.0 G 0.00 0.00 15 0.0 0.1 0.2 0.3 0.4 1 3 10 30 100 300 0.0 0.1 0.2 0.3 0.4 3 10 30 100 300 e1 a/ e e1 a/ e

Figure 5. Inferring the relative strength of migration and eccentricity damping, τα/τe, during resonant capture for HD 45364 (left) and HD 33844 (right) from our ACR model fits. For each system, the left panel shows the posterior distribution of planet eccentricities from the ACR model MCMC fit with the loci of equilibrium configurations for different values of τα/τe plotted in different colors. The upper-right panels show the posterior distribution of τα/τe values inferred by converting the eccentricity values shown in the left panels to τα/τe values. The bottom-right panel shows the stability/instability growth rates, in units of −1 τα , as a function of τα/τe for the current resonance occupied by each system as well as the 2:1 MMR and, for HD 45364, the 5:3 MMR. Positive values correspond to instability (the ACR becomes an unstable spiral in the presence of dissipation) while negative values correspond to stability (the ACR becomes a stable spiral in the presence of dissipation). tion and eccentricity damping forces, the eccentricity tion of HD 45364. Another possibility is that capture in damping will play a negligible role in the evolution of D the 2:1 MMR was rendered temporary in both systems and because the ACR configuration was an unstable spiral √ in the presence of dissipative forces. This mechanism β β α 1 D˙ ≈ √ 1 2 . (7) presents a compelling alternative explanation because, β1 α(1 + s) + β2s 2τα as Rein et al.(2010) note, the migration rates required Inserting the appropriate parameters in Equation (7), to avoid capture in the 2:1 MMR are significantly faster HD 45364 would reach the median posterior value of D than the rates of migration predicted by conventional type II migration theory. We explore this possibility increasing from 0 in a time of ∼ 0.15τα. Similarly, HD further in Figures5 and6. 33844 would reach its median value of D in ∼ 0.03τα. The times the two systems would have required to reach Figure5 illustrates the stability of ACR equilibria as a their current MMRs by large-scale migration from a pe- function of τα/τe for the current resonance occupied by each system as well as the 2:1 MMR (plus the 5:3 MMR riod ratio of approximately ∼2:1, are ∼ 0.2τα for HD for HD 45364 system), which the planets would have tra- 45364 and ∼ 0.1τα for HD 33844. This scenario there- fore requires that planets’ migration timescales to be versed on their way to their current MMR configuration. comparable to or longer than the lifetime of the proto- The curves are computed as follows: first, we determine planetary disk while migration rates predicted by con- the equilibrium configuration for a given τα/τe using the ventional type II migration theory are usually at least resonance equations of motion, taking p = 1 in Equa- one or two orders of magnitude shorter than disk life- tion (2) describing the dissipative forces experienced by times (Kley & Nelson 2012). the planets. Next, we compute the Jacobian of the equa- One of the puzzling features of the HD 45364 and HD tions of motion at this equilibrium. The stability is then 33844 systems is that they both lie interior to the 2:1 determined based on the real parts of the eigenvalues of MMR. In standard core accretion theories of planet for- the Jacobian as described in Section2. The plot shows −1 mation, massive planets like those in these systems are the maximum real eigenvalue component in units of τα , 5 expected to form farther apart than the 2:1 MMR (Ar- which we have taken to be τα = 3 × 10 P2. (We confirm mitage 2007, and references therein). If the resonances that, for sufficiently large τα, growth rates simply scale −1 in these systems were established through convergent with τα .) For HD 45364, the 2:1 ACR equilibrium is migration, then, during formation, the planets should unstable for 6 < τα/τe < 211. This range encompasses have first encountered and been captured into the 2:1 65% of the posterior points plotted in the top right panel MMR. One possibility is that their migration was suffi- of Figure5. For HD 33844, instability occurs at the 2:1 ciently rapid to avoid capture in the 2:1 MMR. This is MMR for 3.6 < τα/τe < 67, encompassing 81% of the the scenario considered, for example, in the simulations posterior. of Rein et al.(2010) to explain the orbital configura- 12 Hadden & Payne

HD 45364 HD 33844 300

100 100

e 30 / 30

10 10

3 5 0.03 0.1 0.3 1 3 10 30 0.1 0.3 1 3 10 e, 1/ e, 2 e, 1/ e, 2

2:1 unstable 2:1 limit cycle 5:3 unstable 1 RV constraint 3:2 unstable

Figure 6. Stability of ACR equilibria as a function of τα/τe and τe,1/τe,2 for the HD 45364 and HD 33844 systems. Eccentricity and semi-major axis damping evolve planets toward an ACR equilibrium that may be stable or unstable, depending on the relative eccentricity damping strengths experienced by the inner and outer planet. Regions where these equilibria are unstable are indicated by different colors for different resonances. Parameter combinations that reach a limit cycle in the 2:1 MMR rather than passing through the resonance are also indicated. Gray bands show the 1σ inferred ranges of τα/τe as a function of τe,1/τe,2 based on our ACR model MCMC fit. The vertical dashed line indicates τe,1/τe,2 = m2/m1, the eccentricity damping relationship presumed in Figure5. Colored circles indicate the parameters used in the N-body simulations plotted in Figures7 and8. For both HD 45364 and HD 33844, there exist regions of parameter space that would have both led to their escape from the 2:1 MMR while also allowing for subsequent stable capture into their current resonant configurations.

In Figure6, we perform similar calculations, but we one unstable fixed point. If D > Dbif then the unsta- now relax our assumption of τe,1/τe,2 = m2/m1 and in- ble librations grow until the system eventually escapes stead explore a range of relative eccentricity-damping resonance while, for D < Dbif, the librations saturate strengths. We examine credible regions of τa/τe in- at a finite value when the system reaches a limit cy- ferred from our ACR model fit posterior as a function cle. To compute Dbif for the 2:1 MMR, we use an inte- of τe,1/τe,2. The figure also shows the regions for which grable approximation for the resonant dynamics similar different combinations of τe,1/τe,2 and τα/τe drive the to the one employed by Deck & Batygin(2015) imple- system to an ACR configuration that is made unstable mented in the celmech package.8 Damping parameter by the dissipative forces. combinations expected to lead to a limit cycle in the 2:1 While the elliptic point of the ACR configuration may MMR, where the equilibrium configuration is unstable be rendered unstable by dissipative forces, the ultimate but D < Dbif, are indicated by pink shading in Figure outcome of the instability can lead to either passage 6. through the resonance or a limit cycle within the res- Figures7 and8 show example encounters with the 2:1 onance. In order for the planets of the HD 45364 and MMR for HD 45364 and HD 33844, respectively, at fixed HD 33844 systems to have escaped permanent capture in τα/τe and for a range of τe,1/τe,2 values that are indi- a 2:1 MMR, instabilities must have led to escape rather cated by the colored points in Figure6. The simulations than a limit cycle. Using an integrable approximation in Figures7 and8 use the symplectic WHFast integrator, for the dynamics of a first-order MMR, Deck & Batygin instead of the IAS15 integrator, with time steps set to (2015) derive an approximate criterion to determining 1/100 of the initial orbital period of the inner planet. whether instability is expected to result in escape or We choose the planets’ individual migration timescales 5 m1 m2 a limit cycle. Their criterion can be stated in terms such that τα = 3 × 10 P2 and + = 0. a1,0τm,1 a2,0τm,2 of a critical value of D = Dbif, where the Hamiltonian H¯ (z, D) exhibits a bifurcation and goes from having one 8 elliptic fixed point to having two elliptic fixed points and https://github.com/shadden/celmech RVs of Resonant Planets 13

The latter condition ensures that the time derivative too fast so as to avoid the 3:2 MMR. This is possible  −2  −4/3 of the systems’ energy is approximately zero and min- m1+m2 m1+m2 provided . τα/P . (Xu & imizes any inward drift of the system to ensure that M∗ M∗ Lai 2017). dynamics remain well resolved by the simulations’ fixed How do our inferences about the migration histories time steps. Trajectories are colored according to the pre- of HD 45364 and HD 33844 compare to theoretical pre- dicted stability of their 2:1 ACR equilibrium: pink tra- dictions? For planets experiencing type I migration, jectories are stable while green trajectories are unstable. the relative strength of eccentricity and migration rates, In both Figures7 and8 the planets are initialized with τ /τ , are expected to be 100 (e.g., Baruteau et al. a period ratio of 2.2 on circular orbits and migrate with α e & 2014), significantly larger than the values we infer in τ = 3 × 105P . For HD 45364 shown in Figure7, we α 2 Figures5 and6. This is especially true for HD 45364, set τ = 1/(τ −1 + τ −1) = 8.13τ while in for HD 33844 e e,1 e,2 α where our constraints are the most precise. We note that shown in Figure8, we set τ = 1/(τ −1 + τ −1) = 31τ . e e,1 e,2 α Delisle et al.(2015) examined HD 45364 and found that For HD 45364, shown in Figure7, the unstable simula- τ /τ 6 and τ /τ ∼ 10 based on the reported or- tions grow in libration amplitude and eventually escape e,1 e,2 & e α bital solution of Correia et al.(2009); in agreement with from the resonance. The unstable simulations for HD our results. However, the planets in both systems are 33844, shown in Figure8, exhibit more complicated be- sufficiently massive that they are expected to have open havior. Upon reaching the unstable ACR equilibrium, gaps in their protoplanetary disk, so the predictions of they initially grow in libration amplitude. Three of the type I migration are probably not applicable (e.g., Kley simulations go on to escape from the resonance, just as & Nelson 2012). in the unstable HD 45364 simulations. The other un- Hydrodynamical simulations of the migration of mas- stable simulations, however, reach a limit cycle. This sive, resonant planet pairs in a gas disk have been stud- behavior is consistent with the predictions of Figure6, ied by a number of authors (Bryden et al. 2000; Kley where many of the simulations lie in the pink shaded 2000; Snellgrove et al. 2001; Papaloizou 2003; Kley et al. region of parameter space, leading to an unstable 2:1 2004; S´andoret al. 2007; Crida et al. 2008; Rein et al. MMR but with D < D . bif 2010; Andr´e& Papaloizou 2016). Kley et al.(2004) in- For HD 33844, Figure6 shows that there is a signifi- fer an effective τ /τ of approximately ∼ 1–10 from their cant region of parameter space which is both consistent α e simulations of two giant planets in a disk by comparing with our ACR model fit and for which the 2:1 ACR the results of their hydrodynamic simulations with sim- configuration is unstable but the 5:3 ACR configuration ple damped N-body simulations. This result is in good remains stable. HD 33844 b and c could, therefore, have agreement with the values inferred from our ACR fits readily evaded permanent capture in the 2:1 MMR and for both systems. Crida et al.(2008) and Morbidelli & continued migrating toward the 5:3 MMR, where they Crida(2007) note the importance of an inner disk to were ultimately permanently captured. There is also a provide eccentricity damping for the innermost planet. region of parameter space for HD 45364 that is consis- Figure6 shows that both systems would have required tent with our ACR model fit and for which the 2:1 ACR the eccentricity damping experienced by the inner planet configuration is unstable but the 3:2 ACR configura- to be comparable in magnitude to the damping experi- tion remains stable. HD 45364 b and c could, therefore, enced by the outer planet if they were to have escaped also have escaped the 2:1 MMR and continued migrat- the 2:1 MMR due to instability and yet reached a stable ing toward the 3:2 MMR. However, in order to migrate equilibrium in their present-day resonances. into the 3:2 MMR, the system would also have traversed While we have sketched plausible migration histories the second-order 5:3 MMR. There is a narrow region for the HD 45364 and HD 33844 systems that can ex- of parameter space in Figure6 that lead to unstable plain how they might evade capture in a 2:1 MMR and ACR equilibria in both the 2:1 and 5:3 MMRs but a reach their current configurations, we cannot rule out stable 3:2 ACR equilibrium. However, such parameters other scenarios. For example, the planets may have had are not generic and a scenario in which the planet pair significantly different masses at the time they encoun- escaped both the 2:1 and 5:3 MMRs through instabil- tered the 2:1 MMR and only have grown to their cur- ity but reached a stable equilibrium in the 3:2 MMR rent masses after becoming trapped in the resonances appears to suffer from a fine-tuning problem. Alter- they currently occupy. Another possibility is that the natively, HD 45364 b and c could have reached the 3:2 disk conditions, and thus migration and eccentricity- MMR if their migration rate was sufficiently fast to avoid damping rates, varied significantly between planets’ en- capture into the 5:3 MMR. This would require a migra- counters with the 2:1 MMR and their subsequent en- tion rate sufficiently fast to avoid the 5:3 MMR but not counters with more closely spaced resonances. Addi- 14 Hadden & Payne

HD 45364 2:1 MMR Encounters HD 33844 2:1 MMR Encounters 2.1 2.10

b 2 ]

P 2.05 / 2.0 3 c b [ P

P / 2.00

1 c e P t 2 a

1.9 ] R 1.95 1

0 y 1 [ t

i e

l 1.90 0.4 t i a b R 0 a 1 0.0 0.5 1.0 1.5 2.0 2.5 3.0 y t t

0.2 i l s T/ i e b n a 0.2 b I

1 t e eb 0.1 s 2 n I ec 0.0 2 0.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 0.0 0.5 1.0 1.5 2.0 2.5 3.0 0.10 T/ 3 c

T/ e 0.05

Figure 7. Example outcomes of a 2:1 MMR encounter for 0.00 0.0 0.5 1.0 1.5 2.0 2.5 3.0 HD 45364 for different values of τe,1/τe,2 indicated by the T/ colored points plotted in Figure6. The upper panel shows the planets’ period ratio as a function of time measured in Figure 8. Example outcomes of a 2:1 MMR encounter for units of τα, and the bottom panel shows the evolution of the HD 33844 for different values of τe,1/τe,2 indicated by the planets’ eccentricities. Results of each simulation are colored colored points plotted in Figure6. The upper panel shows according to the instability growth rate computed using the the planets’ period ratio as a function of time measured in resonance equations of motion described in Section2. Green units of τα, and the bottom panels show the evolution of each colors correspond to unstable parameters and escape from planet’s eccentricity. Results of each simulation are colored the resonance after capture, while pink simulations are stable according to the instability growth rate computed using the and remain in the resonance. resonance equations of motion described in Section2. Green corresponds to unstable parameters while pink simulations tionally, our treatment of eccentricity damping and mi- are stable. Some of the unstable simulations pass through gration is likely oversimplified. In Equation (2), we pa- the resonance whereas others reach a limit cycle with large rameterized the dependence of planets’ semi-major axis libration amplitude inside the 2:1 MMR. evolution under disk forces by including the parameter “p,” which describes the degree to which eccentricity- 4.3. Improving Constraints with Follow-up damping forces conserve angular momentum (p = 1 Observations corresponds to eccentricity damping at constant angu- In Section 3.2, we showed that the RV signals of both lar momentum). As Xu et al.(2018) note, for type I HD 45364 and HD 33844 were consistent with the hy- migration, this treatment is only valid when eccentrici- pothesis that the systems reside in ACR configurations. ties are less than the local disk aspect ratio, e  H/r, In each case, our nested sampling simulations yielded where H is the disk scale height and r the orbital ra- model evidences that prefer ACR configurations for both dius. Xu et al.(2018) find that using a more realistic systems. However, in both cases, the preference for the treatment of migration and eccentricity-damping forces ACR models is somewhat marginal. Here we briefly ex- in the type I regime generally leads to larger equilibrium plore the prospects for follow-up observations to further eccentricities and more stable capture when compared to bolster the evidence for ACR configurations in these sys- the approximate treatment we employ in Equation (2). tems or detect deviations from the predictions of the For giant planets that open a common gap (the regime ACR models. In Figure9, we show the predicted RV likely occupied by the planets we have considered here), signals of HD 45364 and HD 33844 from 2020 April 15 the dependence of migration and eccentricity-damping to 2025 April 15. The figures compare the predicted RV forces on planet eccentricities is less well studied, though signals projected using both the unrestricted and ACR hydrodynamical simulations by Crida et al.(2008) sug- models. In order to identify the most opportune times gest a potentially complicated dependence. Ultimately, for follow-up observations, we seek to identify times a comparative study of a larger sample of resonant sys- where the models’ posterior predictive distributions of tems both in and interior to the 2:1 MMR, in conjunc- RV values are most distinct. This is achieved by compar- tion with theoretical investigations of planet–disk inter- ing the distribution of the predicted RV of a system at actions in systems of resonant gap-opening planet pairs, a given time using a two-sample Kolmogorov–Smirnov could shed further light on why some systems become (KS) test (Kolmogorov 1933; Smirnov 1948). In the bot- captured in the 2:1 MMR while others manage be cap- tom panels of Figure9 we plot the negative logarithm of tured into closer resonances. the p values returned by these KS tests as a function of time. Small p values indicate that the distributions pre- RVs of Resonant Planets 15 dicted by the two are highly unlikely to be derived from timescale approximately ∼ 10 times shorter than the same underlying distribution and provide a heuristic the migration timescale. measure of the future epochs at which additional obser- vations could most effectively distinguish between the 3. We showed that both systems could have avoided two models. permanent capture in the 2:1 MMR during mi- gration due to an instability mechanism while 5. SUMMARY AND CONCLUSIONS reaching stable equilibria in their present-day res- In this paper we developed an RV-fitting method that onances. This can explain how these planets allows us to fit the RVs of a pair of planets under the reached their present-day resonances without the assumption that the pair resides in an ACR configu- need to invoke rapid migration in order to explain ration. This approach to RV fitting has a number of how they avoided permanent capture during ear- benefits. First, it allows one to test the hypothesis that lier encounters with the 2:1 MMR. the present-day dynamical configuration arose from res- We envision the application of the methods devel- onant capture during smooth migration by comparing oped in this paper to the wider sample of resonant fits with the ACR model to conventional RV fits. Sec- and near-resonant RV systems, allowing for a com- ond, it allows for the efficient identification of stable prehensive comparative study, as a promising fu- orbital configurations in strongly interacting systems. ture direction for better understanding the role of Finally, for systems consistent with an ACR configura- migration in shaping the architectures of exoplan- tion, the eccentricities of the planets can used to infer etary systems. We provide the Python code for constraints on the system’s migration history. computing and fitting our ACR model online at We applied this model to two systems hosting pairs of github.com/shadden/ResonantPlanetPairsRVModeling. resonant giant planets, HD 45364 and HD 33844. We summarize our key conclusions: Software: (Foreman-Mackey et al. 2019), dynesty (Speagle 2020), radvel (Fulton et al. 2018), 1. ACR configurations were preferred over an unre- REBOUND (Rein & Liu 2012), REBOUNDx (Tamayo et al. stricted N-body model for both HD 45364 and HD 2020), Theano (Theano Development Team 2016) 33844 systems. This lends support to the hypoth- esis that the resonances in these systems were es- tablished via smooth migration. Acknowledgments. We thank Paul Duffell, Matt Hol- man, and Josh Speagle for helpful discussion. S.H. 2. Based on the present-day dynamical configura- gratefully acknowledges the CfA Fellowship. We are tions of these systems, we used our ACR fits to grateful to the anonymous referee whose feedback has measure the relative strengths of migration and improved the quality of this manuscript. The compu- eccentricity damping at the time these systems tations in this paper were run on the Odyssey cluster formed. In both cases, we found that the data supported by the FAS Science Division Research Com- are best explained by an eccentricity-damping puting Group at Harvard University.

APPENDIX

A. EQUATIONS OF MOTION A.1. Construction of the Hamiltonian In this appendix we derive the equations of motion governing the dynamics of a j:j − k resonance between a pair of coplanar planets of mass m1 and m2 orbiting a star of mass m0. We begin by considering the conservative evolution of the system in Jacobi coordinates using modified canonical Delauney variables (e.g., Morbidelli 2002). The canonical momenta are given by

q Λi =m ˜ i GM˜ iai q q ˜ 2 Γi =m ˜ i GMiai(1 − 1 − ei )

ηi−1 ηi Pi where G is the gravitational constant,m ˜ i = mi, M˜ i = m0, and ηi = mi. The angle variables conjugate ηi ηi−1 j=0 to Λi and Γi are are, respectively, the planets’ mean longitudes, λi, and γi = −$i where $i are the planets’ longitudes 16 Hadden & Payne

HD 45364 Predicted RVs HD 33844 Predicted RVs 60 30 Model Model Full Full 40 20 ACR ACR

10 20

0 0

10 RV [m/s] RV [m/s] 20

20 40

30 60 ) ) p p ( ( 0 0 1 100 1 100 g g o o l l

0 0 59000 59250 59500 59750 60000 60250 60500 59000 59250 59500 59750 60000 60250 60500 Time [JD-2400000] Time [JD-2400000]

Figure 9. Predicted RV signals of the HD 45364 and HD 33844 system over the next 5 yr. Top panels show RV signals for the unrestricted and ACR models. In the bottom panel, the times where the posterior predictive distributions differ between the unrestricted and ACR model most significantly are identified by computing p-values using a two-sample KS test for the two distributions. The predicted RVs of the ACR model have been computed via N-body integration as the double-Keplerian approximation does not remain valid over the timescales plotted (see AppendixB). of periapse. The Hamiltonian is given by

2 2 ˜ 2 3   X G M m˜ 1 r1 · r2 H(λ , γ ;Λ , Γ ) = − i i − Gm m − (A1) i i i i 2Λ2 1 2 |r − r | |r |3 i=1 i 1 2 2 where the position vectors ri are functions of the canonical variables, and we omit terms that are second order and higher in the planet–star mass ratios. To derive equations of motion governing the dynamics of a j:j − k resonance, we follow Michtchenko et al.(2006) and transform to new canonical angle variables,       σ1 −s 1 + s 1 0 λ1       σ2  −s 1 + s 0 1 λ2   =   ·   (A2) Q −1/k 1/k 0 0 γ1 1 1 l 2 2 0 0 γ2 where s = (j − k)/k, along with new conjugate momenta defined implicitly in terms of the old momentum variables as

Γi = Ii L Λ = − P/k − s(I + I ) 1 2 1 2 L Λ = + P/k + (1 + s)(I + I ) . (A3) 2 2 1 2

The full Hamiltonian is independent of the new angle l = (λ1 + λ2)/2 and its corresponding canonical momentum,

L = Λ1 − Γ1 + Λ2 − Γ2 , is the total angular momentum, which is conserved due to the rotational symmetry of the system. To derive equations of motion governing the resonant dynamics, we perform a near-identity canonical transformation (σi,Ii, Q, P ) → (¯σi, I¯i, Q,¯ P¯) such that, to leading order in the planet–star mass ratio, the new Hamiltonian is given by 1 Z 2π H¯ (¯σi, I¯i; L, P¯) = HdQ , (A4) 2π 0 i.e., the new Hamiltonian is the old Hamiltonian averaged over the “fast” variable Q. We construct this transformation explicitly below in Appendix A.2 so that we may transform the osculating elements of a pair of planets to the variables of our Hamiltonian model and vice versa. RVs of Resonant Planets 17

The averaging procedure yields Λ¯ − Λ¯  1 P¯ /k = 2 1 − s + (Γ¯ + Γ¯ ) 2 2 1 2 as a constant of motion. In order to gain a better physical intuition for the meaning of the conserved quantity, P¯, it is instructive to express its value in terms of the value of the planets’ eccentricities and distance to nominal j−k P2 resonance, − 1 ≡ ∆. This can be accomplished as follows: first, define the reference semi-major axes a2,0 and j P1  1/3  2/3 M˜ 1 j−k a1,0 = a2,0 corresponding to the nominal location of resonance, such that L = Λ1,0 + Λ2,0 where M˜ 2 j q ˜ ¯ ¯ s+1 ¯ Λi,0 =m ˜i GMiai,0 for i = 1, 2. Conservation of P and L implies that Λ2 − Λ2,0 = − s (Λ1 − Λ1,0). Defining δΛi = Λi − Λi,0, we can write     δΛ2 δΛ1 (s + 1)Λ1,0 + sΛ2,0 ∆ ≈ 3 − = 3δΛ2 . Λ2,0 Λ1,0 (s + 1)Λ2,0Λ1,0 We define the ‘normalized AMD’ as 1 ¯ 2 (Λ2,0 − Λ1,0) − P /k D = p . (A5) (s + 1/2)(m ˜ 1 +m ˜ 2) Gm0a2,0 Rewriting Equation (A5) in terms of orbital elements gives √  q   q  √ 2 2 kβ2β1 α0∆ D ≈ β1 α0 1 − 1 − e1 + β2 1 − 1 − e2 − √  3 β1 α0(s + 1) + β2s q m˜ i M˜ i √ 2 2 where βi = and α0 = a1,0/a2,0. For small eccentricities and ∆ ≈ 0, we have that D ≈ β1 αie /2+β2e /2. m˜ 1+m ˜ 2 m0 1 2 In order to implement the equations of motion given in Equation (3) governing resonant dynamics, we evaluate the integral in Equation (A4) and its derivative with respect to canonical variables by numerical quadrature using a Gauss- Legendre quadrature rule. We use the exoplanet (Foreman-Mackey et al. 2019) package’s Kepler solver algorithm to compute the planets’ ~ri as functions of canonical variables to evaluate the integrand of Equation (A4). Derivatives of H¯ are then computed using the Theano (Theano Development Team 2016) package’s automatic differentiation capabilities. A.2. Transformation from mean to osculating elements The orbital elements appearing in the canonical variables of the equations of motion governing the planets’ resonant dynamics represent ‘mean’ elements. These mean elements differ from the planets’ osculating elements, which exhibit additional high-frequency variations on the timescale of the planets’ synodic period. This is because the Hamiltonian system governing the resonant dynamics is derived from a phase-space reduction of the full three-body problem via near-identity canonical transformation that eliminates the degree of freedom associated with the canonical coordinate Q = (λ2 − λ1)/k. The ACR equilibrium configurations of the resonant Hamiltonian correspond to periodic orbits of the full three-body problem that are 2π-periodic in Q. In order to properly initialize N-body simulations with planets residing in an ACR configuration, the periodic variations of the osculating orbital elements must be accounted for; ignoring these corrections can result in large libration amplitudes when running N-body simulations. We do this by constructing the canonical transformation from the variables of our resonance model to the canonical coordinates of the unaveraged three-body problem. In order to construct our canonical transformation, we begin by writing the full Hamiltonian of the planar three-body problem as

H(σi,Ii, Q, P ; L) = H0(Ii,P ; L) + H¯1(σi,Ii,P ; L) + H1,osc.(σi,Ii, Q, P ; L) (A6) where 2 X G2M˜ 2m˜ 3 H = − i i 0 2Λ2 i=1 i Z 2π   ¯ Gm1m2 1 r1 · r2 H1 = − 3 dQ 2π 0 |r1 − r2| r2   1 r1 · r2 ¯ H1,osc. = Gm1m2 − 3 − H1 (A7) |r1 − r2| r2 18 Hadden & Payne and  serves as a bookkeeping parameter that we will set to unity after deriving the transformation to first order in . We focus on constructing the transformation for phase-space points in the vicinity of an ACR. We adopt the vector notation z = (σ1, σ2,I1,I2) and define an equilibrium point z¯eq(P0) as a point that satisfies   ∇z H0(z¯eq,P0; L) + H¯1(z¯eq,P0; L) = 0

We next transform to canonical variables δz = z − z¯eq and δP = P − P0 centered on the equilibrium configuration and approximate the Hamiltonian by expanding in δz as 1 H = δzT · ∇2 H + H¯  · δz + (ω + δz · ∇ ω ) δP/k +  H + δzT · ∇ H  (A8) 2 z 0 1 syn z syn 1,osc. z 1,osc.

∂H0 where ωsyn ≡ k ∂P is the synodic frequency n2 − n1, and we have dropped constant terms from Equation (A8). We next perform a symplectic linear transformation,

w = S−1 · δz (A9) to new canonical variables w = (w1, w2, w˜1, w˜2) where wi are the new coordinates andw ˜i are the conjugate momenta. The matrix S satisfies

−1 2  ¯  S · Ω · ∇z H0 + H1 · S = D ST · Ω · S = Ω (A10) where D is a diagonal matrix of the form D = diag(iω1, iω2, −iω1, −iω2). We choose S so that the components of w ∗ satisfyw ˜i = −iwi . After the canonical change of variables, Hamiltonian (A8) transforms to

2 X H(w, δP, Q) = i ωiwiw˜i + (ωsyn + w · ∇wωsyn) δP/k +  [H1,osc.(z¯eq,Q) + w · ∇wH1,osc.(Q)] (A11) i=1

T where ∇w = S · ∇z. This transformation puts the Hamiltonian in the form of a perturbed pair of harmonic oscillators with frequencies ωi and allows us to apply canonical perturbation theory to construct the transformation from osculating to mean variables below. To construct the transformation from δz to w, we evaluate the matrix 2  ¯  Ω · ∇z H0 + H1 by means of automatic differentiation and then numerically determine its eigenvectors in order to calculate the matrices S and D. We now construct a canonical transformation (w, δP, Q) → (w¯ , δP,¯ Q¯) by means of a canonical Lie transformation (e.g., Morbidelli 2002) in order to eliminate the dependence of the Hamiltonian on Q to first order in . The trans- ¯ ¯ ¯ ¯ formation is generated by the function χ1(w¯ , δP, Q) so that (w, δP, Q) = exp [Lχ1 ](w¯ , δP, Q), where Lχ1 = {·, χ1} is the Lie derivative with respect to χ1, i.e., the canonical Poisson bracket of a given function of phase-space coordinates and the function χ1. We will solve for χ1 so that Hamiltonian (A11) is transformed to

2 ¯ ¯ ¯ ¯ ¯ X ¯ ¯ 2 H(w¯ , δP, Q) ≡ exp [Lχ1 ]H(w¯ , δP, Q) = i ωiw¯iw˜i + (ωsyn + w¯ · ∇wωsyn) δP /k + O( ) . (A12) i=1

9 Expanding Equation (A12) and collecting terms that are first order in , we obtain the following equation for χ1:

2   X ∂χ1 ∂χ1 1 ∂χ1 i ω w˜¯ − w¯ + (ω + w¯ · ∇ ω ) + H + w¯ · ∇ H = 0 . (A13) i i ∂w˜¯ i ∂w¯ k syn w syn ∂Q¯ 1,osc. w¯ 1,osc. i=1 i i Inserting the ansatz solution X χ1(Q,¯ w¯i, w˜¯i) = G(Q¯) + w¯iFi(Q¯) + w˜¯iF˜i(Q¯) (A14) i

9 As P¯ is a conserved quantity of the resonant Hamiltonian, P −P0 will be O(). The term (δP/k) {w¯ · ∇wωsyn, χ1}, is therefore omitted from Equation (A13) as it is O(2) RVs of Resonant Planets 19 for χ1 into Equation (A13), we have

ω dG(Q) syn = H (z¯ ,Q) (A15) k dQ 1,osc. eq

ωsyn dFi(Q) ∂H1,osc.(Q) 1 ∂ωsyn dG(Q) = − + iωiFi(Q) (A16) k dQ ∂wi k ∂wi dQ

˜ ∗ P ˆ and Fi = −iFi . To solve for Fi, we Fourier decompose Fi and H1,osc. as Fi = l Fi,l exp[ilQ] and   ∂ ∂ ln ωsyn X − H1,osc.(z¯eq,Q) = Xˆi,l exp[ilQ] . ∂w¯i ∂w¯i l

We use a fast Fourier transform algorithm to compute the amplitudes Xˆi,l and then compute solutions for F1(Q) and F2(Q) as Fourier sums with amplitudes −ik Fˆi,l = Xˆi,l . (A17) lωsyn − kωi We convert the canonical variables of the ACR equilibrium solutions of the resonance Hamiltonian to the canonical variables of the unaveraged three-body problem which are then, in turn, used to compute the osculating orbital elements of planets in the ACR configuration. To first order in , this is achieved by evaluating the functionx ¯ 7→ x =x ¯+{x,¯ χ1} at the phase-space point (w¯ , δP,¯ Q¯) = (0, 0,Q) for any dynamical variable or function of dynamical variables, x, of interest. For a given ACR equilibrium solution of the resonance Hamiltonian, z¯eq(P0), Equations (A9), (A14), and (A15), give the solutions

k  ¯ ¯ P (Q) = P0 + δP , χ1 ¯w=0 = P0 + H1,osc.(zeq,Q) (A18) ωsyn   F1(Q)  F (Q)  z(Q) = z¯ + {δz¯, χ } = z¯ + S · Ω ·  2  (A19) eq 1 eq  ∗  −iF1 (Q) ∗ −iF2 (Q) for osculating canonical variables, which can then be used to compute the planets’ osculating orbital elements. Figure 10 shows an example of osculating elements computed as a function of Q using the transformations given in Equations (A18) and (A19) for a pair of Jupiter-mass planets in a 3:2 ACR. Numerical routines for reproducing Figure 10 as well as computing the transformation from mean to osculating variables for different resonances, planet masses, and normalized AMD values are available online at github.com/shadden/ResonantPlanetPairsRVModeling.

B. VALIDITY OF THE TWO-KEPLERIAN APPROXIMATION While our unrestricted model utilizes N-body integration to synthesize RV signals, the ACR model relies on approx- imating the RV signal as the sum of two independent signals generated by two planets on strictly Keplerian orbits. Gravitational interactions between the planets cause their orbits to deviate from perfect Keplerian ellipses and modify the RV signal. Here we briefly explore the consequences of these effects on the accuracy of our ACR model for the planets’ RV signal. The most important consequence of resonant planets’ gravitational interactions is that they induced periapse pre- cession at a constant rate. (The periodic variations of the osculating elements described above in Appendix A.2 have minimal influence on the RV signal.) Due to this precession, the average value of resonant planets’ period ratio deviates slightly from the nominal resonant value. For example, if HD 45364 b and c are in a 3:2 ACR, they will have orbital ˙ ˙ periods such that 3λc − 2λb is equal to the mean apsidal precession rate,$ ˙ b =$ ˙ c, rather than 0. This ensures that the average values of the resonant angles remain fixed at their equilibrium values. We have ignored this effect in our two-Keplerian approximation and instead set the planets’ period ratios to their nominal resonant ratio. We also treat planets’ longitudes of periapse as constant. Figure 11 plots the difference between the RV signals of planets in an ACR configuration computed with the fixed Keplerian approximation versus the RV signals of planets in ACR configurations computed by N-body integration. 20 Hadden & Payne

3 3:2 ACR; (e1, e2) = (0.18, 0.24); m1 = m2 = 10 m0 0.001 Planet 1 i

e Planet 2 0.000 analytic i

e 0.001

i 0.05

0.00 i 0.05 2 a /

1 0.0025 a 0.0000 2 a

/ 0.0025 1

a 0 /2 3 /2 2 Q

Figure 10. Difference between osculating orbital elements and mean orbital elements computed from the canonical variables of −3 our resonance model Hamiltonian as a function of Q for a pair of planets with m1 = m2 = 10 m0. Black dashed lines show ana- lytic predictions computed using Equations (A18) and (A19) while results of an N-body integration are shown as colored points. The N-body integration was initialized by setting the planets’ orbital elements to the analytically computed osculating elements for Q = 0 and integrated until Q = 2π. The particular ACR configuration shown corresponds to D = 0.22. Numerical routines for reproducing this figure as well as computing the transformation from mean to osculating variables for different resonances, planet masses, and normalized AMD values are available online at github.com/shadden/ResonantPlanetPairsRVModeling.

We utilize the transformations from mean to osculating elements described in Section A.2 in order to initialize the N- body simulations with planets in ACR configurations. Figure 11 shows that, at the time of the originally reported RV observations, differences between N-body and double-Keplerian models are small and should not affect our conclusions, given that the median RV measurement uncertainty, including the inferred jitter, is ∼2 m/s for HD 45364 and ∼8 m/s for HD 33844.

REFERENCES

Adams, F. C., Laughlin, G., & Bloch, A. M. 2008, ApJ, Bryden, G., R´o˙zyczka, M., Lin, D. N. C., & Bodenheimer, 683, 1117 P. 2000, ApJ, 540, 1091 Andr´e,Q., & Papaloizou, J. C. B. 2016, MNRAS, 461, 4406 Cincotta, P. M., Giordano, C. M., & Sim´o,C. 2003, Antoniadou, K. I., & Voyatzis, G. 2014, Ap&SS, 349, 657 Physica D Nonlinear Phenomena, 182, 151 Armitage, P. J. 2007, Lecture notes on the formation and Correa-Otto, J. A., Michtchenko, T. A., & Beaug´e,C. 2013, early evolution of planetary systems, A&A, 560, A65 arXiv:astro-ph/0701485 [astro-ph] Correia, A. C. M., Udry, S., Mayor, M., et al. 2009, A&A, Baluev, R. V. 2008, CeMDA, 102, 297 496, 521 Baluev, R. V., & Beaug, C. 2014, MNRAS, 439, 673 Crida, A., S´andor,Z., & Kley, W. 2008, A&A, 483, 325 Baruteau, C., Crida, A., Paardekooper, S. J., et al. 2014, in Deck, K. M., & Batygin, K. 2015, ApJ, 810, 119 Protostars and Planets VI, ed. H. Beuther, R. S. Klessen, C. P. Dullemond, & T. Henning (Tucson: University of Delisle, J. B., Correia, A. C. M., & Laskar, J. 2015, A&A, Arizona Press), 667 579, A128 Beaug´e,C., Ferraz-Mello, S., & Michtchenko, T. A. 2003, Foreman-Mackey, D., Barentsen, G., & Barclay, T. 2019, ApJ, 593, 1124 dfm/exoplanet: exoplanet v0.1.6 RVs of Resonant Planets 21

HD 45364 N-body vs. double-Keplerian 10 ]

s 5 / m [

0 V R 5

10 53000 54000 55000 56000 57000 58000 59000 60000 Time [JD-2400000]

0.2 planet b 100 2 planet c

y n

d 75 i 0.0 o s b e -

N 50 0.2 40 60 80 100 0.2 0.1 0.0 0.1 0.2 fixed Keplerian 2 ecos

HD 33844 N-body vs. double-Keplerian 10 ]

s 5 / m [

0 V R 5

10 55000 56000 57000 58000 59000 60000 Time [JD-2400000]

0.2 planet b

2 100 planet c

y n d 75 i 0.0 o s b e -

N 50 0.2 40 60 80 100 120 0.2 0.1 0.0 0.1 0.2 fixed Keplerian 2 ecos

Figure 11. Comparison between RV signals of resonant configurations computed using N-body integrations versus a double- Keplerian approximation. For each system, the top panels show the velocity predicted via N-body minus the velocity predicted by the double-Keplerian model for 1000 random draws from the MCMC posterior fit. The shading indicates the regions containing 68%, 95%, and 99.7% (1σ,2σ, and 3σ) of the samples’ velocity differences as a function of time. The shaded blue regions indicate the time spanned by the observational data reported by Correia et al.(2009) for HD 45364 and Wittenmyer et al.(2016) for HD 33844. The bottom-left panels show scatter plots of the χ2 value computed with N-body integrations versus the χ2 computed when the double-Keplerian model is used. The right panels illustrate the precession of the planets’ eccentricity vectors. The fixed eccentricity and ω values assumed by the double-Keplerian model are plotted as points with a line showing the precession of the eccentricity vectors over the course of the plotted time frame. Parameters of the two-Keplerian ACR models are converted to an N-body simulation assuming the planets are coplanar in an i = 90◦ edge-on configuration. The planets’ orbital elements are translated from the mean elements of the ACR model to osculating elements in the N-body simulations using the procedure described in AppendixA. 22 Hadden & Payne

Fulton, B. J., Petigura, E. A., Blunt, S., & Sinukoff, E. Morbidelli, A., & Crida, A. 2007, Icarus, 191, 158 2018, PASP, 130, 044504 Murray, C. D., & Dermott, S. F. 1999, Solar system Giguere, M. J., Fischer, D. A., Payne, M. J., et al. 2015, dynamics (Cambridge, UK: Cambridge University Press) ApJ, 799, 89 Niedzielski, A., Nowak, G., Adam´ow,M., & Wolszczan, A. Giorgilli, A., Delshams, A., Fontich, E., Galgani, L., & 2009, ApJ, 707, 768 Sim´o,C. 1989, Journal of Differential Equations, 77, 167 Papaloizou, J. C. B. 2003, CeMDA, 87, 53 Goldreich, P. 1965, MNRAS, 130, 159 Peale, S. J. 1986, in Satellites, 159 Goldreich, P., & Schlichting, H. E. 2014, AJ, 147, 32 Rein, H., & Liu, S. F. 2012, A&A, 537, A128 Goldreich, P., & Tremaine, S. 1980, ApJ, 241, 425 Rein, H., Papaloizou, J. C. B., & Kley, W. 2010, A&A, 510, Gregory, P. 2005, Bayesian Logical Data Analysis for the A4 Physical Sciences: A Comparative Approach with Rein, H., & Spiegel, D. S. 2015, MNRAS, 446, 1424 Mathematica R Support (Cambridge University Press) Hadden, S. 2019, AJ, 158, 238 Rein, H., & Tamayo, D. 2015, MNRAS, 452, 376 Haghighipour, N., Couetdic, J., Varadi, F., & Moore, W. B. Robertson, P., Horner, J., Wittenmyer, R. A., et al. 2012, 2003, ApJ, 596, 1332 ApJ, 754, 50 Henrard, J., & Lamaitre, A. 1983, Celestial Mechanics, 30, S´andor,Z., Kley, W., & Klagyivik, P. 2007, A&A, 472, 981 197 Silburt, A., & Rein, H. 2017, MNRAS, 469, 4613 Ida, S. 1990, Icarus, 88, 129 Smirnov, N. 1948, Ann. Math. Statist., 19, 279 Johnson, J. A., Payne, M., Howard, A. W., et al. 2011a, Snellgrove, M. D., Papaloizou, J. C. B., & Nelson, R. P. AJ, 141, 16 2001, A&A, 374, 1092 Johnson, J. A., Clanton, C., Howard, A. W., et al. 2011b, Speagle, J. S. 2020, MNRAS, 493, 3132 ApJS, 197, 26 Stassun, K. G., Collins, K. A., & Gaudi, B. S. 2017, AJ, Kley, W. 2000, MNRAS, 313, L47 153, 136 Kley, W., & Nelson, R. P. 2012, ARA&A, 50, 211 Tamayo, D., Rein, H., Shi, P., & Hernand ez, D. M. 2020, Kley, W., Peitz, J., & Bryden, G. 2004, A&A, 414, 735 MNRAS, 491, 2885 Kolmogorov, A. N. 1933, Giornale dell’Istituto Italiano Theano Development Team. 2016, arXiv e-prints, degli Attuari, 4, 83 abs/1605.02688 Lee, M. H., Butler, R. P., Fischer, D. A., Marcy, G. W., & Vogt, S. S. 2006, ApJ, 641, 1178 Tinney, C. G., Butler, R. P., Marcy, G. W., et al. 2006, Lee, M. H., & Peale, S. J. 2002, ApJ, 567, 596 ApJ, 647, 594 Lin, D. N. C., & Papaloizou, J. 1986, ApJ, 309, 846 Trifonov, T., Stock, S., Henning, T., et al. 2019, AJ, 157, 93 Luque, R., Trifonov, T., Reffert, S., et al. 2019, A&A, 631, Wisdom, J. 2015, AJ, 150, 127 A136 Wittenmyer, R. A., Tan, X., Lee, M. H., et al. 2014, ApJ, Malhotra, R., Black, D., Eck, A., & Jackson, A. 1992, 780, 140 Nature, 356, 583 Wittenmyer, R. A., Johnson, J. A., Butler, R. P., et al. Marcy, G. W., Butler, R. P., Fischer, D., et al. 2001, ApJ, 2016, ApJ, 818, 35 556, 296 Wolszczan, A., & Frail, D. A. 1992, Nature, 355, 145 Mayor, M., Udry, S., Naef, D., et al. 2004, A&A, 415, 391 Wright, J. T., Veras, D., Ford, E. B., et al. 2011, ApJ, 730, Meyer, J., & Wisdom, J. 2008, Icarus, 193, 213 93 Michtchenko, T. A., Beaug´e,C., & Ferraz-Mello, S. 2006, Xu, W., & Lai, D. 2017, MNRAS, 468, 3223 CeMDA, 94, 411 Xu, W., Lai, D., & Morbidelli, A. 2018, MNRAS, 481, 1538 Morbidelli, A. 2002, Modern celestial mechanics : aspects of Yoder, C. F. 1973, PhD thesis, Univ. California solar system dynamics (London: Taylor & Francis)