# Lambert W function

The **Lambert W function** is the multivalued function defined as the solution of the equation \( W e^{W} = z \); in other words, it is the inverse of the function \( w \mapsto w e^{w} \)<sup>[1](https://dlmf.nist.gov/4.13)</sup>. Because \( w e^{w} \) is not one-to-one, W has infinitely many branches indexed by an integer \( k \), of which two take real values on parts of the real line<sup>[2](https://cache-docs.scipy.org/doc/scipy/reference/generated/scipy.special.lambertw.html)</sup>. It solves equations that mix exponentials (or logarithms) with polynomial terms, which no combination of elementary functions can do, and it is now a standard special function in mathematical physics, engineering, and combinatorics<sup>[3](https://www.nature.com/nature-index/topics/l4/analytical-applications-of-lambert-w-function-in-mathematical-physics)</sup><sup> • </sup><sup>[4](https://cs.uwaterloo.ca/research/tr/1993/03/W.pdf)</sup>.

| Key fact | Detail |
|---|---|
| Definition | \( W(z) e^{W(z)} = z \); W inverts \( w e^{w} \)<sup>[1](https://dlmf.nist.gov/4.13)</sup> |
| Branches | Infinitely many, indexed by \( k \in \mathbb{Z} \); all except \( k = 0 \) have a logarithmic singularity at \( z = 0 \)<sup>[2](https://cache-docs.scipy.org/doc/scipy/reference/generated/scipy.special.lambertw.html)</sup> |
| Real branches | \( W_0 \) is real for \( z \ge -1/\mathrm{e} \); \( W_{-1} \) is real for \( -1/\mathrm{e} \le z < 0 \); the two meet at the branch point \( W(-1/\mathrm{e}) = -1 \)<sup>[1](https://dlmf.nist.gov/4.13)</sup><sup> • </sup><sup>[2](https://cache-docs.scipy.org/doc/scipy/reference/generated/scipy.special.lambertw.html)</sup> |
| Power series | \( W_0(z) = \sum_{n=1}^{\infty} \frac{(-n)^{n-1}}{n!} z^{n} \) for \( |z| < \mathrm{e}^{-1} \)<sup>[1](https://dlmf.nist.gov/4.13)</sup> |
| Derivative | \( \dfrac{dW}{dz} = \dfrac{\mathrm{e}^{-W}}{1+W} = \dfrac{W}{z(1+W)} \)<sup>[1](https://dlmf.nist.gov/4.13)</sup> |
| Sample value | \( W(1) \approx 0.56714329040978384 \), the omega constant<sup>[2](https://cache-docs.scipy.org/doc/scipy/reference/generated/scipy.special.lambertw.html)</sup> |
| Modern treatment | Formalized for complex analysis by Corless, Gonnet, Hare, Jeffrey, and Knuth, *Advances in Computational Mathematics* 5 (1996) 329–359<sup>[4](https://cs.uwaterloo.ca/research/tr/1993/03/W.pdf)</sup> |

## Real branches and the branch point

On the interval \( [0, \infty) \) the equation \( W e^{W} = z \) has one real solution, which is nonnegative and increasing. On \( (-\mathrm{e}^{-1}, 0) \) it has two real solutions, one increasing and one decreasing. The increasing solution, satisfying \( W(z) \ge W(-\mathrm{e}^{-1}) = -1 \), is called the principal branch and written \( W_0(z) \)<sup>[1](https://dlmf.nist.gov/4.13)</sup>. The decreasing solution is the \( k = -1 \) branch, real only on \( [-1/\mathrm{e}, 0) \)<sup>[2](https://cache-docs.scipy.org/doc/scipy/reference/generated/scipy.special.lambertw.html)</sup>. The point \( z = -1/\mathrm{e} \), where the two branches meet with a square-root-type tangency, is the branch point of the function, and numerical evaluation becomes inaccurate very close to it<sup>[2](https://cache-docs.scipy.org/doc/scipy/reference/generated/scipy.special.lambertw.html)</sup>.

The principal branch has a convergent power series around the origin,

\[ W_0(z) = \sum_{n=1}^{\infty} \frac{(-n)^{n-1}}{n!} z^{n}, \qquad |z| < \mathrm{e}^{-1}, \]

whose radius of convergence is set by the branch point<sup>[1](https://dlmf.nist.gov/4.13)</sup>. Near the branch point itself, a different expansion in powers of \( t \), where \( t^2 = 2(W + \ln W + 1) \) up to sign conventions, gives accurate starting values<sup>[1](https://dlmf.nist.gov/4.13)</sup>.

## History

The equation behind the function was proposed by Johann Heinrich Lambert in 1758 and studied by [Leonhard Euler](https://www.edgepedia.org/leonhard-euler) in 1779, in a paper on transcendental equations in which Euler credited Lambert<sup>[5](https://archive.lib.msu.edu/crcmath/math/math/l/l058.htm)</sup>. Lambert's development of the equation \( x^{m} + px = q \) as an infinite series was extended by Euler and by Joseph Louis Lagrange<sup>[6](https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Lambert%2C_Johann_Heinrich)</sup>. Despite these 18th-century roots, the function received its modern name, notation, and systematic branch structure only in the 1990s, when Don Corless and colleagues at the [University of Waterloo](https://www.edgepedia.org/university-of-waterloo) published "On the Lambert W function" in *Advances in Computational Mathematics* (1996)<sup>[4](https://cs.uwaterloo.ca/research/tr/1993/03/W.pdf)</sup>. That paper's definition and branch conventions are the basis of implementations such as SciPy's `lambertw`<sup>[2](https://cache-docs.scipy.org/doc/scipy/reference/generated/scipy.special.lambertw.html)</sup>.

## Computation

W cannot be expressed in terms of elementary functions, so software evaluates it numerically<sup>[7](https://www.mdpi.com/1996-1073/12/3/358)</sup>. For \( x \in [-1/\mathrm{e}, \infty) \) the principal branch can be computed by solving \( W \mathrm{e}^{W} = x \) with Newton's rule, using initial approximations from the power series when \( x \) is close to \( -1/\mathrm{e} \), from the asymptotic expansion when \( x \) is large, and from numerical integration of the differential equation \( dW/dz = \mathrm{e}^{-W}/(1+W) \) for other values<sup>[8](https://dlmf.nist.gov/4.45)</sup>. The same machinery covers \( W_{-1} \) on \( [-1/\mathrm{e}, 0) \)<sup>[8](https://dlmf.nist.gov/4.45)</sup>. SciPy's implementation instead uses Halley's iteration (a third-order generalization of [Newton's method](https://www.edgepedia.org/newtons-method)) to invert \( w \,\mathrm{e}^{w} \), starting from a first-order asymptotic approximation of order \( O(\log w) \) or \( O(w) \)<sup>[2](https://cache-docs.scipy.org/doc/scipy/reference/generated/scipy.special.lambertw.html)</sup>. Dedicated Fortran and C implementations, including Barry et al. (1995) and Lawrence et al. (2012), are cataloged in the NIST Digital Library of Mathematical Functions<sup>[9](https://dlmf.nist.gov/4.48)</sup>.

## Applications

**Solving transcendental equations.** The function's core use is giving closed-form answers to equations that mix \( x \), \( e^x \), and \( \ln x \). Lambert's original transcendental equation \( x = \mathrm{e}^{-\alpha x} \) type relations have the solution \( x = \exp[-W(-\beta v)/\beta] \) in modern notation<sup>[5](https://archive.lib.msu.edu/crcmath/math/math/l/l058.htm)</sup>. In physics, this ability to invert exponentials and absorb logarithmic dependencies yields exact energy levels in quantum wells, explicit reaction-kinetics expressions, threshold conditions in nonlinear optics, and stability analyses in gravitational collapse<sup>[3](https://www.nature.com/nature-index/topics/l4/analytical-applications-of-lambert-w-function-in-mathematical-physics)</sup>.

**Solar cells.** The single- and double-diode models of photovoltaic cells lead to implicit current–voltage relations that W solves in closed form, enabling exact representation of the I–V curve and direct parameter extraction<sup>[10](https://www.sciencedirect.com/science/article/pii/S019689041630783X)</sup>. In a comparison of six extraction methods for current–voltage characteristics, the Lambert W-function method was rated the best comprehensive method for accuracy, applicability, and convergence, though slower in calculation than the other four methods compared<sup>[11](https://www.sciencedirect.com/science/article/abs/pii/S0038092X12004203)</sup>.

**Time delay systems.** The roots of the characteristic equation of a linear time-invariant system with a single known delay are expressible through W, so free and forced solutions, stability, observability, controllability, and controller design by eigenvalue assignment can all be treated in one framework; the approach extends to higher-order systems through a matrix Lambert W function and is implemented in the open-source Matlab LambertW_DDE toolbox<sup>[12](https://www.sciencedirect.com/science/article/pii/S147466701534708X)</sup>. Related work applies W to delay differential equation models in economics and finance<sup>[13](https://pubmed.ncbi.nlm.nih.gov/41410562/)</sup> and to laser dynamics with time-delayed optical feedback<sup>[14](https://arxiv.org/abs/1801.03111)</sup>.

**Combinatorics.** The tree function \( T(x) \), defined by \( T \mathrm{e}^{-T} = x \) up to sign, is essentially \( -W(-x) \); \( T(x) \) is the exponential generating function for rooted trees and \( \mathrm{e}^{T(x)} = T(x)/x \) that for forests of rooted trees, making W a basic object of enumerative combinatorics even though combinatorialists often state results in tree-function notation<sup>[15](https://doi.org/10.1016/j.jcta.2016.06.018)</sup>.

## Related functions and generalizations

The Wright omega function, also available in SciPy alongside `lambertw`, is a single-valued relative of W that solves a related equation without branch ambiguity<sup>[2](https://cache-docs.scipy.org/doc/scipy/reference/generated/scipy.special.lambertw.html)</sup>. Generalizations built from special polynomials extend W to wider classes of transcendental equations arising in theoretical physics<sup>[16](https://arxiv.org/abs/1408.3999)</sup>, and high-order approximations combined with careful branch selection have reduced computational overhead in applications such as solar cell parameter extraction, [Raman fiber](https://www.edgepedia.org/raman-fiber) laser design, and geophysical oscillators<sup>[3](https://www.nature.com/nature-index/topics/l4/analytical-applications-of-lambert-w-function-in-mathematical-physics)</sup>.

## References

1. [DLMF §4.13, Lambert W-Function, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/4.13)
2. [scipy.special.lambertw, SciPy v1.18.0 Manual](https://cache-docs.scipy.org/doc/scipy/reference/generated/scipy.special.lambertw.html)
3. [Analytical Applications of Lambert W Function in Mathematical Physics, Nature Index](https://www.nature.com/nature-index/topics/l4/analytical-applications-of-lambert-w-function-in-mathematical-physics)
4. [Corless, R. M., Gonnet, G. H., Hare, D. E. G., Jeffrey, D. J., Knuth, D. E. (1996). On the Lambert W function. Advances in Computational Mathematics 5, 329–359](https://cs.uwaterloo.ca/research/tr/1993/03/W.pdf)
5. [Lambert's Transcendental Equation, MathWorld archive](https://archive.lib.msu.edu/crcmath/math/math/l/l058.htm)
6. [Lambert, Johann Heinrich, 1911 Encyclopædia Britannica, Wikisource](https://en.wikisource.org/wiki/1911_Encyclop%C3%A6dia_Britannica/Lambert%2C_Johann_Heinrich)
7. [Non-Iterative Methods for the Extraction of the Single-Diode Model Parameters of Photovoltaic Modules, Energies 12(3), 358 (2019)](https://www.mdpi.com/1996-1073/12/3/358)
8. [DLMF §4.45, Methods of Computation, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/4.45)
9. [DLMF §4.48, Software, NIST Digital Library of Mathematical Functions](https://dlmf.nist.gov/4.48)
10. [Lambert W-function based exact representation for double diode model of solar cells, Energy Conversion and Management (2017)](https://www.sciencedirect.com/science/article/pii/S019689041630783X)
11. [Evaluation of methods to extract parameters from current–voltage characteristics of solar cells, Solar Energy (2013)](https://www.sciencedirect.com/science/article/abs/pii/S0038092X12004203)
12. [The Lambert W Function Approach to Time Delay Systems and the LambertW_DDE Toolbox, IFAC Proceedings Volumes 45(14), 114–119 (2012)](https://www.sciencedirect.com/science/article/pii/S147466701534708X)
13. [Lambert W Function in Solving Delay Differential Equations for Modeling in Economics and Finance, PubMed](https://pubmed.ncbi.nlm.nih.gov/41410562/)
14. [Lambert function methods for laser dynamics with time-delayed feedback, arXiv:1801.03111](https://arxiv.org/abs/1801.03111)
15. [Lagrange inversion, Journal of Combinatorial Theory A (2016)](https://doi.org/10.1016/j.jcta.2016.06.018)
16. [On the generalization of the Lambert W function with applications in theoretical physics, arXiv:1408.3999](https://arxiv.org/abs/1408.3999)

---
*Topic: Encyclopedia › Physical world and mathematics › Mathematics and statistics › Analysis and mathematical models › Analysis overview and reference*

*Initially written Sep 17, 2026 · Reviewed: Sep 30, 2026; Oct 15, 2026 · Edited: Oct 15, 2026 · Last review: Oct 15, 2026*

*Copyright 2026 EdgeChat AI, a subsidiary of Biostate AI.*

License: Edgepedia Community License 1.0, https://www.edgepedia.org/edgepedia/license
