# §4.13 Lambert $W$-Function

The Lambert $W$-function $W\left(z\right)$ is the solution of the equation

 4.13.1 $W{\mathrm{e}}^{W}=z.$ ⓘ Defines: $W\left(\NVar{z}\right)$: Lambert $W$-function Symbols: $\mathrm{e}$: base of natural logarithm and $z$: complex variable Referenced by: §4.13 Permalink: http://dlmf.nist.gov/4.13.E1 Encodings: TeX, pMML, png See also: Annotations for §4.13 and Ch.4

On the $z$-interval $[0,\infty)$ there is one real solution, and it is nonnegative and increasing. On the $z$-interval $(-{\mathrm{e}}^{-1},0)$ there are two real solutions, one increasing and the other decreasing. We call the increasing solution for which $W\left(z\right)\geq W\left(-{\mathrm{e}}^{-1}\right)=-1$ the principal branch and denote it by $W_{0}\left(z\right)$. See Figure 4.13.1.

The decreasing solution can be identified as $W_{\pm 1}\left(x\mp 0\mathrm{i}\right)$. Other solutions of (4.13.1) are other branches of $W\left(z\right)$. They are denoted by $W_{k}\left(z\right)$, $k\in\mathbb{Z}$, and have the property

 4.13.1_1 $W_{k}\left(z\right)={\rm ln}_{k}(z)-\ln\left({\rm ln}_{k}(z)\right)+o\left(1% \right),$ $\left|z\right|\to\infty$, ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $o\left(\NVar{x}\right)$: order less than, $\ln\NVar{z}$: principal branch of logarithm function, $k$: integer and $z$: complex variable Notes: See Corless et al. (1996, §4). Permalink: http://dlmf.nist.gov/4.13.E1_1 Encodings: TeX, pMML, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4

where ${\rm ln}_{k}(z)=\ln\left(z\right)+2\pi\mathrm{i}k$. $W_{0}\left(z\right)$ is a single-valued analytic function on $\mathbb{C}\setminus(-\infty,-{\mathrm{e}}^{-1}]$, real-valued when $z>-{\mathrm{e}}^{-1}$, and has a square root branch point at $z=-{\mathrm{e}}^{-1}$. See (4.13.6) and (4.13.9_1). The other branches $W_{k}\left(z\right)$ are single-valued analytic functions on $\mathbb{C}\setminus(-\infty,0]$, have a logarithmic branch point at $z=0$, and, in the case $k=\pm 1$, have a square root branch point at $z=-{\mathrm{e}}^{-1}\mp 0\mathrm{i}$ respectively. See Figure 4.13.2. Figure 4.13.2: The W⁡(z) function on the first 5 Riemann sheets. W⁡(z) maps the first Riemann sheet |ph⁡(z+e−1)|<π in the middle of the left-hand side to the region enclosed by the green curve on the right-hand side; it maps the Riemann sheet π

Alternative notations are $\operatorname{Wp}\left(x\right)$ for $W_{0}\left(x\right)$, $\operatorname{Wm}\left(x\right)$ for $W_{-1}\left(x+0\mathrm{i}\right)$, both previously used in this section, the Wright $\omega$-function $\omega\left(z\right)=W\left({\mathrm{e}}^{z}\right)$, which is single-valued, satisfies

 4.13.1_2 $\omega\left(z\right)+\ln\left(\omega\left(z\right)\right)=z,$ ⓘ Symbols: $\omega\left(\NVar{z}\right)$: Wright $\omega$-function, $\ln\NVar{z}$: principal branch of logarithm function and $z$: complex variable Referenced by: (4.13.3), §4.13, Erratum (V1.1.7) for Expansion Permalink: http://dlmf.nist.gov/4.13.E1_2 Encodings: TeX, pMML, png Rearrangement (effective with 1.1.7): This equation, which was originally (4.13.3), was moved here, and the symbol for $\omega$ was originally $U$. See also: Annotations for §4.13 and Ch.4

