In mathematics, the Lambert-W function, also called the omega function or product logarithm, is a set of functions, namely the branches of the inverse relation of the function f(z) = zez where ez is the exponential function and z is any complex number. In other words

${\displaystyle z=f^{-1}(ze^{z})=W(ze^{z})}$

By substituting the above equation in ${\displaystyle z'=ze^{z))$, we get the defining equation for the W function (and for the W relation in general):

${\displaystyle z'=W(z')e^{W(z')))$

for any complex number z'.

Since the function ƒ is not injective, the relation W is multivalued (except at 0). If we restrict attention to real-valued W, the complex variable z is then replaced by the real variable x, and the relation is defined only for x ≥ −1/e, and is double-valued on (−1/e, 0). The additional constraint W ≥ −1 defines a single-valued function W0(x). We have W0(0) = 0 and W0(−1/e) = −1. Meanwhile, the lower branch has W ≤ −1 and is denoted W−1(x). It decreases from W−1(−1/e) = −1 to W−1(0) = −∞.

It can be extended to the function ${\displaystyle z=xa^{x))$ using the identity ${\displaystyle x={\frac {W[\ln(a)z]}{\ln(a)))}$.

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

## Terminology

The Lambert-W function is named after Johann Heinrich Lambert. The main branch W0 is denoted by Wp in the Digital Library of Mathematical Functions and the branch W−1 is denoted by Wm there.

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

## History

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

The function Lambert considered was

${\displaystyle x=x^{m}+q}$

Euler transformed this equation into the form

${\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. Taking limits he derived the equation

${\displaystyle \log(x)=cx^{a))$

He then put a = 1 and obtained a convergent series solution.

Taking derivatives with respect to x and after some manipulation the standard form of the Lambert function is obtained.

The Lambert W function was "re-discovered" every decade or so in specialized applications.[citation needed] In 1993, when it was reported that the Lambert W function provides an exact solution to the quantum-mechanical double-well Dirac delta function model for equal charges—a fundamental problem in physics—Corless and developers of the Maple Computer algebra system made a library search, and found that this function was ubiquitous in nature.[2][5]

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

## Calculus

### Derivative

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

${\displaystyle z(1+W){\frac ((\rm {d))W}((\rm {d))z))=W\quad {\text{for ))z\neq -1/e.}$

(W is not differentiable for z = −1/e.) As a consequence, we get the following formula for the derivative of W:

${\displaystyle {\frac ((\rm {d))W}((\rm {d))z))={\frac {W(z)}{z(1+W(z))))\quad {\text{for ))z\not \in \{0,-1/e\}.}$

Using the identity ${\displaystyle e^{W(z)}=z/W(z)}$, we get the following equivalent formula which holds for all ${\displaystyle z\not =-1/e}$:

${\displaystyle {\frac ((\rm {d))W}((\rm {d))z))={\frac {1}{z+e^{W(z)))}.}$

### Antiderivative

The function W(x), and many expressions involving W(x), can be integrated using the substitution w = W(x), i.e. x = w ew:

{\displaystyle {\begin{aligned}\int W(x)\,{\rm {d))x&=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 does not hold at ${\displaystyle x=0}$.)

One consequence of which (using the fact that ${\displaystyle W(e)=1}$) is the identity:

${\displaystyle \int _{0}^{e}W(x)\,{\rm {d))x=e-1}$

## Asymptotic expansions

The Taylor series of ${\displaystyle W_{0))$ around 0 can be found using the Lagrange inversion theorem and is given by

${\displaystyle W_{0}(x)=\sum _{n=1}^{\infty }{\frac {(-n)^{n-1)){n!))x^{n}=x-x^{2}+{\frac {3}{2))x^{3}-{\frac {8}{3))x^{4}+{\frac {125}{24))x^{5}-\cdots }$

The radius of convergence is 1/e, 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 (−∞, −1/e]; this holomorphic function defines the principal branch of the Lambert W function.

For large values of x, W0 is asymptotic to

${\displaystyle {W_{0}(x)=L_{1}-L_{2}+{\frac {L_{2)){L_{1))}+{\frac {L_{2}(-2+L_{2})}{2L_{1}^{2))}+{\frac {L_{2}(6-9L_{2}+2L_{2}^{2})}{6L_{1}^{3))}+{\frac {L_{2}(-12+36L_{2}-22L_{2}^{2}+3L_{2}^{3})}{12L_{1}^{4))}+\cdots ))$
${\displaystyle W_{0}(x)=L_{1}-L_{2}+\sum _{\ell =0}^{\infty }\sum _{m=1}^{\infty }{\frac {(-1)^{\ell }\left[{\begin{matrix}\ell +m\\\ell +1\end{matrix))\right]}{m!))L_{1}^{-\ell -m}L_{2}^{m))$

where ${\displaystyle L_{1}=\ln(x)}$ , ${\displaystyle L_{2}=\ln {\bigl (}\ln(x){\bigr )))$ and ${\displaystyle \left[{\begin{matrix}\ell +m\\\ell +1\end{matrix))\right]}$ is a non-negative Stirling number of the first kind.[6] Keeping only the first two terms of the expansion,

${\displaystyle W_{0}(x)=\ln(x)-\ln {\bigl (}\ln(x){\bigr )}+o(1).}$

The other real branch, ${\displaystyle W_{-1))$, defined in the interval [−1/e, 0), has an approximation of the same form as x approaches zero, with in this case ${\displaystyle L_{1}=\ln(-x)}$ and ${\displaystyle L_{2}=\ln(-\ln(-x))}$.

In[7] it is shown that the following bound holds for ${\displaystyle x\geq e}$:

${\displaystyle \ln(x)-\ln {\bigl (}\ln(x){\bigr )}+{\frac {\ln {\bigl (}\ln(x){\bigr ))){2\ln(x)))\leq W_{0}(x)\leq \ln(x)-\ln {\bigl (}\ln(x){\bigr )}+{\frac {e}{e-1)){\frac {\ln {\bigl (}\ln(x){\bigr ))){\ln(x)))}$.

In[8] it was proven that branch ${\displaystyle W_{-1))$ can be bounded as follows:

${\displaystyle -1-{\sqrt {2u))-u

for ${\displaystyle u>0}$.

### Integer and complex powers

Integer powers of ${\displaystyle W_{0))$ also admit simple Taylor (or Laurent) series expansions at ${\displaystyle 0}$

${\displaystyle W_{0}(x)^{2}=\sum _{n=2}^{\infty }{\frac {-2(-n)^{n-3)){(n-2)!))\ x^{n}=x^{2}-2x^{3}+4x^{4}-{\frac {25}{3))x^{5}+18x^{6}-\cdots }$

More generally, for ${\displaystyle r\in \mathbb {Z} ,}$ the Lagrange inversion formula gives

${\displaystyle W_{0}(x)^{r}=\sum _{n=r}^{\infty }{\frac {-r(-n)^{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 ${\displaystyle W_{0}(x)/x}$

${\displaystyle \left({\frac {W_{0}(x)}{x))\right)^{r}=\exp(-rW_{0}(x))=\sum _{n=0}^{\infty }{\frac {r(n+r)^{n-1)){n!))\ (-x)^{n},}$

which holds for any ${\displaystyle r\in \mathbb {C} }$ and ${\displaystyle |x|.

## Identities

A few identities follow from definition:

${\displaystyle W(x\cdot e^{x})=x{\text{ for ))x\geq 0}$
${\displaystyle W_{0}(x\cdot e^{x})=x{\text{ for ))x\geq -1}$
${\displaystyle W_{-1}(x\cdot e^{x})=x{\text{ for ))x\leq -1}$

Note that, since f(x) = x⋅ex 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 x⋅ex = y⋅ey has two 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), Wi(x⋅ex) is the other solution of the equation x⋅ex = y⋅ey.

{\displaystyle {\begin{aligned}&W(x)\cdot e^{W(x)}=x\\[5pt]&e^{W(x)}={\frac {x}{W(x)))\\[5pt]&e^{-W(x)}={\frac {W(x)}{x))\\[5pt]&e^{n\cdot W(x)}=\left({\frac {x}{W(x)))\right)^{n}\end{aligned))}[9]
${\displaystyle \ln W(x)=\ln(x)-W(x){\text{ for ))x>0}$[10]
{\displaystyle {\begin{aligned}&W(x)=\ln \left({\frac {x}{W(x)))\right){\text{ for ))x\geq {\frac {-1}{e))\\[5pt]&W\left({\frac {nx^{n)){W(x)^{n-1))}\right)=n\cdot W(x){\text{ for ))n>0{\text{, ))x>0\end{aligned))}

(which can be extended to other n and x if the right branch is chosen)

${\displaystyle W(x)+W(y)=W\left(xy\left({\frac {1}{W(x)))+{\frac {1}{W(y)))\right)\right){\text{ for ))x,y>0}$

From inverting f(ln(x)):

${\displaystyle W(x\cdot \ln x)=\ln x{\text{ for ))x>0}$
${\displaystyle W(x\cdot \ln x)=W(x)+\ln W(x){\text{ for ))x>0}$

With Euler's iterated exponential h(x):

{\displaystyle {\begin{aligned}h(x)&=e^{-W(-\ln(x))}\\&={\frac {W(-\ln(x))}{-\ln(x))){\text{ for ))x\not =1\end{aligned))}

## Special values

For any non-zero algebraic number x, W(x) is a transcendental number. Indeed, if W(x) is zero then x must be zero as well, and if W(x) is non-zero and algebraic, then by the Lindemann–Weierstrass theorem, eW(x) must be transcendental, implying that x=W(x)eW(x) must also be transcendental.

${\displaystyle W\left(-{\frac {\pi }{2))\right)={\frac {\pi }{2)){\rm {i))}$
${\displaystyle W\left(-{\frac {\ln a}{a))\right)=-\ln a\quad \left({\frac {1}{e))\leq a\leq e\right)}$
${\displaystyle W\left(-{\frac {1}{e))\right)=-1}$
${\displaystyle W(0)=0\,}$
${\displaystyle W(1)=\Omega ={\frac {1}{\displaystyle \int _{-\infty }^{+\infty }{\frac {dt}{(e^{t}-t)^{2}+\pi ^{2))))}-1\approx 0.56714329\ldots \,}$ (the Omega constant)
${\displaystyle W\left(1\right)=e^{-W(1)}=\ln \left({\frac {1}{W(1)))\right)=-\ln W(1)}$
${\displaystyle W(e)=1\,}$
${\displaystyle W(-1)\approx -0.31813-1.33723{\rm ((i}\,))}$
${\displaystyle W'(0)=1\,}$

## Representations

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

${\displaystyle -{\frac {\pi }{2))W(-x)=\int _{0}^{\pi }{\frac {\sin \left({\frac {3}{2))t\right)-xe^{\cos t}\sin \left({\frac {5}{2))t-\sin t\right)}{1-2xe^{\cos t}\cos(t-\sin t)+x^{2}e^{2\cos t))}\sin \left({\frac {1}{2))t\right)dt\quad (|x|<1/e).}$

On the same domain, the considerably simpler representation is found by Mező:[12]

${\displaystyle W(x)={\frac {1}{\pi ))\Re \int _{0}^{\pi }\log \left({\frac {e^{e^{it))-xe^{-it)){e^{e^{it))-xe^{it))}\right)dt.}$

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

${\displaystyle W(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 ))))))))))))))))}$

