Definition of the Function

Solution of the Equation *y ^{x}* =

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

$W\left(z\right){e}^{W\left(z\right)}=z$

Since the function inverts this relation, one can immediately write

${W}^{-1}\left(z\right)=z{e}^{z}$

The Lambert function has an infinite number of complex branches, like the complex natural logarithm that approximates it. The principle branch is designated ${W}_{0}$ .

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

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

${2}^{4}={2}^{2}\xb7{2}^{2}={4}^{2}$

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

$\frac{lny}{y}=\frac{lnx}{x}$

then note the following inverse function value:

${W}^{-1}(-lny)=-\frac{lny}{y}$

This means one can write

$y=exp[-W(-\frac{lnx}{x}\left)\right]$

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

The portion in red comes from the principal branch ${W}_{0}$ of the Lambert function, while the portion in magenta requires the branch ${W}_{-1}$ . The two solutions meet at $x=e$ where

$y=exp[-W(-\frac{1}{e}\left)\right]=exp[-(-1\left)\right]=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}={x}^{ux}=({x}^{u}{)}^{x}\phantom{\rule{2em}{0ex}}\to \phantom{\rule{2em}{0ex}}\begin{array}{l}x={u}^{1/(u-1)}\\ y={u}^{u/(u-1)}\end{array}$

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

$W\left(z\right){e}^{W\left(z\right)}=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\left(z\right)=logz-logW\left(z\right)\approx logz+f\left(z\right)$

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\left(z\right)\approx 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,

${W}_{k}\left(z\right)\approx logz+2\pi ik-log(logz+2\pi 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 *W*_{0} 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.