and has several advantages over the Lambert $W$-function (see Lawrence et al. (2012)), and the tree $T$-function $T\left(z\right)=-W\left(-z\right)$, which is a solution of

 4.13.1_3 $T{\mathrm{e}}^{-T}=z.$ ⓘ Symbols: $T\left(\NVar{z}\right)$: Tree $T$-function, $\mathrm{e}$: base of natural logarithm and $z$: complex variable Referenced by: §4.13, Erratum (V1.1.7) for Expansion Permalink: http://dlmf.nist.gov/4.13.E1_3 Encodings: TeX, pMML, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4

Properties include:

 4.13.2 $\displaystyle W_{0}\left(-{\mathrm{e}}^{-1}\right)$ $\displaystyle=W_{\pm 1}\left(-{\mathrm{e}}^{-1}\mp 0\mathrm{i}\right)=-1,$ $\displaystyle W_{0}\left(0\right)$ $\displaystyle=0,$ $\displaystyle W_{0}\left(\mathrm{e}\right)$ $\displaystyle=1.$ ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\mathrm{e}$: base of natural logarithm and $\mathrm{i}$: imaginary unit Permalink: http://dlmf.nist.gov/4.13.E2 Encodings: TeX, TeX, TeX, pMML, pMML, pMML, png, png, png See also: Annotations for §4.13 and Ch.4
 4.13.3 Moved to (4.13.1_2). ⓘ Referenced by: (4.13.1_2) Permalink: http://dlmf.nist.gov/4.13.E3 See also: Annotations for §4.13 and Ch.4
 4.13.3_1 $W_{0}\left(x{\mathrm{e}}^{x}\right)=\begin{cases}x,&-1\leq x,\\ \text{(no simpler form)},&x<-1.\end{cases}$ ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\mathrm{e}$: base of natural logarithm and $x$: real variable Proof sketch: Take $x=W_{0}\left(t\right)>-1$, with $t>-{\mathrm{e}}^{-1}$. Then $W_{0}\left(x{\mathrm{e}}^{x}\right)=W_{0}\left(W_{0}\left(t\right){\mathrm{e}}% ^{W_{0}\left(t\right)}\right)=W_{0}\left(t\right)=x$. Referenced by: §4.13, Erratum (V1.1.7) for Expansion Permalink: http://dlmf.nist.gov/4.13.E3_1 Encodings: TeX, pMML, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4
 4.13.3_2 $W_{\pm 1}\left(x{\mathrm{e}}^{x}\mp 0\mathrm{i}\right)=\begin{cases}\text{(no % simpler form)},&-1\leq x,\\ x,&x<-1.\end{cases}$ ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\mathrm{e}$: base of natural logarithm, $\mathrm{i}$: imaginary unit and $x$: real variable Proof sketch: Take $x=W_{1}\left(t-0\mathrm{i}\right)<-1$, with $-{\mathrm{e}}^{-1}. Then $W_{1}\left(x{\mathrm{e}}^{x}-0\mathrm{i}\right)=W_{1}\left(W_{1}\left(t-0% \mathrm{i}\right){\mathrm{e}}^{W_{1}\left(t-0\mathrm{i}\right)}-0\mathrm{i}% \right)=W_{1}\left(t-0\mathrm{i}\right)=x$. Referenced by: §4.13, Erratum (V1.1.7) for Expansion Permalink: http://dlmf.nist.gov/4.13.E3_2 Encodings: TeX, pMML, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4
 4.13.4 $\frac{\mathrm{d}W}{\mathrm{d}z}=\frac{{\mathrm{e}}^{-W}}{1+W}=\frac{W}{z(1+W)}.$
 4.13.4_1 $\frac{{\mathrm{d}}^{n}W}{{\mathrm{d}z}^{n}}=\frac{{\mathrm{e}}^{-nW}p_{n-1}(W)% }{\left(1+W\right)^{2n-1}},$ $n=1,2,3,\dots$, ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\frac{\mathrm{d}\NVar{f}}{\mathrm{d}\NVar{x}}$: derivative, $\mathrm{e}$: base of natural logarithm, $n$: integer and $z$: complex variable Notes: See Corless et al. (1997, formula (7)). Referenced by: §4.13, Erratum (V1.1.7) for Expansion Permalink: http://dlmf.nist.gov/4.13.E4_1 Encodings: TeX, pMML, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4