## Branches and range

There are countably many branches of the W function, denoted by ${\displaystyle W_{k}(z)}$, for k an integer; ${\displaystyle W_{0}(z)}$ being the principal branch. The branch point for the principal branch is at ${\displaystyle z=-1/e}$, with a branch cut that extends to ${\displaystyle -\infty }$ along the negative real axis. This branch cut separates the principal branch from the two branches ${\displaystyle W_{-1))$ and ${\displaystyle W_{1))$. In all other branches, there is a branch point at ${\displaystyle z=0}$, and a branch cut along the whole negative real axis.

The range of the entire function is the complex plane. The image of the real axis coincides with the quadratrix of Hippias, the parametric curve ${\displaystyle w=-t\cot t+it}$.

## Other formulas

### Definite integrals

There are several useful definite integral formulas involving the W function, including the following:

{\displaystyle {\begin{aligned}&\int _{0}^{\pi }W{\bigl (}2\cot ^{2}(x){\bigr )}\sec ^{2}(x)\;\mathrm {d} x=4{\sqrt {\pi ))\\[5pt]&\int _{0}^{\infty }{\frac {W(x)}{x{\sqrt {x))))\mathrm {d} x=2{\sqrt {2\pi ))\\[5pt]&\int _{0}^{\infty }W\left({\frac {1}{x^{2))}\right)\;\mathrm {d} x={\sqrt {2\pi ))\end{aligned))}

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

