A simple alternative in approximation and asymptotic expansion by exponential/trigonometric functions

Function approximation plays a crucial role in applied mathematics and mathematical physics, involving tasks such as interpolation, extrapolation, and studying asymptotic properties. Over the past two centuries, several approximation methods have been developed, but no universal solution has emerged. Each method has its own strengths and weaknesses. The most commonly used approach, rational Padé approximants, has limitations, performing well only for arguments x < 1 and often containing spurious poles. This report introduces a new and straightforward procedure for exponential/trigonometric approximation that addresses these limitations. The method demonstrates accurate fitting capabilities for various functions and solutions of second-order ordinary differential equations, whether linear or nonlinear. Moreover, it surpasses the performance of Padé approximants. Notably, the proposed algorithm is remarkably simple, requiring only four values of approximating functions. The provided examples show case the potential of this method to offer a straightforward and reliable approach for a wide range of tasks in applied mathematics and mathematical physics.


Introduction
Approximation of functions is an indispensable tool in applied mathematics and mathematical physics. The problem has been confronted as early as the development of calculus. Newton, Euler, Lagrange, Laplace, Gauss and many others designed various approaches for interpolation, integration, extrapolation of functions and finding asymptotics. The most popular current method for approximating functions is rational Pade approximations [1][2][3]. The calculation of Pade approximants is straightforward, given the corresponding software. Explicit expressions are mostly cumbersome, even in the second order [2]. Many functions are fitted for small argument values (x < 1) much better by the Pade approximants than by the Taylor series. Pade approximation gets worse for x > 1, which cannot be circumvented by applying higher orders because they often contain spurious poles due to rational Pade expression.
The problem of approximating specific functions can be closely related to the summation of divergent series. Many methods for accelerating convergence have been developed, as reviewed by Weniger [4]. In particular, he concluded that 'it still has to be discussed how one should actually proceed if the convergence of a slowly convergent sequence or series has to be accelerated or if a divergent series has to be summed. In view of the numerous different types of sequences and series, which can occur in practical problems, and because of the large number of sequence transformations, which are known, the selection of an appropriate sequence transformation is certainly a nontrivial problem'. This citation may manifest a 'status-quo' in this field and indicates its openness to innovations.
An alternative approach to Pade approximation to reconstructing functions has been developed in a series of papers by Yukalov, Yukalova and Gluzman [5][6][7][8][9][10]. The authors introduce self-similar factor approximants and can fit a broad class of functions. The authors have introduced multiplicative, additive and nested exponential approximants. Four or more parameters in the approximation are determined from the Taylor expansion. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. Selected functions were fitted with an accuracy that excels Pade approximants. However, a straightforward application sometimes fails and requires adjustment using 'the control parameters'. Within this framework, only steadily increasing or decreasing functions have been approximated.
In this report, a novel approximation scheme dubbed exponential/trigonometric fitting is described. The formulation is simple, and the application requires a few unsophisticated calculations. The method delivers accurate approximations and outperforms the Pade and other approaches for a wide variety of functions (elementary, special and those used in celestial and quantum mechanics). It also correctly predicts the asymptotics of some non-linear ordinary differential equations (nODE).
The paper is organized as follows: in part A, the procedure for finding parameters for exponential/ trigonometric approximation is described; in part B and Supplementary Material, the application to a wide class of functions is presented; in part C, the method of 'chasing' is generalized for solving non-linear ODEs; and in part D, the exponential/trigonometric approximation is applied to predict the asymptotics of nODEs.

