This page will document applications of the Lambert W function that are too short to comprise individual presentations on this website.


Definition of the Function
Solution of the Equation yx = xy
Solutions of Other Equations
Interated Exponentiation

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 principal branch is designated W0 .

Slight rearranging the defining equation,

z=eW +lnW =eW+lnW +2nπi

it is clear that the following relation holds between different branches of the Lambert function:

Wn+lnWn =W0+lnW0 +2nπi

This is analogous to how branches of the complex logarithm are related to one another.

An approximation to the function useful for numerical root finding is

W(z) lnz-lnlnz

This approximation becomes exact asymptotically, which can be seen by putting it into the defining equation and letting the independent variable grow,

(lnz -lnlnz) zlnz z 1-lnlnz lnz 1 limz (1-lnlnz lnz) =limz (1-1 zlnz ×z) =1

where the last step follows from appyling l’Hôpital’s rule to the fraction.

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.

Solutions of Other Equations

Other bases in the defining equation are handled rather easily:

xbx=a =xexlnb x=W( alnb) lnb

A double exponentiated variable can be solved with an intermediate exponential x=ey  :

ln[ xxa =b] xalnx =lnb yeay =lnb x=exp[ W(alnb) a]

A linear combination of a variable and its exponential can handled with an intermediate linear variable x=b-y  :

ax+x =b abe ylna =y x=b-W( ablna) lna

The particular branch has not be specified in these solutions since any branch serves as a solution. This is because the dependent variable appears in entire functions. This is not true of the next equation.

Taking a logarithm of both sides of the following transcendental equation indicates that is is soluble by the Lambert function:

exp[ lnx+ax =b ] xeax =eb x=W( aeb) a

Numerical evaluation of this expression followed by substitution in the original equation indicates that it is not satisfied by just any branch. The necessary branch can be determined using the relation above between different branches:

lnax+ax =b+lna W0( aeb) +lnW0( aeb) +2nπi =b+lna n=b+lna -W0( aeb) -lnW0( aeb) 2πi

Then the correct solution to the original equation is

lnx+ax=b x=Wn( aeb) a

with n as indicated.

Interated Exponentiation

Interated exponentiation is defined by the expression

f(z) =zzzz

whenever it converges: for real numbers that occurs for ee z e1/e  . The expression can be evaluated with the Lambert function by rearranging into the latter’s defining equation:

f(z) =zf(z) =eflnz flnz eflnz =lnz f(z) =W( lnz) lnz

And here’s how this function looks on the specified interval, using the principal branch of the Lambert function:

Uploaded 2020.11.27 — Updated 2021.03.16