The second identity can be derived by making the substitution

${\displaystyle u=W(x)\,}$

which gives

{\displaystyle {\begin{aligned}x&=ue^{u}\\[5pt]{\frac {dx}{du))&=(u+1)e^{u}\end{aligned))}

Thus

{\displaystyle {\begin{aligned}\int _{0}^{\infty }{\frac {W(x)}{x{\sqrt {x))))\,\mathrm {d} x&=\int _{0}^{\infty }{\frac {u}{ue^{u}{\sqrt {ue^{u))))}(u+1)e^{u}\,\mathrm {d} u\\[5pt]&=\int _{0}^{\infty }{\frac {u+1}{\sqrt {ue^{u))))\mathrm {d} u\\[5pt]&=\int _{0}^{\infty }{\frac {u+1}{\sqrt {u))}{\frac {1}{\sqrt {e^{u))))\mathrm {d} u\\[5pt]&=\int _{0}^{\infty }u^{\frac {1}{2))e^{-{\frac {u}{2))}\mathrm {d} u+\int _{0}^{\infty }u^{-{\frac {1}{2))}e^{-{\frac {u}{2))}\mathrm {d} u\\[5pt]&=2\int _{0}^{\infty }(2w)^{\frac {1}{2))e^{-w}\,\mathrm {d} w+2\int _{0}^{\infty }(2w)^{-{\frac {1}{2))}e^{-w}\,\mathrm {d} w&&\quad u=2w\\[5pt]&=2{\sqrt {2))\int _{0}^{\infty }w^{\frac {1}{2))e^{-w}\,\mathrm {d} w+{\sqrt {2))\int _{0}^{\infty }w^{-{\frac {1}{2))}e^{-w}\,\mathrm {d} w\\[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))({\sqrt {\pi )))\\[5pt]&=2{\sqrt {2\pi ))\end{aligned))}

