Lambert W function
In-game article clicks load inline without leaving the challenge.


In mathematics, the Lambert W function, also called the omega function or product logarithm, is a multivalued function, namely the branches of the converse relation of the function f ( w ) = w e w {\displaystyle f(w)=we^{w}}, where w is any complex number and e w {\displaystyle e^{w}} 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 W function per se in 1783. Despite its early origins and wide use, its properties were not widely recognized until the 1990s thanks primarily to the work of Rob Corless.
For each integer k {\displaystyle k} there is one branch, denoted by W k ( z ) {\displaystyle W_{k}\left(z\right)}, which is a complex-valued function of one complex argument. W 0 {\displaystyle W_{0}} is known as the principal branch. These functions have the following property: if z {\displaystyle z} and w {\displaystyle w} are any complex numbers, then
w e w = z {\displaystyle we^{w}=z}
holds if and only if
w = W k ( z ) for some integer k . {\displaystyle w=W_{k}(z)\ \ {\text{ for some integer }}k.}
When dealing with real numbers only, the two branches W 0 {\displaystyle W_{0}} and W − 1 {\displaystyle W_{-1}} suffice: for real numbers x {\displaystyle x} and y {\displaystyle y} the equation
y e y = x {\displaystyle ye^{y}=x}
can be solved for y {\displaystyle y} only if x ≥ − 1 e {\textstyle x\geq {\frac {-1}{e}}}; yields y = W 0 ( x ) {\displaystyle y=W_{0}\left(x\right)} if x ≥ 0 {\displaystyle x\geq 0} and the two values y = W 0 ( x ) {\displaystyle y=W_{0}\left(x\right)} and y = W − 1 ( x ) {\displaystyle y=W_{-1}\left(x\right)} if − 1 e ≤ x < 0 {\textstyle {\frac {-1}{e}}\leq x<0}.
The Lambert W function's branches cannot be expressed in terms of elementary functions. 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 y ′ ( t ) = a y ( t − 1 ) {\displaystyle y'\left(t\right)=a\ y\left(t-1\right)}. 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 W function.


Terminology
The notation convention chosen here (with W 0 {\displaystyle W_{0}} and W − 1 {\displaystyle W_{-1}}) follows the canonical reference on the Lambert W function by Corless, Gonnet, Hare, Jeffrey and Knuth.
The name "product logarithm" can be understood as follows: since the inverse function of f ( w ) = e w {\displaystyle f\left(w\right)=e^{w}} is termed the logarithm, it makes sense to call the inverse "function" of the product w e w {\displaystyle we^{w}} 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 W 0 ( 1 ) {\displaystyle W_{0}\left(1\right)}.
History
Lambert first considered the related Lambert's Transcendental Equation in 1758, which led to an article by Leonhard Euler in 1783 that discussed the special case of w e w {\displaystyle we^{w}}.
The equation Lambert considered was
x = x m + q . {\displaystyle x=x^{m}+q.}
Euler transformed this equation into the form
x a − x b = ( a − b ) c x a + b . {\displaystyle x^{a}-x^{b}=(a-b)cx^{a+b}.}
Both authors derived a series solution for their equations.
Once Euler had solved this equation, he considered the case a = b {\displaystyle a=b}. Taking limits, he derived the equation
ln x = c x a . {\displaystyle \ln x=cx^{a}.}
He then put a = 1 {\displaystyle a=1} and obtained a convergent series solution for the resulting equation, expressing x {\displaystyle x} in terms of c {\displaystyle c}.
After taking derivatives with respect to x {\displaystyle x} and some manipulation, the standard form of the Lambert function is obtained.
In 1993, it was reported that the Lambert W {\displaystyle W} function provides an exact solution to the quantum-mechanical double-well Dirac delta function model for equal charges—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."
Another example where this function is found is in Michaelis–Menten kinetics.
Although it was widely believed that the Lambert W {\displaystyle W} function cannot be expressed in terms of elementary (Liouvillian) functions, the first published proof did not appear until 2008.
Elementary properties, branches and range


There are countably many branches of the W function, denoted by Wk(z), for integer k; W0(z) being the main (or principal) branch. W0(z) is defined for all complex numbers z while Wk(z) with k ≠ 0 is defined for all non-zero z, with W0(0) = 0 and lim z → 0 W k ( z ) = − ∞ , {\displaystyle \lim \limits _{z\to 0}W_{k}(z)=\;-\infty ,} for all k ≠ 0.
The branch point for the principal branch is at z = − e − 1 {\displaystyle z=-e^{-1}}, with the standard branch cut extending along the negative real axis to −∞+0i. This branch cut separates the principal branch from the two branches W−1 and W1. In all branches Wk with k ≠ 0, there is a branch point at z = 0 and a branch cut is conventionally taken along the entire negative real axis.
The functions Wk(z), k ∈ Z are all injective and their ranges are disjoint. The range of the entire multivalued function W 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 w = −t cot t + it.
Inverse

