Lambert W function

The product logarithm Lambert W function plotted in the complex plane from −2 − 2i to 2 + 2i
The product logarithm Lambert W function plotted in the complex plane from −2 − 2i to 2 + 2i
The graph of y = W(x) for real x < 6 and y > −4. The upper branch (blue) with y ≥ −1 is the graph of the function W0 (principal branch), the lower branch (magenta) with y ≤ −1 is the graph of the function W−1. The minimum value of x is at {−1/e, −1}

In mathematics, the Lambert W function, also called the omega function or product logarithm,[1] is a multivalued function, namely the branches of the converse relation of the function f(w) = wew, where w is any complex number and ew 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.[citation needed]

For each integer k there is one branch, denoted by Wk(z), which is a complex-valued function of one complex argument. W0 is known as the principal branch. These functions have the following property: if z and w are any complex numbers, then

holds if and only if

When dealing with real numbers only, the two branches W0 and W−1 suffice: for real numbers x and y the equation

can be solved for y only if x ≥ −1/e; yields y = W0(x) if x ≥ 0 and the two values y = W0(x) and y = W−1(x) if 1/ex < 0.

The Lambert W function's branches cannot be expressed in terms of elementary functions.[2] It is useful in combinatorics, for instance, in the enumeration of trees. It can be used to solve various equations involving exponentials (e.g. the maxima of the Planck, Bose–Einstein, and Fermi–Dirac distributions) and also occurs in the solution of delay differential equations, such as y′(t) = a y(t − 1). 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.

Main branch of the Lambert W function in the complex plane, plotted with domain coloring. Note the branch cut along the negative real axis, ending at 1/e.
The modulus of the principal branch of the Lambert W function, colored according to arg W(z)

Terminology

[edit]

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

The name "product logarithm" can be understood as this: Since the inverse function of f(w) = ew is called the logarithm, it makes sense to call the inverse "function" of the product wew as "product logarithm". (Technical note: like the complex logarithm, it is multivalued and thus W is described as the converse relation rather than inverse function.) It is related to the omega constant, which is equal to W0(1).

History

[edit]

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

The equation Lambert considered was

Euler transformed this equation into the form

Both authors derived a series solution for their equations.

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

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

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

In 1993, it was reported that the Lambert function provides an exact solution to the quantum-mechanical double-well Dirac delta function model for equal charges[6]—a fundamental problem in physics. Prompted by this, Rob Corless and developers of the Maple computer algebra system realized that "the Lambert W function has been widely used in many fields, but because of differing notation and the absence of a standard name, awareness of the function was not as high as it should have been."[3][7]

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

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

Elementary properties, branches and range

[edit]
The range of the W function, showing all branches. The black curves (including the real axis) form the image of the real axis, the orange curves are the image of the imaginary axis. The purple curve and circle are the image of a small circle around the point z = 0; the red curves are the image of a small circle around the point z = −1/e.
Plot of the imaginary part of Wn(x + iy) for branches n = −2, −1, 0, 1, 2. The plot is similar to that of the multivalued complex logarithm function except that the spacing between sheets is not constant and the connection of the principal sheet is different

There are countably many branches of the 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 limz→0 Wk(z) = −∞ for all k ≠ 0.

The branch point for the principal branch is at z = −1/e, with a branch cut that extends to −∞ along the negative real axis. 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 along the entire negative real axis.

The functions Wk(z), kZ 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

[edit]
Regions of the complex plane for which W(n, zez) = z, where z = x + iy. The darker boundaries of a particular region are included in the lighter region of the same color. The point at {−1, 0} is included in both the n = −1 (blue) region and the n = 0 (gray) region. Horizontal grid lines are in multiples of π.

The range plot above also delineates the regions in the complex plane where the simple inverse relationship is true. implies that there exists an such that , where depends upon the value of . The value of the integer changes abruptly when is at the branch cut of , which means that ≤ 0, except for where it is ≤ −1/.

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

For , the branch cut for is the non-positive real axis, so that

and

For , the branch cut for is the real axis with , so that the inequality becomes

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

Calculus

[edit]

Derivative

[edit]

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

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

Using the identity eW(z) = z/W(z), gives the following equivalent formula:

At the origin we have

Integral

[edit]

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

