# PSEM Approximations for Both Branches of LambertW Function with Applications

Authors: H. Vazquez-Leal; M. A. Sandoval-Hernandez; J. L. Garcia-Gervacio; A. L. Herrera-May; U. A. Filobello-Nino
Journal: Discrete Dynamics in Nature and Society
 (2019)

---

## Abstract

Transcendental functions are a fundamental building block of science and engineering. Among them, a relatively new function denominated as LambertW 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 combination with 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.


---

## Body

## 1. 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–4]. This is the case of the Lambert W Function [5, 6]. The Lambert W Function as today known, denoted by W(x), is a multivalued function that can be defined as the inverse of the following transcendental function [5–9]:(1)yxexp⁡yx=x,resulting in(2)yx=Wx,where x can be any real or complex number, and W(x) is known as Lambert W Function.The Lambert W Function (W(x)) is a multivalued function (also called multibranched function); branches considering only real numbers of x are plotted in Figure 1. The two real branches, W0(x) and W-1(x), can be identified. W0(x) is called the upper branch (also named the principal branch) and satisfies the condition W(x)≥-1. This branch can be split into two branches, W0+(x) and W0-(x). W-1(x) is called the lower branch and satisfies the condition W(x)≤-1. Both branches are jointed at (-1/e, -1). Then, on the interval -1/e<x<0, there are two possible values for W(x), the one for W0-(x) and the second for W-1(x).Figure 1
The two real branches of the Lambert W Function.W0(x) is the upper branch and W-1(x) is the lower branch.The origin of (2) begins in 1758 when Johann Heinrich Lambert solved the next trinomial equation [5, 6] by giving a series for x in powers of q.(3)x=q+xmSome years later, in 1783 Leonhard Euler presented (3) into a symmetrical form as follows [5, 6]:(4)xα-xβ=α-βvxα+βwhich is developed in series expansion as(5)log⁡x=v+212!v2+323!v3+434!v4+⋯and can be expressed as(6)log⁡x=∑n=1nn-1n!vn=Tv.This series is called the Tree FunctionT(v) and is related to the Lambert W Function (2) because T(v)=-W(-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 W(x) 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].Since then, many works have appeared with reviews and significant contributions to the approximation of theW(x) oriented to diverse applications; some relevant works are presented by Corless et al. [21, 22], Brito et al. [6], Abdolhossein et al. [23], Fukushima [24], Marko [25], Fredrik [9], Jeffrey et al. [26], Jeffrey [27], Kheyfits [28], Darko [7], Dence [29], and Mezo et al. [30]. Moreover, a conference was created and celebrated in honour of the Lambert W Function in 2016. Lambert W is today used in all fields of science where transcendental functions as (1) are implicit in equations to solve. In general, W(x) can be applied in Physics, Mathematics, Chemistry, Engineering, and so on [5, 6, 8]. Some particular applications are biochemical kinetics [25, 31], electromagnetics (capacitor, transmission lines, etc.) [32], semiconductor (diode) circuits [33, 34], photocells [35], acoustics [36], optics [37], particle physics [38], general relativity [39], geophysics [40], risk theory [41], technological systems [42], information theory [43], combinatorial [5, 44], iterative exponentiation [5, 45, 46], graph theory [47], oscillation theory [13], time-delay dynamics [48–51], pedagogical [5], physiology [52, 53], hydrology [54, 55], hydraulic [56], materials and transport research [57–59], electrochemistry [60], microfluidics [61], statistical mechanics [62], etc.The formal solution of the Lambert W function can be expressed as [56](7)Wx≈ln⁡xln⁡xln⁡xln⁡xln⁡⋯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–65]. Other proposals to obtain an analytic approximation of the Lambert W function are [11, 66–68]. Fukushima proposed an algorithm [24] to obtain the numerical solution for W0(x) and W-1(x) 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 W-1(x).In this work, we propose to apply power series extender method (PSEM) [69] to calculate approximate solutions for both branch Lambert W. 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.Section2 presents the basic procedure to apply PSEM. The procedure to obtain the approximation of lower and upper branch of Lambert W 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.


