Definition of the Function
Solution of the Equation yx = xy
visualization
Reference
This function is defined implicitly as the inverse of the nonlinear transcendental equation
Since the function inverts this relation, one can immediately write
The Lambert function has an infinite number of complex branches, like the complex natural logarithm that approximates it. The principle branch is designated .
Both the function and its inverse are supported in Math as fully complex functions.
This equation clearly has a trivial solution . It also has a solution in terms of powers of two:
There is additionally a solution that is not obvious. First take a logarithm of both sides of the equation,
then note the following inverse function value:
This means one can write
without much algebraic manipulation. The two continuous solutions look like this:
The portion in red comes from the principal branch of the Lambert function, while the portion in magenta requires the branch . The two solutions meet at where
on both of the branches involved.
Another way to represent the nonobvious solution is via a parametrization. Setting , the equation becomes
It is straightforward to insert this parametrization in the previous solution to verify that it is correct.
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
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:
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
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,
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.