The Exponential Integral Ei(x) and Numerical Calculation of Its Inverse
DOI:
https://doi.org/10.37256/cm.7420269353Keywords:
accuracy, inverse function, Lambert's W-function, remainder of infinite series, root-finding algorithm, Taylor expansion, transcendental functionAbstract
The exponential integral y = Ei(x) =
dx represents a transcendental function that can be applied as a growth function with interesting properties. Representing an infinite series, its numerical evaluation can be carried out with assymptotic expansion or summing up a finite number of elements with a sufficiently small remainder. Its inverse results in two subfunctions that are defined here as x =
(y) for x < 0 (and always y < 0), and x =
(y) for x > 0, where x is a real-valued variable. There is no direct formula to calculate numerical values for the two inverse subfunctions. In this article, we first show that for x being close to 0, the inverse function with sufficiently small error is represented by Lambert's W-function. Then we compare two methods. In the first method, two versions of a generic root-finding algorithm search for a number X that solves Y = Ei(X) for given number Y, distinguishing x < 0 and x > 0 in the case of Y < 0. The second method is a Taylor expansion with a 10th-degree polynomial. For the Y-value of interest, a corresponding reference interval is taken by the algorithm from a list that is here developed, and the associated X0 together with Y enters the polynomial to calculate X directly. The chosen remainder or maximum error εY , that results from cutting the infinite Taylor series, is taken into account in the interval limits around X0. The relationship between εY and corresponding εX (the resulting maximum error for X) is analyzed. Iterative formulas for the determination of optimal intervals as a function of X0 are derived for given |εY| or relative error
. The methods were tested with Mathematica notebooks that are provided as supporting information. The more flexible root-finding algorithm will generally be the best choice. However, the Taylor expansion can be implemented without any special functions, as long as the corresponding polynomial can be solved accurately.
Downloads
Published
How to Cite
Issue
Section
License
Copyright (c) 2026 Martin Ricker, et al.

This work is licensed under a Creative Commons Attribution 4.0 International License.