## 2. Basic Procedure of PSEM

In broad sense, a nonlinear differential equation can be expressed as follows:(8)Lu+Nu-fx=0,x∈Ω,having as boundary condition,(9)Bu,∂u∂η=0,x∈Γ,whereL and N are a linear operator and a nonlinear operator, respectively, f(x) is a known analytic function, B is a boundary operator, Γ is the boundary of domain Ω, and ∂u/∂η denotes differentiation along the normal drawn outwards from Ω [70].Next, we express the solution of (8) as a Taylor expansion:(10)u=∑k=0∞vkx-x0k,where vk(k=0.1,2,…) are the coefficients of the power series and x0 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(11)u=u0+∑i=0nfix,ui,or(12)u=u0+∑i=0nfix,ui1+∑j=n+12nfjx,uj,whereui are constants to be determined by PSEM, fi(x,ui) are arbitrary trial functions, and n and 2n 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:(13)u=u0+∑i=0nPi,0+∑i=0n∑k=1∞Pi,kx-x0k,(14)u=u0+∑i=0nPi,0+∑i=02n∑k=1∞Pi,kx-x0k,respectively, where Taylor coefficientsPk are expressed in terms of parameters ui. Finally, we equate/match the coefficients of power series (13) or (14) with the correspondent ones of (10) to obtain the values of ui 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 (ui). 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 thex-powers are valid for (13) and (14), because fi functions were chosen analytic in a well-defined domain in the independent variable x, whereby, the correspondent Taylor series are convergent for such values of x [72, 73]. By restricting the values of (8) to the mentioned domain of convergence, the sum of the Taylor series of fi is also convergent [72, 73]. In the same fashion, the quotient of two analytic functions series (see (12)) in x0 is also analytic, whenever the denominator is different from zero at x0. 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.


## 3. PSEM Approximation Procedure for LambertW Function

In this section, we will present the approximations for both branches of LambertW 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 W(x) and applying the built-in package “MultiSeries” of Maple 18.


### 3.1. Lower Branch Treatment

The lower branch will be segmented into three pieces. For the first approximation, we propose(15)W~-1,1=αβx+1e-1,α=xa1+xa2+xa3+a4x,β=1+xb1+xb2+xb3+xb4+b5x,where constantsa1⋯,a4 and b1,…,b5 will be determined by the PSEM procedure. In order to obtain an accurate approximation, we propose to obtain build 4 equations for W-1(x), W-1′(x),…,W-1′′′(x) evaluating them at x=-0.355 and other 5 equations for W-1(x), W-1′(x),…,W-1(iv)(x) evaluating them at x=-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(16)W~-1,2=xa1+xa2+xa3+a4x1+xb1+xb2+xb3+b4x,and(17)W~-1,3=xa1+xa2+a3x1+xb1+xb2+b3x+W~-1,ax,where(18)W~-1,ax=k0-k1+k1k0,k0=ln⁡-x,k1=ln⁡-k0.It is important to note thatW~-1,a is obtained by calculating the order two power series expansion at X=0 for(19)W-1-exp⁡-1X=-1X-ln⁡1X-Xln⁡1X,and transforming (19) using X=-1/ln(-x), we obtain (18).In summary, the lower branch is approximated (see (A.1)-(A.3) in Appendix A) by(20)W~-1x=W~-1,1x-exp⁡-1≤x<-0.34,W~-1,2x-0.34≤x<-0.1,W~-1,3x-0.1≤x≤0.


### 3.2. Upper Branch Treatment

