Abstract
In a recent paper, Philcox, Goodman and Slepian obtain an explicit solution of the elliptic Kepler’s equation (KE) as a quotient of two contour integrals along a Jordan curve \( \mathcal {C} = \mathcal {C}(M,e)\) that contains the unique real solution of KE but not includes other complex zeros of KE in its interior. The aim of this paper is to study the main issues that arise in the practical implementation of this integral solution. Thus, after a study of the complex zeros of KE, several families of Jordan contours \( \mathcal {C} = \mathcal {C}(M,e)\) that are suitable for this integral solution are proposed. Since contours with minimal length turn out to be the more accurate for numerical purposes, several families that minimize their length are constructed. Secondly, the approximation of the contour integrals by the composite trapezoidal rule is considered. Recall that this rule is employed in the fast Fourier transform and, in spite of its lower order, displays a spectral convergence as a function of the number of nodes, which implies a very fast convergence. Finally, the results of some numerical experiments are presented to show that such a combination of appropriate contours with the composite trapezoidal rule leads to a powerful numerical method to solve KE with any desired accuracy for all values of eccentricity.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
The elliptic Kepler’s equation
which relates the position in an elliptic orbit with eccentricity \(e \in [0,1)\) of the two-body problem with the physical time, defines the eccentric anomaly E in terms of the mean anomaly M, and this equation has been one of the most studied transcendental equations in Celestial Mechanics along several centuries (Colwell 1993) and as remarked by R. Battin (Battin 1999, Chapter 4) is connected with the development of many mathematical topics such as Bessel functions, Fourier series, Lagrange expansion theorem and numerical approximation of functions.
Thus, the solution of (1) can be written as a sine Fourier series of M in the form
where \( J_k ( \cdot )\) is the Bessel function of the first kind of order k. Also Lagrange’s approach to solving Kepler’s equation leads to the power series expansion in the eccentricity
that converges for \( e < 0.66 \ldots \)
On the other hand, there are many approximations to the solution \( E= E(M;e)\) of Eq. (1) by Newton and other high-order iterative methods. In these methods for given e and M, and starting from an approximation \(E_0\) close to E(M; e) a sequence \( ( E_k)_{k \ge 1}\) is defined which converges to the exact solution as fast as possible (see, e.g., Odell and Gooding (1986), Markley (1995), Fukushima (1997), Feinstein and McLaughlin (2006), Davis et al. (2010), Mortari and Elipe (2014), Calvo et al. (2013), Calvo et al. (2017), Raposo-Pulido and Peláez (2017), to mention just a few works).
In this paper we study a different approach to solve Kepler’s equation proposed in a recent paper of Philcox et al. (2021) in which they obtain an explicit formula \(E=E (M;e)\), solution of Kepler’s equation (1), following a technique used by Ullisch (2020) for solving the classical goat’s problem. This technique is based on the following theorem of Jackson (1916):
Theorem 1.1
Let \(U \subseteq \mathbb {C}\) be an open simply connected subset and \(f: U \longrightarrow \mathbb {C}\) a nonzero analytic function. For every simple zero \(z_{0} \in U\) of f, there is a closed curve C in U such that
Note: C does not contain other zeros of f than \(z_0\).
Thus, Philcox et al. (2021) applying the above theorem shows that the solution \( E = E (M,e)\) of elliptic Kepler’s equation (1) can be given explicitly as the quotient of the two contour integrals
where f is the analytical complex valued function of z given by
and \( \mathcal {C} = \mathcal {C} ( M,e) \) is a Jordan curve that encloses the unique real solution of Eq. (1), \( z= E (M,e)\) for \( (e,M) \in \mathcal {D} = (0,1) \times (0,\pi ) \), and \( f(z) \ne 0\) for all z in \( \mathcal {C}\) and its interior, except \( z = E\). Hereafter we will say that if a family of contours \( \mathcal {C} = \mathcal {C} ( M; e)\), with \( (e,M) \in \mathcal {D}\), satisfies these conditions, it is admissible for the integral solution (2).
In particular, these authors take as \( \mathcal {C}_0 = \mathcal {C} ( M,e) \) the family of circles centered at the midpoint \( \mu _0\) of M and \( M +e\) and radius \(\rho _0= e/2\), i.e.,
showing that this family of Jordan curves is admissible for (2). With this choice and approximating the contour integrals of Eq. (2) by some Riemann sums, it is possible to provide explicit approximate solutions of elliptic Kepler’s equation for all \( (e,M) \in \mathcal {D}\) that are faster than standard iterative methods that provide approximate solutions to the transcendental Kepler equation (1).
We already proved (Calvo et al. 2022) that for solving a similar (but simpler) formula emanating from the collapse’s radial evolution in time (Slepian and Philcox 2021), the length of the Jordan curve and the numerical quadrature formula used to compute the above line integrals have a big influence in the final result in both aspects of speed and accuracy. Thus, in this paper we study the two main issues that are relevant in the practical application of this integral solution (2), namely the choice of the Jordan curve and the numerical method to compute the line integrals in Eq. (2).
A first point is the choice of the Jordan contour \(\mathcal {C} = \mathcal {C}_{M,e}\) that is admissible for the integrals of (2). To make clear this point in Sect. 2, we study the complex zeros of \( f(z; M, e)=0\) for \( M \in (0, \pi )\) and \( e \in [0,1)\). It turns out that (2) is independent on the choice of the contour provided that it satisfies the above suitability condition but in the numerical approximation of these integrals their accuracy is much better for curves with small length. Then in Sect. 3 we focus our attention in the construction of suitable contours that minimize the length of their boundary. Several families are proposed with circular and elliptic contours.
In Sect. 4 we deal with the numerical quadrature method to compute the line integrals of Eq. (2). We study the application of the composite trapezoidal rule to approximate the integrals of (2) along suitable circular and elliptic contours. The choice of this quadrature rule is motivated because in spite of the lower order of the trapezoidal rule (second order), it is very reliable when it is used in the fast Fourier transform (FFT) and even more important, it exhibits spectral convergence with the number N of nodes, i.e., the error in the approximation of the integral of a periodic function (here the numerator or the denominator of (2)) by this quadrature rule with N nodes behaves as \( \mathcal {O} ( \exp ( - \alpha N))\) with some positive constant \( \alpha \), as we prove in Appendix A. In our case, the quadratures in (2) depend on the parameters \((e,M) \in \mathcal {D}\) and therefore \( \alpha = \alpha (M; e)\) also depends on these parameters. This spectral behavior of the numerator and denominator of (2) is inherited by the approximation \( E_N\) to E. Observe that with a standard quadrature rule with order p the error behaves as \( \mathcal {O}( N^{-p} )\) and therefore spectral convergence is much stronger than any potential convergence. We will show also that the factor \( \alpha (M; e) \rightarrow 0\) when \( (M,e) \rightarrow (1,0)\) that is the singular point of the solution \( E= E(M;e)\) of Kepler’s equation and consequently spectral convergence fails for values of (M, e) close to (1, 0).
In Sect. 5 we examine several points with the purpose to make the implementation of the quadrature rules as efficient as possible. Observe that the integrals of numerator and denominator of Eq. (2) could be obtained by a FFT by using a standard routine, but this is not the most efficient way because we only need two Fourier coefficients and the remaining are not necessary. Hence, we have made a direct approach to calculate these coefficients. Finally, we present the results of some numerical experiments showing that very high accuracy can be attained with a moderate computational cost.
2 The complex zeroes of f(z; M, e)
Here we consider Kepler’s equation (KE): \( f(z; M,e)=0\) with complex \( z = x+ i y\), where x and y are reals and we study their solutions for the values of the parameters \( (e,M) \in \mathcal {D}\).
It is worth to remark that as shown in Wintner (page 216) the solution of KE can be considered as the determination of the inverse function \( z = z(M;e)\) of the meromorphic function \( M = z - e \sin z\), for \((e,M) \in \mathcal {D}\), and taking into account that z(M; e) is a multi-valued analytic function for each \(M \in (0, \pi )\) there is an infinite set of solutions. In this section, our aim is to describe this set of solutions in order to find suitable Jordan curves for the integral solution (2).
First of all, the complex KE can be written in the form
therefore, \( z = x + i \; y\) is a zero of f if and only if their real and imaginary parts satisfy
Clearly, for \( e=0\) the equations (6) have the unique solution \( y=0\), \( x=M\); then we will consider \( e \in (0,1)\). On the other hand if \( y=0\), equations (6) reduce to the real KE \( M = x - e \sin x \) that has also a unique solution \( x \in [0, \pi ]\) for all \( e \in (0,1)\), \( M \in [0, \pi ]\). Moreover, if (x, y) is a solution of (6), \( (x,-y)\) is also a solution of these equations, i.e., in the complex plane the solutions are symmetric with respect to the real axis, and if \( z \in \mathbb {C}\) is a solution then its conjugate \( \overline{z} \) is also solution. Because of this, hereafter we will consider only the case \( y>0\). Under this assumption, the first equation of (6) can be written in the equivalent form
and introducing the notation
the equation (7) can be written as
Clearly, for all \( e = e_0 \in (0,1)\), the function \( \cos x \) will be defined only for the values of y such that \( \vert g(y) \vert \le e_0\), and taking into account that when \( y>0\), the function g(y) is strict monotonic decreasing with \( g(0)=1\) and \( g (+ \infty ) = 0\), for all \( e_0 \in (0,1)\) there is a unique \( y_0 >0\) such that \( g ( y_0 ) = e_0 \) and Eq. (9) is defined only for \( y \ge y_0\). Moreover, inasmuch \( \cos x \) is an even and \( 2 \pi \)–periodic function, (9) defines x as a function of y by the multivalued function
Next we will substitute the function (10) into the second equation of (6) to determine the values of y that satisfy this equation. The right-hand side of this equation along the functions (10) will be denoted by
We study firstly the function \( \psi _k^{+} (y; e_0)\). It can be seen that it is a monotonic function of y for \( y \ge y_0\). Moreover, for \( y= y_0\), \( g(y_0)=e_0\) and \( \varphi _k^{+} (y_0; k) = 2 k \pi \), which implies that
Consequently, by the mean value theorem, for all \( M \in (0, \pi ]\) the equation
has no solution for \( k \le 0\), whereas for each \( k >0\) there exists a unique solution of (12) depending on M that will be denoted by \( y_{0,k}^{+} = y_{0,k}^{+} ( M; e_0)\), and these solutions satisfy
i.e., \( \left( y_{0,k}^{+} \right) _{k \ge 1}\) is a monotonic increasing sequence. Hence, for each \( e_0 \in (0,1)\), \( M \in (0, \pi ]\), the complex equation (5) possesses the complex roots
Secondly, we consider the equations
Now \( \psi _k^{-} ( y; e_0)\) are monotonic increasing functions of y for \( y \ge y_0\) with \( \psi _k^{-} ( y_0; e_0) = 2 \, k \ \pi \) and \( \psi _k^{-} ( y; e_0) \rightarrow + \infty \) when \( y \rightarrow + \infty \). Therefore, for \( k \ge 1\), Eq. (14) does not have solutions and for all \( k \le 0\), there is a unique solution \( y = y_{0,k}^{-} > y_0\) depending on \( M \in (0, \pi ]\) such that \(y_0< y_{0,0}^{-}< y_{0,1}^{-} < \ldots \)
Consequently, the complex equation (5) has also the complex roots
From this analysis we conclude
Proposition 2.1
The complex roots of complex Kepler’s Equation for \( e \in [0,1)\), \( M \in (0, \pi ]\) satisfy
-
For \( e=0\) there is a unique solution \( z=M\).
-
For all \( e \in [0,1)\), \( M \in (0, \pi ]\) there is a unique real equation.
-
If \( z \in \mathbb {C}\) is a solution of Eq. (5), then \( \overline{z}\) is also solution.
-
For \(z = x + i \; y \), with \( y>0\) and \( e \in (0,1)\), \( M \in (0, \pi ]\), there is an infinite numerable set of solutions
$$\begin{aligned} z_0^{-} \quad \hbox {and} \quad z_k^{+}, \quad k=1, 2, \ldots , \quad \hbox {and} \quad z_k^{-}, \quad k=-1, -2, \ldots , \end{aligned}$$
Remark 1
Note that for all \( (e_0, M) \in \mathcal {D}\) we have
consequently, there are no complex roots of Kepler’s Equation in the complex band \( \left\{ z \in \mathbb {C} \,;\, 0 \le \hbox {Re}\; z \le \pi \right\} \) and any Jordan curve contained in this band is suitable for the application of the integral formula Eq. (2).
In Fig. 1 we display the locus of the complex zeros \( z_{0}^{-}\) of KE for eccentricity \( e = 0.5\) and \( M \in (0, \pi )\). Observe that in general, for all \( e_0 \in (0,1) \) and \( M \in (0, \pi ) \), the two branches of \( z_{0}^{-}\) of non-real solutions remain in \(\hbox {Re} \; (z) < 0\) (as shown in Philcox et al. (2021)), but when \( e_0 \rightarrow 1\) and \( M \rightarrow 0\), since \( y \rightarrow 0\), they become arbitrarily close to the origin.
Remark 2
The above study can be repeated for the limit Kepler’s equation \(E - \sin E = M\). Now, putting \(E = x + i\, y\), its real part is
that is defined for all \(y > 0\). Then, for all \(M \in (0,\pi )\) there exists an infinite set of complex solutions \(z_k = \varphi _k(y) + i \, y_k\), where \(y = y_k\) is the unique real solution of \(M = y - \sin (\varphi _k(y)) \cosh y\). Moreover, for \(M \rightarrow 0\), \(z_0 \rightarrow 0\) with \(\text{ Re } z_0 < 0\), and for all \(k = 0, 1, 2, \ldots \) the complex solutions \(z_k\) are not contained in the complex strip \(\text{ Re } z \in (0,\pi ]\) for all \(M \in (0,\pi )\).
3 The Jordan contours \( \mathcal {C} = \mathcal {C} ( M,e) \)
In theory, the exact solution \( E = E(M;e)\) of Eq. (2) is independent of the Jordan contour \( \mathcal {C} = \mathcal {C} ( M,e) \) of the integrals provided that for each \( e \in [0,1)\) and \( M \in (0, \pi )\) it contains the exact solution E(M; e) and \( f(z) \ne 0\) for all z in the interior, except \( z = E(M;e)\). However, the practical approximation of these integrals depends on the curve \( \mathcal {C}\) and, as we will see next, curves with smaller lengths lead to essential improvements in the accuracy when the integrals are approximated by quadrature rules. In this section we will consider several Jordan contours \( \mathcal {C}\) that are designed with the purpose to minimize their length.
First of all, we consider admissible circular contours in which each \( \mathcal {C}\) is a circle of radius \( \rho = \rho (M,e)\) and center \( \mu = \mu (M,e)\)
so that for all \((e, M ) \in \mathcal {D}\), the curve \( \mathcal {C} (\mu , \rho )\) contains the exact solution of Kepler equation: \( E = E(M;e)\) and, moreover, are admissible for (2).
For this Jordan curve (16) the integral solution (2) becomes
with
A crucial point for the choice of the contours (16) is that as follows from
the exact solution of KE: \( E = E (M; e)\) is a monotonic increasing function of M and also is convex downwards. Then, by choosing appropriate upper and lower bounds of \( E = E(M;e)\) in \( M \in (0, \pi )\) we may derive admissible circular contours (16). Thus, taking as a lower bound \( E^{-}= E^{-}(M;e) \) of \( E = E(M;e)\), \( E^{-} =M\) and as upper bound \( E^{+} = E^{+}(M;e) = M+e\) we have
that leads to the contour \( \mathcal {C}_0 = \mathcal {C} (\mu _0, \rho _0)\) with
that is the contour used by Philcox et al. (2021). It contains the exact solution E(M; e) of (1) and by Proposition (2.1) is admissible for (2). Note that in (19) the lower bound \( E^{-}=M \) is in the (M, E) plane the chord joining the end points of the arc \( E = E(M;e)\) with \( M \in (0,\pi )\), i.e., the points (0, 0) and \( (\pi , \pi )\). Also the upper bound \( E^{+}= M+e\) is the tangent to the curve \( E = E(M;e)\) at the point \( (M,E)= ( \pi /2- e, \pi /2)\) that is parallel to the chord. Since both \( E^{+} = E^{+}(M;e)\) and \( E^{-} = E^{-}(M;e)\) are affine functions of M with the same slope, it follows from the first equation of (20) that \( \rho _0= e/2\) is in fact independent of the mean anomaly M and, as we will see next, this fact has some computational advantages because it remains constant along the solution of the same elliptic orbit.
Clearly, \(\mathcal {C}_0\) is a good choice for small eccentricities because the length of all contours is \( \pi e\), but when e is close to 1 the length of the contours becomes close to \( \pi \). Furthermore, when \( M \rightarrow 0\) and \( e \rightarrow 1\), the contour \(\mathcal {C}_0\) tends to the circle of center \( \mu _0=1/2\) and radius \( \rho _0=1/2\) that is tangent to the imaginary axis at the origin, and recall that \( E=M=0 \) with \( e=1\) is a singular point of Kepler’s equation, and this fact introduces additional difficulties in the numerical calculations.
Now with the purpose to have admissible circular contours with radius \( \rho ( e) < e/2\), we first note that we may split the interval of mean anomaly \( (0, \pi )\) into two (or more) subintervals and then to obtain admissible circular contours in each subinterval such that the corresponding radius in each subinterval is smaller than the above \( \rho _0=e/2\).
Consider an interval \( (M_L, M_R)\) with \( (0 \le M_L < M_R \le \pi )\) and let \( E_L\), \(E_R\) be their corresponding eccentric anomalies. We take as lower bound \( E^{-}\) of \( E= E(M;e)\) in the interval \( (M_L, M_R)\) the chord between the two end points of it,
and as upper bound \( E^+\), the tangent at some point \( (M^*, E^*)\) of \( E = E(M; e)\) that is parallel to (21). Since
we have
that defines \( E^*\) and \( M^*\) by
and then the upper bound is
Now, we take as radius \(\rho \),
with
Note that \( \alpha \) and \( \rho \) are independent of M. For the center \(\mu \), there results
that is an affine function of M.
As an example, suppose that we split the interval \( (0, \pi ) = I_1 \cup I_2\) in the two subintervals
\(I_1\) corresponds to \( E_L =0\) and \( E_R = \pi /2\). Then from (22) and (23) we get \(E^* = 0.880689\ldots \), \(\alpha = 0.105257\ldots \), and now \( \rho (e)\) is a monotonic increasing function such that \(0< \rho < 0.28966\ldots \).
Similarly, in the subinterval \( I_2\) we have \( E_L = \pi /2\) and \( E_R = \pi \) and \( E^* = 2.2609\ldots \), \(\alpha = 0.105257\ldots \), and now \( \rho (e)\) is a monotonic increasing function with \(0< \rho < 0.0643136\ldots \), and hence, in both subintervals, \(I_1\) and \(I_2\), there results that the radii \(\rho _1(e), \rho _2(e) < e/2\), which was the radius of the Jordan circle \( \mathcal {C}_0 \) given in Eq. (20).
In Fig. 2 we present for this value of the eccentricity (\(e=0.5\)) the upper (\(E^+\)) and lower bounds (\(E^-\)) of the eccentric anomaly in the above two subintervals. Besides, on the right part of this figure, we plot the respective radii (\(\rho _1, \rho _2\)) of the Jordan circles and we can see that both are smaller than the radius \(\rho _0=0.5\) of the circle \(\mathcal {C}_0\); hence, the length of each new circle is smaller than the length of \(\mathcal {C}_0\).
Left) Lower bounds \(E^{-}\) (in blue) and upper bounds \(E^{+}\) (in orange) of the eccentric anomaly \(E=E(M;e)\) (in red) when M is in the subintervals \(I_1= (0,\pi /2- e)\) and \(I_2= (\pi /2- e,\pi )\) for \(e=0.5\), as given in Eqs. (21) and (22). Right The radius \(\rho \) of the Jordan circle in the interval \(I_1\) (in red), in the interval \(I_2\) (in blue), and \(\rho _0 =e\) for the circle \(\mathcal {C}_0\) is given in Eq. (20)
Another possibility to construct contours for integrals (2) with small lengths is to replace the circular contours of center \( \mu \) and radius \( \rho \) by elliptic contours with the same center, semi-major axis \( \rho \), and semi-minor axis \( \varepsilon \, \rho \) with some \( 0< \varepsilon < 1\). It follows from Proposition (2.1) that if a circular contour is suitable for (2) the corresponding elliptic contour defined in this way will be also suitable. This contour can be written in the parametric form as
and now the integral expression (2) becomes
with \( G_{\mathcal {E}} ( \theta ) = \left[ f( z_{\mathcal {E}} ) \right] ^{-1} \).
4 Approximation of the line integrals along circular and elliptic contours
For circular contours, the solution \( E = E(M;e)\) is given by Eqs. (17), (18) and \( G( \theta )\) is a \(2 \pi \)-periodic function of \( \theta \) that has a Fourier expansion
with coefficients \( \widehat{G} (n)\) given by
therefore, the exact solution (17) can be written also in the form
A straightforward approach (used by Philcox et al. (2021)) to approximate (29) is to compute the FFT of \( G( \theta )\) by using a standard FFT solver in which, for a given number \( N (\gg 1)\) of points, we get approximations \( \widehat{G}_N (k) \) to \( \widehat{G} (k) \) for \( \vert k \vert \le N/2\). With these approximations we have the approximate solution \( E_N(M;e)\) of (29)
The main advantage of this approach is its simplicity and reliability because it is enough to use well-established FFT solvers and N sufficiently big to get accurate approximations. However, FFT solvers provide all coefficients \( \widehat{G}_N (k)\) with \( \vert k \vert \le N/2\), but for Eq. (30) we only need the corresponding to \(k = -2\) and \(k =-1\). Because of this, we focus on the approximations to \( \widehat{G} (-2)\) and \(\widehat{G} (-1)\) and we will use the same quadrature rule as the one used in the FFT, namely the composite trapezoidal rule that, in spite of its second order, is a reliable quadrature rule and, more important, the discrete approximations \( \widehat{G}_N (k)\) have a spectral convergence to \( \widehat{G} (k) \). In fact, it will be seen in the Appendix 1 that for all \( \vert k \vert \le N/2\) there exist \( \alpha = \alpha ( e)\) so that
with some constant \( C_k\). In other words, the discrete Fourier coefficients \( \widehat{G}_N (k)\) converge exponentially to their corresponding exact values \( \widehat{G}(k)\). Note that in a standard quadrature rule with order p this convergence behaves asymptotically as \( 1/ (N^p)\), \( (N \rightarrow \infty )\). Furthermore, \( E_N (M; e)\) also exponentially converges with N to E(M; e)
and this implies that the logarithm of the error behaves linearly with N, whereas in the standard case, the logarithm of the error behaves as \( \log N \).
To simplify the calculation of \( \widehat{G}(k)\), \( k=\{-2,-1\}\), we observe that for the particular function \( G( \theta )\) given by (18) there are some symmetries that allow us to reduce the computational cost. In fact, taking into account that for \( k=\{-2,-1\}\)
the integration intervals of (29) can be reduced to \( [0, \pi ]\) and we have
In the composite trapezoidal rule, given an (even) positive integer K the integral
is approximated by
with \( \theta _j = j \; \pi / K, \;\; (j=0,1, \ldots ,K)\) and then (33) is approximated by
Note that (36) is equivalent to the approximation provided by the FFT with \( N = 2 K\) and the symmetry of G reduces the computational cost by a factor of 1/2.
A second remark is that in the computation of
if \( \rho \) is independent of the mean anomaly and \( \mu = \beta _0 + \beta _1 M\) is an affine function of M (here \( \beta _0\) and \( \beta _1\) may depend on e), the evaluations of \( \rho \, \exp ( i \ \theta _j)\), \( j=0, 1, \ldots ,K\), can be stored and used for all evaluations of the mean anomaly along the orbit, and then, the calculation of \( G(\theta )^{-1}\) only requires the computation of \( \sin \mu \) and \( \cos \mu \).
5 Numerical experiments
We will compute for circular and elliptic contours the absolute errors in the numerical solution denoted by \(\texttt {AErr}(K) = \vert E(M;e) - E_K (M; e) \vert \), for \( (e,M) \in \mathcal {D}\). Moreover, in the case of elliptic contours we will denote by \( \texttt {AErr}(K,\varepsilon )\) the corresponding errors for \( \varepsilon \in (0,1)\).
We made many experiments to show the accuracy of our method, but here we present only a few of them, although the approach performs properly in all examples chosen. In all samples we take values of \(M\in (0,\pi )\) and a fixed value of the eccentricity \(e = 0.9\), a higher value that may lead to convergence problems in some iterative methods for M close to zero. In the grid to apply the composite trapezoidal rule, we use three different values of K, namely, \(K=8\) (Fig. 3, top), \(K=16\) (Fig. 3, center), and \(K=32\) (Fig. 3, bottom).
For each value of K, we present the \(\log _{10} \texttt {AErr}(K)\) corresponding to the seven contour Jordan used, from top to bottom on each plot, the circle \(\mathcal {C}_0\), and ellipses with \(\varepsilon = 1/2, 1/4, 1/8, 1/16, 1/32\) and a very eccentric ellipse with \(\varepsilon = 10^{-3})\), close to a straight segment.
We can see in Fig. 3 that the smaller the length of the Jordan curve is the more accuracy we get. This pattern is the same for every number K of points in the grid. However, the accuracy dramatically increases with K; thus, for \(K=32\), we reach from 20 significant digits for \(M\approx 0\) to 40 digits at the end of the interval (\(M \approx \pi \)). Anyway, results for \(K=8\) are also very good; we reach from 10 to 20 significant digits.
We also note that there are several discontinuities in the plots. These are due to the fact that the numerical solution \( E_K(M; e)\) oscillates around the exact solution E(M; e), and then, the discontinuities of \(\log _{10} \texttt {AErr}(K)\) appear at the crossing points. Observe that the number of discontinuities increases with K, showing a similar behavior to the best approximation of continuous functions.
Another important issue is how fast is our method when compared with the one of Philcox et al. (2021). The answer can be found in Figure 4, where we represent the CPU time for three cases depending on the number of nodes taken in the grid. We consider three different methods, all of them sharing the same Jordan circle \(\mathcal {C_0}\) used by Philcox et al. (2021), but we make the numerical computation of the line integrals (17) in three different ways: first (in gray), by using the FFT as in (Philcox et al. 2021); second (in red), by means of the composite trapezoidal rule; and finally (in red), with the optimized trapezoidal rule, that is, taking into consideration the symmetry and periodicity properties of the involved functions. We can see that the composite trapezoidal rule gives for even number of nodes a similar result in speed to the FFT method, the latter is slower for odd nodes. Clearly, optimized trapezoidal rule is the fastest, and the slope of its growing is more smooth than in the former cases.
In \( \log _{10}\) scale, the absolute errors for eccentricity \( e =0.9\) and \( M\in (0,\pi )\) with \( K=8,16, 32 \) (from top to bottom), and for each one computed using seven elliptical contour \( \mathcal {C}_0\), ranging from a circle (\(\varepsilon = 1\)) to an almost straight segment (\(\varepsilon = 10^{-3}\))
6 Conclusions
The integral expression of the transcendental elliptic Kepler’s Equation (KE) as quotient of two contours integrals around an appropriate Jordan curve is not only a mathematically beautiful explicit expression of the solution but also can be used for practical purposes. The aim of this paper is to examine the main issues (accuracy and computational cost) that determines their practical application. Since the definition of the contour integrals depends on a Jordan curve that contains inside only the unique real zero of the KE, a complete study of the complex zeroes of this equation is carried out in Sect. 2.
Moreover, as Jordan contours with smaller lengths improve the accuracy of the numerical approximation of integrals along them, several circular and elliptic Jordan contours have been proposed. Such contours allow us to express the integrals as the Fourier coefficients of a \(2 \pi \)–periodic function for the frequencies \( k=-2\) and \(k=-1\). In this context, taking into account that the composite trapezoidal rule is used in the well-experimented FFT, we use this rule with some additional simplifications due to the symmetries of the integrals proposed to approximate these Fourier coefficients with great accuracy. The spectral accuracy with the number of nodes is obtained in Appendix A, and the results of a number of numerical experiments are presented to show the accuracy as a function of the number of nodes in the quadrature rule. Special attention has been paid to the accuracy for values near the singularity \(M=0, \ e=1\) of KE.
Besides, it is worth to remark that as shown in Fig. 3, the use of ellipses as Jordan contours with parameter \(\varepsilon \) close to zero leads to a great improvement in the accuracy of the numerical approximation of the curvilinear integrals with the same computational cost as in the case of circular contours. Then, elliptical contours are highly recommended in computing the integrals of KE, particularly in the case of orbits with high eccentricities and for values of M close to zero.
Finally, the above study on the explicit integral solutions of elliptic Kepler’s equation can be extended to other similar transcendental equations. In particular, for the limit Kepler’s equation with \(e=1\), as noted in Remark 2, the study of its complex zeroes allows us to consider also elliptic Jordan contours for the efficient solution of the corresponding integrals. Moreover, the case of the hyperbolic Kepler’s equation \(e \sinh F - F =M\) \((e>1,\, M>0)\) in the unknown F will be subject of a forthcoming paper.
References
Battin, R.H.: An Introduction to the Mathematics and Methods in Astrodynamics. (Revised Edition). AIAA Educational Series, Reston, VA (1999). (ISBN: 978-1-60086-154-3)
Calvo, M., Elipe, A., Montijano, J.I., Rández, L.: Optimal starters for solving the elliptic Kepler’s equation. Celest. Mech. Dyn. Astron. 115, 143–160 (2013). https://doi.org/10.1007/s10569-012-9456-5
Calvo, M., Elipe, A., Montijano, J.I., Rández, L.: Convergence of starters for solving Kepler’s equation via Smale’s \(\alpha \)-test. Celest. Mech. Dyn. Astron. 127, 19–34 (2017). https://doi.org/10.1007/s10569-016-9713-0
Calvo, M., Elipe, A., Rández, L.: On the numerical integration of an explicit solution of the homologous collapse’s radial evolution in time. MNRAS 514, 1258–1265 (2022). https://doi.org/10.1093/mnras/stac1418
Colwell, P.: Solving Kepler’s Equation Over Three Centuries. Willmann-Bell, Richmond (1993). (ISBN 10: 0943396409)
Davis, J.J., Mortari, D., Bruccoleri, C.: Sequential solution to Kepler’s equation. Celest. Mech. Dyn. Astron. 108, 59–72 (2010). https://doi.org/10.1007/s10569-010-9292-4
Feinstein, S.A., McLaughlin, C.A.: Dynamic discretization method for solving Kepler’s equation. Celest. Mech. Dyn. Astron. 96, 49–62 (2006). https://doi.org/10.1007/s10569-006-9019-8
Fukushima, T.: A method for solving Kepler’s equation without transcendental function evaluations. Celest. Mech. Dyn. Astron. 66, 309–319 (1997). https://doi.org/10.1007/BF00049384
Hairer, E., Norsett, S.P., Wanner, G.: Solving Ordinary Differential Equations I: Nonstiff Problems (Second Revised Edition). Springer Verlag, Berlin (1992). (ISBN: 978-3-642-05163-0)
Jackson, D.: Non-essential singularities of functions of several complex variable. Ann. Math. 17, 172–179 (1916)
Johnson, S.G.: Numerical integration and the redemption of the trapezoidal rule. MIT Applied Math. IAP Math. Lecture Series (2021) https://math.mit.edu/~stevenj/trap-iap-2011.pdf
Markley, F.L.: Kepler Equation solver. Celest. Mech. Dyn. Astron. 63, 101–111 (1995). https://doi.org/10.1007/BF00691917
Mortari, D., Elipe, A.: Solving Kepler’s equation using implicit functions. Celest. Mech. Dyn. Astron. 118, 1–11 (2014). https://doi.org/10.1007/s10569-013-9521-8
Odell, A.W., Gooding, R.H.: Procedures for Solving Kepler’s Equation. Celest. Mech. 38, 307–334 (1986). https://doi.org/10.1007/BF01238923
Philcox, O.H.E., Goodman, J., Slepian, Z.: Kepler’s Goat Herd: an exact solution to Kepler’s equation for elliptical orbits. MNRAS 506(4), 6111 (2021). https://doi.org/10.1093/mnras/stab1296
Raposo-Pulido, V., Peláez, J.: An efficient code to solve the Kepler equation. Elliptic case. MNRAS 467, 1702–1713 (2017). https://doi.org/10.1093/mnras/stx138
Slepian, Z., Philcox, O.H.E.: A uniform Spherical Goat (Problem): Explicit Solution for Homologous Collapse’s Radial evolution in Time. Preprint (arXiv:2103.09823) (2021)
Trefethen, L.N.: Spectral Methods in MATLAB. SIAM, Philadelphia (2000) https://doi.org/10.1137/1.9780898719598
Ullisch, I.: A closed-form solution to the geometric goat problem. Math Intell. 42, 12 (2020). https://doi.org/10.1007/s00283-020-09966-0
Wintner, A.: The Analytical Foundations of Celestial Mechanics. Princeton University Press, Princeton (1941). (BibCode: 1941afcm.book.....W)
Acknowledgements
Authors are very indebted to the anonymous reviewers for their criticism and suggestions which improved the original manuscript. This work has been supported by Grants PID2019-109045-GB-C31 and PID2020-117066-GB-I00 funded by MCIN/AEI/ 10.13039/501100011033 and by the Aragon Government and European Social Fund (groups E24-20R and E41-20R).
Funding
Open Access funding provided thanks to the CRUE-CSIC agreement with Springer Nature.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
This article is part of the topical collection on Innovative computational methods in Dynamical Astronomy
Guest editor: Christoph Lhotka, Giovanni F. Gronchi, Ugo Locatelli, Alessandra Celletti.
Appendix: A On the convergence of \( \widehat{G}_h(k)\) to \( \widehat{G}(k)\)
Appendix: A On the convergence of \( \widehat{G}_h(k)\) to \( \widehat{G}(k)\)
An interesting study of the convergence of the composite trapezoidal rule was carried out by Johnson (2021), and a first pessimistic approximation leads to
however, in our case \( G ( \theta ) \) is periodic and this is not an accurate estimate.
A more refined tool to analyze the convergence of \( \widehat{G}_h(k)\) to \( \widehat{G}(k)\) is the Euler–Maclaurin formula (see, e.g., Hairer et al. (1992)) that with our notations becomes
where \( B_j\) are the Bernoulli numbers defined as the coefficients of the series expansion
with their first values
For the periodic function \( \Gamma ( \theta ) = \exp ( 2 i\, \theta ) G (\theta )\) with period \( 2 \pi \), it turns out that all derivatives satisfy \( \Gamma ^{(j)} (0) = \Gamma ^{(j)} ( 2 \pi )\), and therefore
for all N and, consequently, we have arbitrarily large order of convergence when \( N \rightarrow \infty \). Similar result holds for \( \Gamma = \exp (i\, \theta ) G (\theta )\).
However, as remarked by Johnson (2021), Fourier analysis will allow us to give sharper bounds on the asymptotic convergence. To do that, we will use the statements (b) and (c) of Theorem 3, page 33 of Trefethen’s book (2000) (also known as Paley Wiener theorem) that in our notation can be formulated as
Theorem A.1
-
(b)
If \( G( \theta )\) has infinitely many derivatives in \( L^2 (\mathbb {R})\) then
$$\begin{aligned} \vert \widehat{G}(k) - \widehat{G}_h (k) \vert = \mathcal {O}( h^m), \qquad \hbox {as} \quad h \rightarrow 0 \end{aligned}$$(39)for every \( m \ge 0\).
-
(c)
If there exist positive constants a and c such that \( G( \theta )\) can be extended to an analytic function \( u ( \theta )\) in the complex \( \theta \) set
$$\begin{aligned} \hbox {Re} \; \theta \in [0, 2 \pi ], \, \vert \hbox {Im} \;\; \theta \vert < a, \end{aligned}$$(40)with \( \vert u ( \theta ) \vert \le c \) for all \( \theta \) in Eq. (40), then
$$\begin{aligned} \vert \widehat{G}(k) - \widehat{G}_h (k) \vert = \mathcal {O} \left( \exp \left[ - \displaystyle \frac{\pi }{h} ( a - \epsilon ) \right] \right) \quad \hbox {as} \quad h \rightarrow 0 \end{aligned}$$(41)for every \( \epsilon >0\).
Under the conditions of the last statement for \( h = 2 \pi /N\), the discrete wavenumbers \( \widehat{G}_h (k) \) approximate the corresponding continuous wavenumber \( \widehat{G} (k) \) with an error of asymptotic order
and then we say that they exhibit spectral approximation with factor a/2.
In the application of the statement (c) to \( \widehat{G}_h(-2)\) and \( \widehat{G}_h(-1)\) observe that \( G( \theta ) = G( \theta ; M, e) = f( z= \mu + \rho \exp ( i \theta ))^{-1}\) depends on the parameters \((e,M) \in \mathcal {D} \) through the center \( \mu \) and the radius \( \rho \) of the circular contour \( \mathcal {C}( \mu , \rho )\). This implies that the constant a of (41) depends also on M and e, i.e., \( a= a(M; e)\) and taking into account that \( G( \theta ) = G(\theta ; M,e)\) becomes singular for \(M=0\), \( e=1\), then \(a(M; e) \rightarrow 0\) when \( (M,e) \rightarrow (0,1)\).
Furthermore, \( G( \theta ) = G( \theta ; M, e) \) as a function of \( \theta \) is not defined for \( \theta = \{0, 2 \pi \}\) if \( 2 - 2 \sin ( M+e) =0,\) i.e., if \(M + e = \pi /2\); and for \( \theta = \pi \), if \(\sin M = 0\), or equivalently, if \(M = \{0,\pi \}\). Because of this, we consider the scaled function \( S = S ( \theta ) = S ( \theta ; M, e)\) given by
that is well defined for all \( \theta \in [0, 2 \pi ]\) and for all values of the parameters \( M \in [0, \pi ]\) and \( e\in [0,1)\) and also
In the application of the statement (b) to the \((2 \pi )\)–periodic function \( S ( \theta )\), we get that
for every \( m >0\), or equivalently, taking into account that \( N = 2 \pi /h\)
and, in particular, the exact integrals in the numerator and denominator of (43) are approximated by their DFT counterparts with the asymptotic accuracy
To apply the stronger result of Theorem A.1(c), we must examine the analytic behavior of \( S( \theta )\) (42) for \( \theta \in \mathbb {C}\) in a set \(\hbox {Re}\ \theta \in [0, 2 \pi ]\), and \(\vert \hbox {Im}\ \theta \vert < a\).
According to the study of Sect. 2, when \( M \rightarrow 0\) and \( e \rightarrow 1\), there is a branch of complex zeroes of \( G( \theta )^{-1}\) that tends to \( \theta =0\), and similarly, when \( M \rightarrow 2 \pi \) and \( e \rightarrow 1\), that branch tends to \( \theta = 2 \pi \). More precisely, for each \( e_0 \in (0,1)\) there exist \( y^* = y^* ( e_0) >0\) that is the unique solution of
so that \( G ( \theta )^{-1}\) has no zeros for \( \vert \hbox {Im} \; ( \theta ) \vert < y^*\) and therefore \( G( \theta )\) is analytic in the set (47) with \( a = y^*\). Some particular values are
![figure a](http://media.springernature.com/lw685/springer-static/image/art%3A10.1007%2Fs10569-023-10142-7/MediaObjects/10569_2023_10142_Figa_HTML.png)
Hence, by choosing \( a < y^*(e_0)\), \( \vert G(\theta ; M, e_0)\vert \) will be uniformly bounded in (47) for all \( M \in [0, \pi ]\) and the statement (c) implies the spectral accuracy of the discrete wavenumbers with error
In conclusion, for a given eccentricity \( e_0 \in (0,1)\) when the exact value of the numerator of (43), that in Fourier notation is \( \widehat{S}(-2) \), is approximated by the composite trapezoidal rule with \((N+1)\) nodes, i.e., \( \widehat{S}_h (-2)\) in terms of the discrete Fourier transform, with \( h = 2 \pi /N\), the error satisfies an asymptotic error estimate
with a coefficient \( a = y^* ( e_0) = g^{-1} (e_0)\) which depends only on \(e_0\) and does not depend on M; therefore,
with some constant \( C_2\).
Similarly for the denominator of (43), we have
with the same a and some constant \( C_1\).
The equations (49) and (50) show that the composite trapezoidal rule applied to the corresponding integrals exhibits an spectral accuracy of both numerator and denominator with the same constant factor \( a < y^*(e_0)\).
Moreover, for the quotient, by putting \( \epsilon = \exp (- a/2 \ N ) \), by (49) and (50)
and then
hence, for the quotient we have also spectral accuracy with the same coefficient. Note that such spectral accuracy could be improved if the equality \( \widehat{S}(-1) C_1 - \widehat{S}(-2) C_2 = 0\) holds.
In Fig. 5 we display the \(\log _{10} \texttt {AErr}(K)\) for the mean anomaly \( M=0.1\) (upper plot) and \( M=3.0\) (lower plot), as a function of K (\(N=2K\)), with \(2\le K \le 32\) and for a discrete range of values of the eccentricity between \( e=0.1\) and \( e = 0.99\).
We see that \( \log _{10} \texttt {AErr} (K) \) exhibits a linear behavior of K with a negative slope \( - \alpha = -\alpha (e) < 0\) that increases with the eccentricity and then
which implies
which shows that \(\texttt {AErr} (K) \) behaves as an exponential function of K with a negative coefficient that depends on the eccentricity so that it is smaller when the eccentricity gets closer to one.
In Figure 5 (upper plot) we observe that for the mean anomaly \( M = 0.1\) we have the same behavior as in the case \( M=3.0\) (lower plot), but as M is close to zero and \( (M=0, e=1) \) is a singularity of KE, the spectral behavior is affected by this fact and \( \alpha (e)\) is closer to zero than in the above case.
This confirms numerically the spectral behavior of the error that depends on the eccentricity. Note that for the small eccentricity \(e=0.1\) the negative slope implies that arbitrarily small errors a attained even with moderate values of K. However, for the eccentricity \(e = 0.99\) it is necessary to take large values of K to get moderate errors. Moreover, this is particularly relevant for values of M close to zero as shows the case \(M=0.1\).
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Calvo, M., Elipe, A. & Rández, L. On the integral solution of elliptic Kepler’s equation. Celest Mech Dyn Astron 135, 26 (2023). https://doi.org/10.1007/s10569-023-10142-7
Received:
Revised:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10569-023-10142-7