PSEM Approximations for Both Branches of Lambert 𝑊 Function with Applications

Transcendental functions are a fundamental building block of science and engineering. Among them, a relatively new function denominated as Lambert 𝑊 is highlighted. The importance of such function relies on the fact that it can perform novel isolation of variables. In this work, we propose two accurate piece-wise approximate solutions, one for the lower branch and another one for the upper branch, respectively. The proposed analytic approximations are obtained by using the power series extender method (PSEM) in combinationwith asymptotic solutions. In addition, we will compare some published approximations with our proposal, highlighting our advantages in terms of significant digits and speed of evaluation. Furthermore, the approximations are validated by the successful simulation of a problem of economy and other acoustic waves of nonlinear ions.


Introduction
Transcendental equations are those containing transcendental functions with the variable to be solved for, which have the particularity that can not be expressed in terms of a sequence of algebraic operations [1][2][3][4].This is the case of the Lambert  Function [5,6].The Lambert W Function as today known, denoted by (), is a multivalued function that can be defined as the inverse of the following transcendental function [5][6][7][8][9]: resulting in where  can be any real or complex number, and () is known as Lambert  Function.
The origin of (2) begins in 1758 when Johann Heinrich Lambert solved the next trinomial equation [5,6] by giving a series for  in powers of . =  +    (3) Some years later, in 1783 Leonhard Euler presented (3) into a symmetrical form as follows [5,6]: which is developed in series expansion as and can be expressed as This series is called the Tree Function (V) and is related to the Lambert W Function (2) because (V) = −(−V) [5,6].The Lambert W Function is also called the Omega function or Product Log function [5,13].However, the inverse of (1) was first described by Polya and Szego in 1925 [14].Later, during 1949 up to 1959, Edward Maitland Wright performs significant contribution to the solution of the transcendental equation (1) by means of his effort to solve Delay Differential Equations (DDE) [15,16].At the same time as Wright, in 1950, N. D. Hayes [17] collaborated in the solution of (1) with his work on transcendental equations.In 1973, Crowley et al. [18] presented an algorithm (called the 443-algorithm) for the solution of that transcendental equation; an updated version of the 443-algorithm (called the 743-algorithm) was given in 1995 [19].Different works have been published from 1758 along the years regarding the solution of (1); however, it was until the work of Corless et al. published in 1996 [5] that () is given to be known worldwide.Corless et al. [5] made a revision of related works and potential applications and provide approximate representations and numeric algorithms of evaluation to the function.At the same time, this function was included in Maple CAS software [5,20].
The formal solution of the Lambert W function can be expressed as [56]  () ≈ ln This expression clearly requires an infinite iterative calculus, which is not feasible to compute.
From the numerical and analytical point of view, there are several methods to compute transcendental functions like this; for example, Chapeau-Blondeau [10] and Corless et al. [5] proposed to evaluate the Lambert W branches using approximate analytical expressions and increasing accuracy with the Halley numerical method [35,[63][64][65].Other proposals to obtain an analytic approximation of the Lambert W function are [11,[66][67][68].Fukushima proposed an algorithm [24] to obtain the numerical solution for  0 () and  −1 () by means of an expansion around the zero branch point.Moreover, Chapeau-Blondeau [10], de Brujin [67], and Karamata [68] proposed series expansions to evaluate branch  −1 ().
In this work, we propose to apply power series extender method (PSEM) [69] to calculate approximate solutions for both branch Lambert .PSEM is a novel tool that is able to produce easy computable, highly accurate approximations without requiring to perform: integrals, solution of differential equations or inclusive without requiring the existence of a perturbative parameter.What is more, the approximate solutions exhibit a large domain of convergence.
Section 2 presents the basic procedure to apply PSEM.The procedure to obtain the approximation of lower and upper branch of Lambert  is presented in Section 3. Next, two case studies are presented in Section 5. Later, Section 6 presents a discussion about the main results of this work.Finally, the concluding remarks are presented in Section 7.

Basic Procedure of PSEM
In broad sense, a nonlinear differential equation can be expressed as follows: having as boundary condition, where  and  are a linear operator and a nonlinear operator, respectively, () is a known analytic function,  is a boundary operator, Γ is the boundary of domain Ω, and / denotes differentiation along the normal drawn outwards from Ω [70].
Next, we express the solution of (8) as a Taylor expansion: where V  ( = 0.1, 2, . ..) are the coefficients of the power series and  0 is the expansion point.Now, in [69,71], it is proposed that the solution for (8) can be written as a finite sum of functions as or where   are constants to be determined by PSEM,   (,   ) are arbitrary trial functions, and  and 2 are the orders of approximations (11) and (12), respectively.We will denominate (11) and (12) as a trial function (TF).Next, we calculate the Taylor expansion of (11) or (12), resulting in the power series: respectively, where Taylor coefficients   are expressed in terms of parameters   .Finally, we equate/match the coefficients of power series ( 13) or ( 14) with the correspondent ones of (10) to obtain the values of   and substitute them into (11) or (12) to obtain the PSEM approximation [69].
It is possible to enrich PSEM by means of introducing cancellation points (CP).For every cancellation point several equations depending on the number of desire derivatives to satisfy are constructed.Such new equations are included in PSEM process to complement the system of equations in order to obtain the coefficients (  ).The cancellation equations are constructed by evaluating the TF and its derivatives at some strategically selected CP to increase the accuracy within a region.It is important to note that every introduced cancellation point and its derivatives would replace the corresponding superior order equations in the regular PSEM procedure.
The TF can be composed by combining different type of functions as long as the Taylor series exist.Note that regrouping terms of the -powers are valid for ( 13) and ( 14), because   functions were chosen analytic in a welldefined domain in the independent variable , whereby, the correspondent Taylor series are convergent for such values of  [72,73].By restricting the values of ( 8) to the mentioned domain of convergence, the sum of the Taylor series of   is also convergent [72,73].In the same fashion, the quotient of two analytic functions series (see (12)) in  0 is also analytic, whenever the denominator is different from zero at  0 .It is important to notice that PSEM convergence greatly depends on the proper selection of the trial function.Then, it is necessary that the proposed TF can potentially describe the qualitative behaviour of the solution of the nonlinear problem.

PSEM Approximation Procedure for Lambert 𝑊 Function
In this section, we will present the approximations for both branches of Lambert  function by using the PSEM procedure.Each branch will be divided into some regions in order to reduce the complexity of the approximations increasing in consequence with the speed of evaluation.In addition, all the numerical PSEM approximations of this work are obtained considering at least four significant digits.
Readers can find in Appendix A the proposed numerical approximations.It is important to remark that all the power series expansions of this work were obtained using special transformations of () and applying the built-in package "MultiSeries" of Maple 18.

Lower Branch Treatment.
The lower branch will be segmented into three pieces.For the first approximation, we propose where constants  1 ⋅ ⋅ ⋅ ,  4 and  1 , . . .,  5 will be determined by the PSEM procedure.In order to obtain an accurate approximation, we propose to obtain build 4 equations for  −1 (),   −1 (), . . .,   −1 () evaluating them at  = −0.355and other 5 equations for  −1 (),   −1 (), . . .,  (V) −1 () evaluating them at  = −0.367,and equating with the same derivatives of (15).Then, by solving the resulting equation system for the unknown constants we obtain the approximate solution (A.1) (see Appendix A).The second and third approximations are expressed as and where It is important to note that W−1, is obtained by calculating the order two power series expansion at  = 0 for and transforming (19) using  = −1/ln(−), we obtain (18).In summary, the lower branch is approximated (see (A.1)-

Upper Branch Treatment.
The upper branch is divided into four segments.First, we propose the following transform: Then, the proposed trial function to apply PSEM to (21) is with where W, is obtained by calculating the order four power series expansion at  = − for (21).Then, the first approximation for the upper branch of Lambert  is Next, the TF for the next two approximations are For the last approximation, we propose the following transform: Then, we calculate the order 5 power series expansion of ( 27) and replace  = 1/(1 + ln(1 + )); it results in In summary, the upper branch is approximated by Numerical PSEM approximations W0,1 (), W0,2 (), and W0,3 () are (A.4), (A.5), and (A.6), respectively (see Appendix A).

Iterative Scheme to Improve Accuracy
In [74] an easy computable iterative algorithm was proposed to increase the accuracy of () approximation.The iterative formula is given by where  is number of iterations,   is and The error term for this iterative scheme is ( 4  ) [74,75].In general terms, lower and upper branch were approximated by PSEM in order to obtain more than 4 significant digits.Then, after a single pass of 30 we obtain more than 16 digits as depicted in Figure 2. In the same fashion, Figures 3 and 4 show more than 15 digits for the upper branch approximations.Therefore, our scheme is compatible with the double float (64-bit IEEE 754) format of C/C++, which provides 15 significant digits.Furthermore, the same figures presented the significant digits of other works from literature after a singles pass of (30), causing our proposal to be the only one that keeps more than 15 digits for the complete domain of Lambert .If more significant digits are required, user can Eq.( 20) [7] [10] Figure 2: Significant digits for (20) and the ones reported at [7,10] after a single pass of iterative scheme of (30).
add more iterations to the scheme.The significant digits were calculated using The number of employed digits extended to 50 (in Maple CAS software) during the simulation in order to avoid rounding errors during the evaluation of approximations.It is important to notice from Figure 4 that our approximation presents the higher number (more than 23) of significant digits for  0 > 15 than all the other approximations.instabilities, the time measurement was determined by the average time of 10 million of evaluations for each point.

Computation Time
It is important to note in Figure 5 that our approximation presents, in general, the best CPU time behaviour in comparison with other reported approximations: [7,10] for lower branch and [7,11,12] for the upper branch.However, for some regions our approximation exhibits a similar or slightly better CPU time.Further work is necessary to obtain faster approximations compatible with double float standard as the one reported [24], which presents a precise and fast computation numerical algorithm to evaluate () that exhibits 50 nsec of average time.The key advantage of [24] to obtain such speed is that authors do not use transcendental functions to evaluate Lambert .However, our approximation is simple piece-wise formulas that are straightforward to implement in Fortran (see Appendix A), C/C++, Java, Basic, among many others.

Case Studies
In this section we present two applications of the Lambert function .The first case of application is to economy and second one is an interesting application to plasma physics.

Economic Order Quantity with Perishable Inventory.
In [76] a problem of Economic Order Quantity (EOQ) with perishable inventory related to the supply chain design of Pick-rate p Eq. ( 34) Eq. ( 20) Figure 6: Approximate and exact optimal transfer batch quantity  * .
melons was reported.After some assumptions the authors of [76] obtain the optimal transfer batch quantity as where the batch transfer cost is  [$], the batch transfer time is   [h], the time in the cold chain is   [in days], the value of the melons at picking is , the deterioration rate at a field temperature at 30 ∘ C is  [hour], the deterioration rate in the cold chain is  [per day], and the picking rate is  [cartons/h].
As an example obtained from [76], we assume the values for  =$7,  = 0.03h,   = 1/2h,  =$75,   = 5days,  = 0.02 per day.Allowing the picking rate to vary between 1 and 120 cartons per hour producing an optimal transfer batch quantity,  * , which is shown in Figure 6, where we have plotted (34) using our proposal and the exact numerical Lambert  based solution from Maple 18.

Application on Extremes of the Sagdeev Pseudo-Potential.
After several assumptions and manipulations, the electrostatic potential  solution [77] is obtained as and where the first and second roots correspond, respectively, to the maximum and minimum in the pseudo-potential, in terms of both real branches of Lambert .V 0 and  are constants of the phenomenon.
The exact ( 1 and  2 ) and approximate ( φ1 and φ2 ) contour plot for different values of  is presented in Figure 7(b).In addition, to find the locus of the conjugation points (see Figure 7(a)), we must insert  2 = exp(V 2 0 − 1) in ( 35) and (36).
The conjugation points separate the (upper) region of the root  1 , corresponding to the maximum in the pseudopotential, from the (lower) region of the root  2 , corresponding to the minimum in the pseudo-potential.

Discussion
PSEM procedure produces compact and high accurate approximations as depicted in Figures 2, 3, and 4. Furthermore, as a reference for convergence of PSEM, we use the root mean square error defined as where () means relative error and  and  represent the valid region of the approximation.The integration procedure will be performed using Simpson's rule 1/3 taking 100 samples for each valid interval of the approximations ( 20) and (29).Additionally, in order to calculate (37), we consider the exact value of Lambert  function as the numerical values obtained from the built-in command from Maple 18. Figure 8 depicts the  rms error for each branch approximations, using several -th trial functions (TF) increasing gradually the number of constants accordingly with Tables 1 and 2. Such figure shows how as the number of constants increments the  rms error reduces its value significantly showing the good convergence of the PSEM procedure.
As it is expected, the cases study shows how our proposal can be applied to solve practical problems in sciences and engineering.In fact, the simplicity of the piece-wise approximations allows easily implementing the approximations within computer languages as Fortran, C++, among many others.It is also worth mentioning that the computation time of our proposal was compared against other reported approximations from literature presenting the advantage of our proposal.Further work is required to reduce even more the computation time in order to compete with numerical algorithms as the one reported in [24].i

Concluding Remarks
In this article piece-wise approximations for both branches of Lambert  were proposed.The approximations were obtained using PSEM in combination with asymptotic approximations, resulting in handy and highly accurate expressions in comparison with other ones from literature.
In fact, we apply the approximations to practical problems in the fields of economic and physics, exhibiting highly accurate results.It is important to highlight that the coupling of PSEM with asymptotic solutions was successful to improve the accuracy in the vicinity of the expansion point and keeping the high accuracy of the original asymptotic approximation for large values of the domain.Additionally,  we prove that it is possible to improve the accuracy using an easy computable iterative scheme based on asymptotic methods.The computation time was measured resulting that

Figure 1 :
Figure 1: The two real branches of the Lambert W Function.  0 () is the upper branch and  −1 () is the lower branch.

1 Critical 1 Figure 7 :
Figure 7: Contour plot of the roots  1 and  2 as functions of the parameter .

Figure 8 :
Figure 8:  rms for the different  trial functions for PSEM.