The upper branch is divided into four segments. First, we propose the following transform:(21)WTx=11+W0x,Then, the proposed trial function to apply PSEM to (21) is(22)WT~x=a0+xa1+a2x1+xb1+xb2+b3xx+1e+W~T,ax,with(23)W~T,ax=-2ex+112+8Z24Z,Z=1+ex,where W~T,a is obtained by calculating the order four power series expansion at x=-e for (21). Then, the first approximation for the upper branch of Lambert W is(24)W~0,1x=-W~Tx-1W~Tx,Next, the TF for the next two approximations are(25)W~0,2=a0ln⁡1+xa1+xa2+xa3+xa4+a5x,and(26)W~0,3=a0ln⁡1+xa1+xa2+xa3+xa4+xa5+xa6+xa7+xa8+a9x.For the last approximation, we propose the following transform:(27)WT1X=W0exp⁡1-XX-1.Then, we calculate the order 5 power series expansion of (27) and replace X=1/(1+ln(1+x)); it results in(28)
W
~
0,4
x
=
1
k
0
-
1
-
k
1
+
1
+
k
1
+
-
1
2
+
1
2
k
1
2
+
-
1
6
+
-
1
+
-
1
2
+
1
3
k
1
k
1
k
1
k
0
k
0
k
0
k
0
=
1
1
+
ln
⁡
1
+
x
,
k
1
=
ln
⁡
1
k
0
,
x
≥
20000
.In summary, the upper branch is approximated by(29)W~0x=W~0,1x-exp⁡-1≤x<1,W~0,2x1≤x<40,W~0,3x40≤x<20000,W~0,4xx≥20000.Numerical PSEM approximationsW~0,1(x), W~0,2(x), and W~0,3(x) are (A.4), (A.5), and (A.6), respectively (see Appendix A).


## 3.1. Lower Branch Treatment

The lower branch will be segmented into three pieces. For the first approximation, we propose(15)W~-1,1=αβx+1e-1,α=xa1+xa2+xa3+a4x,β=1+xb1+xb2+xb3+xb4+b5x,where constantsa1⋯,a4 and b1,…,b5 will be determined by the PSEM procedure. In order to obtain an accurate approximation, we propose to obtain build 4 equations for W-1(x), W-1′(x),…,W-1′′′(x) evaluating them at x=-0.355 and other 5 equations for W-1(x), W-1′(x),…,W-1(iv)(x) evaluating them at x=-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(16)W~-1,2=xa1+xa2+xa3+a4x1+xb1+xb2+xb3+b4x,and(17)W~-1,3=xa1+xa2+a3x1+xb1+xb2+b3x+W~-1,ax,where(18)W~-1,ax=k0-k1+k1k0,k0=ln⁡-x,k1=ln⁡-k0.It is important to note thatW~-1,a is obtained by calculating the order two power series expansion at X=0 for(19)W-1-exp⁡-1X=-1X-ln⁡1X-Xln⁡1X,and transforming (19) using X=-1/ln(-x), we obtain (18).In summary, the lower branch is approximated (see (A.1)-(A.3) in Appendix A) by(20)W~-1x=W~-1,1x-exp⁡-1≤x<-0.34,W~-1,2x-0.34≤x<-0.1,W~-1,3x-0.1≤x≤0.


## 3.2. Upper Branch Treatment

The upper branch is divided into four segments. First, we propose the following transform:(21)WTx=11+W0x,Then, the proposed trial function to apply PSEM to (21) is(22)WT~x=a0+xa1+a2x1+xb1+xb2+b3xx+1e+W~T,ax,with(23)W~T,ax=-2ex+112+8Z24Z,Z=1+ex,where W~T,a is obtained by calculating the order four power series expansion at x=-e for (21). Then, the first approximation for the upper branch of Lambert W is(24)W~0,1x=-W~Tx-1W~Tx,Next, the TF for the next two approximations are(25)W~0,2=a0ln⁡1+xa1+xa2+xa3+xa4+a5x,and(26)W~0,3=a0ln⁡1+xa1+xa2+xa3+xa4+xa5+xa6+xa7+xa8+a9x.For the last approximation, we propose the following transform:(27)WT1X=W0exp⁡1-XX-1.Then, we calculate the order 5 power series expansion of (27) and replace X=1/(1+ln(1+x)); it results in(28)
W
~
0,4
x
=
1
k
0
-
1
-
k
1
+
1
+
k
1
+
-
1
2
+
1
2
k
1
2
+
-
1
6
+
-
1
+
-
1
2
+
1
3
k
1
k
1
k
1
k
0
k
0
k
0
k
0
=
1
1
+
ln
⁡
1
+
x
,
k
1
=
ln
⁡
1
k
0
,
x
≥
20000
.In summary, the upper branch is approximated by(29)W~0x=W~0,1x-exp⁡-1≤x<1,W~0,2x1≤x<40,W~0,3x40≤x<20000,W~0,4xx≥20000.Numerical PSEM approximationsW~0,1(x), W~0,2(x), and W~0,3(x) are (A.4), (A.5), and (A.6), respectively (see Appendix A).


