Lambert W function explained

In mathematics, the Lambert function, also called the omega function or product logarithm, is a multivalued function, namely the branches of the converse relation of the function, where is any complex number and is the exponential function. The function is named after Johann Lambert, who considered a related problem in 1758. Building on Lambert's work, Leonhard Euler described the function per se in 1783.

For each integer there is one branch, denoted by, which is a complex-valued function of one complex argument. is known as the principal branch. These functions have the following property: if and are any complex numbers, then

wew=z

holds if and only if

w=Wk(z)  forsomeintegerk.

When dealing with real numbers only, the two branches and suffice: for real numbers and the equation

yey=x

can be solved for only if ; gets if and the two values and if .

The Lambert function's branches cannot be expressed in terms of elementary functions.[1] It is useful in combinatorics, for instance, in the enumeration of trees. It can be used to solve various equations involving exponentials (e.g. the maxima of the Planck, Bose–Einstein, and Fermi–Dirac distributions) and also occurs in the solution of delay differential equations, such as . In biochemistry, and in particular enzyme kinetics, an opened-form solution for the time-course kinetics analysis of Michaelis–Menten kinetics is described in terms of the Lambert function.

Terminology

The principal branch is denoted in the Digital Library of Mathematical Functions, and the branch is denoted there.

The notation convention chosen here (with and) follows the canonical reference on the Lambert function by Corless, Gonnet, Hare, Jeffrey and Knuth.[2]

The name "product logarithm" can be understood as this: Since the inverse function of is called the logarithm, it makes sense to call the inverse "function" of the product as "product logarithm". (Technical note: like the complex logarithm, it is multivalued and thus W is described as the converse relation rather than inverse function.) It is related to the omega constant, which is equal to .

History

Lambert first considered the related Lambert's Transcendental Equation in 1758,[3] which led to an article by Leonhard Euler in 1783[4] that discussed the special case of .

The equation Lambert considered was

x=xm+q.

Euler transformed this equation into the form

xa-xb=(a-b)cxa.

Both authors derived a series solution for their equations.

Once Euler had solved this equation, he considered the case . Taking limits, he derived the equation

lnx=cxa.

He then put and obtained a convergent series solution for the resulting equation, expressing in terms of .

After taking derivatives with respect to and some manipulation, the standard form of the Lambert function is obtained.

In 1993, it was reported that the Lambert function provides an exact solution to the quantum-mechanical double-well Dirac delta function model for equal charges[5] —a fundamental problem in physics. Prompted by this, Rob Corless and developers of the Maple computer algebra system realized that "the Lambert W function has been widely used in many fields, but because of differing notation and the absence of a standard name, awareness of the function was not as high as it should have been."[6]

Another example where this function is found is in Michaelis–Menten kinetics.[7]

Although it was widely believed that the Lambert function cannot be expressed in terms of elementary (Liouvillian) functions, the first published proof did not appear until 2008.[8]

Elementary properties, branches and range

There are countably many branches of the function, denoted by, for integer ; being the main (or principal) branch. is defined for all complex numbers z while with is defined for all non-zero z. With and for all .

The branch point for the principal branch is at, with a branch cut that extends to along the negative real axis. This branch cut separates the principal branch from the two branches and . In all branches with, there is a branch point at and a branch cut along the entire negative real axis.

The functions are all injective and their ranges are disjoint. The range of the entire multivalued function is the complex plane. The image of the real axis is the union of the real axis and the quadratrix of Hippias, the parametric curve .

Inverse

The range plot above also delineates the regions in the complex plane where the simple inverse relationship is true. implies that there exists an such that, where depends upon the value of . The value of the integer changes abruptly when is at the branch cut of, which means that, except for where it is .

Defining, where and are real, and expressing in polar coordinates, it is seen that

\begin{align} zez&=(x+iy)ex(\cosy+i\siny)\\ &=ex(x\cosy-y\siny)+iex(x\siny+y\cosy)\\ \end{align}

For

n0

, the branch cut for is the non-positive real axis, so that

x\siny+y\cosy=0x=-y/\tan(y),

and

(x\cosy-y\siny)ex\leq0.

For

n=0

, the branch cut for is the real axis with

-infty<z\leq-1/e

, so that the inequality becomes

(x\cosy-y\siny)ex\leq-1/e.

Inside the regions bounded by the above, there are no discontinuous changes in, and those regions specify where the function is simply invertible, i.e. .

Calculus

Derivative

By implicit differentiation, one can show that all branches of satisfy the differential equation

z(1+W)

dW
dz

=Wforz ≠ -

1
e

.

(is not differentiable for .) As a consequence, that gets the following formula for the derivative of W:
dW
dz

=

W(z)
z(1+W(z))

forz\not\in\left\{0,-

1
e

\right\}.

Using the identity, gives the following equivalent formula:

dW
dz

=

1
z+eW(z)

forz ≠ -

1
e

.

At the origin we have

W'0(0)=1.

Integral

The function, and many other expressions involving, can be integrated using the substitution, i.e. :

\begin{align} \intW(x)dx&=xW(x)-x+eW(x)+C\\ &=x\left(W(x)-1+

1
W(x)

\right)+C. \end{align}

(The last equation is more common in the literature but is undefined at). One consequence of this (using the fact that) is the identity
e
\int
0

W0(x)dx=e-1.

Asymptotic expansions

The Taylor series of around 0 can be found using the Lagrange inversion theorem and is given by

W0(x)=\sum

