lamberW(x)

Content

Definition of the Function
Solution of the Equation yx = xy visualization
Reference

lamberW(x) = W(x). Its inverse function is the inverseW(x) = W-1(x).

Definition of the Function

This function is defined implicitly as the inverse of the nonlinear transcendental equation

W(z) eW(z) =z

Since the function inverts this relation, one can immediately write

W1 (z) =zez

The Lambert function has an infinite number of complex branches, like the complex natural logarithm that approximates it. The principle branch is designated W0 .

Both the function and its inverse are supported in Math as fully complex functions.


Solution of the Equation yx = xy

This equation clearly has a trivial solution y=x . It also has a solution in terms of powers of two:

24 =22·22 =42

There is additionally a solution that is not obvious. First take a logarithm of both sides of the equation,

lnyy =lnxx

then note the following inverse function value:

W1 (lny) =lnyy

This means one can write

y=exp[W( lnxx )]

without much algebraic manipulation. The two continuous solutions look like this:

The portion in red comes from the principal branch W0 of the Lambert function, while the portion in magenta requires the branch W1 . The two solutions meet at x=e where

y=exp[W( 1e)] =exp[ (1)] =e

on both of the branches involved.

Another way to represent the nonobvious solution is via a parametrization. Setting y=ux , the equation becomes

(ux)x =xux =(xu )x x=u1/ (u-1) y=uu/ (u-1)

It is straightforward to insert this parametrization in the previous solution to verify that it is correct.

visualization

Here is a visualization of several branches of the Lambert W function on the complex plane:

This function is defined implicitly as the inverse of the nonlinear transcendental equation

W(z) eW(z) =z

An extremely comprehensive overview of this function, including details of evaluation and applications, is available here.

Evaluation of the function is accomplished using standard inversion algorithms, such as Newton’s method, but one needs a good starting point in order to reach all branches. To find this, first take a logarithm of both sides of the defining equation:

W(z) =logz -logW(z) logz +f(z)

The Lambert function can thus be approximated by the natural logarithm, which explains the similarity of its appearance to that function. Putting the right-hand side into the defining equation and ignoring the additive term f in comparison to the logarithm on the resulting left-hand side, one gets

W(z) logz -loglogz

All that remains now is to specify the branches of the logarithms. This can be done by keeping the second outer logarithm on the principal branch and letting the index of the Lambert function set the branch of the other functions. That is,

Wk(z) logz +2πik -log(logz +2πik)

Starting from this complex point allows one to determine the value of the Lambert function for all branches, with the exception of the principal branch W0 in the vicinity of the origin. Since the function is zero there, starting from that value reaches most of the region around the origin, apart from some instability around the negative real axis.

While the Lambert function is similar to the natural logarithm, the branches of its imaginary part are not equally spaced as for the latter. This can be seen by visualizing multiple branches of the imaginary part at the same time:

The Lambert function has a complex structure with respect to argument similar to that of the natural logarithm, but reaches its asymptotic coloring noticeably faster than that function.

Reference

  • On the W function