The third identity may be derived from the second by making the substitution ${\displaystyle u={\frac {1}{x^{2))))$ and the first can also be derived from the third by the substitution ${\displaystyle z=\tan(x)/{\sqrt {2))}$.

Except for z along the branch cut ${\displaystyle (-\infty ,-1/e]}$ (where the integral does not converge), the principal branch of the Lambert W function can be computed by the following integral:

${\displaystyle W(z)={\frac {z}{2\pi ))\int \limits _{-\pi }^{\pi }{\frac {(1-\nu \cot \nu )^{2}+\nu ^{2)){z+\nu \csc \nu e^{-\nu \cot \nu ))}\,d\nu ={\frac {z}{\pi ))\int \limits _{0}^{\pi }{\frac {(1-\nu \cot \nu )^{2}+\nu ^{2)){z+\nu \csc \nu e^{-\nu \cot \nu ))}\,d\nu }$[14]

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

### Indefinite integrals

${\displaystyle \int {\frac {W(x)}{x))dx={\frac {1}{2)){\Bigl (}1+W(x){\Bigr )}^{2}+C}$

${\displaystyle \int W(A\exp(Bx))dx={\frac {1}{2B)){\Bigl (}1+W(A\exp(Bx)){\Bigr )}^{2}+C}$

## Solutions of equations

