Lambert W function

From testwiki
Jump to navigation Jump to search

Template:Short description Template:Use American English

The product logarithm Lambert W function plotted in the complex plane from −2 − 2i to 2 + 2i
The product logarithm Lambert W function plotted in the complex plane from Template:Math to Template:Math
The graph of Template:Math for real Template:Math and Template:Math. The upper branch (blue) with Template:Math is the graph of the function Template:Math (principal branch), the lower branch (magenta) with Template:Math is the graph of the function Template:Math. The minimum value of Template:Math is at Template:Math

In mathematics, the Lambert Template:Mvar function, also called the omega function or product logarithm,[1] is a multivalued function, namely the branches of the converse relation of the function Template:Math, where Template:Mvar is any complex number and Template:Math 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 Template:Mvar function per se in 1783.Template:Citation needed

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

wew=z

holds if and only if

w=Wk(z)   for some integer k.

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

yey=x

can be solved for Template:Math only if Template:Math; yields Template:Math if Template:Math and the two values Template:Math and Template:Math if Template:Math.

The Lambert Template:Mvar function's branches cannot be expressed in terms of elementary functions.[2] 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 Template:Math. 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 Template:Mvar function.

Main branch of the Lambert Template:Mvar function in the complex plane, plotted with domain coloring. Note the branch cut along the negative real axis, ending at Template:Math.
The modulus of the principal branch of the Lambert Template:Mvar function, colored according to Template:Math

Terminology

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

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

History

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

The equation Lambert considered was

x=xm+q.

Euler transformed this equation into the form

xaxb=(ab)cxa+b.

Both authors derived a series solution for their equations.

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

lnx=cxa.

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

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

In 1993, it was reported that the Lambert Template:Tmath function provides an exact solution to the quantum-mechanical double-well Dirac delta function model for equal charges[6]—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."[3][7]

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

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

Elementary properties, branches and range

File:Lambert W Range.pdf
The range of the Template:Mvar function, showing all branches. The black curves (including the real axis) form the image of the real axis, the orange curves are the image of the imaginary axis. The purple curve and circle are the image of a small circle around the point Template:Math; the red curves are the image of a small circle around the point Template:Math.
Plot of the imaginary part of Template:Math for branches Template:Math. The plot is similar to that of the multivalued complex logarithm function except that the spacing between sheets is not constant and the connection of the principal sheet is different

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

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

The functions Template:Math are all injective and their ranges are disjoint. The range of the entire multivalued function Template:Mvar 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 Template:Math. Template:Clear

Inverse

Regions of the complex plane for which Template:Math, where Template:Math. The darker boundaries of a particular region are included in the lighter region of the same color. The point at Template:Math is included in both the Template:Math (blue) region and the Template:Math (gray) region. Horizontal grid lines are in multiples of Template:Math.

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

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

zez=(x+iy)ex(cosy+isiny)=ex(xcosyysiny)+iex(xsiny+ycosy)

For n0, the branch cut for Template:Tmath is the non-positive real axis, so that

xsiny+ycosy=0x=y/tan(y),

and

(xcosyysiny)ex0.

For n=0, the branch cut for Template:Tmath is the real axis with <z1/e, so that the inequality becomes

(xcosyysiny)ex1/e.

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

Calculus

Derivative

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

z(1+W)dWdz=Wfor z1e.

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

dWdz=W(z)z(1+W(z))for z∉{0,1e}.

Using the identity Template:Math, gives the following equivalent formula:

dWdz=1z+eW(z)for z1e.

At the origin we have

W'0(0)=1.

The n-th derivative of Template:Mvar is of the form:

dnWdzn=Pn(W(z))(z+eW(z))n(W(z)+1)n1for n>0,z1e.

Where Template:Math is a polynomial function with coefficients defined in Template:OEIS link. If and only if Template:Mvar is a root of Template:Math then Template:Math is a root of the n-th derivative of Template:Mvar.

Taking the derivative of the n-th derivative of Template:Mvar yields:

dn+1Wdzn+1=(W(z)+1)Pn(W(z))+(13nnW(z))Pn(W(z))(n+eW(z))n+1(W(z)+1)nfor n>0,z1e.

Inductively proving the n-th derivative equation.

Integral

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

W(x)dx=xW(x)x+eW(x)+C=x(W(x)1+1W(x))+C.

(The last equation is more common in the literature but is undefined at Template:Math). One consequence of this (using the fact that Template:Math) is the identity

0eW0(x)dx=e1.

Asymptotic expansions

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

W0(x)=n=1(n)n1n!xn=xx2+32x3166x4+12524x5.