The range plot above also delineates the regions in the complex plane where the simple inverse relationship W n ( z e z ) = z {\displaystyle \ W_{n}(z\ e^{z})=z\ } is true. f = z e z {\displaystyle \ f=z\ e^{z}\ } implies that there exists an n {\displaystyle \ n\ } such that z = W n ( f ) = W n ( z e z ) , {\displaystyle \ z=W_{n}(f)=W_{n}(z\ e^{z})\ ,} where n {\displaystyle \ n\ } depends upon the value of z . {\displaystyle \ z~.}
For real values of z , {\displaystyle \ z\ ,} the value of the integer n {\displaystyle \ n\ } changes abruptly when z e z {\displaystyle \ z\ e^{z}\ } is at the branch cut of W n ( z e z ) , {\displaystyle \ W_{n}(z\ e^{z})\ ,} which means that z e z ≤ 0 , {\displaystyle \ z\ e^{z}\leq 0\ ,} except for n = 0 {\displaystyle \ n=0\ } where it is z e z ≤ − 1 / e . {\displaystyle \ z\ e^{z}\leq -1/e~.}
For complex z , {\displaystyle \ z\ ,} define z = x + i y , {\displaystyle \ z=x+i\ y\ ,} where x {\displaystyle \ x\ } and y {\displaystyle \ y\ } are real, and expressing e z {\displaystyle \ e^{z}\ } in polar coordinates, it is seen that
z e z = ( x + i y ) e x ( cos y + i sin y ) = e x ( x cos y − y sin y ) + i e x ( x sin y + y cos y ) {\displaystyle {\begin{aligned}z\ e^{z}&=(x+i\ y)\ e^{x}\ (\cos y+i\ \sin y)\\&=e^{x}(x\ \cos y\ -\ y\ \sin y)\ +\ i\ e^{x}(x\ \sin y\ +\ y\ \cos y)\\\end{aligned}}}
For n ≠ 0 , {\displaystyle \ n\neq 0\ ,} the branch cut for W n ( z e z ) {\displaystyle \ W_{n}(z\ e^{z})\ } is the non-positive real axis, so that
x sin y + y cos y = 0 ⇒ x = − y / tan ( y ) , {\displaystyle x\ \sin y\ +\ y\ \cos y=0\quad \Rightarrow \quad x=-y/\tan(y)\ ,}
and
( x cos y − y sin y ) e x ≤ 0 . {\displaystyle (x\ \cos y\ -\ y\ \sin y)\ e^{x}~\leq ~0~.}
For n = 0 , {\displaystyle \ n=0\ ,} the branch cut for W n ( z e z ) {\displaystyle \ W_{n}(z\ e^{z})\ } is the real axis with − ∞ < z ≤ − 1 / e , {\displaystyle \ -\infty <z\leq -1/e\ ,} so that the inequality becomes
( x cos y − y sin y ) e x ≤ − 1 / e {\displaystyle (x\ \cos y-y\ \sin y)\ e^{x}~\leq ~-1/e\quad } or ( x cos y − y sin y ) e x + 1 ≤ − 1 . {\displaystyle \quad (x\ \cos y-y\ \sin y)\ e^{x+1}~\leq ~-1~.}
Inside the regions bounded by the above, there are no discontinuous changes in W n ( z e z ) , {\displaystyle \ W_{n}(z\ e^{z})\ ,} and those regions specify where the W {\displaystyle \ W\ } function is simply invertible, i.e. W n ( z e z ) = z . {\displaystyle \ W_{n}(z\ e^{z})=z~.}
Transcendence
For each algebraic number z ≠ 0 {\displaystyle z\neq 0}, the numbers W k ( z ) {\displaystyle W_{k}(z)} are transcendental. This can be proved as follows. Suppose that W k ( z ) {\displaystyle W_{k}(z)} is algebraic. Then by the Lindemann–Weierstrass theorem we have e W k ( z ) {\displaystyle e^{W_{k}(z)}} is transcendental, but e W k ( z ) = z W k ( z ) {\displaystyle e^{W_{k}(z)}={\frac {z}{W_{k}(z)}}} which is algebraic, giving a contradiction.
Calculus
Derivative
By implicit differentiation, one can show that all branches of W satisfy the differential equation
z ( 1 + W ) d W d z = W for z ≠ − 1 e . {\displaystyle z(1+W){\frac {dW}{dz}}=W\quad {\text{for }}z\neq -{\frac {1}{e}}.}
(W is not differentiable for z = −1/e.) As a consequence, that gets the following formula for the derivative of W:
d W d z = W ( z ) z ( 1 + W ( z ) ) for z ∉ { 0 , − 1 e } . {\displaystyle {\frac {dW}{dz}}={\frac {W(z)}{z(1+W(z))}}\quad {\text{for }}z\not \in \left\{0,-{\frac {1}{e}}\right\}.}
Using the identity eW(z) = z/W(z), gives the following equivalent formula:
d W d z = 1 z + e W ( z ) for z ≠ − 1 e . {\displaystyle {\frac {dW}{dz}}={\frac {1}{z+e^{W(z)}}}\quad {\text{for }}z\neq -{\frac {1}{e}}.}
At the origin we have
W 0 ′ ( 0 ) = 1. {\displaystyle W'_{0}(0)=1.}
The n-th derivative of W is of the form:
d n W d z n = P n ( W ( z ) ) ( z + e W ( z ) ) n ( W ( z ) + 1 ) n − 1 for n > 0 , z ≠ − 1 e . {\displaystyle {\frac {d^{n}W}{dz^{n}}}={\frac {P_{n}(W(z))}{(z+e^{W(z)})^{n}(W(z)+1)^{n-1}}}\quad {\text{for }}n>0,\,z\neq -{\frac {1}{e}}.}
Where Pn is a polynomial function with coefficients defined in A042977. If and only if z is a root of Pn, then zez is a root of the n-th derivative of W.
Taking the derivative of the n-th derivative of W yields:
d n + 1 W d z n + 1 = ( W ( z ) + 1 ) P n ′ ( W ( z ) ) + ( 1 − 3 n − n W ( z ) ) P n ( W ( z ) ) ( n + e W ( z ) ) n + 1 ( W ( z ) + 1 ) n for n > 0 , z ≠ − 1 e . {\displaystyle {\frac {d^{n+1}W}{dz^{n+1}}}={\frac {(W(z)+1)P_{n}'(W(z))+(1-3n-nW(z))P_{n}(W(z))}{(n+e^{W(z)})^{n+1}(W(z)+1)^{n}}}\quad {\text{for }}n>0,\,z\neq -{\frac {1}{e}}.}
Inductively proving the n-th derivative equation.
Integral
The function W(x), and many other expressions involving W(x), can be integrated using the substitution w = W(x), i.e. x = wew:
∫ W ( x ) d x = x W ( x ) − x + e W ( x ) + C = x ( W ( x ) − 1 + 1 W ( x ) ) + C . {\displaystyle {\begin{aligned}\int W(x)\,dx&=xW(x)-x+e^{W(x)}+C\\&=x\left(W(x)-1+{\frac {1}{W(x)}}\right)+C.\end{aligned}}}
(The last equation is more common in the literature but is undefined at x = 0). One consequence of this (using the fact that W0(e) = 1) is the identity
∫ 0 e W 0 ( x ) d x = e − 1. {\displaystyle \int _{0}^{e}W_{0}(x)\,dx=e-1.}
Asymptotic expansions
By the Lagrange inversion theorem, the Taylor series of the principal branch W 0 ( x ) {\displaystyle W_{0}(x)} around x = 0 {\displaystyle x=0} is:
W 0 ( x ) = ∑ n = 1 ∞ ( − n ) n − 1 n ! x n = x − x 2 + 3 2 x 3 − 16 6 x 4 + 125 24 x 5 − ⋯ . {\displaystyle W_{0}(x)=\sum _{n=1}^{\infty }{\frac {(-n)^{n-1}}{n!}}x^{n}=x-x^{2}+{\tfrac {3}{2}}x^{3}-{\tfrac {16}{6}}x^{4}+{\tfrac {125}{24}}x^{5}-\cdots .}
The radius of convergence is 1 / e {\displaystyle 1/e} by the ratio test, and the function defined by the series can be extended to a holomorphic function defined on all complex numbers except a branch cut along the interval ( − ∞ , 1 / e ] {\displaystyle (-\infty ,1/e]}.
For large values x → ∞ {\displaystyle x\to \infty }, the real function W 0 ( x ) {\displaystyle W_{0}(x)} is asymptotic to
W 0 ( x ) = L 1 − L 2 + L 2 L 1 + L 2 ( − 2 + L 2 ) 2 L 1 2 + L 2 ( 6 − 9 L 2 + 2 L 2 2 ) 6 L 1 3 + L 2 ( − 12 + 36 L 2 − 22 L 2 2 + 3 L 2 3 ) 12 L 1 4 + ⋯ = L 1 − L 2 + ∑ ℓ = 1 ∞ ∑ m = 1 ℓ ( − 1 ) ℓ [ ℓ ℓ − m + 1 ] m ! L 2 m L 1 ℓ , {\displaystyle {\begin{aligned}W_{0}(x)&=L_{1}-L_{2}+{\frac {L_{2}}{L_{1}}}+{\frac {L_{2}\left(-2+L_{2}\right)}{2L_{1}^{2}}}+{\frac {L_{2}\left(6-9L_{2}+2L_{2}^{2}\right)}{6L_{1}^{3}}}+{\frac {L_{2}\left(-12+36L_{2}-22L_{2}^{2}+3L_{2}^{3}\right)}{12L_{1}^{4}}}+\cdots \\[5pt]&=L_{1}-L_{2}+\sum _{\ell =1}^{\infty }\sum _{m=1}^{\ell }{\frac {(-1)^{\ell }\left[{\begin{smallmatrix}\ell \\\ell -m+1\end{smallmatrix}}\right]}{m!}}{\frac {L_{2}^{m}}{L_{1}^{\ell }}},\end{aligned}}}
where L1 = ln x, L2 = ln ln x, and [n k] is a non-negative Stirling number of the first kind. Keeping only the first two terms of the expansion,
W 0 ( x ) = ln x − ln ln x + o ( 1 ) . {\displaystyle W_{0}(x)=\ln x-\ln \ln x+{\mathcal {o}}(1).}
The other real branch, W−1, defined in the interval [−1/e, 0), has an approximation of the same form as x approaches zero, in this case with L1 = ln(−x) and L2 = ln(−ln(−x)).
Integer and complex powers
Integer powers of W0 also admit simple Taylor (or Laurent) series expansions at zero:
W 0 ( x ) 2 = ∑ n = 2 ∞ − 2 ( − n ) n − 3 ( n − 2 ) ! x n = x 2 − 2 x 3 + 4 x 4 − 25 3 x 5 + 18 x 6 − ⋯ . {\displaystyle W_{0}(x)^{2}=\sum _{n=2}^{\infty }{\frac {-2\left(-n\right)^{n-3}}{(n-2)!}}x^{n}=x^{2}-2x^{3}+4x^{4}-{\tfrac {25}{3}}x^{5}+18x^{6}-\cdots .}
More generally, for r ∈ Z, the Lagrange inversion formula gives
W 0 ( x ) r = ∑ n = r ∞ − r ( − n ) n − r − 1 ( n − r ) ! x n , {\displaystyle W_{0}(x)^{r}=\sum _{n=r}^{\infty }{\frac {-r\left(-n\right)^{n-r-1}}{(n-r)!}}x^{n},}
which is, in general, a Laurent series of order r. Equivalently, the latter can be written in the form of a Taylor expansion of powers of W0(x) / x:
( W 0 ( x ) x ) r = e − r W 0 ( x ) = ∑ n = 0 ∞ r ( n + r ) n − 1 n ! ( − x ) n , {\displaystyle \left({\frac {W_{0}(x)}{x}}\right)^{r}=e^{-rW_{0}(x)}=\sum _{n=0}^{\infty }{\frac {r\left(n+r\right)^{n-1}}{n!}}\left(-x\right)^{n},}
which holds for any r ∈ C and |x| < 1/e.
Bounds and inequalities
A number of non-asymptotic bounds are known for the Lambert function.
Principal branch
Hoorfar and Hassani showed that the following bound holds for x ≥ e:
ln x − ln ln x + ln ln x 2 ln x ≤ W 0 ( x ) ≤ ln x − ln ln x + e e − 1 ln ln x ln x . {\displaystyle \ln x-\ln \ln x+{\frac {\ln \ln x}{2\ln x}}\leq W_{0}(x)\leq \ln x-\ln \ln x+{\frac {e}{e-1}}{\frac {\ln \ln x}{\ln x}}.}
Roberto Iacono and John P. Boyd enhanced the bounds for x ≥ e as follows:
ln ( x ln x ) − ln ( x ln x ) 1 + ln ( x ln x ) ln ( 1 − ln ln x ln x ) ≤ W 0 ( x ) ≤ ln ( x ln x ) − ln ( ( 1 − ln ln x ln x ) ( 1 − ln ( 1 − ln ln x ln x ) 1 + ln ( x ln x ) ) ) . {\displaystyle \ln \left({\frac {x}{\ln x}}\right)-{\frac {\ln \left({\frac {x}{\ln x}}\right)}{1+\ln \left({\frac {x}{\ln x}}\right)}}\ln \left(1-{\frac {\ln \ln x}{\ln x}}\right)\leq W_{0}(x)\leq \ln \left({\frac {x}{\ln x}}\right)-\ln \left(\left(1-{\frac {\ln \ln x}{\ln x}}\right)\left(1-{\frac {\ln \left(1-{\frac {\ln \ln x}{\ln x}}\right)}{1+\ln \left({\frac {x}{\ln x}}\right)}}\right)\right).}
Hoorfar and Hassani also showed the general bound
W 0 ( x ) ≤ ln ( x + y 1 + ln ( y ) ) , {\displaystyle W_{0}(x)\leq \ln \left({\frac {x+y}{1+\ln(y)}}\right),}
for every y > 1 / e {\displaystyle y>1/e} and x ≥ − 1 / e {\displaystyle x\geq -1/e}, with equality only for x = y ln ( y ) {\displaystyle x=y\ln(y)}. The bound allows many other bounds to be derived, such as taking y = x + 1 {\displaystyle y=x+1} which gives the bound
W 0 ( x ) ≤ ln ( 2 x + 1 1 + ln ( x + 1 ) ) . {\displaystyle W_{0}(x)\leq \ln \left({\frac {2x+1}{1+\ln(x+1)}}\right).}
Bounds for the function W 0 ( − x e − x ) {\displaystyle W_{0}(-xe^{-x})} for x ≥ 1 {\displaystyle x\geq 1} are obtained by Stewart.
Secondary branch
The branch W−1 can be bounded as follows:
− 1 − 2 u − u < W − 1 ( − e − u − 1 ) < − 1 − 2 u − 2 3 u for u > 0. {\displaystyle -1-{\sqrt {2u}}-u<W_{-1}\left(-e^{-u-1}\right)<-1-{\sqrt {2u}}-{\tfrac {2}{3}}u\quad {\text{for }}u>0.}
Identities


A few identities follow from the definition:
W 0 ( x e x ) = x for x ≥ − 1 , W − 1 ( x e x ) = x for x ≤ − 1. {\displaystyle {\begin{aligned}W_{0}(xe^{x})&=x&{\text{for }}x&\geq -1,\\W_{-1}(xe^{x})&=x&{\text{for }}x&\leq -1.\end{aligned}}}
Since f(x) = xex is not injective, it does not always hold that W(f(x)) = x, much like with the inverse trigonometric functions. For fixed x < 0 and x ≠ −1, the equation xex = yey has two real solutions in y, one of which is of course y = x. Then, for i = 0 and x < −1, as well as for i = −1 and x ∈ (−1, 0), y = Wi(xex) is the other solution.
Some other identities:
W ( x ) e W ( x ) = x , therefore: e W ( x ) = x W ( x ) , e − W ( x ) = W ( x ) x , e n W ( x ) = ( x W ( x ) ) n . {\displaystyle {\begin{aligned}&W(x)e^{W(x)}=x,\quad {\text{therefore:}}\\[5pt]&e^{W(x)}={\frac {x}{W(x)}},\qquad e^{-W(x)}={\frac {W(x)}{x}},\qquad e^{nW(x)}=\left({\frac {x}{W(x)}}\right)^{n}.\end{aligned}}}
ln W 0 ( x ) = ln x − W 0 ( x ) for x > 0. {\displaystyle \ln W_{0}(x)=\ln x-W_{0}(x)\quad {\text{for }}x>0.}
W 0 ( x ln x ) = ln x and e W 0 ( x ln x ) = x for 1 e ≤ x . {\displaystyle W_{0}\left(x\ln x\right)=\ln x\quad {\text{and}}\quad e^{W_{0}\left(x\ln x\right)}=x\quad {\text{for }}{\frac {1}{e}}\leq x.}
W − 1 ( x ln x ) = ln x and e W − 1 ( x ln x ) = x for 0 < x ≤ 1 e . {\displaystyle W_{-1}\left(x\ln x\right)=\ln x\quad {\text{and}}\quad e^{W_{-1}\left(x\ln x\right)}=x\quad {\text{for }}0<x\leq {\frac {1}{e}}.}
W ( x ) = ln x W ( x ) for x ≥ − 1 e , W ( n x n W ( x ) n − 1 ) = n W ( x ) for n , x > 0 {\displaystyle {\begin{aligned}&W(x)=\ln {\frac {x}{W(x)}}&&{\text{for }}x\geq -{\frac {1}{e}},\\[5pt]&W\left({\frac {nx^{n}}{W\left(x\right)^{n-1}}}\right)=nW(x)&&{\text{for }}n,x>0\end{aligned}}} (which can be extended to other n and x if the correct branch is chosen).
W ( x ) + W ( y ) = W ( x y ( 1 W ( x ) + 1 W ( y ) ) ) for x , y > 0. {\displaystyle W(x)+W(y)=W\left(xy\left({\frac {1}{W(x)}}+{\frac {1}{W(y)}}\right)\right)\quad {\text{for }}x,y>0.}
Substituting −ln x in the definition:
W 0 ( − ln x x ) = − ln x for 0 < x ≤ e , W − 1 ( − ln x x ) = − ln x for x > e . {\displaystyle {\begin{aligned}W_{0}\left(-{\frac {\ln x}{x}}\right)&=-\ln x&{\text{for }}0&<x\leq e,\\[5pt]W_{-1}\left(-{\frac {\ln x}{x}}\right)&=-\ln x&{\text{for }}x&>e.\end{aligned}}}
With Euler's iterated exponential h(x):
h ( x ) = e − W ( − ln x ) = W ( − ln x ) − ln x for x ≠ 1. {\displaystyle {\begin{aligned}h(x)&=e^{-W(-\ln x)}\\&={\frac {W(-\ln x)}{-\ln x}}\quad {\text{for }}x\neq 1.\end{aligned}}}
∀ c ∈ [ − 1 e , 0 ) , let t = W − 1 ( c ) W 0 ( c ) ≥ 1 ⟹ W 0 ( c ) = ln t 1 − t , W − 1 ( c ) = t ln t 1 − t {\displaystyle \forall c\in \left[-{\frac {1}{e}},0\right),{\text{let }}t={\frac {W_{-1}(c)}{W_{0}(c)}}\geq 1\implies W_{0}(c)={\frac {\ln t}{1-t}},W_{-1}(c)={\frac {t\ln t}{1-t}}}
Special values
The following are special values of the principal branch: W 0 ( − π 2 ) = i π 2 {\displaystyle W_{0}\left(-{\frac {\pi }{2}}\right)={\frac {i\pi }{2}}} W 0 ( − 1 e ) = − 1 {\displaystyle W_{0}\left(-{\frac {1}{e}}\right)=-1} W 0 ( 2 ln 2 ) = ln 2 {\displaystyle W_{0}\left(2\ln 2\right)=\ln 2} W 0 ( x ln x ) = ln x ( x ⩾ 1 e ≈ 0.36788 ) {\displaystyle W_{0}\left(x\ln x\right)=\ln x\quad \left(x\geqslant {\tfrac {1}{e}}\approx 0.36788\right)} W 0 ( x x + 1 ln x ) = x ln x ( x > 0 ) {\displaystyle W_{0}\left(x^{x+1}\ln x\right)=x\ln x\quad \left(x>0\right)} W 0 ( 0 ) = 0 {\displaystyle W_{0}(0)=0}
W 0 ( 1 ) = Ω ≈ 0.56714329 {\displaystyle W_{0}(1)=\Omega \approx 0.56714329\quad } (the omega constant)
W 0 ( 1 ) = e − W 0 ( 1 ) = ln 1 W 0 ( 1 ) = − ln W 0 ( 1 ) {\displaystyle W_{0}(1)=e^{-W_{0}(1)}=\ln {\frac {1}{W_{0}(1)}}=-\ln W_{0}(1)} W 0 ( e ) = 1 {\displaystyle W_{0}(e)=1} W 0 ( e 1 + e ) = e {\displaystyle W_{0}\left(e^{1+e}\right)=e} W 0 ( e 2 ) = 1 2 {\displaystyle W_{0}\left({\frac {\sqrt {e}}{2}}\right)={\frac {1}{2}}} W 0 ( e n n ) = 1 n {\displaystyle W_{0}\left({\frac {\sqrt[{n}]{e}}{n}}\right)={\frac {1}{n}}} W 0 ( − 1 ) ≈ − 0.31813 + 1.33723 i {\displaystyle W_{0}(-1)\approx -0.31813+1.33723i}
Special values of the branch W−1: W − 1 ( − ln 2 2 ) = − ln 4 {\displaystyle W_{-1}\left(-{\frac {\ln 2}{2}}\right)=-\ln 4}
Representations
The principal branch of the Lambert function can be represented by a proper integral, due to Poisson:
− π 2 W 0 ( − x ) = ∫ 0 π sin ( 3 2 t ) − x e cos t sin ( 5 2 t − sin t ) 1 − 2 x e cos t cos ( t − sin t ) + x 2 e 2 cos t sin ( 1 2 t ) d t for | x | < 1 e . {\displaystyle -{\frac {\pi }{2}}W_{0}(-x)=\int _{0}^{\pi }{\frac {\sin \left({\tfrac {3}{2}}t\right)-xe^{\cos t}\sin \left({\tfrac {5}{2}}t-\sin t\right)}{1-2xe^{\cos t}\cos(t-\sin t)+x^{2}e^{2\cos t}}}\sin \left({\tfrac {1}{2}}t\right)\,dt\quad {\text{for }}|x|<{\frac {1}{e}}.}
Another representation of the principal branch was found by Kalugin–Jeffrey–Corless:
W 0 ( x ) = 1 π ∫ 0 π ln ( 1 + x sin t t e t cot t ) d t . {\displaystyle W_{0}(x)={\frac {1}{\pi }}\int _{0}^{\pi }\ln \left(1+x{\frac {\sin t}{t}}e^{t\cot t}\right)dt.}
The following continued fraction representation also holds for the principal branch:
W 0 ( x ) = x 1 + x 1 + x 2 + 5 x 3 + 17 x 10 + 133 x 17 + 1927 x 190 + 13582711 x 94423 + ⋱ . {\displaystyle W_{0}(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 |W0(x)| < 1:
W 0 ( x ) = x exp x exp x ⋱ . {\displaystyle W_{0}(x)={\cfrac {x}{\exp {\cfrac {x}{\exp {\cfrac {x}{\ddots }}}}}}.}
In turn, if |W0(x)| > 1, then
W 0 ( x ) = ln x ln x ln x ⋱ . {\displaystyle W_{0}(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 W function, including the following:
∫ 0 π W 0 ( 2 cot 2 x ) sec 2 x d x = 4 π , ∫ 0 ∞ W 0 ( x ) x x d x = 2 2 π , ∫ 0 ∞ W 0 ( 1 x 2 ) d x = 2 π , and more generally ∫ 0 ∞ W 0 ( 1 x N ) d x = N 1 − 1 N Γ ( 1 − 1 N ) for N > 1 {\displaystyle {\begin{aligned}&\int _{0}^{\pi }W_{0}\left(2\cot ^{2}x\right)\sec ^{2}x\,dx=4{\sqrt {\pi }},\\[5pt]&\int _{0}^{\infty }{\frac {W_{0}(x)}{x{\sqrt {x}}}}\,dx=2{\sqrt {2\pi }},\\[5pt]&\int _{0}^{\infty }W_{0}\left({\frac {1}{x^{2}}}\right)\,dx={\sqrt {2\pi }},{\text{ and more generally}}\\[5pt]&\int _{0}^{\infty }W_{0}\left({\frac {1}{x^{N}}}\right)\,dx=N^{1-{\frac {1}{N}}}\Gamma \left(1-{\frac {1}{N}}\right)\qquad {\text{for }}N>1\end{aligned}}}
where Γ {\displaystyle \Gamma } denotes the gamma function.
The first identity can be found by writing the Gaussian integral in polar coordinates.
The second identity can be derived by making the substitution u = W0(x), which gives
x = u e u , d x d u = ( u + 1 ) e u . {\displaystyle {\begin{aligned}x&=ue^{u},\\[5pt]{\frac {dx}{du}}&=(u+1)e^{u}.\end{aligned}}}
Thus
∫ 0 ∞ W 0 ( x ) x x d x = ∫ 0 ∞ u u e u u e u ( u + 1 ) e u d u = ∫ 0 ∞ u + 1 u e u d u = ∫ 0 ∞ u + 1 u 1 e u d u = ∫ 0 ∞ u 1 2 e − u 2 d u + ∫ 0 ∞ u − 1 2 e − u 2 d u = 2 ∫ 0 ∞ ( 2 w ) 1 2 e − w d w + 2 ∫ 0 ∞ ( 2 w ) − 1 2 e − w d w ( u = 2 w ) = 2 2 ∫ 0 ∞ w 1 2 e − w d w + 2 ∫ 0 ∞ w − 1 2 e − w d w = 2 2 ⋅ Γ ( 3 2 ) + 2 ⋅ Γ ( 1 2 ) = 2 2 ( 1 2 π ) + 2 ( π ) = 2 2 π . {\displaystyle {\begin{aligned}\int _{0}^{\infty }{\frac {W_{0}(x)}{x{\sqrt {x}}}}\,dx&=\int _{0}^{\infty }{\frac {u}{ue^{u}{\sqrt {ue^{u}}}}}(u+1)e^{u}\,du\\[5pt]&=\int _{0}^{\infty }{\frac {u+1}{\sqrt {ue^{u}}}}du\\[5pt]&=\int _{0}^{\infty }{\frac {u+1}{\sqrt {u}}}{\frac {1}{\sqrt {e^{u}}}}du\\[5pt]&=\int _{0}^{\infty }u^{\tfrac {1}{2}}e^{-{\frac {u}{2}}}du+\int _{0}^{\infty }u^{-{\tfrac {1}{2}}}e^{-{\frac {u}{2}}}du\\[5pt]&=2\int _{0}^{\infty }(2w)^{\tfrac {1}{2}}e^{-w}\,dw+2\int _{0}^{\infty }(2w)^{-{\tfrac {1}{2}}}e^{-w}\,dw&&\quad (u=2w)\\[5pt]&=2{\sqrt {2}}\int _{0}^{\infty }w^{\tfrac {1}{2}}e^{-w}\,dw+{\sqrt {2}}\int _{0}^{\infty }w^{-{\tfrac {1}{2}}}e^{-w}\,dw\\[5pt]&=2{\sqrt {2}}\cdot \Gamma \left({\tfrac {3}{2}}\right)+{\sqrt {2}}\cdot \Gamma \left({\tfrac {1}{2}}\right)\\[5pt]&=2{\sqrt {2}}\left({\tfrac {1}{2}}{\sqrt {\pi }}\right)+{\sqrt {2}}\left({\sqrt {\pi }}\right)\\[5pt]&=2{\sqrt {2\pi }}.\end{aligned}}}
The third identity may be derived from the second by making the substitution u = x−2 and the first can also be derived from the third by the substitution z = 1/√2 tan x. Deriving its generalization, the fourth identity, is only slightly more involved and can be done by substituting, in turn, u = 1 x N {\displaystyle u={\frac {1}{x^{N}}}}, t = W 0 ( u ) {\displaystyle t=W_{0}(u)}, and z = t N {\displaystyle z={\frac {t}{N}}}, observing that one obtains two integrals matching the definition of the gamma function, and finally using the properties of the gamma function to collect terms and simplify.
Except for z along the branch cut (−∞, −1/e] (where the integral does not converge), the principal branch of the Lambert W function can be computed by the following integral:
W 0 ( z ) = z 2 π ∫ − π π ( 1 − ν cot ν ) 2 + ν 2 z + ν csc ( ν ) e − ν cot ν d ν = z π ∫ 0 π ( 1 − ν cot ν ) 2 + ν 2 z + ν csc ( ν ) e − ν cot ν d ν , {\displaystyle {\begin{aligned}W_{0}(z)&={\frac {z}{2\pi }}\int _{-\pi }^{\pi }{\frac {\left(1-\nu \cot \nu \right)^{2}+\nu ^{2}}{z+\nu \csc \left(\nu \right)e^{-\nu \cot \nu }}}\,d\nu \\[5pt]&={\frac {z}{\pi }}\int _{0}^{\pi }{\frac {\left(1-\nu \cot \nu \right)^{2}+\nu ^{2}}{z+\nu \csc \left(\nu \right)e^{-\nu \cot \nu }}}\,d\nu ,\end{aligned}}}
where the two integral expressions are equivalent due to the symmetry of the integrand.
Indefinite integrals
∫ W ( x ) x d x = W ( x ) 2 2 + W ( x ) + C {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;{\frac {W(x)^{2}}{2}}+W(x)+C}
Introduce substitution variable u = W ( x ) → u e u = x d d u u e u = ( u + 1 ) e u {\displaystyle u=W(x)\rightarrow ue^{u}=x\;\;\;\;{\frac {d}{du}}ue^{u}=(u+1)e^{u}}
∫ W ( x ) x d x = ∫ u u e u ( u + 1 ) e u d u {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;\int {\frac {u}{ue^{u}}}(u+1)e^{u}\,du}
∫ W ( x ) x d x = ∫ u u e u ( u + 1 ) e u d u {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;\int {\frac {\cancel {\color {OliveGreen}{u}}}{{\cancel {\color {OliveGreen}{u}}}{\cancel {\color {BrickRed}{e^{u}}}}}}\left(u+1\right){\cancel {\color {BrickRed}{e^{u}}}}\,du}
∫ W ( x ) x d x = ∫ ( u + 1 ) d u {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;\int (u+1)\,du}
∫ W ( x ) x d x = u 2 2 + u + C {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;{\frac {u^{2}}{2}}+u+C} u = W ( x ) {\displaystyle u=W(x)}
∫ W ( x ) x d x = W ( x ) 2 2 + W ( x ) + C {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;{\frac {W(x)^{2}}{2}}+W(x)+C}
W ( x ) e W ( x ) = x → W ( x ) x = e − W ( x ) {\displaystyle W(x)e^{W(x)}=x\rightarrow {\frac {W(x)}{x}}=e^{-W(x)}}
∫ W ( x ) x d x = ∫ e − W ( x ) d x {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;\int e^{-W(x)}\,dx}
u = W ( x ) → u e u = x d d u u e u = ( u + 1 ) e u {\displaystyle u=W(x)\rightarrow ue^{u}=x\;\;\;\;{\frac {d}{\,du}}ue^{u}=\left(u+1\right)e^{u}}
∫ W ( x ) x d x = ∫ e − u ( u + 1 ) e u d u {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;\int e^{-u}(u+1)e^{u}\,du}
∫ W ( x ) x d x = ∫ e − u ( u + 1 ) e u d u {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;\int {\cancel {\color {OliveGreen}{e^{-u}}}}\left(u+1\right){\cancel {\color {OliveGreen}{e^{u}}}}\,du}
∫ W ( x ) x d x = ∫ ( u + 1 ) d u {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;\int (u+1)\,du}
∫ W ( x ) x d x = u 2 2 + u + C {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;{\frac {u^{2}}{2}}+u+C}
u = W ( x ) {\displaystyle u=W(x)}
∫ W ( x ) x d x = W ( x ) 2 2 + W ( x ) + C {\displaystyle \int {\frac {W(x)}{x}}\,dx\;=\;{\frac {W(x)^{2}}{2}}+W(x)+C}
∫ W ( A e B x ) d x = W ( A e B x ) 2 2 B + W ( A e B x ) B + C {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {W\left(Ae^{Bx}\right)^{2}}{2B}}+{\frac {W\left(Ae^{Bx}\right)}{B}}+C}
∫ W ( A e B x ) d x = ∫ W ( A e B x ) d x {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;\int W\left(Ae^{Bx}\right)\,dx}
u = B x → u B = x d d u u B = 1 B {\displaystyle u=Bx\rightarrow {\frac {u}{B}}=x\;\;\;\;{\frac {d}{du}}{\frac {u}{B}}={\frac {1}{B}}}
∫ W ( A e B x ) d x = ∫ W ( A e u ) 1 B d u {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;\int W\left(Ae^{u}\right){\frac {1}{B}}du}
v = e u → ln ( v ) = u d d v ln ( v ) = 1 v {\displaystyle v=e^{u}\rightarrow \ln \left(v\right)=u\;\;\;\;{\frac {d}{dv}}\ln \left(v\right)={\frac {1}{v}}}
∫ W ( A e B x ) d x = 1 B ∫ W ( A v ) v d v {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {1}{B}}\int {\frac {W\left(Av\right)}{v}}dv}
w = A v → w A = v d d w w A = 1 A {\displaystyle w=Av\rightarrow {\frac {w}{A}}=v\;\;\;\;{\frac {d}{dw}}{\frac {w}{A}}={\frac {1}{A}}}
∫ W ( A e B x ) d x = 1 B ∫ A W ( w ) w 1 A d w {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {1}{B}}\int {\frac {{\cancel {\color {OliveGreen}{A}}}W(w)}{w}}{\cancel {\color {OliveGreen}{\frac {1}{A}}}}dw}
t = W ( w ) → t e t = w d d t t e t = ( t + 1 ) e t {\displaystyle t=W\left(w\right)\rightarrow te^{t}=w\;\;\;\;{\frac {d}{dt}}te^{t}=\left(t+1\right)e^{t}}
∫ W ( A e B x ) d x = 1 B ∫ t t e t ( t + 1 ) e t d t {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {1}{B}}\int {\frac {t}{te^{t}}}\left(t+1\right)e^{t}dt}
∫ W ( A e B x ) d x = 1 B ∫ t t e t ( t + 1 ) e t d t {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {1}{B}}\int {\frac {\cancel {\color {OliveGreen}{t}}}{{\cancel {\color {OliveGreen}{t}}}{\cancel {\color {BrickRed}{e^{t}}}}}}\left(t+1\right){\cancel {\color {BrickRed}{e^{t}}}}dt}
∫ W ( A e B x ) d x = 1 B ∫ ( t + 1 ) d t {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {1}{B}}\int (t+1)dt}
∫ W ( A e B x ) d x = t 2 2 B + t B + C {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {t^{2}}{2B}}+{\frac {t}{B}}+C}
t = W ( w ) {\displaystyle t=W\left(w\right)}
∫ W ( A e B x ) d x = W ( w ) 2 2 B + W ( w ) B + C {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {W\left(w\right)^{2}}{2B}}+{\frac {W\left(w\right)}{B}}+C}
w = A v {\displaystyle w=Av}
∫ W ( A e B x ) d x = W ( A v ) 2 2 B + W ( A v ) B + C {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {W\left(Av\right)^{2}}{2B}}+{\frac {W\left(Av\right)}{B}}+C}
v = e u {\displaystyle v=e^{u}}
∫ W ( A e B x ) d x = W ( A e u ) 2 2 B + W ( A e u ) B + C {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {W\left(Ae^{u}\right)^{2}}{2B}}+{\frac {W\left(Ae^{u}\right)}{B}}+C}
u = B x {\displaystyle u=Bx}
∫ W ( A e B x ) d x = W ( A e B x ) 2 2 B + W ( A e B x ) B + C {\displaystyle \int W\left(Ae^{Bx}\right)\,dx\;=\;{\frac {W\left(Ae^{Bx}\right)^{2}}{2B}}+{\frac {W\left(Ae^{Bx}\right)}{B}}+C}
∫ W ( x ) x 2 d x = Ei ( − W ( x ) ) − e − W ( x ) + C {\displaystyle \int {\frac {W(x)}{x^{2}}}\,dx\;=\;\operatorname {Ei} \left(-W(x)\right)-e^{-W(x)}+C}
Introduce substitution variable u = W ( x ) {\displaystyle u=W(x)}, which gives us u e u = x {\displaystyle ue^{u}=x} and d d u u e u = ( u + 1 ) e u {\displaystyle {\frac {d}{du}}ue^{u}=\left(u+1\right)e^{u}}
∫ W ( x ) x 2 d x = ∫ u ( u e u ) 2 ( u + 1 ) e u d u = ∫ u + 1 u e u d u = ∫ u u e u d u + ∫ 1 u e u d u = ∫ e − u d u + ∫ e − u u d u {\displaystyle {\begin{aligned}\int {\frac {W(x)}{x^{2}}}\,dx\;&=\;\int {\frac {u}{\left(ue^{u}\right)^{2}}}\left(u+1\right)e^{u}du\\&=\;\int {\frac {u+1}{ue^{u}}}du\\&=\;\int {\frac {u}{ue^{u}}}du\;+\;\int {\frac {1}{ue^{u}}}du\\&=\;\int e^{-u}du\;+\;\int {\frac {e^{-u}}{u}}du\end{aligned}}}
v = − u → − v = u d d v − v = − 1 {\displaystyle v=-u\rightarrow -v=u\;\;\;\;{\frac {d}{dv}}-v=-1}
∫ W ( x ) x 2 d x = ∫ e v ( − 1 ) d v + ∫ e − u u d u {\displaystyle \int {\frac {W(x)}{x^{2}}}\,dx\;=\;\int e^{v}\left(-1\right)dv\;+\;\int {\frac {e^{-u}}{u}}du}
∫ W ( x ) x 2 d x = − e v + Ei ( − u ) + C {\displaystyle \int {\frac {W(x)}{x^{2}}}\,dx\;=\;-e^{v}+\operatorname {Ei} \left(-u\right)+C}
v = − u {\displaystyle v=-u}
∫ W ( x ) x 2 d x = − e − u + Ei ( − u ) + C {\displaystyle \int {\frac {W(x)}{x^{2}}}\,dx\;=\;-e^{-u}+\operatorname {Ei} \left(-u\right)+C}
u = W ( x ) {\displaystyle u=W(x)}
∫ W ( x ) x 2 d x = − e − W ( x ) + Ei ( − W ( x ) ) + C = Ei ( − W ( x ) ) − e − W ( x ) + C {\displaystyle {\begin{aligned}\int {\frac {W(x)}{x^{2}}}\,dx\;&=\;-e^{-W(x)}+\operatorname {Ei} \left(-W(x)\right)+C\\&=\;\operatorname {Ei} \left(-W(x)\right)-e^{-W(x)}+C\end{aligned}}}
Applications
Solving equations
General case
The Lambert W 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 zez = w and then to solve for z using the W function.
For example, the equation
3 x = 2 x + 2 {\displaystyle 3^{x}=2x+2}
(where x is an unknown real number) can be solved by rewriting it as
( x + 1 ) 3 − x = 1 2 ( multiply by 3 − x / 2 ) ⇔ ( − x − 1 ) 3 − x − 1 = − 1 6 ( multiply by − 1 / 3 ) ⇔ ( ln 3 ) ( − x − 1 ) e ( ln 3 ) ( − x − 1 ) = − ln 3 6 ( multiply by ln 3 ) {\displaystyle {\begin{aligned}&(x+1)\ 3^{-x}={\frac {1}{2}}&({\mbox{multiply by }}3^{-x}/2)\\\Leftrightarrow \ &(-x-1)\ 3^{-x-1}=-{\frac {1}{6}}&({\mbox{multiply by }}{-}1/3)\\\Leftrightarrow \ &(\ln 3)(-x-1)\ e^{(\ln 3)(-x-1)}=-{\frac {\ln 3}{6}}&({\mbox{multiply by }}\ln 3)\end{aligned}}}
This last equation has the desired form and the solutions for real x are:
( ln 3 ) ( − x − 1 ) = W 0 ( − ln 3 6 ) or ( ln 3 ) ( − x − 1 ) = W − 1 ( − ln 3 6 ) {\displaystyle (\ln 3)(-x-1)=W_{0}\left({\frac {-\ln 3}{6}}\right)\ \ \ {\textrm {or}}\ \ \ (\ln 3)(-x-1)=W_{-1}\left({\frac {-\ln 3}{6}}\right)}
and thus:
x = − 1 − W 0 ( − ln 3 6 ) ln 3 = − 0.79011 … or x = − 1 − W − 1 ( − ln 3 6 ) ln 3 = 1.44456 … {\displaystyle x=-1-{\frac {W_{0}\left(-{\frac {\ln 3}{6}}\right)}{\ln 3}}=-0.79011\ldots \ \ {\textrm {or}}\ \ x=-1-{\frac {W_{-1}\left(-{\frac {\ln 3}{6}}\right)}{\ln 3}}=1.44456\ldots }
Generally, the solution to
x = a + b e c x {\displaystyle x=a+b\,e^{cx}}
is:
x = a − 1 c W ( − b c e a c ) {\displaystyle x=a-{\frac {1}{c}}W(-bc\,e^{ac})}
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.
Super root
Along with the topic of the so called Sophomore's dream the tetration function f ( x ) = x x {\displaystyle f(x)=x^{x}} became a well known function. Its inverse function is a special case of the so called super root and it can be determined and displayed as follows:
x x = y {\displaystyle x^{x}=y}
The power rule gives following expression:
exp [ x ln ( x ) ] = y {\displaystyle \exp[x\ln(x)]=y}
The natural logarithm of that is taken:
x ln ( x ) = ln ( y ) {\displaystyle x\ln(x)=\ln(y)}
The Lambert W function is used now:
ln ( x ) = W 0 [ ln ( y ) ] {\displaystyle \ln(x)=W_{0}[\ln(y)]}
And in the final step the second last equation will be divided by the last equation:
x = ln ( y ) W 0 [ ln ( y ) ] {\displaystyle x={\frac {\ln(y)}{W_{0}[\ln(y)]}}}
A calculation example is made:
x x = 2 {\displaystyle x^{x}=2}
x = ln ( 2 ) ÷ W 0 [ ln ( 2 ) ] ≈ 1.559610469462369349970388768765 {\displaystyle x=\ln(2)\div W_{0}[\ln(2)]\approx 1.559610469462369349970388768765}
Tree counting and combinatorics
Cayley's formula states that the number of tree graphs on n labeled vertices is n n − 2 {\displaystyle n^{n-2}}, so that the number of trees with a designated root vertex is n n − 1 {\displaystyle n^{n-1}}. The exponential generating function of this counting sequence is:
T ( x ) = ∑ n = 0 ∞ n n − 1 n ! x n . {\displaystyle T(x)=\sum _{n=0}^{\infty }{\frac {n^{n-1}}{n!}}x^{n}.}
The class of rooted trees has a natural recurrence: a rooted tree is equivalent to a root vertex attached to a set of smaller rooted trees. Using the exponential formula for labeled combinatorial classes, this translates into the equation:
T ( x ) = x e T ( x ) , {\displaystyle T(x)=xe^{T(x)},}
which implies − T ( − x ) e − T ( − x ) = x {\displaystyle -T(-x)e^{-T(-x)}=x} and
W 0 ( x ) = − T ( − x ) {\displaystyle W_{0}(x)=-T(-x)}.
Reversing the argument, the Maclaurin series of W 0 ( x ) {\displaystyle W_{0}(x)} around x = 0 {\displaystyle x=0} can be found directly using the Lagrange inversion theorem:
W 0 ( x ) = ∑ n = 1 ∞ ( − n ) n − 1 n ! x n , {\displaystyle W_{0}(x)=\sum _{n=1}^{\infty }{\frac {(-n)^{n-1}}{n!}}x^{n},}
and this gives the standard analytic proof of Cayley's formula. But the Maclaurin series radius of convergence is limited to | x | < 1 / e {\displaystyle |x|<1/e} because of the branch point at x = − 1 / e {\displaystyle x=-1/e}.
Inviscid flows
Applying the unusual accelerating traveling-wave Ansatz in the form of ρ ( η ) = ρ ( x − a t 2 2 ) {\displaystyle \rho (\eta )=\rho {\big (}x-{\frac {at^{2}}{2}}{\big )}} (where ρ {\displaystyle \rho }, η {\displaystyle \eta }, 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.
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 ) − x L ) , {\displaystyle H(x)=1+W\left((H(0)-1)e^{(H(0)-1)-{\frac {x}{L}}}\right),}
where H(x) is the debris flow height, x is the channel downstream position, L 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.
Time-dependent flow in simple branch hydraulic systems
The principal branch of the Lambert W 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. The Lambert W function provided an exact solution to the flow rate of fluid in both the laminar and turbulent regimes: Q turb = Q i ζ i W 0 [ ζ i e ( ζ i + β t / b ) ] Q lam = Q i ξ i W 0 [ ξ i e ( ξ i + β t / ( b − Γ 1 ) ) ] {\displaystyle {\begin{aligned}Q_{\text{turb}}&={\frac {Q_{i}}{\zeta _{i}}}W_{0}\left[\zeta _{i}\,e^{(\zeta _{i}+\beta t/b)}\right]\\Q_{\text{lam}}&={\frac {Q_{i}}{\xi _{i}}}W_{0}\left[\xi _{i}\,e^{\left(\xi _{i}+\beta t/(b-\Gamma _{1})\right)}\right]\end{aligned}}} where Q i {\displaystyle Q_{i}} is the initial flow rate and t {\displaystyle t} is time.
Neuroimaging
The Lambert W 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.
Chemical engineering
The Lambert W 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 W 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.
Crystal growth
In the crystal growth, the negative principal of the Lambert W-function can be used to calculate the distribution coefficient, k {\textstyle k}, and solute concentration in the melt, C L {\textstyle C_{L}}, from the Scheil equation:
k = W 0 ( Z ) ln ( 1 − f s ) C L = C 0 ( 1 − f s ) e W 0 ( Z ) Z = C S C 0 ( 1 − f s ) ln ( 1 − f s ) {\displaystyle {\begin{aligned}&k={\frac {W_{0}(Z)}{\ln(1-fs)}}\\&C_{L}={\frac {C_{0}}{(1-fs)}}e^{W_{0}(Z)}\\&Z={\frac {C_{S}}{C_{0}}}(1-fs)\ln(1-fs)\end{aligned}}}
Materials science
The Lambert W 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 W for this problem, the critical thickness had to be determined via solving an implicit equation. Lambert W turns it in an explicit equation for analytical handling with ease.
Semiconductor devices
It was shown that a W-function describes the relation between voltage, current and resistance in a diode.
The use of the Lambert W Function to analytically and exactly solve the terminals' current and voltage as explicit functions of each other in a circuit model of a diode with both series and shunt resistances was first reported in the year 2000.
The Lambert W Function was introduced into compact modeling of MOSFETs in 2003 as a useful mathematical tool to explicitly describe the surface potential in undoped channels.
The Lambert W function-based explicit analytic solution of the illuminated photovoltaic solar cell single-diode model with parasitic series and shunt resistance was published in 2004.
Porous media
The Lambert W 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.
Bernoulli numbers and Todd genus
The equation (linked with the generating functions of Bernoulli numbers and Todd genus):
Y = X 1 − e X {\displaystyle Y={\frac {X}{1-e^{X}}}}
can be solved by means of the two real branches W0 and W−1:
X ( Y ) = { W − 1 ( Y e Y ) − W 0 ( Y e Y ) = Y − W 0 ( Y e Y ) for Y < − 1 , W 0 ( Y e Y ) − W − 1 ( Y e Y ) = Y − W − 1 ( Y e Y ) for − 1 < Y < 0. {\displaystyle X(Y)={\begin{cases}W_{-1}\left(Ye^{Y}\right)-W_{0}\left(Ye^{Y}\right)=Y-W_{0}\left(Ye^{Y}\right)&{\text{for }}Y<-1,\\W_{0}\left(Ye^{Y}\right)-W_{-1}\left(Ye^{Y}\right)=Y-W_{-1}\left(Ye^{Y}\right)&{\text{for }}-1<Y<0.\end{cases}}}
This application shows that the branch difference of the W function can be employed in order to solve other transcendental equations.
Statistics
The centroid of a set of histograms defined with respect to the symmetrized Kullback–Leibler divergence (also called the Jeffreys divergence ) has a closed form using the Lambert W function.
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 W function.
Exact solutions of the Schrödinger equation
The Lambert W 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 = V 0 1 + W ( e − x σ ) . {\displaystyle V={\frac {V_{0}}{1+W\left(e^{-{\frac {x}{\sigma }}}\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
z = W ( e − x σ ) . {\displaystyle z=W\left(e^{-{\frac {x}{\sigma }}}\right).}
The Lambert W 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 {\displaystyle \alpha _{\text{s}}} is computed perturbatively, the order n corresponding to Feynman diagrams including n quantum loops. 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 W 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 W function.
Thermodynamic equilibrium
If a reaction involves reactants and products having heat capacities that are constant with temperature then the equilibrium constant K obeys
ln K = a T + b + c ln T {\displaystyle \ln K={\frac {a}{T}}+b+c\ln T}
for some constants a, b, and c. When c (equal to ΔCp/R) is not zero the value or values of T can be found where K equals a given value as follows, where L can be used for ln T.
− a = ( b − ln K ) T + c T ln T = ( b − ln K ) e L + c L e L − a c = ( b − ln K c + L ) e L − a c e b − ln K c = ( L + b − ln K c ) e L + b − ln K c L = W ( − a c e b − ln K c ) + ln K − b c T = exp ( W ( − a c e b − ln K c ) + ln K − b c ) . {\displaystyle {\begin{aligned}-a&=(b-\ln K)T+cT\ln T\\&=(b-\ln K)e^{L}+cLe^{L}\\[5pt]-{\frac {a}{c}}&=\left({\frac {b-\ln K}{c}}+L\right)e^{L}\\[5pt]-{\frac {a}{c}}e^{\frac {b-\ln K}{c}}&=\left(L+{\frac {b-\ln K}{c}}\right)e^{L+{\frac {b-\ln K}{c}}}\\[5pt]L&=W\left(-{\frac {a}{c}}e^{\frac {b-\ln K}{c}}\right)+{\frac {\ln K-b}{c}}\\[5pt]T&=\exp \left(W\left(-{\frac {a}{c}}e^{\frac {b-\ln K}{c}}\right)+{\frac {\ln K-b}{c}}\right).\end{aligned}}}
If a and c have the same sign there will be either two solutions or none (or one if the argument of W is exactly −1/e). (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 W functions.
Wien's displacement law in a D -dimensional universe
Wien's displacement law is expressed as ν max / T = α = c o n s t {\displaystyle \nu _{\max }/T=\alpha =\mathrm {const} }. With x = h ν max / k B T {\displaystyle x=h\nu _{\max }/k_{\mathrm {B} }T} and d ρ T ( x ) / d x = 0 {\displaystyle d\rho _{T}\left(x\right)/dx=0}, where ρ T {\displaystyle \rho _{T}} is the spectral energy energy density, one finds e − x = 1 − x D {\displaystyle e^{-x}=1-{\frac {x}{D}}}, where D {\displaystyle D} is the number of degrees of freedom for spatial translation. The solution x = D + W ( − D e − D ) {\displaystyle x=D+W\left(-De^{-D}\right)} shows that the spectral energy density is dependent on the dimensionality of the universe.
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 W function.
Epidemiology
In the t → ∞ limit of the SIR model, the proportion of susceptible and recovered individuals has a solution in terms of the Lambert W function.
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 W 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 u ln u = v (where u and v clump together the geometrical and physical factors of the problem), which is solved by the Lambert W function. The first solution to this problem, due to Sommerfeld circa 1898, already contained an iterative method to determine the value of the Lambert W function.
Orthogonal trajectories of real ellipses
The family of ellipses x 2 + ( 1 − ε 2 ) y 2 = ε 2 {\displaystyle x^{2}+(1-\varepsilon ^{2})y^{2}=\varepsilon ^{2}} centered at ( 0 , 0 ) {\displaystyle (0,0)} is parameterized by eccentricity ε {\displaystyle \varepsilon }. The orthogonal trajectories of this family are given by the differential equation ( 1 y + y ) d y = ( 1 x − x ) d x {\displaystyle \left({\frac {1}{y}}+y\right)dy=\left({\frac {1}{x}}-x\right)dx} whose general solution is the family y 2 = {\displaystyle y^{2}=}W 0 ( x 2 exp ( − 2 C − x 2 ) ) {\displaystyle W_{0}(x^{2}\exp(-2C-x^{2}))}.
Generalizations
The standard Lambert W function expresses exact solutions to transcendental algebraic equations (in x) of the form:
| e − c x = a 0 ( x − r ) {\displaystyle e^{-cx}=a_{0}(x-r)} |
where a0, c and r are real constants. The solution is x = r + 1 c W ( c e − c r a 0 ) . {\displaystyle x=r+{\frac {1}{c}}W\left({\frac {c\,e^{-cr}}{a_{0}}}\right).} Generalizations of the Lambert W function include:
- An application to general relativity and quantum mechanics (quantum gravity) in lower dimensions, in fact a link (unknown prior to 2007) between these two areas, where the right-hand side of (1) is replaced by a quadratic polynomial in x: e − c x = a 0 ( x − r 1 ) ( x − r 2 ) , {\displaystyle e^{-cx}=a_{0}\left(x-r_{1}\right)\left(x-r_{2}\right),} where r1 and r2 are real distinct constants, the roots of the quadratic polynomial. Here, the solution is a function which has a single argument x but the terms like ri and a0 are parameters of that function. In this respect, the generalization resembles the hypergeometric function and the Meijer G function but it belongs to a different class of functions. When r1 = r2, both sides of (2) can be factored and reduced to (1) and thus the solution reduces to that of the standard W function. Equation (2) expresses the equation governing the dilaton field, from which is derived the metric of the R = T or lineal two-body gravity problem in 1 + 1 dimensions (one spatial dimension and one time dimension) for the case of unequal rest masses, as well as the eigenenergies of the quantum-mechanical double-well Dirac delta function model for unequal charges in one dimension.
- Analytical solutions of the eigenenergies of a special case of the quantum mechanical three-body problem, namely the (three-dimensional) hydrogen molecule-ion. Here the right-hand side of (1) is replaced by a ratio of infinite order polynomials in x: e − c x = a 0 ∏ i = 1 ∞ ( x − r i ) ∏ i = 1 ∞ ( x − s i ) {\displaystyle e^{-cx}=a_{0}{\frac {\displaystyle \prod _{i=1}^{\infty }(x-r_{i})}{\displaystyle \prod _{i=1}^{\infty }(x-s_{i})}}} where ri and si are distinct real constants and x is a function of the eigenenergy and the internuclear distance R. Equation (3) with its specialized cases expressed in (1) and (2) is related to a large class of delay differential equations. G. H. Hardy's notion of a "false derivative" provides exact multiple roots to special cases of (3).
Applications of the Lambert W function in fundamental physical problems are not exhausted even for the standard case expressed in (1) as seen recently in the area of atomic, molecular, and optical physics.
Plots
- Plots of the Lambert W function on the complex plane
- z = Re(W0(x + iy))
- z = Im(W0(x + iy))
- z = |W0(x + iy)|
- Superimposition of the previous three plots
Numerical evaluation
The W function may be approximated using Newton's method, with successive approximations to w = W(z) (so z = wew) being
w j + 1 = w j − w j e w j − z w j e w j + e w j . {\displaystyle w_{j+1}=w_{j}-{\frac {w_{j}e^{w_{j}}-z}{w_{j}e^{w_{j}}+e^{w_{j}}}}.}
Faster convergence may be obtained using Halley's method,
w j + 1 = w j − w j e w j − z w j e w j + e w j − ( w j + 2 ) ( w j e w j − z ) 2 w j + 2 {\displaystyle w_{j+1}=w_{j}-{\frac {w_{j}e^{w_{j}}-z}{w_{j}e^{w_{j}}+e^{w_{j}}-{\dfrac {\left(w_{j}+2\right)\left(w_{j}e^{w_{j}}-z\right)}{2w_{j}+2}}}}}
given in Corless et al. Because the computation time is dominated by the exponential function, this is only slightly more expensive than Newton's method.
For real x ≥ − 1 / e {\displaystyle x\geq -1/e}, it may be approximated by the quadratic-rate recursive formula of R. Iacono and J.P. Boyd:
w n + 1 ( x ) = w n ( x ) 1 + w n ( x ) ( 1 + log ( x w n ( x ) ) ) . {\displaystyle w_{n+1}(x)={\frac {w_{n}(x)}{1+w_{n}(x)}}\left(1+\log \left({\frac {x}{w_{n}(x)}}\right)\right).}
Lajos Lóczi proves that by using this iteration with an appropriate starting value w 0 ( x ) {\displaystyle w_{0}(x)},
- For the principal branch W 0 : {\displaystyle W_{0}:} if x ∈ ( e , ∞ ) {\displaystyle x\in (e,\infty )}: w 0 ( x ) = log ( x ) − log ( log ( x ) ) , {\displaystyle w_{0}(x)=\log(x)-\log(\log(x)),} if x ∈ ( 0 , e ) : {\displaystyle x\in (0,e):} w 0 ( x ) = x / e , {\displaystyle w_{0}(x)=x/e,} if x ∈ ( − 1 / e , 0 ) : {\displaystyle x\in (-1/e,0):} w 0 ( x ) = e x log ( 1 + 1 + e x ) 1 + e x + 1 + e x , {\displaystyle w_{0}(x)={\frac {ex\log(1+{\sqrt {1+ex}})}{1+ex+{\sqrt {1+ex}}}},}
- For the branch W − 1 : {\displaystyle W_{-1}:} if x ∈ ( − 1 / 4 , 0 ) : {\displaystyle x\in (-1/4,0):} w 0 ( x ) = log ( − x ) − log ( − log ( − x ) ) , {\displaystyle w_{0}(x)=\log(-x)-\log(-\log(-x)),} if x ∈ ( − 1 / e , − 1 / 4 ] : {\displaystyle x\in (-1/e,-1/4]:} w 0 ( x ) = − 1 − 2 1 + e x , {\displaystyle w_{0}(x)=-1-{\sqrt {2}}{\sqrt {1+ex}},}
one can determine the maximum number of iteration steps in advance for any precision:
- if x ∈ ( e , ∞ ) {\displaystyle x\in (e,\infty )} (Theorem 2.4): 0 < W 0 ( x ) − w n ( x ) < ( log ( 1 + 1 / e ) ) 2 n , {\displaystyle 0<W_{0}(x)-w_{n}(x)<\left(\log(1+1/e)\right)^{2^{n}},}
- if x ∈ ( 0 , e ) {\displaystyle x\in (0,e)} (Theorem 2.9): 0 < W 0 ( x ) − w n ( x ) < ( 1 − 1 / e ) 2 n − 1 5 , {\displaystyle 0<W_{0}(x)-w_{n}(x)<{\frac {\left(1-1/e\right)^{2^{n}-1}}{5}},}
- if x ∈ ( − 1 / e , 0 ) : {\displaystyle x\in (-1/e,0):} for the principal branch W 0 {\displaystyle W_{0}} (Theorem 2.17): 0 < w n ( x ) − W 0 ( x ) < ( 1 / 10 ) 2 n , {\displaystyle 0<w_{n}(x)-W_{0}(x)<\left(1/10\right)^{2^{n}},} for the branch W − 1 {\displaystyle W_{-1}}(Theorem 2.23): 0 < W − 1 ( x ) − w n ( x ) < ( 1 / 2 ) 2 n . {\displaystyle 0<W_{-1}(x)-w_{n}(x)<\left(1/2\right)^{2^{n}}.}
Toshio Fukushima has presented a fast method for approximating the real valued parts of the principal and secondary branches of the W function without using any iteration. In this method the W function is evaluated as a conditional switch of minimax rational functions on transformed variables: W 0 ( z ) = { X k ( x ) , ( z k − 1 ≤ z < z k , k = 1 , 2 , … , 17 ) , U k ( u ) , ( z k − 1 ≤ z < z k , k = 18 , 19 ) , {\displaystyle W_{0}(z)={\begin{cases}X_{k}(x),&(z_{k-1}\leq z<z_{k},\quad k=1,2,\ldots ,17),\\U_{k}(u),&(z_{k-1}\leq z<z_{k},\quad k=18,19),\end{cases}}} W − 1 ( z ) = { Y k ( y ) , ( z k − 1 ≤ z < z k , k = − 1 , − 2 , … , − 7 ) , V k ( v ) , ( z k − 1 ≤ z < z k , k = − 8 , − 9 , − 10 ) , {\displaystyle W_{-1}(z)={\begin{cases}Y_{k}(y),&(z_{k-1}\leq z<z_{k},\quad k=-1,-2,\ldots ,-7),\\V_{k}(v),&(z_{k-1}\leq z<z_{k},\quad k=-8,-9,-10),\end{cases}}} where u, v, x, and y are transformations of z:
u = ln z , v = ln ( − z ) , x = z + 1 / e , y = − z / ( x + 1 / e ) {\displaystyle u=\ln {z},\quad v=\ln(-z),\quad x={\sqrt {z+1/e}},\quad y=-z/(x+1/{\sqrt {e}})}.
Here U k ( u ) {\displaystyle U_{k}(u)}, V k ( v ) {\displaystyle V_{k}(v)}, X k ( x ) {\displaystyle X_{k}(x)}, and Y k ( y ) {\displaystyle Y_{k}(y)} are rational functions whose coefficients for different k-values are listed in the referenced paper together with the z k {\displaystyle z_{k}} values that determine their subdomains. With higher degree polynomials in these rational functions the method can approximate the W function more accurately.
For example, when − 1 / e ≤ z ≤ 2.0082178115844727 {\displaystyle -1/e\leq z\leq 2.0082178115844727}, W 0 ( z ) {\displaystyle W_{0}(z)} can be approximated to 24 bits of accuracy on 64-bit floating point values as W 0 ( z ) ≈ X 1 ( x ) = ∑ i 4 P i x i ∑ i 3 Q i x i {\displaystyle W_{0}(z)\approx X_{1}(x)={\frac {\sum _{i}^{4}P_{i}x^{i}}{\sum _{i}^{3}Q_{i}x^{i}}}} where x is defined with the transformation above and the coefficients P i {\displaystyle P_{i}} and Q i {\displaystyle Q_{i}} are given in the table below.
| i {\displaystyle i} | P i {\displaystyle P_{i}} | Q i {\displaystyle Q_{i}} |
|---|---|---|
| 0 | −0.9999999403954019 | 1 |
| 1 | 0.0557300521617778 | 2.275906559863465 |
| 2 | 2.1269732491053173 | 1.367597013868904 |
| 3 | 0.8135112367835288 | 0.18615823452831623 |
| 4 | 0.01632488014607016 | 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 W 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) | |
lambert_w0, lambert_wm1, lambert_w0_prime, and lambert_wm1_prime | Boost C++ libraries | ||
LambertW | LambertW-function | ||
| GP | lambertw | ||
| Julia | lambertw | LambertW | |
| Maple | LambertW | ||
| Mathematica | ProductLog (with LambertW as a silent alias) | ||
| Matlab | lambertw | ||
| Maxima | lambert_w | ||
| Octave | lambertw | specfun | |
| PARI | glambertW, lambertWC, glambertW_i, mplambertW, lambertW | ||
| Perl | LambertW | ntheory | |
| Python | lambertw | scipy | |
| R | lambertW0 and lambertWm1 | lamW | |
| Rust | lambert_w, lambert_w0 and lambert_wm1 | lambert_w |
See also
- Wright omega function
- Lambert's trinomial equation
- Lagrange inversion theorem
- Experimental mathematics
- Holstein–Herring method
- R = T model
- Ross' π lemma
Notes
- Corless, R.; Gonnet, G.; Hare, D.; Jeffrey, D.; Knuth, Donald (1996). (PDF). Advances in Computational Mathematics. 5: 329–359. doi:. ISSN . S2CID . Archived from (PDF) on 2010-12-14.
- Chapeau-Blondeau, F.; Monir, A. (2002). (PDF). IEEE Trans. Signal Process. 50 (9). doi:. Archived from (PDF) on 2012-03-28.
- Francis; et al. (2000). "Quantitative General Theory for Periodic Breathing". Circulation. 102 (18): 2214–21. CiteSeerX . doi:. PMID . S2CID . (Lambert function is used to solve delay-differential dynamics in human disease.)
- Hayes, B. (2005). (PDF). American Scientist. 93 (2): 104–8. doi:. (PDF) from the original on 2022-10-10.
- Roy, R.; Olver, F. W. J. (2010), , in Olver, Frank W. J.; Lozier, Daniel M.; Boisvert, Ronald F.; Clark, Charles W. (eds.), NIST Handbook of Mathematical Functions, Cambridge University Press, ISBN 978-0-521-19225-5, MR.
- Stewart, Seán M. (2005). (PDF). Australian Senior Mathematics Journal. 19 (2): 8–26. ISSN . (PDF) from the original on 2022-10-10.
- Veberic, D. (2010). "Having Fun with Lambert W(x) Function". arXiv: [].
- Veberic, D. (2012). "Lambert W function for applications in physics". Computer Physics Communications. 183 (12): 2622–8. arXiv:. Bibcode:. doi:. S2CID .
- Chatzigeorgiou, I. (2013). "Bounds on the Lambert function and their Application to the Outage Analysis of User Cooperation". IEEE Communications Letters. 17 (8): 1505–8. arXiv:. Bibcode:. doi:. S2CID .
External links
- GPL with Halley's and Fritsch's iteration.
- of the – GSL