Many equations involving exponentials can be solved using the W function. The general strategy is to move all instances of the unknown to one side of the equation and make it look like Y = XeX at which point the W function provides the value of the variable in X.

In other words :

${\displaystyle Y=Xe^{X}\;\Longleftrightarrow \;X=W(Y)}$

### Example 1

{\displaystyle {\begin{aligned}2^{t}&=5t\\1&={\frac {5t}{2^{t))}\\1&=5t\,e^{-t\ln 2}\\{\frac {1}{5))&=t\,e^{-t\ln 2}\\{\frac {-\ln 2}{5))&=(-t\ln 2)\,e^{(-t\ln 2)}\\W\left({\frac {-\ln 2}{5))\right)&=-t\ln 2\\t&=-{\frac {W\left({\frac {-\ln 2}{5))\right)}{\ln 2))\end{aligned))}

More generally, the equation

${\displaystyle p^{x}=ax+b}$

where

${\displaystyle p>0{\text{ and ))p\neq 1{\text{ and ))a\neq 0}$

can be transformed via the substitution

${\displaystyle -t=x+{\frac {b}{a))}$

into

${\displaystyle tp^{t}=R=-{\frac {1}{a))p^{-{\frac {b}{a))))$

giving

${\displaystyle t={\frac {W(R\ln p)}{\ln p))}$

which yields the final solution

${\displaystyle x=-{\frac {W(-{\frac {\ln p}{a))\,p^{-{\frac {b}{a))})}{\ln p))-{\frac {b}{a))}$

### Example 2

{\displaystyle {\begin{aligned}x^{x}&=z\\x\ln x&=\ln z\\e^{\ln x}\cdot \ln x&=\ln z\\\ln x&=W(\ln z)\\x&=e^{W(\ln z)}\\\end{aligned))}

or, equivalently,

${\displaystyle x={\frac {\ln z}{W(\ln z))),}$

since

${\displaystyle \ln z=W(\ln z)e^{W(\ln z)))$

by definition.

### Example 3

{\displaystyle {\begin{aligned}x^{n}&=e^{-ax}\\x^{n}e^{ax}&=1\end{aligned))}

taking the n-th root

{\displaystyle {\begin{aligned}xe^{\frac {ax}{n))&=1\\{\frac {ax}{n))e^{\frac {ax}{n))&={\frac {a}{n))\end{aligned))}

let : ${\displaystyle y={\frac {ax}{n))}$ then

{\displaystyle {\begin{aligned}ye^{y}&={\frac {a}{n))\\y&=W\left({\frac {a}{n))\right)\\x&={\frac {n}{a))W\left({\frac {a}{n))\right)\end{aligned))}

### Example 4

Whenever the complex infinite exponential tetration

${\displaystyle z^{z^{z^{\cdot ^{\cdot ^{\cdot ))))))$

converges, the Lambert W function provides the actual limit value as

${\displaystyle c=e^{-W(-\ln(z))))$

where ln(z) denotes the principal branch of the complex log function. This can be shown by observing that

${\displaystyle z^{c}=c}$

if c exists, so

{\displaystyle {\begin{aligned}z&=c^{\frac {1}{c))\\z^{-1}&=c^{-{\frac {1}{c))}\\{\frac {1}{z))&=\left({\frac {1}{c))\right)^{\frac {1}{c))\\-\ln(z)&=\left({\frac {1}{c))\right)\ln \left({\frac {1}{c))\right)\\-\ln(z)&=e^{\ln \left({\frac {1}{c))\right)}\ln \left({\frac {1}{c))\right)\\\ln \left({\frac {1}{c))\right)&=W(-\ln(z))\\{\frac {1}{c))&=e^{W(-\ln(z))}\\c&=e^{-W(-\ln(z))}\\\end{aligned))}

which is the result which was to be found.

### Example 5

Solutions for

${\displaystyle x\log _{b}\left(x\right)=a}$

have the form[5]

${\displaystyle x=e^{W(a\ln b)}.}$

### Example 6

The solution for the current in a series diode/resistor circuit can also be written in terms of the Lambert W. See diode modeling.

