# SageMath with numberdb: analytic n=0 or 1, integer ell>=2.
# Returns an exact rational or an Arb enclosure with the requested significant digits.
import numberdb.sage as numberdb
from sage.rings.rational_field import QQ
from sage.rings.integer_ring import ZZ
from sage.rings.complex_arb import ComplexBallField
def love_analytic(n, ell, digits=100):
n, ell = QQ(n), QQ(ell)
if n not in (0, 1) or ell.denominator() != 1 or ell < 2:
raise ValueError('Use n=0 or 1 and an integer ell>=2.')
ell = ZZ(ell)
if n == 0:
return QQ(3) / (4 * (ell - 1))
target = numberdb.bits(digits, losing=8)
precision = target + 80
while True:
p = ComplexBallField(precision).pi()
k = (p.bessel_J(ell + QQ(3)/2)
/ (2 * p.bessel_J(ell - QQ(1)/2))).real()
if k.is_finite() and k.accuracy() >= target:
return k
precision *= 2
print(love_analytic(0, 4))
print(love_analytic(1, 4))The two incompressible values are exact rationals, and the index-one closed forms are evaluated with Arb ball arithmetic. All other entries use central-series initialization and Taylor continuation in $t=\sqrt{\theta_n}$ of the Lane–Emden background and the original-potential Riccati equation. Runs at 150 and 210 working decimal digits use Taylor orders 160 and 210, step caps $1/12$ and $1/18$, and central matching radii $1/2$ and $2/3$. Across all twenty responses, including the analytic controls, the largest relative discrepancy is less than $5.76\times10^{-152}$. Only 100 significant digits are stored.
A separate DOP853 integration in the original radial coordinate uses the continuous modified-potential equation, without importing the production solver. It checks every response; its largest relative discrepancy is less than $2.77\times10^{-10}$. Both analytic models are nonzero controls, and deliberately displaced controls are rejected. An independent 140-digit Bessel evaluation checks the index-one formulas. The modified-field transformation is checked as an exact polynomial identity. Readback checks compare the written intervals with the high-precision results, repeat exterior matching and the radial comparisons on the stored values, and compare every background radius and mass with the companion tables.
These checks do not rigorously bound Taylor truncation, propagated ODE error or the numerical surface location, so the ODE values are heuristic (agreement-checked). The attachments retain the reproducible generator, independent checks, numerical evidence, argument-selection justification, source hashes and the coordinated skill manifest.