in which the $p_{n}(x)$ are polynomials of degree $n$ with

 4.13.4_2 $\displaystyle p_{0}(x)$ $\displaystyle=1,$ $\displaystyle p_{n}(x)$ $\displaystyle=(1+x)p_{n-1}^{\prime}(x)+(1-n(x+3))p_{n-1}(x),$ $n=1,2,3,\dots$. ⓘ Symbols: $n$: integer and $x$: real variable Notes: See Corless et al. (1997, formula (8)). Permalink: http://dlmf.nist.gov/4.13.E4_2 Encodings: TeX, TeX, pMML, pMML, png, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4

Explicit representations for the $p_{n}(x)$ are given in Kalugin and Jeffrey (2011).

 4.13.5 $W_{0}\left(z\right)=\sum_{n=1}^{\infty}\frac{\left(-n\right)^{n-1}}{n!}z^{n},$ $|z|<{\mathrm{e}}^{-1}$.
 4.13.5_1 $\left(\frac{W_{0}\left(z\right)}{z}\right)^{a}={\mathrm{e}}^{-aW_{0}\left(z% \right)}=\sum_{n=0}^{\infty}\frac{a\left(n+a\right)^{n-1}}{n!}\left(-z\right)^% {n},$ $|z|<{\mathrm{e}}^{-1}$, $a\in\mathbb{C}$. ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\mathbb{C}$: complex plane, $\in$: element of, $\mathrm{e}$: base of natural logarithm, $!$: factorial (as in $n!$), $n$: integer, $a$: real or complex constant and $z$: complex variable Notes: See Corless et al. (1996, formula (2.36)). Referenced by: §4.13, Erratum (V1.1.7) for Expansion Permalink: http://dlmf.nist.gov/4.13.E5_1 Encodings: TeX, pMML, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4
 4.13.5_2 $\frac{1}{1+W_{0}\left(-z\right)}=\sum_{n=0}^{\infty}\frac{n^{n}}{n!}z^{n},$ $|z|<{\mathrm{e}}^{-1}$. ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\mathrm{e}$: base of natural logarithm, $!$: factorial (as in $n!$), $n$: integer and $z$: complex variable Notes: See Corless et al. (1997, formula (14)). Referenced by: §4.13, Erratum (V1.1.7) for Expansion Permalink: http://dlmf.nist.gov/4.13.E5_2 Encodings: TeX, pMML, png See also: Annotations for §4.13 and Ch.4
 4.13.5_3 $\left(1+W_{0}\left(z\right)\right)^{2}=1-2\sum_{n=1}^{\infty}\frac{n^{n-2}}{n!% }\left(-z\right)^{n},$ $|z|<{\mathrm{e}}^{-1}$. ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\mathrm{e}$: base of natural logarithm, $!$: factorial (as in $n!$), $n$: integer and $z$: complex variable Notes: See https://vixra.org/abs/2308.0054. Referenced by: §4.13, Erratum (V1.1.11) for Additions Permalink: http://dlmf.nist.gov/4.13.E5_3 Encodings: TeX, pMML, png Addition (effective with 1.1.11): This equation was added. See also: Annotations for §4.13 and Ch.4
 4.13.6 $W\left(-{\mathrm{e}}^{-1-(t^{2}/2)}\right)=\sum_{n=0}^{\infty}(-1)^{n-1}c_{n}t% ^{n},$ $|t|<2\sqrt{\pi}$,

where $t\geq 0$ for $W_{0}$, $t\leq 0$ for $W_{\pm 1}$ on the relevant branch cuts,

 4.13.7 $c_{0}=1,\quad c_{1}=1,\quad c_{2}=\tfrac{1}{3},\quad c_{3}=\tfrac{1}{36},\quad c% _{4}=-\tfrac{1}{270},$ ⓘ Symbols: $c_{i}$: coefficients Permalink: http://dlmf.nist.gov/4.13.E7 Encodings: TeX, pMML, png See also: Annotations for §4.13 and Ch.4
 4.13.8 $c_{n}=\frac{c_{n-1}}{n+1}-\tfrac{1}{2}\sum_{k=2}^{n-1}c_{k}c_{n+1-k},$ $n=2,3,4,\dots$, ⓘ Symbols: $k$: integer, $n$: integer and $c_{i}$: coefficients Permalink: http://dlmf.nist.gov/4.13.E8 Encodings: TeX, pMML, png See also: Annotations for §4.13 and Ch.4