### Example 7

${\displaystyle {\dot {y))(t)=ay(t-1)}$

has characteristic equation ${\displaystyle \lambda =ae^{-\lambda ))$, leading to ${\displaystyle \lambda =W_{k}(a)}$ and ${\displaystyle y(t)=e^{W_{k}(a)t))$, where ${\displaystyle k}$ is the branch index. If ${\displaystyle a\geq e^{-1))$, only ${\displaystyle W_{0}(a)}$ need be considered.

## Applications

### Instrument design

The Lambert-W function has been recently (2013) shown to be the optimal solution for the required magnetic field of a Zeeman slower.[15]

### Viscous flows

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

${\displaystyle H(x)=1+W\left[(H(0)-1)\exp \left((H(0)-1)-{\frac {x}{L))\right)\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.

### Neuroimaging

The Lambert-W function was 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.[16]

### Chemical engineering

The Lambert-W function was employed in the field of Chemical Engineering for modelling the porous electrode film thickness in a glassy carbon based supercapacitor for electrochemical energy storage. The Lambert "W" function turned out to be the exact solution for a gas phase thermal activation process where growth of carbon film and combustion of the same film compete with each other.[17][18]

### Materials science

The Lambert-W function was 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.[19]

### 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 homogeneus 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 ligther fluid.[20]

### Bernoulli numbers and Todd genus

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

${\displaystyle Y={\frac {X}{1-e^{X))))$

can be solved by means of the two real branches ${\displaystyle W_{0))$ and ${\displaystyle W_{-1))$:

${\displaystyle X(Y)=W_{-1}(Ye^{Y})-W_{0}(Ye^{Y})=Y-W_{0}(Ye^{Y}){\text{for ))Y<-1.}$
${\displaystyle X(Y)=W_{0}(Ye^{Y})-W_{-1}(Ye^{Y})=Y-W_{-1}(Ye^{Y}){\text{for ))-1

This application shows in evidence that the branch difference of the W function can be employed in order to solve other trascendental equations.

### Statistics

The centroid of a set of histograms defined with respect to the symmetrized Kullback-Leibler divergence (also called the Jeffreys divergence) is in closed form using the Lambert function.

### Exact solutions of the Schrödinger equation

The Lambert-W function appears in a quantum-mechanical potential (see The Lambert-W step-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

${\displaystyle V={\frac {V_{0)){1+W(e^{-x/\sigma })))}$.

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 ${\displaystyle z=W(e^{-x/\sigma })}$.

### 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.[21]

## Generalizations

The standard Lambert-W function expresses exact solutions to transcendental algebraic equations (in x) of the form:

${\displaystyle e^{-cx}=a_{o}(x-r)}$
(1)

where a0, c and r are real constants. The solution is ${\displaystyle x=r+{\frac {1}{c))W\!\left({\frac {c\,e^{-cr)){a_{o))}\right)\,}$. Generalizations of the Lambert W function[22][23][24] include:

${\displaystyle e^{-cx}=a_{o}(x-r_{1})(x-r_{2})}$
(2)
and where r1 and r2 are real distinct constants, the roots of the quadratic polynomial. Here, the solution is a function has a single argument x but the terms like ri and ao 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. Eq. (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.[26] Here the right-hand-side of (1) (or (2)) is now a ratio of infinite order polynomials in x:
${\displaystyle e^{-cx}=a_{o}{\frac {\displaystyle \prod _{i=1}^{\infty }(x-r_{i})}{\displaystyle \prod _{i=1}^{\infty }(x-s_{i})))}$
(3)
where ri and si are distinct real constants and x is a function of the eigenenergy and the internuclear distance R. Eq. (3) with its specialized cases expressed in (1) and (2) is related to a large class of delay differential equations. Hardy's notion of a "false derivative" provides exact multiple roots to special cases of (3).[27]

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.[28]

## Numerical evaluation

The W function may be approximated using Newton's method, with successive approximations to ${\displaystyle w=W(z)}$ (so ${\displaystyle z=we^{w))$) being

${\displaystyle w_{j+1}=w_{j}-{\frac {w_{j}e^{w_{j))-z}{e^{w_{j))+w_{j}e^{w_{j)))).}$

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

${\displaystyle w_{j+1}=w_{j}-{\frac {w_{j}e^{w_{j))-z}{e^{w_{j))(w_{j}+1)-{\frac {(w_{j}+2)(w_{j}e^{w_{j))-z)}{2w_{j}+2))))}$

given in Corless et al. to compute W.

## Software

The Lambert-W function is implemented as LambertW in Maple, lambertw in GP (and glambertW in PARI), lambertw in MATLAB,[29] also lambertw in octave with the 'specfun' package, as lambert_w in Maxima,[30] as ProductLog (with a silent alias LambertW) in Mathematica,[31] as lambertw in Python scipy's special function package,[32] as LambertW in Perl's ntheory module,[33] and as gsl_sf_lambert_W0 and gsl_sf_lambert_Wm1 functions in special functions section of the GNU Scientific Library – GSL. In R, the Lambert-W function is implemented as the lambertW0 and lambertWm1 functions in the 'lamW' package[34].

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

## Notes

1. ^ Chow, Timothy Y. (1999), "What is a closed-form number?", American Mathematical Monthly, 106 (5): 440–448, doi:10.2307/2589148, MR 1699262.
2. ^ a b Corless, R. M.; Gonnet, G. H.; Hare, D. E. G.; Jeffrey, D. J.; Knuth, D. E. (1996). "On the Lambert W function" (PostScript). Advances in Computational Mathematics. 5: 329–359. doi:10.1007/BF02124750.
3. ^ Lambert JH, "Observationes variae in mathesin puram", Acta Helveticae physico-mathematico-anatomico-botanico-medica, Band III, 128–168, 1758 (facsimile)
4. ^ Euler, L. "De serie Lambertina Plurimisque eius insignibus proprietatibus." Acta Acad. Scient. Petropol. 2, 29–51, 1783. Reprinted in Euler, L. Opera Omnia, Series Prima, Vol. 6: Commentationes Algebraicae. Leipzig, Germany: Teubner, pp. 350–369, 1921. (facsimile)
5. ^ a b Corless, R. M.; Gonnet, G. H.; Hare, D. E. G.; Jeffrey, D. J. (1993). "Lambert's W function in Maple". The Maple Technical Newsletter. 9. MapleTech: 12–22. CiteSeerX 10.1.1.33.2556.
6. ^ Approximation of the Lambert W function and the hyperpower function, Hoorfar, Abdolhossein; Hassani, Mehdi.
7. ^ http://www.emis.de/journals/JIPAM/images/107_07_JIPAM/107_07_www.pdf
8. ^ Chatzigeorgiou, I. (2013). "Bounds on the Lambert function and their Application to the Outage Analysis of User Cooperation". IEEE Communications Letters. 17 (8): 1505–1508. arXiv:1601.04895. doi:10.1109/LCOMM.2013.070113.130972.
9. ^ http://functions.wolfram.com/ElementaryFunctions/ProductLog/17/01/0001/
10. ^ http://mathworld.wolfram.com/LambertW-Function.html
11. ^ Finch, S. R. (2003). Mathematical constants. Cambridge University Press. p. 450.
12. ^ István, Mező. "An integral representation for the principal branch of Lambert the W function". Retrieved 7 November 2017.
13. ^ Dubinov, A. E.; Dubinova, I. D.; Saǐkov, S. K. (2006). The Lambert W Function and Its Applications to Mathematical Problems of Physics (in Russian). RFNC-VNIIEF. p. 53.
14. ^ "The Lambert W Function". Ontario Research Centre.
15. ^ B Ohayon., G Ron. (2013). "New approaches in designing a Zeeman Slower". Journal of Instrumentation. 8 (02): P02016. doi:10.1088/1748-0221/8/02/P02016.
16. ^ Sotero, Roberto C.; Iturria-Medina, Yasser (2011). "From Blood oxygenation level dependent (BOLD) signals to brain temperature maps". Bull Math Biol. 73 (11): 2731–47. doi:10.1007/s11538-011-9645-5. PMID 21409512.
17. ^ Braun, Artur; Wokaun, Alexander; Hermanns, Heinz-Guenter (2003). "Analytical Solution to a Growth Problem with Two Moving Boundaries". Appl Math Model. 27 (1): 47–52. doi:10.1016/S0307-904X(02)00085-9.
18. ^ Braun, Artur; Baertsch, Martin; Schnyder, Bernhard; Koetz, Ruediger (2000). "A Model for the film growth in samples with two moving boundaries – An Application and Extension of the Unreacted-Core Model". Chem Eng Sci. 55 (22): 5273–5282. doi:10.1016/S0009-2509(00)00143-3.
19. ^ Braun, Artur; Briggs, Keith M.; Boeni, Peter (2003). "Analytical solution to Matthews' and Blakeslee's critical dislocation formation thickness of epitaxially grown thin films". J Cryst Growth. 241 (1/2): 231–234. Bibcode:2002JCrGr.241..231B. doi:10.1016/S0022-0248(02)00941-7.
20. ^ Colla, Pietro (2014). "A New Analytical Method for the Motion of a Two-Phase Interface in a Tilted Porous Medium". PROCEEDINGS,Thirty-Eighth Workshop on Geothermal Reservoir Engineering,Stanford University. SGP-TR-202.([1])
21. ^ de la Madrid, R. (2017). "Numerical calculation of the decay widths, the decay constants, and the decay energy spectra of the resonances of the delta-shell potential". Nucl. Phys. A. 962: 24–45. arXiv:1704.00047. doi:10.1016/j.nuclphysa.2017.03.006.
22. ^ Scott, T. C.; Mann, R. B.; Martinez Ii, Roberto E. (2006). "General Relativity and Quantum Mechanics: Towards a Generalization of the Lambert W Function". AAECC (Applicable Algebra in Engineering, Communication and Computing). 17 (1): 41–47. arXiv:math-ph/0607011. doi:10.1007/s00200-006-0196-1.
23. ^ Scott, T. C.; Fee, G.; Grotendorst, J. (2013). "Asymptotic series of Generalized Lambert W Function". SIGSAM (ACM Special Interest Group in Symbolic and Algebraic Manipulation). 47 (185): 75–83. doi:10.1145/2576802.2576804.
24. ^ Scott, T. C.; Fee, G.; Grotendorst, J.; Zhang, W.Z. (2014). "Numerics of the Generalized Lambert W Function". SIGSAM. 48 (1/2): 42–56. doi:10.1145/2644288.2644298.
25. ^ Farrugia, P. S.; Mann, R. B.; Scott, T. C. (2007). "N-body Gravity and the Schrödinger Equation". Class. Quantum Grav. 24 (18): 4647–4659. arXiv:gr-qc/0611144. doi:10.1088/0264-9381/24/18/006.
26. ^ Scott, T. C.; Aubert-Frécon, M.; Grotendorst, J. (2006). "New Approach for the Electronic Energies of the Hydrogen Molecular Ion". Chem. Phys. 324 (2–3): 323–338. arXiv:physics/0607081. doi:10.1016/j.chemphys.2005.10.031.
27. ^ Maignan, Aude; Scott, T. C. (2016). "Fleshing out the Generalized Lambert W Function". SIGSAM. 50 (2): 45–60. doi:10.1145/2992274.2992275.
28. ^ Scott, T. C.; Lüchow, A.; Bressanini, D.; Morgan, J. D. III (2007). "The Nodal Surfaces of Helium Atom Eigenfunctions". Phys. Rev. A. 75 (6): 060101. doi:10.1103/PhysRevA.75.060101.
29. ^ lambertw – MATLAB
30. ^ Maxima, a Computer Algebra System
31. ^ ProductLog at WolframAlpha
32. ^ [2]
33. ^ ntheory at MetaCPAN
34. ^ Adler, Avraham (2017-04-24), lamW: Lambert-W Function, retrieved 2017-12-19
35. ^ The webpage of István Mező