The radius of convergence is Template:Math, 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 Template:Open-closed; this holomorphic function defines the principal branch of the Lambert Template:Mvar function.

For large values of Template:Mvar, Template:Math is asymptotic to

W0(x)=L1L2+L2L1+L2(2+L2)2L12+L2(69L2+2L22)6L13+L2(12+36L222L22+3L23)12L14+=L1L2+l=0m=1(1)l[l+ml+1]m!L1lmL2m,

where Template:Math, Template:Math, and Template:Math is a non-negative Stirling number of the first kind.[3] Keeping only the first two terms of the expansion,

W0(x)=lnxlnlnx+(1).

The other real branch, Template:Math, defined in the interval Template:Closed-open, has an approximation of the same form as Template:Mvar approaches zero, with in this case Template:Math and Template:Math.[3]

Integer and complex powers

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

W0(x)2=n=22(n)n3(n2)!xn=x22x3+4x4253x5+18x6.

More generally, for Template:Math, the Lagrange inversion formula gives

W0(x)r=n=rr(n)nr1(nr)!xn,

which is, in general, a Laurent series of order Template:Mvar. Equivalently, the latter can be written in the form of a Taylor expansion of powers of Template:Math:

(W0(x)x)r=erW0(x)=n=0r(n+r)n1n!(x)n,

which holds for any Template:Math and Template:Math.

Bounds and inequalities

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

Hoorfar and Hassani[10] showed that the following bound holds for Template:Math:

lnxlnlnx+lnlnx2lnxW0(x)lnxlnlnx+ee1lnlnxlnx.

They also showed the general bound

W0(x)ln(x+y1+ln(y)),

for every y>1/e and x1/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)ln(2x+11+ln(x+1)).

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

12uu<W1(eu1)<12u23ufor u>0.

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

ln(xlnx)ln(xlnx)1+ln(xlnx)ln(1lnlnxlnx)W0(x)ln(xlnx)ln((1lnlnxlnx)(1ln(1lnlnxlnx)1+ln(xlnx))).

Identities

A plot of Template:Math where blue is for Template:Math and red is for Template:Math. The diagonal line represents the intervals where Template:Math.
The product logarithm Lambert W function W 2(z) plotted in the complex plane from -2-2i to 2+2i
The product logarithm Lambert Template:Math function Template:Math plotted in the complex plane from Template:Math to Template:Math

A few identities follow from the definition:

W0(xex)=xfor x1,W1(xex)=xfor x1.

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

Some other identities:[13]

W(x)eW(x)=x,therefore:eW(x)=xW(x),eW(x)=W(x)x,enW(x)=(xW(x))n.
lnW0(x)=lnxW0(x)for x>0.[14]
W0(xlnx)=lnxandeW0(xlnx)=xfor 1ex.
W1(xlnx)=lnxandeW1(xlnx)=xfor 0<x1e.
W(x)=lnxW(x)for x1e,W(nxnW(x)n1)=nW(x)for n,x>0
(which can be extended to other Template:Mvar and Template:Mvar if the correct branch is chosen).
W(x)+W(y)=W(xy(1W(x)+1W(y)))for x,y>0.

Substituting Template:Math in the definition:[15]

W0(lnxx)=lnxfor 0<xe,W1(lnxx)=lnxfor x>e.

With Euler's iterated exponential Template:Math:

h(x)=eW(lnx)=W(lnx)lnxfor x1.

Special values

The following are special values of the principal branch: W0(π2)=iπ2 W0(1e)=1 W0(2ln2)=ln2 W0(xlnx)=lnx(x1e0.36788) W0(xx+1lnx)=xlnx(x>0) W0(0)=0

W0(1)=Ω=(dt(ett)2+π2)110.56714329 (the omega constant)

W0(1)=eW0(1)=ln1W0(1)=lnW0(1) W0(e)=1 W0(e1+e)=e W0(e2)=12 W0(enn)=1n W0(1)0.31813+1.33723i

Special values of the branch Template:Math: W1(ln22)=ln4

Representations

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

π2W0(x)=0πsin(32t)xecostsin(52tsint)12xecostcos(tsint)+x2e2costsin(12t)dtfor |x|<1e.

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

W0(x)=1π0πln(1+xsinttetcott)dt.

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

W0(x)=x1+x1+x2+5x3+17x10+133x17+1927x190+13582711x94423+.

Also, if Template:Math:[19]

W0(x)=xexpxexpx.

In turn, if Template:Math, then

W0(x)=lnxlnxlnx.

Other formulas

Definite integrals

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

0πW0(2cot2x)sec2xdx=4π.0W0(x)xxdx=22π.0W0(1x2)dx=2π.

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

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