and

 4.13.9 $1\cdot 3\cdot 5\cdots(2n+1)c_{2n+1}=g_{n},$ ⓘ Symbols: $n$: integer, $c_{i}$: coefficients and $g_{n}$: Unknown defined in GA Permalink: http://dlmf.nist.gov/4.13.E9 Encodings: TeX, pMML, png See also: Annotations for §4.13 and Ch.4

where $g_{n}$ is defined in §5.11(i). See Jeffrey and Murdoch (2017) for an explicit representation for the $c_{n}$ in terms of associated Stirling numbers.

 4.13.9_1 $W_{0}\left(z\right)=\sum_{n=0}^{\infty}d_{n}\left(\mathrm{e}z+1\right)^{\ifrac% {n}{2}},$ $\left|\mathrm{e}z+1\right|<1$, $\left|\operatorname{ph}\left(z+{\mathrm{e}}^{-1}\right)\right|<\pi$, ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\pi$: the ratio of the circumference of a circle to its diameter, $\frac{\mathrm{d}\NVar{f}}{\mathrm{d}\NVar{x}}$: derivative, $\mathrm{e}$: base of natural logarithm, $\operatorname{ph}$: phase, $n$: integer and $z$: complex variable Proof sketch: Substitute (4.13.9_1) into $z(1+W)\frac{\mathrm{d}W}{\mathrm{d}z}=W$. Referenced by: (4.13.9_1), §4.13, §4.13, Erratum (V1.1.7) for Expansion Permalink: http://dlmf.nist.gov/4.13.E9_1 Encodings: TeX, pMML, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4

where

 4.13.9_2 $\displaystyle d_{0}$ $\displaystyle=-1,\quad d_{1}=\sqrt{2},\quad d_{2}=-\tfrac{2}{3},\quad d_{3}=% \tfrac{11}{36}\sqrt{2},\quad d_{4}=-\tfrac{43}{135},$ $\displaystyle(n+2)d_{1}d_{n+1}$ $\displaystyle=-2d_{n}+\frac{n}{2}\sum_{k=1}^{n-1}d_{k}d_{n-k}-\frac{n+2}{2}% \sum_{k=1}^{n-1}d_{k+1}d_{n-k+1},$ $n=1,2,3,\dots$. ⓘ Symbols: $k$: integer and $n$: integer Permalink: http://dlmf.nist.gov/4.13.E9_2 Encodings: TeX, TeX, pMML, pMML, png, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4

For the definition of Stirling cycle numbers of the first kind $\genfrac{[}{]}{0.0pt}{}{n}{k}$ see (26.13.3). As $\left|z\right|\to\infty$

 4.13.10 $W_{k}\left(z\right)\sim\xi_{k}-\ln\xi_{k}+\sum_{n=1}^{\infty}\frac{(-1)^{n}}{% \xi_{k}^{n}}\sum_{m=1}^{n}\genfrac{[}{]}{0.0pt}{}{n}{n-m+1}\frac{\left(-\ln\xi% _{k}\right)^{m}}{m!},$ ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\genfrac{[}{]}{0.0pt}{}{\NVar{n}}{\NVar{k}}$: Stirling cycle number of the first kind, $\sim$: Poincaré asymptotic expansion, $!$: factorial (as in $n!$), $\ln\NVar{z}$: principal branch of logarithm function, $k$: integer, $m$: integer, $n$: integer and $z$: complex variable Notes: See Corless et al. (1996, p. 350) and Jeffrey et al. (1995, Theorem 2). Referenced by: §4.13, §4.13, §4.45(iii), Erratum (V1.1.7) for Expansion Permalink: http://dlmf.nist.gov/4.13.E10 Encodings: TeX, pMML, png Addition (effective with 1.1.7): Originally we gave only the first three terms of the infinite series. See also: Annotations for §4.13 and Ch.4