infty
n=1
(-n)n-1
n!

xn=x-x2+\tfrac{3}{2}x3-\tfrac{8}{3}x4+\tfrac{125}{24}x5- … .

The radius of convergence is, as may be seen by the ratio test. The function defined by this series can be extended to a holomorphic function defined on all complex numbers with a branch cut along the interval ; this holomorphic function defines the principal branch of the Lambert function.

For large values of, is asymptotic to

\begin{align} W0(x)&=L1-L2+

L2
L1

+

L2\left(-2+L2\right)
2
2L
1

+

L-9L2+
2\right)
2L
2
2\left(6
3
6L
1

+

L+36L2-
2
22L
2
+
3\right)
3L
2
2\left(-12
4
12L
1

+\\[5pt] &=L1-L2+

infty
\sum
l=0
infty
\sum
m=1
(-1)l\left[\begin{smallmatrix
l

+m\l+1\end{smallmatrix}\right]}{m!}

-l-m
L
1
m, \end{align}
L
2
where,, and is a non-negative Stirling number of the first kind. Keeping only the first two terms of the expansion,

W0(x)=lnx-lnlnx+l{o}(1).

The other real branch,, defined in the interval, has an approximation of the same form as approaches zero, with in this case and .

Integer and complex powers

Integer powers of also admit simple Taylor (or Laurent) series expansions at zero:

2
W
0(x)

=

infty
\sum
n=2
-2\left(-n\right)n-3
(n-2)!

xn=x2-2x3+4x4-\tfrac{25}{3}x5+18x6-.

More generally, for, the Lagrange inversion formula gives

r
W
0(x)

=

infty
\sum
n=r
-r\left(-n\right)n
(n-r)!

xn,

which is, in general, a Laurent series of order . Equivalently, the latter can be written in the form of a Taylor expansion of powers of :
\left(W0(x)
x

\right)r=

-rW0(x)
e

=

infty
\sum
n=0
r\left(n+r\right)n
n!

\left(-x\right)n,

which holds for any and .

Bounds and inequalities

A number of non-asymptotic bounds are known for the Lambert function.

Hoorfar and Hassani[9] showed that the following bound holds for :

lnx-lnlnx+

lnlnx
2lnx

\leW0(x)\lelnx-lnlnx+

e
e-1
lnlnx
lnx

.

They also showed the general bound

W0(x)\leln\left(

x+y
1+ln(y)

\right),

for every

y>1/e

and

x\ge-1/e

, with equality only for

x=yln(y)

.The bound allows many other bounds to be made, such as taking

y=x+1

which gives the bound

W0(x)\leln\left(

2x+1
1+ln(x+1)

\right).

In 2013 it was proven[10] that the branch can be bounded as follows:

-1-\sqrt{2u}-u<W-1\left(-e-u-1\right)<-1-\sqrt{2u}-\tfrac{2}{3}uforu>0.

Roberto Iacono and John P. Boyd[11] enhanced the bounds as follows:

ln\left(

x
lnx

\right)-

ln
\left(x
lnx
\right)
1+ln
\left(x
lnx
\right)

ln\left(1-

lnlnx
lnx

\right)\leW0(x)\leln\left(

x
lnx

\right)-ln\left(\left(1-

lnlnx\right)\left(1-
lnx
ln\left(1-lnlnx\right)
lnx
1+ln
\left(x
lnx
\right)

\right)\right).

Identities

A few identities follow from the definition:

\begin{align} W0(xex)&=x&forx&\geq-1,\\ W-1(xex)&=x&forx&\leq-1. \end{align}

Note that, since is not injective, it does not always hold that, much like with the inverse trigonometric functions. For fixed and, the equation has two real solutions in, one of which is of course . Then, for and, as well as for and, is the other solution.

Some other identities:[12]

\begin{align} &W(x)eW(x)=x,therefore:\\[5pt] &eW(x)=

x
W(x)

,    e-W(x)=

W(x)
x

,    en=\left(

x
W(x)

\right)n. \end{align}

lnW0(x)=lnx-W0(x)forx>0.

[13]

W0\left(xlnx\right)=lnxand

W0\left(xlnx\right)
e

=xfor

1e
\leq

x.

W-1\left(xlnx\right)=lnxand

W-1\left(xlnx\right)
e

=xfor0<x\leq

1e
.

\begin{align} &W(x)=ln

x
W(x)

&&forx\geq-

1e,
\\[5pt] &

W\left(

nxn
W\left(x\right)n-1

\right)=nW(x)&&forn,x>0 \end{align}

(which can be extended to other and if the correct branch is chosen).

W(x)+W(y)=W\left(xy\left(

1
W(x)

+

1
W(y)

\right)\right)forx,y>0.

Substituting in the definition:[14]

\begin{align} W
0\left(-lnx
x

\right)&=-lnx&for0&<x\leqe,\\[5pt] W-1\left(-

lnx
x

\right)&=-lnx&forx&>e. \end{align}

With Euler's iterated exponential :

\begin{align}h(x)&=e-W(-ln\\ &=

W(-lnx)
-lnx

forx1. \end{align}

Special values

The following are special values of the principal branch:W_0\left(-\frac\right) = \fracW_0\left(-\frac\right) = -1W_0\left(2 \ln 2 \right) = \ln 2W_0\left(x \ln x \right) = \ln x \quad \left(x \geqslant \tfrac \approx 0.36788\right)W_0\left(x^ \ln x \right) = x \ln x \quad \left(x > 0\right)W_0(0) = 0

W0(1)=\Omega=

infty
\left(\int
-infty
dt
\left(et-t\right)2+\pi2

\right)-1-1 ≈ 0.56714329

(the omega constant)W_0(1) = e^ = \ln\frac = -\ln W_0(1)W_0(e) = 1W_0\left(e^\right) = eW_0\left(\frac\right) = \fracW_0\left(\frac\right) = \fracW_0(-1) \approx -0.31813+1.33723i

Special values of the branch :W_\left(-\frac\right) = -\ln 4

Representations

The principal branch of the Lambert function can be represented by a proper integral, due to Poisson:[15]

-\pi
2

W0(-x)=\int

\pi\sin\left(\tfrac32t\right)-xe\cos\sin\left(\tfrac52t-\sint\right)
1-2xe\cos\cos(t-\sint)+x2e2\cos
0

\sin\left(\tfrac12t\right)dtfor|x|<

1{e}.

Another representation of the principal branch was found by Kalugin–Jeffrey–Corless:[16]

W
0(x)=1
\pi
\piln\left(1+x\sint
t
\int
0

et\cot\right)dt.

The following continued fraction representation also holds for the principal branch:[17]

W0(x)=\cfrac{x}{1+\cfrac{x}{1+\cfrac{x}{2+\cfrac{5x}{3+\cfrac{17x}{10+\cfrac{133x}{17+\cfrac{1927x}{190+\cfrac{13582711x}{94423+\ddots}}}}}}}}.

Also, if :[18]

W0(x)=\cfrac{x}{\exp\cfrac{x}{\exp\cfrac{x}{\ddots}}}.

In turn, if, then

W0(x)=ln\cfrac{x}{ln\cfrac{x}{ln\cfrac{x}{\ddots}}}.

Other formulas

Definite integrals

There are several useful definite integral formulas involving the principal branch of the function, including the following:

\begin{align} &

\pi
\int
0

W0\left(2\cot2x\right)\sec2xdx=4\sqrt{\pi}.\\[5pt] &

infty
\int
0
W0(x)
x\sqrt{x
}\,dx = 2\sqrt. \\[5pt]& \int_0^\infty W_0\left(\frac\right)\,dx = \sqrt.\end

The first identity can be found by writing the Gaussian integral in polar coordinates.

The second identity can be derived by making the substitution, which gives

\begin{align} x&=ueu,\\[5pt]

dx
du

&=(u+1)eu. \end{align}

Thus

infty
\begin{align} \int
0
W0(x)
x\sqrt{x
}\,dx &=\int_0^\infty \frac(u+1)e^u \, du \\[5pt]&=\int_0^\infty \fracdu \\[5pt]&=\int_0^\infty \frac\fracdu\\[5pt]&=\int_0^\infty u^\tfrac12 e^du+\int_0^\infty u^ e^du\\[5pt]&=2\int_0^\infty (2w)^\tfrac12 e^ \, dw+2\int_0^\infty (2w)^ e^ \, dw && \quad (u =2w) \\[5pt]&=2\sqrt\int_0^\infty w^\tfrac12 e^ \, dw + \sqrt \int_0^\infty w^ e^ \, dw \\[5pt]&=2\sqrt \cdot \Gamma \left (\tfrac32 \right)+\sqrt \cdot \Gamma \left (\tfrac12 \right) \\[5pt]&=2\sqrt \left (\tfrac12\sqrt \right)+\sqrt\left(\sqrt\right) \\[5pt]&=2\sqrt.\end

The third identity may be derived from the second by making the substitution and the first can also be derived from the third by the substitution .

Except for along the branch cut (where the integral does not converge), the principal branch of the Lambert function can be computed by the following integral:[19]

\begin{align} W
0(z)&=z
2\pi
\pi\left(1-\nu\cot\nu\right)2+\nu2
z+\nu\csc\nue-\nu\cot\nu
\int
-\pi

d\nu\\[5pt] &=

z
\pi
\pi
\int
0
\left(1-\nu\cot\nu\right)2+\nu2
z+\nu\csc\nue-\nu\cot\nu

d\nu, \end{align}

where the two integral expressions are equivalent due to the symmetry of the integrand.

Indefinite integrals

\int \frac \, dx \; = \; \frac + W(x) + C

\int W\left(A e^\right) \, dx \; = \; \frac + \frac + C

\int \frac \, dx \; = \; \operatorname\left(- W(x) \right) - e^ + C

Applications

Solving equations

The Lambert function is used to solve equations in which the unknown quantity occurs both in the base and in the exponent, or both inside and outside of a logarithm. The strategy is to convert such an equation into one of the form and then to solve for using the function.

For example, the equation

3x=2x+2

(where is an unknown real number) can be solved by rewriting it as

\begin{align}&(x+1) 3-x=

1
2

&(multiplyby3-x/2)\\ \Leftrightarrow&(-x-1) 3-x-1=-

1
6

&(multiplyby{-}1/3)\\ \Leftrightarrow&(ln3)(-x-1)e(ln=-

ln3
6

&(multiplybyln3) \end{align}

This last equation has the desired form and the solutions for real x are:

(ln3)(-x-1)=

W
0\left(-ln3
6

\right)   rm{or}   (ln3)(-x-1)=W-1\left(

-ln3
6

\right)

and thus:

x=-1-

W\right)
0\left(-ln3
6
ln3

=-0.79011\ldots  rm{or}  x=-1-

W
\left(-ln3
6
\right)
-1
ln3

=1.44456\ldots

Generally, the solution to

x=a+becx

is:
x=a-1
c

W(-bceac)

where a, b, and c are complex constants, with b and c not equal to zero, and the W function is of any integer order.

Viscous flows

Granular and debris flow fronts and deposits, and the fronts of viscous fluids in natural events and in laboratory experiments can be described by using the Lambert–Euler omega function as follows:

H(x)=1+W\left((H(0)-1)

(H(0)-1)-x
L
e

\right),

where is the debris flow height, is the channel downstream position, is the unified model parameter consisting of several physical and geometrical parameters of the flow, flow height and the hydraulic pressure gradient.

In pipe flow, the Lambert W function is part of the explicit formulation of the Colebrook equation for finding the Darcy friction factor. This factor is used to determine the pressure drop through a straight run of pipe when the flow is turbulent.[20]

Time-dependent flow in simple branch hydraulic systems

The principal branch of the Lambert function is employed in the field of mechanical engineering, in the study of time dependent transfer of Newtonian fluids between two reservoirs with varying free surface levels, using centrifugal pumps.[21] The Lambert function provided an exact solution to the flow rate of fluid in both the laminar and turbulent regimes: \beginQ_\text &= \frac W_0\left[\zeta_i \, e^{(\zeta_i+\beta t/b)}\right]\\Q_\text &= \frac W_0\left[\xi_i \, e^{\left(\xi_i+\beta t/(b-\Gamma_1)\right)}\right]\endwhere

Qi

is the initial flow rate and

t

is time.

Neuroimaging

The Lambert function is employed in the field of neuroimaging for linking cerebral blood flow and oxygen consumption changes within a brain voxel, to the corresponding blood oxygenation level dependent (BOLD) signal.[22]

Chemical engineering

The Lambert function is employed in the field of chemical engineering for modeling the porous electrode film thickness in a glassy carbon based supercapacitor for electrochemical energy storage. The Lambert function provides an exact solution for a gas phase thermal activation process where growth of carbon film and combustion of the same film compete with each other.[23] [24]

Crystal growth

In the crystal growth, the negative principal of the Lambert W-function can be used to calculate the distribution coefficient, k, and solute concentration in the melt, C_L,[25] [26] from the Scheil equation:

\begin{align} &k=

W0(Z)
ln(1-fs)

\\ &

C
L=C0
(1-fs)
W0(Z)
e

\\ &Z=

CS
C0

(1-fs)ln(1-fs)\end{align}

Materials science

The Lambert function is employed in the field of epitaxial film growth for the determination of the critical dislocation onset film thickness. This is the calculated thickness of an epitaxial film, where due to thermodynamic principles the film will develop crystallographic dislocations in order to minimise the elastic energy stored in the films. Prior to application of Lambert for this problem, the critical thickness had to be determined via solving an implicit equation. Lambert turns it in an explicit equation for analytical handling with ease.[27]

Porous media

The Lambert function has been employed in the field of fluid flow in porous media to model the tilt of an interface separating two gravitationally segregated fluids in a homogeneous tilted porous bed of constant dip and thickness where the heavier fluid, injected at the bottom end, displaces the lighter fluid that is produced at the same rate from the top end. The principal branch of the solution corresponds to stable displacements while the −1 branch applies if the displacement is unstable with the heavier fluid running underneath the lighter fluid.[28]

Bernoulli numbers and Todd genus

The equation (linked with the generating functions of Bernoulli numbers and Todd genus):

Y=

X
1-eX
can be solved by means of the two real branches and :

X(Y)=\begin{cases} W-1\left(YeY\right)-W0\left(YeY\right)=Y-W0\left(YeY\right)&forY<-1,\\ W0\left(YeY\right)-W-1\left(YeY\right)=Y-W-1\left(YeY\right)&for-1<Y<0. \end{cases}

This application shows that the branch difference of the function can be employed in order to solve other transcendental equations.[29]

Statistics

The centroid of a set of histograms defined with respect to the symmetrized Kullback–Leibler divergence (also called the Jeffreys divergence [30]) has a closed form using the Lambert function.[31]

Pooling of tests for infectious diseases

Solving for the optimal group size to pool tests so that at least one individual is infected involves the Lambert function.[32] [33] [34]

Exact solutions of the Schrödinger equation

The Lambert function appears in a quantum-mechanical potential, which affords the fifth – next to those of the harmonic oscillator plus centrifugal, the Coulomb plus inverse square, the Morse, and the inverse square root potential – exact solution to the stationary one-dimensional Schrödinger equation in terms of the confluent hypergeometric functions. The potential is given as

V=

V0
1+W
-x
\sigma
\left(e
\right)

.

A peculiarity of the solution is that each of the two fundamental solutions that compose the general solution of the Schrödinger equation is given by a combination of two confluent hypergeometric functions of an argument proportional to[35]

z=W

-x
\sigma
\left(e

\right).

The Lambert function also appears in the exact solution for the bound state energy of the one dimensional Schrödinger equation with a Double Delta Potential.

Exact solution of QCD coupling constant

\alphas

is computed perturbatively, the order n corresponding to Feynman diagrams including n quantum loops.[36] The first order, n=1, solution is exact (at that order) and analytical. At higher orders, n>1, there is no exact and analytical solution and one typically uses an iterative method to furnish an approximate solution. However, for second order, n=2, the Lambert function provides an exact (if non-analytical) solution.

Exact solutions of the Einstein vacuum equations

In the Schwarzschild metric solution of the Einstein vacuum equations, the function is needed to go from the Eddington–Finkelstein coordinates to the Schwarzschild coordinates. For this reason, it also appears in the construction of the Kruskal–Szekeres coordinates.

Resonances of the delta-shell potential

The s-wave resonances of the delta-shell potential can be written exactly in terms of the Lambert function.[37]

Thermodynamic equilibrium

If a reaction involves reactants and products having heat capacities that are constant with temperature then the equilibrium constant obeys

lnK=

a
T

+b+clnT

for some constants,, and . When (equal to) is not zero the value or values of can be found where equals a given value as follows, where can be used for .

\begin{align} -a&=(b-lnK)T+cTlnT\\ &=(b-lnK)eL+cLe

L\\[5pt] -a
c
&=\left(
b-lnK
c
L\\[5pt] -a
c
+L\right)e
b-lnK
c
e&=\left(L+
b-lnK
c
L+b-lnK
c
\right)e\\[5pt] L&=W\left(-
a
c
b-lnK
c
e\right)+
lnK-b\\[5pt] T&=\exp\left(W\left(-
c
a
c
b-lnK
c
e\right)+
lnK-b
c

\right). \end{align}

If and have the same sign there will be either two solutions or none (or one if the argument of is exactly). (The upper solution may not be relevant.) If they have opposite signs, there will be one solution.

Phase separation of polymer mixtures

In the calculation of the phase diagram of thermodynamically incompatible polymer mixtures according to the Edmond-Ogston model, the solutions for binodal and tie-lines are formulated in terms of Lambert functions.[38]

Wien's displacement law in a D-dimensional universe

Wien's displacement law is expressed as

\numax/T=\alpha=const

. With

x=h\numax/kBT

and

d\rhoT\left(x\right)/dx=0

, where

\rhoT

is the spectral energy energy density, one finds

e-x=1-

x
D
, where

D

is the number of degrees of freedom for spatial translation. The solution

x=D+W\left(-De-D\right)

shows that the spectral energy density is dependent on the dimensionality of the universe.[39]

AdS/CFT correspondence

The classical finite-size corrections to the dispersion relations of giant magnons, single spikes and GKP strings can be expressed in terms of the Lambert function.[40] [41]

Epidemiology

In the limit of the SIR model, the proportion of susceptible and recovered individuals has a solution in terms of the Lambert function.[42]

Determination of the time of flight of a projectile

The total time of the journey of a projectile which experiences air resistance proportional to its velocity can be determined in exact form by using the Lambert function.

Electromagnetic surface wave propagation

The transcendental equation that appears in the determination of the propagation wave number of an electromagnetic axially symmetric surface wave (a low-attenuation single TM01 mode) propagating in a cylindrical metallic wire gives rise to an equation like (where and clump together the geometrical and physical factors of the problem), which is solved by the Lambert function. The first solution to this problem, due to Sommerfeld circa 1898, already contained an iterative method to determine the value of the Lambert function.[43]

Orthogonal trajectories of real ellipses

The family of ellipses

x2+(1-\varepsilon2)y2=\varepsilon2

centered at

(0,0)

is parameterized by eccentricity

\varepsilon

. The orthogonal trajectories of this family are given by the differential equation

\left(

1
y

+y\right)dy=\left(

1
x

-x\right)dx

whose general solution is the family

y2=

2\exp(-2C-x
W
0(x

2))

.

Generalizations

The standard Lambert function expresses exact solutions to transcendental algebraic equations (in) of the form:where, and are real constants. The solution is x = r + \frac W\left(\frac \right). Generalizations of the Lambert function[44] [45] [46] include:

Applications of the Lambert function in fundamental physical problems are not exhausted even for the standard case expressed in as seen recently in the area of atomic, molecular, and optical physics.[50]

Numerical evaluation

The function may be approximated using Newton's method, with successive approximations to (so) being

wj+1

=w
j-
w
wj
e
-z
j
wj
e+wj
wj
e

.

The function may also be approximated using Halley's method,

wj+1

=w
j-
w
wj
e
-z
j
wj
e\left(wj+1\right)-\dfrac{\left(wj+2\right)\left(w
wj
je
-z\right)

{2wj+2}}

given in Corless et al. to compute .

For real

x\ge-1/e

, it may be approximated by the quadratic-rate recursive formula of R. Iacono and J.P. Boyd:[11]

wn+1(x)=

wn(x)
1+wn(x)

\left(1+log\left(

x
wn(x)

\right)\right).

Lajos Lóczi proves[51] that by using this iteration with an appropriate starting value

w0(x)

,

W0:

x\in(e,infty)

:

w0(x)=log(x)-log(log(x)),

x\in(0,e):

w0(x)=x/e,

x\in(-1/e,0):

w0(x)=

exlog(1+\sqrt{1+ex
)

}{1+ex+\sqrt{1+ex}},

W-1:

x\in(-1/4,0):

w0(x)=log(-x)-log(-log(-x)),

x\in(-1/e,-1/4]:

w0(x)=-1-\sqrt{2}\sqrt{1+ex},

one can determine the maximum number of iteration steps in advance for any precision:

x\in(e,infty)

(Theorem 2.4):

0<W0(x)-wn(x)<\left(log(1+1/e)

2n
\right)

,

x\in(0,e)

(Theorem 2.9):

0<W0(x)-wn(x)<

\left(1-1/e
2n-1
\right)
5

,

x\in(-1/e,0):

W0

(Theorem 2.17):

0<wn(x)-W0(x)<\left(1/10

2n
\right)

,

W-1

(Theorem 2.23):

0<W-1(x)-wn(x)<\left(1/2

2n
\right)

.

Software

The Lambert function is implemented as LambertW in Maple,[52] lambertw in GP (and glambertW in PARI), lambertw in Matlab,[53] also lambertw in Octave with the specfun package, as lambert_w in Maxima,[54] as ProductLog (with a silent alias LambertW) in Mathematica,[55] as lambertw in Python scipy's special function package,[56] as LambertW in Perl's ntheory module,[57] and as gsl_sf_lambert_W0, gsl_sf_lambert_Wm1 functions in the special functions section of the GNU Scientific Library (GSL). In the Boost C++ libraries, the calls are lambert_w0, lambert_wm1, lambert_w0_prime, and lambert_wm1_prime. In R, the Lambert function is implemented as the lambertW0 and lambertWm1 functions in the lamW package.

C++ code for all the branches of the complex Lambert function is available on the homepage of István Mező.[58]

See also

References

External links

Notes and References

  1. .
  2. Corless. R. M. . Gonnet . G. H. . Hare . D. E. G. . Jeffrey . D. J. . Knuth . D. E. . On the LambertW function . Advances in Computational Mathematics . 329–359 . 1996 . 5 . 10.1007/BF02124750 . 29028411.
  3. Lambert J. H., "Observationes variae in mathesin puram", Acta Helveticae physico-mathematico-anatomico-botanico-medica, Band III, 128–168, 1758.
  4. Euler, L. "De serie Lambertina Plurimisque eius insignibus proprietatibus". Acta Acad. Scient. Petropol. 2, 29–51, 1783. Reprinted in Euler, L. Opera Omnia, Series Prima, Vol. 6: Commentationes Algebraicae. Leipzig, Germany: Teubner, pp. 350–369, 1921.
  5. Scott . TC . Babb . JF . Dalgarno . A . Morgan . John D . The calculation of exchange forces: General results and specific models . J. Chem. Phys. . Aug 15, 1993 . 99 . 4 . 2841–2854 . 10.1063/1.465193 . American Institute of Physics . 1993JChPh..99.2841S . English . 0021-9606.
  6. R. M. . Corless . G. H. . Gonnet . D. E. G. . Hare . D. J. . Jeffrey . Lambert's function in Maple . The Maple Technical Newsletter . 9 . 12–22 . 1993 . 10.1.1.33.2556 .
  7. Book: Mező, István . The Lambert W Function: Its Generalizations and Applications . 2022 . 10.1201/9781003168102. 9781003168102 . 247491347 .
  8. Manuel . Bronstein . Robert M. . Corless . James H. . Davenport . D. J. . Jeffrey . Algebraic properties of the Lambert function from a result of Rosenlicht and of Liouville . Integral Transforms and Special Functions . 19 . 10 . 709–712 . 2008 . 10.1080/10652460802332342 . 120069437 . https://web.archive.org/web/20151211132056/http://opus.bath.ac.uk/27004/1/Davenport_ITSF_19_10_709.pdf . 2015-12-11 . live .
  9. A. Hoorfar, M. Hassani, Inequalities on the Lambert W Function and Hyperpower Function, JIPAM, Theorem 2.7, page 7, volume 9, issue 2, article 51. 2008.
  10. Chatzigeorgiou. I. . Bounds on the Lambert function and their Application to the Outage Analysis of User Cooperation . IEEE Communications Letters . 17 . 8 . 1505–1508 . 2013 . 1601.04895. 10.1109/LCOMM.2013.070113.130972 . 10062685.
  11. Iacono . Roberto . Boyd . John P. . 2017-12-01 . New approximations to the principal real-valued branch of the Lambert W-function . Advances in Computational Mathematics . en . 43 . 6 . 1403–1436 . 10.1007/s10444-017-9530-3 . 254184098 . 1572-9044.
  12. Web site: Lambert function: Identities (formula 01.31.17.0001).
  13. Web site: Lambert W-Function.
  14. https://isa-afp.org/entries/Lambert_W.html Note: although one of the assumptions of the relevant lemma states that x must be > 1/e, inspection of said lemma reveals that this assumption is unused. The lower bound is in fact x > 0. The reason for the branch switch at e is simple: for x > 1 there are always two solutions, −ln x and another one that you'd get from the x on the other side of e that would feed the same value to W; these must crossover at x = e: https://wolframalpha.com/input/?i=plot+LambertW%280%2C-ln%28x%29%2Fx%29%3BLambertW%28-1%2C-ln%28x%29%2Fx%29x%3D0...5 Wn cannot distinguish a value of ln x/x from an x < e from the same value from the other x > e, so it cannot flip the order of its return values.
  15. Book: Finch, S. R. . Mathematical constants . 450 . 2003 . Cambridge University Press .
  16. Kalugin . German A. . Jeffrey . David J. . Corless . Robert M. . 10.1080/10652469.2011.640327 . 11 . Integral Transforms and Special Functions . 2989751 . 817–829 . Bernstein, Pick, Poisson and related integral expressions for Lambert . 23 . 2012. See Theorem 3.4, p. 821 of published version (p. 5 of preprint).
  17. Book: Dubinov. A. E. . Dubinova. I. D. . Saǐkov. S. K. . The Lambert W Function and Its Applications to Mathematical Problems of Physics (in Russian) . 53 . 2006 . RFNC-VNIIEF.
  18. Book: Robert M. . Corless . David J. . Jeffrey . Donald E. . Knuth . Proceedings of the 1997 international symposium on Symbolic and algebraic computation - ISSAC '97 . A sequence of series for the Lambert W function . 1997 . 197–204 . 10.1145/258726.258783. 978-0897918756 . 6274712 .
  19. Web site: The Lambert W Function. Ontario Research Centre for Computer Algebra.
  20. Analytical solutions for the Colebrook and White equation and for pressure drop in ideal gas flow in pipes . More, A. A. . Chemical Engineering Science . 61 . 5515–5519 . 2006 . 16 . 10.1016/j.ces.2006.04.003 . 2006ChEnS..61.5515M .
  21. Pellegrini . C. C. . Zappi . G. A. . Vilalta-Alonso . G. . 2022-05-12 . An Analytical Solution for the Time-Dependent Flow in Simple Branch Hydraulic Systems with Centrifugal Pumps . Arabian Journal for Science and Engineering . 47 . 12 . 16273–16287 . en . 10.1007/s13369-022-06864-9 . 248762601 . 2193-567X.
  22. Sotero . Roberto C. . Iturria-Medina . Yasser . From Blood oxygenation level dependent (BOLD) signals to brain temperature maps . Bull Math Biol . 73 . 11 . 2731–47 . 2011 . 10.1007/s11538-011-9645-5 . 21409512. 12080132 . Submitted manuscript .
  23. Braun . Artur . Wokaun . Alexander . Hermanns . Heinz-Guenter . Analytical Solution to a Growth Problem with Two Moving Boundaries . Appl Math Model . 27 . 1 . 47–52 . 2003 . 10.1016/S0307-904X(02)00085-9. free .
  24. Braun . Artur . Baertsch . Martin . Schnyder . Bernhard . Koetz . Ruediger . A Model for the film growth in samples with two moving boundaries – An Application and Extension of the Unreacted-Core Model. . Chem Eng Sci . 55 . 22 . 5273–5282 . 2000 . 10.1016/S0009-2509(00)00143-3.
  25. Asadian . M . Saeedi . H . Yadegari . M . Shojaee . M . Determinations of equilibrium segregation, effective segregation and diffusion coefficients for Nd+3 doped in molten YAG . Journal of Crystal Growth . June 2014 . 396 . 15 . 61–65. 10.1016/j.jcrysgro.2014.03.028 . 2014JCrGr.396...61A . https://doi.org/10.1016/j.jcrysgro.2014.03.028
  26. Asadian . M . Zabihi . F . Saeedi . H . Segregation and constitutional supercooling in Nd:YAG Czochralski crystal growth . Journal of Crystal Growth . March 2024 . 630 . 127605 . 10.1016/j.jcrysgro.2024.127605 . 2024JCrGr.63027605A . 267414096 . https://doi.org/10.1016/j.jcrysgro.2024.127605
  27. Braun . Artur . Briggs . Keith M. . Boeni . Peter . Analytical solution to Matthews' and Blakeslee's critical dislocation formation thickness of epitaxially grown thin films . J Cryst Growth . 241 . 1–2 . 231–234 . 2003 . 10.1016/S0022-0248(02)00941-7 . 2002JCrGr.241..231B.
  28. Colla . Pietro . 2014 . A New Analytical Method for the Motion of a Two-Phase Interface in a Tilted Porous Medium . PROCEEDINGS, Thirty-Eighth Workshop on Geothermal Reservoir Engineering, Stanford University . SGP-TR-202. (https://pangea.stanford.edu/ERE/pdf/IGAstandard/SGW/2014/Colla.pdf)
  29. https://web.archive.org/web/20150212084155/http://www.apmaths.uwo.ca/~djeffrey/Offprints/SYNASC2014.pdf D. J. Jeffrey and J. E. Jankowski, "Branch differences and Lambert W"
  30. Flavia-Corina Mitroi-Symeonidis . Ion Anghel . Shigeru Furuichi . Encodings for the calculation of the permutation hypoentropy and their applications on full-scale compartment fire data . Acta Technica Napocensis . 2019 . 62, IV . 607–616.
  31. https://ieeexplore.ieee.org/document/6509930 F. Nielsen, "Jeffreys Centroids: A Closed-Form Expression for Positive Histograms and a Guaranteed Tight Approximation for Frequency Histograms"
  32. https://arxiv.org/abs/2005.03051 J. Batson et al., "A COMPARISON OF GROUP TESTING ARCHITECTURES FOR COVID-19TESTING".
  33. https://arxiv.org/abs/2004.01684 A.Z. Broder, "A Note on Double Pooling Tests"
  34. Rudolf Hanel, Stefan Thurner . Boosting test-efficiency by pooled testing for SARS-CoV-2—Formula for optimal pool size . PLOS ONE . 2020 . 15, 11 . 11 . e0240652. 10.1371/journal.pone.0240652 . 33147228 . 7641378 . 2020PLoSO..1540652H . free.
  35. https://arxiv.org/abs/1509.00846 A.M. Ishkhanyan, "The Lambert W barrier – an exactly solvable confluent hypergeometric potential"
  36. 1604.08082 . 10.1016/j.ppnp.2016.04.003 . The QCD running coupling . 2016 . Deur . Alexandre . Brodsky . Stanley J. . De Téramond . Guy F. . Progress in Particle and Nuclear Physics . 90 . 1–74 . 2016PrPNP..90....1D . 118854278 .
  37. R. . de la Madrid . 2017 . Numerical calculation of the decay widths, the decay constants, and the decay energy spectra of the resonances of the delta-shell potential . Nucl. Phys. A . 962 . 24–45 . 10.1016/j.nuclphysa.2017.03.006 . 1704.00047 . 2017NuPhA.962...24D . 119218907 .
  38. Bot. A.. Dewi. B.P.C.. Venema. P.. 2021. Phase-separating binary polymer mixtures: the degeneracy of the virial coefficients and their extraction from phase diagrams. ACS Omega. 6. 11. 7862–7878. 10.1021/acsomega.1c00450. 33778298. 7992149. free.
  39. Cardoso . T. R. . de Castro . A. S. . The blackbody radiation in a -dimensional universe . Rev. Bras. Ens. Fis. . 2005 . 27 . 4 . 559–563 . 10.1590/S1806-11172005000400007. free . 11449/211894 . free .
  40. Emmanuel . Floratos . George . Georgiou . Georgios . Linardopoulos . 2014. Large-Spin Expansions of GKP Strings. JHEP . 2014. 3 . 0180. 1311.5800. 10.1007/JHEP03(2014)018. 2014JHEP...03..018F . 53355961 .
  41. Emmanuel . Floratos . Georgios . Linardopoulos . 2015. Large-Spin and Large-Winding Expansions of Giant Magnons and Single Spikes. Nucl. Phys. B . 897. 229–275. 1406.0796. 10.1016/j.nuclphysb.2015.05.021. 2015NuPhB.897..229F . 118526569 .
  42. Web site: Wolfram Research, Inc. . Mathematica, Version 12.1 . Champaign IL, 2020.
  43. J. R. G. . Mendonça . 2019 . Electromagnetic surface wave propagation in a metallic wire and the Lambert function . American Journal of Physics . 87 . 6 . 476–484 . 1812.07456 . 10.1119/1.5100943. 2019AmJPh..87..476M . 119661071 .
  44. T. C. . Scott . R. B. . Mann . 2006 . General Relativity and Quantum Mechanics: Towards a Generalization of the Lambert W Function . AAECC (Applicable Algebra in Engineering, Communication and Computing) . 17 . 1 . 41–47 . 10.1007/s00200-006-0196-1 . math-ph/0607011 . 2006math.ph...7011S . Martinez Ii . Roberto E. . 14664985 .
  45. T. C. . Scott . G. . Fee . J. . Grotendorst . 2013 . Asymptotic series of Generalized Lambert W Function . SIGSAM (ACM Special Interest Group in Symbolic and Algebraic Manipulation) . 47 . 185 . 75–83. 10.1145/2576802.2576804. 15370297 .
  46. T. C. . Scott . G. . Fee . J. . Grotendorst. W.Z. . Zhang. 2014. Numerics of the Generalized Lambert W Function. SIGSAM . 48 . 1/2. 42–56. 10.1145/2644288.2644298. 15776321 .
  47. P. S. . Farrugia . R. B. . Mann . T. C. . Scott . 2007 . N-body Gravity and the Schrödinger Equation . Class. Quantum Grav. . 24 . 18 . 4647–4659 . 10.1088/0264-9381/24/18/006 . gr-qc/0611144 . 2007CQGra..24.4647F . 119365501 .
  48. T. C. . Scott . M. . Aubert-Frécon . J. . Grotendorst . 2006 . New Approach for the Electronic Energies of the Hydrogen Molecular Ion . Chem. Phys. . 324 . 2–3 . 323–338 . 10.1016/j.chemphys.2005.10.031 . physics/0607081 . 2006CP....324..323S . 10.1.1.261.9067 . 623114 .
  49. Aude . Maignan . T. C. . Scott . 2016. Fleshing out the Generalized Lambert W Function. SIGSAM . 50 . 2. 45–60. 10.1145/2992274.2992275. 53222884 .
  50. T. C. . Scott . A. . Lüchow . D. . Bressanini . J. D. III . Morgan . 2007 . The Nodal Surfaces of Helium Atom Eigenfunctions . . 75 . 6 . 060101 . 10.1103/PhysRevA.75.060101 . 2007PhRvA..75f0101S . 11383/1679348 . https://web.archive.org/web/20170922054740/https://irinsubria.uninsubria.it/bitstream/11383/1679348/1/2007-scott-pra2007.pdf . 2017-09-22 . live . free .
  51. Lóczi . Lajos . 2022-11-15 . Guaranteed- and high-precision evaluation of the Lambert W function . Applied Mathematics and Computation . en . 433 . 127406 . 10.1016/j.amc.2022.127406 . free . 0096-3003 . 10831/89771 . free .
  52. Web site: LambertW - Maple Help.
  53. http://www.mathworks.com.au/help/toolbox/symbolic/lambertw.html lambertw – MATLAB
  54. http://maxima.sourceforge.net Maxima, a Computer Algebra System
  55. http://reference.wolfram.com/mathematica/ref/ProductLog.html ProductLog at WolframAlpha
  56. Web site: Scipy.special.lambertw — SciPy v0.16.1 Reference Guide.
  57. https://metacpan.org/pod/ntheory ntheory at MetaCPAN
  58. https://sites.google.com/site/istvanmezo81/home?authuser=0 The webpage of István Mező