Applications
As mentioned in Introduction, the self-similar factor approximants [5-10] outperform celebrated Pade approximants for many functions. I use the probe functions to assess the quality of double-exponential fitting.
For example, the function x ln 1 , ) whose accurate evaluation is still a hot topic in applied mathematics [4], is closely reproduced by double-exponentials in the interval 0 < x < 4, whereas the Pade approximation works only for x < 1 (figure 1(A)). Another example from the studies mentioned above is the function which is accurately presented by the double-exponential approximation ( figure 1(B)). The Pade [2/2] approximation in this case fails as it contains a discontinuity (a spurious pole).
Further examples are illustrated in figures S1-S4 in the Supplementary Material section. For example, the procedure works well for elementary transcendental functions such as sech = 1/cosh and tahn (figure S2C, D) and inverse rational functions (figure S2E, F). In figure S3, the method is applied for various functions of mathematical physics such as erfc (A), Debye-Hückel (B), Mittag-Lefler (or Voight) (C), as well as some other functions (D-F). In all these cases, double-exponential approximation shows excellent predictive accuracy (figure S3). Figure S4 shows selected results for a simple approximation of the special functions. They are obtained numerically as solutions of corresponding ODEs using the generalized method of 'chasing' described below. For the Airy function Ai, a single exponential is sufficient (figure S4A) when the internal argument is / x , 3 2 as suggested by asymptotic expansion [11,12]. Oscillating functions such as Laguerre and Hermite orthogonal polynomials and the spherical Bessel function are also well reproduced by the exponential/trigonometric approximation (figures S4B, C and D, respectively). Of note, in all the approximations mentioned above, the fitting parameters are obtained from only four values of function evaluated for x < 1.