where $\xi_{k}=\ln\left(z\right)+2\pi\mathrm{i}k$. For large enough $\left|z\right|$ the series on the right-hand side of (4.13.10) is absolutely convergent to its left-hand side. In the case of $k=0$ and real $z$ the series converges for $z\geq\mathrm{e}$. As $x\to 0-$

 4.13.11 $W_{\pm 1}\left(x\mp 0\mathrm{i}\right)\sim-\eta-\ln\eta+\sum_{n=1}^{\infty}% \frac{1}{\eta^{n}}\sum_{m=1}^{n}\genfrac{[}{]}{0.0pt}{}{n}{n-m+1}\frac{\left(-% \ln\eta\right)^{m}}{m!},$ ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\genfrac{[}{]}{0.0pt}{}{\NVar{n}}{\NVar{k}}$: Stirling cycle number of the first kind, $\sim$: Poincaré asymptotic expansion, $!$: factorial (as in $n!$), $\mathrm{i}$: imaginary unit, $\ln\NVar{z}$: principal branch of logarithm function, $m$: integer, $n$: integer, $x$: real variable and $\eta$ Notes: See Corless et al. (1996, p. 350). Referenced by: §4.13, Erratum (V1.1.2) for Equation (4.13.11), Erratum (V1.1.7) for Expansion Permalink: http://dlmf.nist.gov/4.13.E11 Encodings: TeX, pMML, png Addition (effective with 1.1.7): Originally we gave only the first three terms of the infinite series. See also: Annotations for §4.13 and Ch.4

where $\eta=\ln\left(-1/x\right)$. For these results and other asymptotic expansions see Corless et al. (1997).

For integrals of $W\left(z\right)$ use the substitution $w=W\left(z\right)$, $z=w{\mathrm{e}}^{w}$ and $\,\mathrm{d}z=(w+1){\mathrm{e}}^{w}\,\mathrm{d}w$. Examples are

 4.13.12 $\int W\left(z\right)\,\mathrm{d}z=\frac{z}{W\left(z\right)}+zW\left(z\right)-z,$ ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\,\mathrm{d}\NVar{x}$: differential, $\int$: integral and $z$: complex variable Permalink: http://dlmf.nist.gov/4.13.E12 Encodings: TeX, pMML, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4
 4.13.13 $\int\frac{W\left(z\right)}{z}\,\mathrm{d}z=\tfrac{1}{2}W\left(z\right)^{2}+W% \left(z\right),$ ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\,\mathrm{d}\NVar{x}$: differential, $\int$: integral and $z$: complex variable Permalink: http://dlmf.nist.gov/4.13.E13 Encodings: TeX, pMML, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4
 4.13.14 $2\int\sin\left(W\left(z\right)\right)\,\mathrm{d}z=z\left(1+\frac{1}{W\left(z% \right)}\right)\sin\left(W\left(z\right)\right)-z\cos\left(W\left(z\right)% \right).$ ⓘ Symbols: $W\left(\NVar{z}\right)$: Lambert $W$-function, $\cos\NVar{z}$: cosine function, $\,\mathrm{d}\NVar{x}$: differential, $\int$: integral, $\sin\NVar{z}$: sine function and $z$: complex variable Permalink: http://dlmf.nist.gov/4.13.E14 Encodings: TeX, pMML, png Addition (effective with 1.1.7): This equation was added. See also: Annotations for §4.13 and Ch.4
 4.13.15 $W_{0}\left(z\right)=\frac{z}{\pi}\int_{0}^{\pi}\frac{\left(1-t\cot t\right)^{2% }+t^{2}}{z+t{\mathrm{e}}^{-t\cot t}\csc t}\,\mathrm{d}t.$
 4.13.16 $W_{0}\left(z\right)=\frac{1}{\pi}\int_{0}^{\pi}\ln\left(1+z\frac{\sin t}{t}{% \mathrm{e}}^{t\cot t}\right)\,\mathrm{d}t.$ ⓘ

For these and other integral representations of the Lambert $W$-function see Kheyfits (2004), Kalugin et al. (2012) and Mező (2020).

For the foregoing results and further information see Borwein and Corless (1999), Corless et al. (1996), de Bruijn (1961, pp. 25–28), Olver (1997b, pp. 12–13), and Siewert and Burniston (1973).

For a generalization of the Lambert $W$-function connected to the three-body problem see Scott et al. (2006), Scott et al. (2013) and Scott et al. (2014).