## 4. Iterative Scheme to Improve Accuracy

In [74] an easy computable iterative algorithm was proposed to increase the accuracy of W(x) approximation. The iterative formula is given by(30)Wn+1=Wn1+en,where n is number of iterations, en is(31)en=zn1+Wn21+Wn1+Wn+2/3zn-zn21+Wn1+Wn+2/3zn-2zn,and(32)zn=ln⁡xWn-Wn.The error term for this iterative scheme isO(en4) [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 W. If more significant digits are required, user can add more iterations to the scheme. The significant digits were calculated using(33)Significant  digits=-log10Wx-W~xWx.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 W0>15 than all the other approximations.Figure 2
Significant digits for (20) and the ones reported at [7, 10] after a single pass of iterative scheme of (30).Figure 3
Significant digits for (29) and other ones reported at [7, 11, 12] after a single pass of iterative scheme of (30) for the interval of x=[-exp(-1),0].Figure 4
Significant digits for (29) and other ones reported at [7, 11, 12] after a single pass of iterative scheme of (30) for the interval of x=[0,1E12].


### 4.1. Computation Time Measurement

A computation time (CPU time) comparison among our approximation and other ones from literature was performed using Fortran 77/90, using as compiler the gcc 5.4.0 with level 3 of optimization. The computer used for the simulations was an Intel Core Pentium(R) CPU 2117U × 2 running at 1.80GHz under Linux Ubuntu 16.04. In order to circumvent the operative system instabilities, the time measurement was determined by the average time of 10 million of evaluations for each point. It is important to note in Figure5 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 W(x) 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 W. 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.Figure 5
Computation time (CT) forW~-1(x) and W~0(x).
(a)
C.T.W-1(x) (b)
C.T. forW0(x)


## 4.1. Computation Time Measurement

A computation time (CPU time) comparison among our approximation and other ones from literature was performed using Fortran 77/90, using as compiler the gcc 5.4.0 with level 3 of optimization. The computer used for the simulations was an Intel Core Pentium(R) CPU 2117U × 2 running at 1.80GHz under Linux Ubuntu 16.04. In order to circumvent the operative system instabilities, the time measurement was determined by the average time of 10 million of evaluations for each point. It is important to note in Figure5 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 W(x) 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 W. 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.Figure 5
Computation time (CT) forW~-1(x) and W~0(x).
(a)
C.T.W-1(x) (b)
C.T. forW0(x)


## 5. Case Studies

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


### 5.1. 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 melons was reported. After some assumptions the authors of [76] obtain the optimal transfer batch quantity as(34)Q∗=-pαW-1Kαexp⁡αtr+βtj-1Vp-1e+1.where the batch transfer cost is K [$], the batch transfer time is tr [h], the time in the cold chain is tj  [indays], the value of the melons at picking is V, the deterioration rate at a field temperature at 30°C is α  [hour], the deterioration rate in the cold chain is β  [perday], and the picking rate is p  [cartons/h].As an example obtained from [76], we assume the values for V=$7, α=0.03h, tr=1/2h, K=$75, tj=5days, β=0.02 per day. Allowing the picking rate to vary between 1 and 120 cartons per hour producing an optimal transfer batch quantity, Q∗, which is shown in Figure 6, where we have plotted (34) using our proposal and the exact numerical Lambert W based solution from Maple 18.Figure 6
Approximate and exact optimal transfer batch quantityQ∗.


### 5.2. Application on Extremes of the Sagdeev Pseudo-Potential

After several assumptions and manipulations, the electrostatic potentialφ solution [77] is obtained as(35)φ1=12v02+W-1σ2exp⁡-v02,and(36)φ2=12v02+W0σ2exp⁡-v02,where the first and second roots correspond, respectively, to the maximum and minimum in the pseudo-potential, in terms of both real branches of LambertW. v0 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(v02-1) in (35) and (36).Figure 7
Contour plot of the rootsφ1 and φ2 as functions of the parameter σ.
(a)
Contour plot of the roots forφ1 and φ2 (b)
Locus of conjugation pointsσThe conjugation points separate the (upper) region of the rootφ1, corresponding to the maximum in the pseudo-potential, from the (lower) region of the root φ2, corresponding to the minimum in the pseudo-potential.


## 5.1. 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 melons was reported. After some assumptions the authors of [76] obtain the optimal transfer batch quantity as(34)Q∗=-pαW-1Kαexp⁡αtr+βtj-1Vp-1e+1.where the batch transfer cost is K [$], the batch transfer time is tr [h], the time in the cold chain is tj  [indays], the value of the melons at picking is V, the deterioration rate at a field temperature at 30°C is α  [hour], the deterioration rate in the cold chain is β  [perday], and the picking rate is p  [cartons/h].As an example obtained from [76], we assume the values for V=$7, α=0.03h, tr=1/2h, K=$75, tj=5days, β=0.02 per day. Allowing the picking rate to vary between 1 and 120 cartons per hour producing an optimal transfer batch quantity, Q∗, which is shown in Figure 6, where we have plotted (34) using our proposal and the exact numerical Lambert W based solution from Maple 18.Figure 6
Approximate and exact optimal transfer batch quantityQ∗.


## 5.2. Application on Extremes of the Sagdeev Pseudo-Potential

After several assumptions and manipulations, the electrostatic potentialφ solution [77] is obtained as(35)φ1=12v02+W-1σ2exp⁡-v02,and(36)φ2=12v02+W0σ2exp⁡-v02,where the first and second roots correspond, respectively, to the maximum and minimum in the pseudo-potential, in terms of both real branches of LambertW. v0 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(v02-1) in (35) and (36).Figure 7
Contour plot of the rootsφ1 and φ2 as functions of the parameter σ.
(a)
Contour plot of the roots forφ1 and φ2 (b)
Locus of conjugation pointsσThe conjugation points separate the (upper) region of the rootφ1, corresponding to the maximum in the pseudo-potential, from the (lower) region of the root φ2, corresponding to the minimum in the pseudo-potential.


## 6. Discussion

PSEM procedure produces compact and high accurate approximations as depicted in Figures2, 3, and 4. Furthermore, as a reference for convergence of PSEM, we use the root mean square error defined as(37)Erms=1b-a∫abEt2dt,where E(t) means relative error and a and b 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 W function as the numerical values obtained from the built-in command from Maple 18.Figure8 depicts the Erms error for each branch approximations, using several i-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 Erms error reduces its value significantly showing the good convergence of the PSEM procedure.Table 1
Trial (i-th) functions (TF) for PSEM for W~-1,1(x), W~-1,2(x) and W~-1,3(x).
TF Approximation  i W ~ - 1,1 ( x )  1 L ( x ) - 1  2 a 1 x b 1 x + 1 L ( x ) - 1  3 a 1 x b 2 x 2 + b 1 x + 1 L ( x ) - 1  4 a 2 x 2 + a 1 x b 2 x 2 + b 1 x + 1 L ( x ) - 1  5 a 3 x 3 + a 2 x 2 + a 1 x b 3 x 3 + b 2 x 2 + b 1 x + 1 L ( x ) - 1  6 a 3 x 3 + a 2 x 2 + a 1 x b 4 x 4 + b 3 x 3 + b 2 x 2 + b 1 x + 1 L ( x ) - 1  7 a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x b 4 x 4 + b 3 x 3 + b 2 x 2 + b 1 x + 1 L ( x ) - 1  8 a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x b 5 x 5 + b 4 x 4 + b 3 x 3 + b 2 x 2 + b 1 x + 1 L ( x ) - 1   i W ~ - 1,2 ( x )  1 a 1 x b 1 x + 1  2 a 1 x b 2 x 2 + b 1 x + 1  3 a 2 x 2 + a 1 x b 2 x 2 + b 1 x + 1  4 a 2 x 2 + a 1 x b 3 x 3 + b 2 x 2 + b 1 x + 1  5 a 3 x 3 + a 2 x 2 + a 1 x b 3 x 3 + b 2 x 2 + b 1 x + 1  6 a 3 x 3 + a 2 x 2 + a 1 x b 4 x 4 + b 3 x 3 + b 2 x 2 + b 1 x + 1  7 a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x b 4 x 4 + b 3 x 3 + b 2 x 2 + b 1 x + 1   i W ~ - 1,3 ( x )  1 Q ( x )  2 a 1 x b 1 x + 1 + Q ( x )  3 a 1 x b 2 x 2 + b 1 x + 1 + Q ( x )  4 a 2 x 2 + a 1 x b 2 x 2 + b 1 x + 1 + Q ( x )  5 a 2 x 2 + a 1 x b 3 x 3 + b 2 x 2 + b 1 x + 1 + Q ( x )  6 a 3 x 3 + a 2 x 2 + a 1 x b 3 x 3 + b 2 x 2 + b 1 x + 1 + Q ( x ) ♣L(x)=(x+exp(-1)). ♠Q(x)=ln(-x)-ln(-ln(-x))+ln(-ln(-x))/ln(-x).Table 2
Trial (i-th) functions (TF) for PSEM for W~0,1(x), W~0,2(x) and W~0,3(x).
TF Approximation  i W ~ 0,1 ( x )  1 A ( x )  2 a 0 b 1 x + 1 B ( x ) + A ( x )  3 a 1 x + a 0 b 1 x + 1 B ( x ) + A ( x )  4 a 1 x + a 0 b 2 x 2 + b 1 x + 1 B ( x ) + A ( x )  5 a 1 x 2 + a 1 x + a 0 b 2 x 2 + b 1 x + 1 B ( x ) + A ( x )  6 a 1 x 2 + a 1 x + a 0 b 3 x 3 + b 2 x 2 + b 1 x + 1 B ( x ) + A ( x )   i W ~ 0,2 ( x )  1 a 0 l n ( a 1 x + 1 )  2 a 0 l n ( a 2 x 2 + a 1 x + 1 )  3 a 0 l n ( a 3 x 3 + a 2 x 2 + a 1 x + 1 )  4 a 0 l n ( a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x + 1 )  5 a 0 l n ( a 5 x 5 + a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x + 1 )   i W ~ 0,3 ( x )  1 a 0 l n ( a 1 x + 1 )  2 a 0 l n ( a 2 x 2 + a 1 x + 1 )  3 a 0 l n ( a 3 x 3 + a 2 x 2 + a 1 x + 1 )  4 a 0 l n ( a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x + 1 )  5 a 0 l n ( a 5 x 5 + a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x + 1 )  6 a 0 l n ( a 6 x 6 + a 5 x 5 + a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x + 1 )  7 a 0 l n ( a 7 x 7 + a 6 x 6 + a 5 x 5 + a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x + 1 )  8 a 0 l n ( a 8 x 8 + a 7 x 7 + a 6 x 6 + a 5 x 5 + a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x + 1 )  9 a 0 l n ( a 9 x 9 + a 8 x 8 + a 7 x 7 + a 6 x 6 + a 5 x 5 + a 4 x 4 + a 3 x 3 + a 2 x 2 + a 1 x + 1 ) ♣A(x)=-2ex-112+161+ex/2ex-112-81+ex, B(x)=x+1/e.Figure 8
E r m s for the different i trial functions for PSEM.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].


## 7. Concluding Remarks

In this article piece-wise approximations for both branches of LambertW 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 our proposal is fast in comparison with other approximations from literature. Even more, the significant digits from our proposal are fully compatible with the double float format from C/C++ concluding that our approximations can be applied to practical problems as the study cases of this work.



---

*Source: 8267951-2019-03-03.xml*