(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

Asymptotic expansions

[edit]

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

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

where L1 = ln x, L2 = ln ln x, and [l + m
l + 1
]
is a non-negative Stirling number of the first kind.[3] Keeping only the first two terms of the expansion,

The other real branch, W−1, defined in the interval [−1/e, 0), has an approximation of the same form as x approaches zero, with in this case L1 = ln(−x) and L2 = ln(−ln(−x)).[3]

Integer and complex powers

[edit]

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

More generally, for rZ, the Lagrange inversion formula gives

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:

which holds for any rC and |x| < 1/e.

Bounds and inequalities

[edit]

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

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

They also showed the general bound

for every and , with equality only for . The bound allows many other bounds to be made, such as taking which gives the bound

In 2013 it was proven[11] that the branch W−1 can be bounded as follows:

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

Identities

[edit]
A plot of Wj(xex) where blue is for j = 0 and red is for j = −1. The diagonal line represents the intervals where Wj(xex) = x.
The product logarithm Lambert W function W 2(z) plotted in the complex plane from -2-2i to 2+2i
The product logarithm Lambert W function W2(z) plotted in the complex plane from −2 − 2i to 2 + 2i

A few identities follow from the definition:

Note that, 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:[13]

[14]
(which can be extended to other n and x if the correct branch is chosen).

Substituting −ln x in the definition:[15]

With Euler's iterated exponential h(x):

Special values

[edit]

The following are special values of the principal branch:

(the omega constant)

Special values of the branch W−1:

Representations

[edit]

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

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

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

Also, if |W0(x)| < 1:[19]

In turn, if |W0(x)| > e, then

Other formulas

[edit]

Definite integrals

[edit]

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

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

Thus

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.

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:[20]

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

Indefinite integrals

[edit]

1st proof

Introduce substitution variable

2nd proof

Proof

Proof

Introduce substitution variable , which gives us and

Applications

[edit]

Solving equations

[edit]

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

(where x is an unknown real number) can be solved by rewriting it as

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

and thus:

Generally, the solution to

is:

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.

Viscous flows

[edit]

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:

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

Time-dependent flow in simple branch hydraulic systems

[edit]

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.[22] The Lambert W function provided an exact solution to the flow rate of fluid in both the laminar and turbulent regimes: where is the initial flow rate and is time.

Neuroimaging

[edit]

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

Chemical engineering

[edit]

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.[24][25]

Crystal growth

[edit]

In the crystal growth, the negative principal of the Lambert W-function can be used to calculate the distribution coefficient, , and solute concentration in the melt, ,[26][27] from the Scheil equation:

Materials science

[edit]

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

Porous media

[edit]

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

Bernoulli numbers and Todd genus

[edit]

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

can be solved by means of the two real branches W0 and W−1:

This application shows that the branch difference of the W function can be employed in order to solve other transcendental equations.[30]

Statistics

[edit]

The centroid of a set of histograms defined with respect to the symmetrized Kullback–Leibler divergence (also called the Jeffreys divergence [31]) has a closed form using the Lambert W function.[32]

Pooling of tests for infectious diseases

[edit]

Solving for the optimal group size to pool tests so that at least one individual is infected involves the Lambert W function.[33][34][35]

Exact solutions of the Schrödinger equation

[edit]

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

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

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

[edit]

In Quantum chromodynamics, the quantum field theory of the Strong interaction, the coupling constant is computed perturbatively, the order n corresponding to Feynman diagrams including n quantum loops.[37] 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.[37]

Exact solutions of the Einstein vacuum equations

[edit]

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

[edit]

The s-wave resonances of the delta-shell potential can be written exactly in terms of the Lambert W function.[38]

Thermodynamic equilibrium

[edit]

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

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.

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

[edit]

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

Wien's displacement law in a D-dimensional universe

[edit]

Wien's displacement law is expressed as . With and , where is the spectral energy energy density, one finds , where is the number of degrees of freedom for spatial translation. The solution shows that the spectral energy density is dependent on the dimensionality of the universe.[40]

AdS/CFT correspondence

[edit]

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.[41][42]

Epidemiology

[edit]

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

Determination of the time of flight of a projectile

[edit]

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

[edit]

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

Orthogonal trajectories of real ellipses

[edit]

The family of ellipses centered at is parameterized by eccentricity . The orthogonal trajectories of this family are given by the differential equation whose general solution is the family .

Generalizations

[edit]

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

(1)

where a0, c and r are real constants. The solution is Generalizations of the Lambert W function[45][46][47] include:

  • An application to general relativity and quantum mechanics (quantum gravity) in lower dimensions, in fact a link (unknown prior to 2007[48]) between these two areas, where the right-hand side of (1) is replaced by a quadratic polynomial in x:
    (2)

    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.[49] Here the right-hand side of (1) is replaced by a ratio of infinite order polynomials in x:
    (3)

    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).[50]

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

Plots

[edit]

Numerical evaluation

[edit]

The W function may be approximated using Newton's method, with successive approximations to w = W(z) (so z = wew) being

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

given in Corless et al.[3] to compute W.

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

Lajos Lóczi proves[52] that by using this iteration with an appropriate starting value ,

  • For the principal branch
    • if :
    • if
    • if
  • For the branch
    • if
    • if