非线性函数精确反演的快速开关样条格式:开普勒方程的新首选解
Fast Switch and Spline Scheme for Accurate Inversion of Nonlinear Functions: The New First Choice Solution to Kepler's Equation
摘要:
用数值方法求函数的逆是许多科学问题的常见任务,通常使用牛顿迭代法来解决。在这里,我们描述了一个替代方案,基于切换变量,然后样条插值,它可以适用于单调函数在非常一般的条件下。为了优化算法,我们设计了一个特定的超快速样条例程。我们还推导出分析的方法的理论误差,并测试它的例子,是感兴趣的物理。特别是,我们计算朗伯的$W(y)$函数的实分支,它被定义为$x \exp(x)$的逆,我们解决开普勒方程。在所有情况下,我们的预测的理论误差是在很好的协议与我们的数值结果,并小于可以预期的一般误差分析样条插值的许多数量级,即由一个令人惊讶的$3\times 10^{-22}$因素的计算$W$的范围$W(y)\in [0,10]$,并由一个因素$2\times 10^{-4}$开普勒的问题。在我们的测试中,该方案比Newton-Raphson方法快得多,当要求整个间隔或大量点的反函数值时,对于示例中的执行时间,该方案的执行时间在$10^{-4}$到$10^{-3}$的范围内。对于开普勒方程和公差$10^{-6}$ rad,该算法优于牛顿方法的所有值的点的数量$N\ge 2$。
英文摘要:
Numerically obtaining the inverse of a function is a common task for many scientific problems, often solved using a Newton iteration method. Here we describe an alternative scheme, based on switching variables followed by spline interpolation, which can be applied to monotonic functions under very general conditions. To optimize the algorithm, we designed a specific ultra-fast spline routine. We also derive analytically the theoretical errors of the method and test it on examples that are of interest in physics. In particular, we compute the real branch of Lambert's $W(y)$ function, which is defined as the inverse of $x \exp(x)$, and we solve Kepler's equation. In all cases, our predictions for the theoretical errors are in excellent agreement with our numerical results, and are smaller than what could be expected from the general error analysis of spline interpolation by many orders of magnitude, namely by an astonishing $3\times 10^{-22}$ factor for the computation of $W$ in the range $W(y)\in [0,10]$, and by a factor $2\times 10^{-4}$ for Kepler's problem. In our tests, this scheme is much faster than Newton-Raphson method, by a factor in the range $10^{-4}$ to $10^{-3}$ for the execution time in the examples, when the values of the inverse function over an entire interval or for a large number of points are requested. For Kepler's equation and tolerance $10^{-6}$ rad, the algorithm outperforms Newton's method for all values of the number of points $N\ge 2$.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。