x=ueu,dxdu=(u+1)eu.

Thus

0W0(x)xxdx=0uueuueu(u+1)eudu=0u+1ueudu=0u+1u1eudu=0u12eu2du+0u12eu2du=20(2w)12ewdw+20(2w)12ewdw(u=2w)=220w12ewdw+20w12ewdw=22Γ(32)+2Γ(12)=22(12π)+2(π)=22π.

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

Except for Template:Mvar along the branch cut Template:Open-closed (where the integral does not converge), the principal branch of the Lambert Template:Mvar function can be computed by the following integral:[20]

W0(z)=z2πππ(1νcotν)2+ν2z+νcsc(ν)eνcotνdν=zπ0π(1νcotν)2+ν2z+νcsc(ν)eνcotνdν,

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

Indefinite integrals

W(x)xdx=W(x)22+W(x)+C Template:Math proof Template:Math proof

W(AeBx)dx=W(AeBx)22B+W(AeBx)B+C Template:Math proof

W(x)x2dx=Ei(W(x))eW(x)+C Template:Math proof

Applications

Solving equations

The Lambert Template:Mvar 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 Template:Math and then to solve for Template:Mvar using the Template:Mvar function.

For example, the equation

3x=2x+2

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

(x+1) 3x=12(multiply by 3x/2) (x1) 3x1=16(multiply by 1/3) (ln3)(x1) e(ln3)(x1)=ln36(multiply by ln3)

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

(ln3)(x1)=W0(ln36)   or   (ln3)(x1)=W1(ln36)

and thus:

x=1W0(ln36)ln3=0.79011  or  x=1W1(ln36)ln3=1.44456

Generally, the solution to

x=a+becx

is:

x=a1cW(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.

Inviscid flows

Applying the unusual accelerating traveling-wave Ansatz in the form of ρ(η)=ρ(xat22) (where ρ, η, a, x and t are the density, the reduced variable, the acceleration, the spatial and the temporal variables) the fluid density of the corresponding Euler equation can be given with the help of the W function.[21]

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((H(0)1)e(H(0)1)xL),

where Template:Math is the debris flow height, Template:Mvar is the channel downstream position, Template:Mvar 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.[22]

Time-dependent flow in simple branch hydraulic systems

The principal branch of the Lambert Template:Mvar 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.[23] The Lambert Template:Mvar function provided an exact solution to the flow rate of fluid in both the laminar and turbulent regimes: Qturb=QiζiW0[ζie(ζi+βt/b)]Qlam=QiξiW0[ξie(ξi+βt/(bΓ1))] where Qi is the initial flow rate and t is time.

Neuroimaging

The Lambert Template:Mvar 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.[24]

Chemical engineering

The Lambert Template:Mvar 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 Template:Mvar 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.[25][26]

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, CL,[27][28] from the Scheil equation:

k=W0(Z)ln(1fs)CL=C0(1fs)eW0(Z)Z=CSC0(1fs)ln(1fs)

Materials science

The Lambert Template:Mvar 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 Template:Mvar for this problem, the critical thickness had to be determined via solving an implicit equation. Lambert Template:Mvar turns it in an explicit equation for analytical handling with ease.[29]

Semiconductor

It was shown that a W-function describes the relation between voltage, current and resistance in a diode.[30]

Porous media

The Lambert Template:Mvar 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.[31]

Bernoulli numbers and Todd genus

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

Y=X1eX

can be solved by means of the two real branches Template:Math and Template:Math:

X(Y)={W1(YeY)W0(YeY)=YW0(YeY)for Y<1,W0(YeY)W1(YeY)=YW1(YeY)for 1<Y<0.

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

Statistics

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

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 Template:Math function.[35][36][37]

Exact solutions of the Schrödinger equation

The Lambert Template:Mvar 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=V01+W(exσ).

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[38]

z=W(exσ).

The Lambert Template:Mvar 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

In Quantum chromodynamics, the quantum field theory of the Strong interaction, the coupling constant αs is computed perturbatively, the order n corresponding to Feynman diagrams including n quantum loops.[39] The first order, Template:Math, solution is exact (at that order) and analytical. At higher orders, Template:Math, there is no exact and analytical solution and one typically uses an iterative method to furnish an approximate solution. However, for second order, Template:Math, the Lambert function provides an exact (if non-analytical) solution.[39]

Exact solutions of the Einstein vacuum equations

In the Schwarzschild metric solution of the Einstein vacuum equations, the Template:Mvar 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 Template:Mvar function.[40]

Thermodynamic equilibrium

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

lnK=aT+b+clnT

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

a=(blnK)T+cTlnT=(blnK)eL+cLeLac=(blnKc+L)eLaceblnKc=(L+blnKc)eL+blnKcL=W(aceblnKc)+lnKbcT=exp(W(aceblnKc)+lnKbc).

If Template:Mvar and Template:Mvar have the same sign there will be either two solutions or none (or one if the argument of Template:Mvar is exactly Template:Math). (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 Template:Mvar functions.[41]

Wien's displacement law in a D-dimensional universe

Wien's displacement law is expressed as νmax/T=α=const. With x=hνmax/kBT and dρT(x)/dx=0, where ρT is the spectral energy energy density, one finds ex=1xD, where D is the number of degrees of freedom for spatial translation. The solution x=D+W(DeD) shows that the spectral energy density is dependent on the dimensionality of the universe.[42]

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 Template:Mvar function.[43][44]

Epidemiology

In the Template:Math limit of the SIR model, the proportion of susceptible and recovered individuals has a solution in terms of the Lambert Template:Mvar function.[45]

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 Template:Math function.[46]

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 Template:Math (where Template:Mvar and Template:Mvar clump together the geometrical and physical factors of the problem), which is solved by the Lambert Template:Mvar function. The first solution to this problem, due to Sommerfeld circa 1898, already contained an iterative method to determine the value of the Lambert Template:Mvar function.[47]

Orthogonal trajectories of real ellipses

The family of ellipses x2+(1ε2)y2=ε2 centered at (0,0) is parameterized by eccentricity ε. The orthogonal trajectories of this family are given by the differential equation (1y+y)dy=(1xx)dx whose general solution is the family y2=W0(x2exp(2Cx2)).

Generalizations

The standard Lambert Template:Mvar function expresses exact solutions to transcendental algebraic equations (in Template:Mvar) of the form: Template:NumBlk where Template:Math, Template:Mvar and Template:Mvar are real constants. The solution is x=r+1cW(cecra0). Generalizations of the Lambert Template:Mvar function[48][49][50] include:

Applications of the Lambert Template:Mvar function in fundamental physical problems are not exhausted even for the standard case expressed in (Template:EquationNote) as seen recently in the area of atomic, molecular, and optical physics.[54]

Plots

Numerical evaluation

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

wj+1=wjwjewjzewj+wjewj.

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

wj+1=wjwjewjzewj(wj+1)(wj+2)(wjewjz)2wj+2

given in Corless et al.[3] to compute Template:Mvar.

For real x1/e, it may be approximated by the quadratic-rate recursive formula of R. Iacono and J.P. Boyd:[12]

wn+1(x)=wn(x)1+wn(x)(1+log(xwn(x))).

Lajos Lóczi proves[55] that by using this iteration with an appropriate starting value w0(x),

  • For the principal branch W0:
    • if x(e,): w0(x)=log(x)log(log(x)),
    • if x(0,e): w0(x)=x/e,
    • if x(1/e,0): w0(x)=exlog(1+1+ex)1+ex+1+ex,
  • For the branch W1:
    • if x(1/4,0): w0(x)=log(x)log(log(x)),
    • if x(1/e,1/4]: w0(x)=121+ex,

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

  • if x(e,) (Theorem 2.4): 0<W0(x)wn(x)<(log(1+1/e))2n,
  • if x(0,e) (Theorem 2.9): 0<W0(x)wn(x)<(11/e)2n15,
  • if x(1/e,0):
    • for the principal branch W0 (Theorem 2.17): 0<wn(x)W0(x)<(1/10)2n,
    • for the branch W1(Theorem 2.23): 0<W1(x)wn(x)<(1/2)2n.


Toshio Fukushima has presented a fast method for approximating the real valued parts of the principal and secondary branches of the Template:Mvar function without using any iteration.[56] In this method the Template:Mvar function is evaluated as a conditional switch of rational functions on transformed variables: W0(z)={Xk(x),(zk1<=z<zk,k=1,2,,17),Uk(u),(zk1<=z<zk,k=18,19), W1(z)={Yk(y),(zk1<=z<zk,k=1,2,,7),Vk(u),(zk1<=z<zk,k=8,9,10), where Template:Mvar, Template:Mvar, Template:Mvar and Template:Mvar are transformations of Template:Mvar:

x=z+1/e,u=lnz,y=z/(x+1/e),v=ln(z).

Here Xk(x), Uk(u), Yk(y), and Vk(v) are rational functions whose coefficients for different Template:Mvar-values are listed in the referenced paper together with the zk values that determine the subdomains. With higher degree polynomials in these rational functions the method can approximate the Template:Mvar function more accurately.

For example, when 1/ez2.0082178115844727, W0(z) can be approximated to 24 bits of accuracy on 64-bit floating point values as W0(z)X1(x)=i4Pixii3Qixi where Template:Mvar is defined with the transformation above and the coefficients Pi and Qi are given in the table below.

Coefficients
i Pi Qi
0 Template:Val 1
1 Template:Val Template:Val
2 Template:Val Template:Val
3 Template:Val Template:Val
4 Template:Val 0

Fukushima also offers an approximation with 50 bits of accuracy on 64-bit floats that uses 8th- and 7th-degree polynomials.

Software

The Lambert Template:Mvar function is implemented in many programming languages. Some of them are listed below:

Language Function name Required library
C/C++ gsl_sf_lambert_W0 and gsl_sf_lambert_Wm1 Special functions section of the GNU Scientific Library (GSL)[57]
lambert_w0, lambert_wm1, lambert_w0_prime, and lambert_wm1_prime Boost C++ libraries[58]
LambertW LambertW-function[59]
GP lambertw
Julia lambertw LambertW[60]
Maple LambertW[61]
Mathematica ProductLog (with LambertW as a silent alias)[62]
Matlab lambertw[63]
Maxima lambert_w[64]
Octave lambertw specfun[65]
PARI glambertW, lambertWC, glambertW_i, mplambertW, lambertW
Perl LambertW ntheory[66]
Python lambertw scipy[67]
R lambertW0 and lambertWm1 lamW[68]
Rust lambert_w0 and lambert_wm1 lambert_w[69]

See also

Notes

Template:Reflist

References

Template:Commons category

  1. Template:Citation
  2. Template:Citation.
  3. 3.0 3.1 3.2 3.3 3.4 Template:Cite journal
  4. Lambert J. H., "Observationes variae in mathesin puram", Acta Helveticae physico-mathematico-anatomico-botanico-medica, Band III, 128–168, 1758.
  5. 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.
  6. Template:Cite journal
  7. Template:Cite journal
  8. Template:Cite book
  9. Template:Cite journal
  10. 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.
  11. Template:Cite journal
  12. 12.0 12.1 Template:Cite journal
  13. Template:Cite web
  14. Template:Cite web
  15. 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: [2] 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.
  16. Template:Cite book
  17. Template:Cite journal See Theorem 3.4, p. 821 of published version (p. 5 of preprint).
  18. Template:Cite book
  19. Template:Cite book
  20. Template:Cite web
  21. Template:Cite journal
  22. Template:Cite journal
  23. Template:Cite journal
  24. Template:Cite journal
  25. Template:Cite journal
  26. Template:Cite journal
  27. Template:Cite journal https://doi.org/10.1016/j.jcrysgro.2014.03.028
  28. Template:Cite journal https://doi.org/10.1016/j.jcrysgro.2024.127605
  29. Template:Cite journal
  30. Template:Cite journal
  31. Template:Cite journal([3])
  32. D. J. Jeffrey and J. E. Jankowski, "Branch differences and Lambert W"
  33. Template:Cite journal
  34. F. Nielsen, "Jeffreys Centroids: A Closed-Form Expression for Positive Histograms and a Guaranteed Tight Approximation for Frequency Histograms"
  35. https://arxiv.org/abs/2005.03051 J. Batson et al., "A COMPARISON OF GROUP TESTING ARCHITECTURES FOR COVID-19 TESTING".
  36. A.Z. Broder, "A Note on Double Pooling Tests".
  37. Template:Cite journal
  38. A.M. Ishkhanyan, "The Lambert W barrier – an exactly solvable confluent hypergeometric potential".
  39. 39.0 39.1 Template:Cite journal
  40. Template:Cite journal
  41. Template:Cite journal
  42. Template:Cite journal
  43. Template:Cite journal
  44. Template:Cite journal
  45. Template:Cite web
  46. Template:Cite journal
  47. Template:Cite journal
  48. Template:Cite journal
  49. Template:Cite journal
  50. Template:Cite journal
  51. Template:Cite journal
  52. Template:Cite journal
  53. Template:Cite journal
  54. Template:Cite journal
  55. Template:Cite journal
  56. Template:Cite web
  57. Template:Cite web
  58. Template:Cite web
  59. Template:Citation
  60. Template:Cite web
  61. Template:Cite web
  62. ProductLog - Wolfram Language Reference
  63. lambertw – MATLAB
  64. Maxima, a Computer Algebra System
  65. Template:Cite web
  66. ntheory - MetaCPAN
  67. Template:Cite web
  68. Template:Citation
  69. Template:Citation