Closed Form Expressions for the Potentials and Accelerations of Generalized Ring Models Zachary Murray Abstract We present several closed form expressions of useful mass distributions. These include the potentials and accelerations of circular rings and arcs, the potentials of uniform density rings and arcs at arbitrary eccentricities, and the potentials and accelerations of rings and arcs when the mass is time-averaged over a Kepler orbit. We show that these expressions can be expressed, often simply, in terms of elliptic functions of complex arguments. We show that in a few limiting cases, the expressions are entirely real. We expect that these expressions will allow for more rapid modeling in many areas of celestial mechanics. keywords Gravitation, Celestial Mechanics 1 Introduction Hierarchal gravitational systems are common in the universe, examples include protoplanetary disks, exoplanetary systems, the solar system as a whole, lunar systems and others. Consequently, objects following nearly Keplerian orbits or those lying at the equilibria points produced by such orbits (e.g. the Lagrange points) are common. To study the long-term dynamics and model systems of small bodies, it is necessary to derive expressions for their gravitational fields that, when averaged over time, often correspond to mass distributions along circular and eccentric orbits. Ideally, both the potentials and the accelerations due to such mass distributions would be expressed in closed form, since the former is useful for analytic work and the latter for numerical simulations. A few such expressions already exist. For example, the potential of a simple circular ring ( 15 ; 8 ) and its associated dynamics ( 3 ; 22 ; 13 ) are well studied and have been used to model the Main Asteroid Belt ( 14 ; 12 ) and Kuiper Belt ( 21 ; 20 ) . In more detailed studies, several inclined rings have also been used ( 17 ) . However, in general, expressions for the potentials and accelerations of more complex distributions of mass, including arcs and eccentric rings are still relatively underdeveloped. While multipole or other series expansions can are often employed, they are typically only valid at moderate eccentricities. These models often fail to describe the dynamics at higher eccentricities, when the dynamics leaves the regime of validity of the approximation. Typically at higher eccentricities models reveal new phenomena or break down (e.g., 16 ; 19 ; 23 ; 18 , among others) . In this paper, we derive closed-form expressions in terms of elliptic integrals for the gravitational potentials of circular arcs, uniform eccentric rings, and eccentric rings/arcs that mimic the mass distribution of averaged Kepler orbits. We also provide accelerations for the circular and keplerian cases. We present a variety of numerical checks to verify our work and show agreement with the literature for limiting cases. Given previous work on optimizing the computation of elliptic integrals ( 5 ; 7 ; 6 ; 8 ; 10 ; 11 ) , these expressions allow both for rapid computation and analytic insight. 2 Uniform Circular Arcs The basic problem in this work is to compute the acceleration at some arbitrary point in space, due to a geometric object, and to provide that form in an quickly computable format. It is most convenient to do this by describing the gravitational potential per unit mass V of the object via V=-G\int_{M}\frac{1}{|\vec{x}-\vec{r}|}dM (1) where M describes the mass distribution in question. The corresponding accelerations on an arbitrary point due to these distributions, given by the gradient of the potential \vec{a}=\nabla\phi Hence, the principal difficulty in computing a potential or acceleration is finding a way to rapidly compute a difficult integral. To begin, we wish to solve for the potential everywhere, given an arc-shaped mass distribution. We assume that the arc lies in the x-y plane and assume a cylindrical coordinate system. We describe the arc as having a radius a , a central theta \Theta_{0} , and an angular span \delta\theta , such that \delta\theta=\pi corresponds to the circular limit. The arc is assumed to have mass M (and hence linear mass density \lambda=M/2\delta\theta r ). Finally, we evaluate the potential at some arbitrary radial coordinate r_{0} , theta coordinate \theta_{0} and z coordinate z_{0} . The integral of the potential becomes: V=-G\lambda\int_{S}\frac{rd\theta}{|\vec{x}-\vec{r}|}=-\frac{GM}{2\delta\theta}\int_{\Theta_{0}-\delta\theta}^{\Theta_{0}+\delta\theta}\frac{1}{\sqrt{a^{2}+r_{0}^{2}+z_{0}^{2}-2ar_{0}\cos(\theta-\theta_{0})}}\,d\theta (2) This integral has a closed form in terms of elliptic integrals. The form becomes particularly simple when given the following definitions: \displaystyle R \displaystyle=\sqrt{r_{0}^{2}+z_{0}^{2}}, (3a) \displaystyle C_{1} \displaystyle=\sqrt{a^{2}+R^{2}-2ar_{0}\cos(\delta\theta+\theta_{0}-\Theta_{0})}, (3b) \displaystyle C_{2} \displaystyle=\sqrt{a^{2}+R^{2}-2ar_{0}\cos(\delta\theta-\theta_{0}+\Theta_{0})}, (3c) \displaystyle d \displaystyle=\sqrt{a^{2}-2ar_{0}+R^{2}}, (3d) \displaystyle p \displaystyle=\sqrt{a^{2}+2ar_{0}+R^{2}}, (3e) \displaystyle q^{2} \displaystyle=a^{2}-2r_{0}^{2}+R^{2}, (3f) \displaystyle k \displaystyle=-\frac{4ar_{0}}{a^{2}-2ar_{0}+R^{2}}. (3g) Note here we define q^{2} rather than q itself to avoid imaginary values for when a^{2}+R^{2}<2r^{2} . Since only the q^{2} term appears in our expressions for the potential and accelerations, this means that both can be computed without resorting to imaginary quantities. When expressed in terms of these variables, the potential can be written as V=\frac{GM}{\delta\theta\,d}\left(\textbf{F}\left(\frac{-d\theta-\theta_{0}+\Theta_{0}}{2},k\right)-\textbf{F}\left(\frac{(d\theta-\theta_{0}+\Theta_{0})}{2},k\right)\right). (4) Where \textbf{F}(x,k) is the incomplete elliptic integral of the first kind. Now that we have a closed form for the potential is found, the corresponding accelerations can be derived by simply taking the gradient. In cylindrical coordinates these alignments become (using the definitions in Eq 3 ) \displaystyle a_{z} \displaystyle=-\frac{GMz}{dp^{2}\delta\theta}\Bigg(\textbf{E}\left(\tfrac{1}{2}(\delta\theta+\theta_{0}-\Theta_{0}),k\right)+\textbf{E}\left(\tfrac{1}{2}(\delta\theta-\theta_{0}+\Theta_{0}),k\right) \displaystyle\qquad+\frac{2ar}{C_{1}d}\sin(\delta\theta+\theta_{0}-\Theta_{0})+\frac{2ar}{C_{2}d}\sin(\delta\theta-\theta_{0}+\Theta_{0})\Bigg) (5a) \displaystyle a_{r} \displaystyle=\frac{GM}{2d^{2}\delta\theta}\Bigg(\frac{dq^{2}}{p^{2}r}\textbf{E}\left(\tfrac{1}{2}(\delta\theta+\theta_{0}-\Theta_{0}),k\right)+\frac{dq^{2}}{p^{2}r}\textbf{E}\left(\tfrac{1}{2}(\delta\theta-\theta_{0}+\Theta_{0}),k\right) \displaystyle\qquad-\frac{q^{2}}{rd}\textbf{F}\left(\tfrac{1}{2}(\delta\theta+\theta_{0}-\Theta_{0}),k\right)-\frac{2(a-r)}{d}\textbf{F}\left(\tfrac{1}{2}(-\delta\theta-\theta_{0}+\Theta_{0}),k\right) \displaystyle\qquad-\frac{d}{r}\textbf{F}\left(\tfrac{1}{2}(\delta\theta-\theta_{0}+\Theta_{0}),k\right) \displaystyle\qquad+\frac{2aq^{2}}{p^{2}C_{1}}\sin(\delta\theta+\theta_{0}-\Theta_{0})+\frac{2aq^{2}}{p^{2}C_{2}}\sin(\delta\theta-\theta_{0}+\Theta_{0})\Bigg) (5b) \displaystyle a_{\theta} \displaystyle=-\frac{GM}{2\delta\theta r}\left(-\frac{1}{C_{1}}+\frac{1}{C_{2}}\right) (5c) Plots of these potentials and accelerations are shown in Fig 1 . They are compared to a numerical \phi_{num} , which is the result of a direct quadrature integration of Eq 2 . The numerical accelerations are computed with JAX automatic differentiation ( 2 ) . Figure 1: The top left panel shows the result of a numerical integration \phi_{num} , the top center panel shows the analytic form \phi_{ana} given by Eq 4 and the top right panel shows the log of their difference. The agreement is good to machine precision far from the ring and good to 10^{-12} near it, due to growing integration error caused by the steepening slope of the potential. Finally, the acceleration components given by Eq 5 are shown in the bottom row. All quantities were computed assuming G=M=a=1 , \delta\theta=1.0 , \Theta_{0}=0.0 and z_{0}=0.1 2.1 Limiting Case: Uniform Circular Ring In the limiting case of \delta\theta=\pi , The expression for a circular arc transforms into that of a ring. This limiting case has long been described, by ( 15 ; 9 ) and others. In this limit the integral becomes: V=-\frac{GM}{2\pi}\int_{0}^{2\pi}\frac{1}{\sqrt{a^{2}+r_{0}^{2}+z_{0}^{2}-2ar_{0}\cos(\theta-\theta_{0})}}\,d\theta. (6) This integral has a closed form in terms of elliptic integrals \phi=-\frac{2GM}{\pi d}\textbf{K}(k) (7) Where K is the complete elliptic integral of the first kind. The corresponding accelerations are given by \displaystyle a_{z} \displaystyle=-\frac{GM}{\pi p^{2}}\left(\frac{z_{0}}{d}\right)\textbf{E}(k) (8a) \displaystyle a_{r} \displaystyle=\frac{GM}{\pi r_{0}d}\left(\left(\frac{q^{2}}{p^{2}}\right)\textbf{E}(k)-\textbf{K}(k)\right) (8b) \displaystyle a_{\theta} \displaystyle=0. (8c) An example of this limiting case are the potentials and accelerations are shown in Fig 2 . They are compared to a numerical \phi_{num} , which is the result of a direct integration of Eq 6 . Figure 2: The top left panel shows the result of a numerical integration \phi_{num} , the top center panel shows the analytic form \phi_{ana} given by Eq 7 and the top right panel shows the log of their difference. The agreement is good to machine precision far from the ring and good to 10^{-13} near it, due to growing integration error caused by the steepening slope of the potential. Finally, the acceleration components given by Eq 8 are shown in the lower rows. All quantities were computed assuming G=M=a=1 , \delta\theta=1.0 , \Theta_{0}=0.0 and z_{0}=0.1 3 Eccentric Orbit Averaged Arcs The simplest case of an eccentric ring is one of uniform density. The integral is essentially unchanged. \displaystyle\phi \displaystyle=-G\lambda\int_{S}\frac{r\,d\theta}{|\vec{x}-\vec{r}|} \displaystyle=\frac{-GM}{\textbf{E}(E_{2},e^{2})+\textbf{E}(E_{1},e^{2})}\left(\frac{r_{0}}{a}\right)\int_{\Theta_{0}-\delta\theta}^{\Theta_{0}+\delta\theta}\frac{1}{\sqrt{R(\theta)^{2}+r_{0}^{2}+z_{0}^{2}-2R(\theta)r_{0}\cos(\theta-\theta_{0})}}\,d\theta (9) Except here, instead of R=a as in the circular case, R is now a function of \theta such that R(\theta)=\frac{a(1-e^{2})}{1+e\cos(\theta-\omega)} . The linear mass density \lambda is now proportional to the perimeter of a portion of an ellipse, a problem which, famously, can only be expressed in terms of elliptic integrals 1 . Since rotational symmetry is lost for any e\geq 0 , the linear mass density becomes dependent on where the boundary lies with respect to \omega . In terms of elliptic integrals, the density is \lambda=M^{-1}a\left(\textbf{E}(E_{2},e^{2})+\textbf{E}(E_{1},e^{2})\right) with E_{i}=2\arctan\left(\sqrt{\frac{1-e}{1+e}}\tan\left(\frac{\theta_{i}-\omega}{2}\right)\right) . The essential parts of the integral can be more easily seen by transforming it to the following form \displaystyle V \displaystyle=\int_{\Phi_{\min}}^{\Phi_{\max}}f(\Phi)\,d\Phi \displaystyle=\int_{\Phi_{\min}}^{\Phi_{\max}}\frac{1+e\cos\Phi}{\sqrt{C_{1}+\cos(d\Phi-\Phi)\left(C_{2}+C_{4}\cos\Phi\right)+\cos\Phi\left(C_{3}+C_{5}\cos\Phi\right)}}\,d\Phi (10) where \Phi=\theta-\omega,d\Phi=\theta_{0}-\omega , and the C_{i} are appropriately defined intermediate variables. It is now clear that the integral reduces to a linear combination of 1/d where d^{2} is just a polynomial in \cos{\Phi} . This integral can be reduced further via a Weierstrass substitution t=\tan\frac{\phi}{2} , which is used to transform f(\Phi)d\Phi\rightarrow f(t)dt . The new integrand becomes f(t)dt=\left(2+e\left(-2+\frac{4}{1+t^{2}}\right)\right)\frac{1}{\sqrt{k_{0}+k_{1}t+k_{2}t^{2}+k_{3}t^{3}+k_{4}t^{4}}} (11) with k_{i} defined as \displaystyle k_{0} \displaystyle=(1+e)^{2}\left(a^{2}(1-e)^{2}+r_{0}^{2}+z_{0}^{2}+2a(1-e)r_{0}\cos(d\Phi)\right) (12a) \displaystyle k_{1} \displaystyle=4a(1-e)(1+e)^{2}r_{0}\sin(d\Phi) (12b) \displaystyle k_{2} \displaystyle=2(1-e^{2})\left(a^{2}(1-e^{2})-r_{0}^{2}-z_{0}^{2}-2aer_{0}\cos(d\Phi)\right) (12c) \displaystyle k_{3} \displaystyle=-4a(1-e)^{2}(1+e)r_{0}\sin(d\Phi) (12d) \displaystyle k_{4} \displaystyle=(1-e)^{2}\left(a^{2}(1+e)^{2}+r_{0}^{2}+z_{0}^{2}+2a(1+e)r_{0}\cos(d\Phi)\right) (12e) This transformation comes the cost of having to split the domain of the integration about \pi . Therefore, for arbitrary \Phi_{min} and \Phi_{max} \int_{\Phi_{\min}}^{\Phi_{\max}}f(\Phi)\,d\Phi=\begin{cases}\displaystyle\int_{\tan\left(\frac{\Phi_{\min}}{2}\right)}^{\tan\left(\frac{\Phi_{\max}}{2}\right)}f(t)\,dt,&\text{if }\Phi_{\max}\leq\pi\\[12.0pt] \displaystyle\int_{\tan\left(\frac{\Phi_{\min}}{2}\right)}^{\infty}f(t)\,dt+\int_{-\infty}^{\tan\left(\frac{\Phi_{\max}}{2}\right)}f(t)\,dt,&\text{if }\Phi_{\max}>\pi.\end{cases} (13) However, the advantage is to reduce the integral to a known problem - that of the integral of a rational function times the square root of a quartic polynomial. This is a well known form which can be written in terms of elliptic integrals, by factoring the quartic polynomial and expressing the result in terms of its roots via a Möbius transformation. The result, while dense, can be derived with any computer algebra system. Using Mathematica , we find the indefinite integral can be written as F(t)=\int f(t)dt=CS(t)E(t). (14) With C=-\frac{4}{|r1-r3|\sqrt{k5}} (15) S(t)=\frac{\lvert r_{1}-r_{3}\rvert\,(r_{1}-r_{4})(-r_{2}+t)^{2}}{(-r_{1}+r_{2})(r_{2}-r_{4})}\;\sqrt{\frac{(r_{1}-r_{2})^{2}(r_{2}-r_{4})}{(r_{1}-r_{3})(r_{1}-r_{4})^{2}(-r_{2}+t)^{4}}} (16) E(t)=k_{F}\boldsymbol{F}(\phi(t),m)+k_{\Pi 1}\boldsymbol{\Pi}(n_{1},\phi(t),m)+k_{\Pi 2}\boldsymbol{\Pi}(n_{2},\phi(t),m) (17) Where we’ve defined the auxiliary quantities : \displaystyle k_{F} \displaystyle=1+e\!\left(\frac{2}{1+r_{2}^{2}}-1\right) \displaystyle\qquad s(t) \displaystyle=\frac{(r_{2}-r_{4})(-(r_{1}-t))}{(r_{1}-r_{4})(-(r_{2}-t))} (18a) \displaystyle k_{\Pi 1} \displaystyle=\frac{(ie)(r_{1}-r_{2})}{(-i+r_{1})(-i+r_{2})} \displaystyle\qquad\phi(t) \displaystyle=\arcsin\!\left(\sqrt{s(t)}\right) (18b) \displaystyle k_{\Pi 2} \displaystyle=-\,\frac{(ie)(r_{1}-r_{2})}{(i+r_{1})(i+r_{2})} \displaystyle\qquad m \displaystyle=-\frac{(r_{2}-r_{3})(r_{1}-r_{4})}{(-r_{1}+r_{3})(r_{2}-r_{4})} (18c) \displaystyle n_{1} \displaystyle=\frac{(-i+r_{2})(r_{1}-r_{4})}{(-i+r_{1})(r_{2}-r_{4})} \displaystyle\qquad n_{2} \displaystyle=\frac{(i+r_{2})(r_{1}-r_{4})}{(i+r_{1})(r_{2}-r_{4})}. (18d) Here \boldsymbol{\Pi} is the Legendre incomplete elliptic integrals of the third kind, and r_{i} are the roots of the quartic polynomial in the denominator in Eq 11 . These roots can be computed brute-force through the full quartic formula, but can also be done without complex arithmetic via the well-known Ferrari and Cardano decompositions ( 1 ; 4 ) . Since the polynomial is always greater than zero, these roots are complex and come in conjugate pairs, we choose indices such that r_{1}=A_{1}+iB_{1}=r_{2}^{*} and r_{3}=A_{2}+iB_{2}=r_{4}^{*} . While the conjugacy conditions guarantee that certain variables are always real (e.g C and m ), the elliptic functions of the — generally complex — arguments yield complex results with nonzero real and imaginary parts, and so are fully complex functions of t . The t dependence of F(t) is carried through S(t) and s(t) , however the behavior of S(t) is very simple as it is either -1 or 1 depending on t, so the dependence is equivalent to a sign change. The rest of the variables are also generally complex, with k_{\pi 1} and k_{\pi 2} being symmetric about the imaginary axis, with the same imaginary part but opposite signed real parts. Sadly, the branch cuts and other discontinuities in these functions displace the real part of the function and cause the imaginary part to be piecewise constant (rather than fully constant, which would cancel in Eq 13 when the bounds are evaluated) . Hence, while the indefinite integral is known, care must be taken when evaluating the integrand to compute the definite integral, as particular choices of the integration bounds lead to an imaginary residual and an incorrect real result, explicitly \int_{a}^{b}f(t)\neq F(b)-F(a) . This issue can be seen graphically in Fig 3 for the \boldsymbol{F} and \boldsymbol{\Pi} functions. While these properties could be easily overcome numerically, by checking if a discontinuities is crossed and shifting the result accordingly, their presence reduces the analytic utility of the result and increases the computational cost of evaluation. Consequently, we take the approach of manually finding and analytically patch the offsets. To this end, we wish to derive a continuous version of the antiderivative, which we call F_{c}(t) . Figure 3: We show an example of the discontinuous behavior of the \boldsymbol{F} , \boldsymbol{\Pi_{1}} and \boldsymbol{\Pi_{2}} functions described in Eq 17 . In each case, we show the function itself in red, the function times S(t) in blue, and the continued, patched function in green. All quantities were computed assuming G=M=a=1 , r_{0}=0.5 , e=0.5 , \omega=2.0 , \Theta_{0}=0.0 and z_{0}=0.1 Since the sum of continuous functions is continuous, it is most convenient to derive F_{c}(t) by defining continuous versions of the individual elliptic integrals (which we will denote with \boldsymbol{F_{c}} and \boldsymbol{\Pi_{c}} ). We can then transform F(t)\rightarrow F_{c}(t) by letting S(t)\boldsymbol{F}\rightarrow\boldsymbol{F_{c}} and S(t)\boldsymbol{\Pi}\rightarrow\boldsymbol{\Pi_{c}} . In this way we can absorb the piecewise behavior of S(t) and the other discontinuities into a single function. To do this we must understand the locations of the discontinuities and their magnitudes, in addition to the behavior of the S(t) function. We begin with S(t) . Since the branch cut for the square root lies on the negative imaginary axis, we seek values of t such that \displaystyle\Im\!\left[\frac{(r_{1}-r_{2})^{2}(r_{2}-r_{4})}{(r_{1}-r_{3})(r_{1}-r_{4})^{2}(-r_{2}+t)^{4}}\right] \displaystyle=0, (19) \displaystyle\Re\!\left[\frac{(r_{1}-r_{2})^{2}(r_{2}-r_{4})}{(r_{1}-r_{3})(r_{1}-r_{4})^{2}(-r_{2}+t)^{4}}\right] \displaystyle<0. The two solutions can be expressed in terms of A_{i} and B_{i} as \displaystyle D \displaystyle:=\sqrt{\bigl((A_{1}-A_{2})^{2}+B_{1}^{2}\bigr)^{2}+2(A_{1}-A_{2}-B_{1})(A_{1}-A_{2}+B_{1})B_{2}^{2}+B_{2}^{4}} (20a) \displaystyle t_{1} \displaystyle:=-\frac{-A_{1}^{2}+A_{2}^{2}-B_{1}^{2}+B_{2}^{2}-D}{2(A_{1}-A_{2})} (20b) \displaystyle t_{3} \displaystyle:=-\frac{-A_{1}^{2}+A_{2}^{2}-B_{1}^{2}+B_{2}^{2}+D}{2(A_{1}-A_{2})}. (20c) Another branch cut can occur in \phi(t) due to s(t) crossing a branch cut. If we solve for the analogous condition we find it is not independent, but occurs at the same location as our t_{3} from earlier and is therefore already accounted for. Finally, there can be one last discontinuity where the \boldsymbol{\Pi} function crosses a pole. This occurs where ns(t)=0 . Solving for this t we get a unique result t_{2}:=\frac{-1+A_{1}^{2}+B_{1}^{2}-\sqrt{(1+A_{1}^{2})^{2}+2(-1+A_{1}^{2})B_{1}^{2}+B_{1}^{4}}}{2A_{1}} (21) which we define to be t_{2} . We’ve chosen our indexes such that t_{1}t_{2} case. The appropriate continuations are shown in Table 2 for the t_{2}