Numerical ODE solution by generalized method of 'chasing'
I next explored the possibility of exponential/trigonometric approximation to present solutions of secondorder ODEs. They were obtained numerically using the 'chasing' method. It has been designed by Gelfand and Lokutsiyevskii for canonical inhomogeneous ODE, y p x y f x " + = ( ) ( ). The original algorithm is described by Berezin and Zhidkov [13], pp. 409-412 in English translation). The procedure is extended below to solve a general second order ODE First, the ODE is presented in the discrete form as  (7). The two moves (forward and backward) correspond to the term 'chasing'. The procedure has been tested for various ODEs and reproduced well existing analytical solutions.
The method of chasing is readily extended to finding solutions of non-linear ODEs. In many cases, they may be presented as above, with a non-linear function f (y) on the right-hand side y q x y p x y f y , The equation is solved iteratively. Starting from f y 0 = ( ) and solving the homogeneous ODE, a new f(y) is obtained and plugged into the RHS of (8) in the next step and so on. From numerical experience with different nODE types, less than 10 iterations are needed to obtain accurate solution.
The exponential/trigonometric approximation works well for oscillatory functions. The periodic second solution (Bi) of the Airy equation is accurately reproduced and the relative error of approximation is small ( figure 2(A)). Small deviations in from exact function occur at points where Bi ≈ 0. Note that in this case the internal variable, / x 2 3 is used as suggested by the asymptotic expansion [11,12]. Another challenging example represents the seminal non-linear Thomas-Fermi equation that describes the screened Coulomb potential caused by a heavy charged nucleus surrounded by a cloud of electrons. The best fits achieved in previous approximations [2,8] used more than eight terms in expansion. The double-exponential with only four parameters closely reproduces a slow decay of solution. 1.4. Approximating nODE asymptotics from series expansion Finally, I applied exponential/trigonometric fitting to assess the asymptotics of non-linear ODEs. The equations are abundant in mathematical physics, and most of them cannot be solved explicitly. The asymptotic dependence is usually tackled using various perturbation approaches [2,3,[14][15][16]. As an example, I take the non-linear equation which appears in describing the calcium gradients established around single calcium channels in the cytoplasm [17]. The analytical solution is readily obtained by integrating equation (9) twice. For μ = 1, the first integration gives / y y y 3 2, 2 2 3 ¢ =  + and the second one delivers the two solutions which correspond to the (+) and (−) signs in equation (9), respectively. The integration constants w are defined by the boundary condition at x = 0, set by calcium influx into the cytoplasm.
To compare with analytical results, I used the expansion: y y y y y. As in other approaches cited above, the equations in all orders represent linear inhomogeneous ODEs. The terms y n were calculated using the generalized method of chasing (part C). The left panels in figure 3 show the sums y . n å They differ from analytical solutions (the graphs in the right parts of figure 3), but attempting to fit them with Pade approximants (blue squares in figure 3) is unsuccessful: an exponential decay is overestimated ( figure 3(A)), and for the periodic solution, the oscillations are severely dampened ( figure 3(B)). The exponential/trigonometric approximations indicate perfect coincidence with analytical solutions (the red dots versus black curves in the right panels in figure 3).

Discussion and conclusions
Approximation of functions is a cornerstone of applied mathematics and mathematical physics. Most important tasks concern interpolation and extrapolation of functions and examination of their asymptotic properties. In the past two centuries, a multitude of methods has been developed. Nonetheless, continued efforts in the field perhaps merely indicate no universal recipe, and each method has benefits and flaws. The most popular remains the use of rational Pade approximants, but they only work reliably for arguments x < 1 and show deviations for larger x. It is logical to increase Pade order, which may bring some improvement but at the cost of complexity. Explicit expressions can be routinely obtained by computer algebra; however, they are so lengthy that it is useless to present them [2]. Even worse is appearance of spurious poles coming from unavoidable zeros of the denominator in the Pade ratios. A step beyond Pade has been made in a series of papers [5][6][7][8][9][10], where selfsimilar factor approximants are introduced. In many cases, they outperform Pade approximants, but sometimes the control functions have to be introduced to achieve convergence and accuracy. Moreover, the oscillating functions have not been considered.
In this report, a novel and simple approximation procedure based on exponential/trigonometric fitting is described. The algorithm is used to accurately reproduce both functions and solutions of second-order ODE, linear and non-linear. The main advantage is the simplicity of the algorithm, as presented by equations (1) through (4). The fitting parameters are uniquely determined from only four values of probe functions. The reference points are extracted at equidistant intervals for the argument x < 1, for which the Taylor series may be used.
The sum of two exponentials fits many functions that steadily increase or decrease. The examples are presented in figures 1 and S2, S3 in the supplementary material section. For alternating functions, the exponential/trigonometric fitting is appropriate. This naturally follows from the two-exponential approximation, when the exponents become complex conjugates. The examples are presented in figures 2, 3, and S4 in supplementary material.
The method is also applied to assess the asymptotics of non-linear ODEs. These are usually sought in the form of perturbation series using Δ-expansion, Adomian polynomials, multiple scales etc [2,3,[14][15][16]. Exponential/trigonometric approximation may be useful in seeking the asymptotics of perturbation expansions that usually generate inhomogeneous ODEs, like system (11). The analytical solutions can be obtained as integrals from an inhomogeneous term multiplied by the solution of the homogenous ODE. When they are given by the special functions, they can be accurately presented using exponential/trigonometric functions. The required integrals are then explicitly calculated to deliver analytical asymptotics. Alternatively, the nODEs can be solved numerically, for which the method of chasing is generalized in part C. When the perturbation series is restricted to four terms as in equation (11), the exponential/trigonometric approximation can be readily applied as in figure 3.
In this report, we propose a novel and straightforward procedure for exponential/trigonometric approximation. This method demonstrates accurate fitting capabilities for various functions and solutions of second-order ordinary differential equations, whether linear or nonlinear. Remarkably, it outperforms Padé approximants. The key advantages of this method lie in its algorithm's simplicity and the requirement of only four values of approximating functions. The presented examples highlight the potential of this method to provide a simple and reliable representation for a wide range of tasks in applied mathematics and mathematical physics. For example, finding solutions of non-linear PDEs in the framework of the Hirota transform is based upon perturbation expansion consisting of exponential terms with temporal and spatial dependencies [18]. This case is well suited for exponential/trigonometric approximation.