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 *y ^{x}* =

Solutions of Other Equations

Interated Exponentiation

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 principal branch is designated ${W}_{0}$ .

Slight rearranging the defining equation,

$z={e}^{W+lnW}={e}^{W+lnW+2n\pi i}$

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

${W}_{n}+ln{W}_{n}={W}_{0}+ln{W}_{0}+2n\pi i$

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

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.

Other bases in the defining equation are handled rather easily:

$\begin{array}{l}x{b}^{x}=a=x{e}^{xlnb}\\ x=\frac{W(alnb)}{lnb}\end{array}$

A double exponentiated variable can be solved with an intermediate exponential $x={e}^{y}$ :

$\begin{array}{c}ln[\phantom{\rule{.5em}{0ex}}{x}^{{x}^{a}}=b\phantom{\rule{.5em}{0ex}}]\\ {x}^{a}lnx=lnb\\ y{e}^{ay}=lnb\\ x=exp\left[\frac{W(alnb)}{a}\right]\end{array}$

A linear combination of a variable and its exponential can handled with an intermediate linear variable

$\begin{array}{c}{a}^{x}+x=b\\ {a}^{b}{e}^{-ylna}=y\\ x=b-\frac{W({a}^{b}lna)}{lna}\end{array}$

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:

$\begin{array}{c}exp[\phantom{\rule{.5em}{0ex}}lnx+ax=b\phantom{\rule{.5em}{0ex}}]\\ x{e}^{ax}={e}^{b}\\ x=\frac{W\left(a{e}^{b}\right)}{a}\end{array}$

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:

$\begin{array}{c}lnax+ax=b+lna\\ {W}_{0}\left(a{e}^{b}\right)+ln{W}_{0}\left(a{e}^{b}\right)+2n\pi i=b+lna\\ n=\frac{b+lna-{W}_{0}\left(a{e}^{b}\right)-ln{W}_{0}\left(a{e}^{b}\right)}{2\pi i}\end{array}$

Then the correct solution to the original equation is

$lnx+ax=b\phantom{\rule{2em}{0ex}}\to \phantom{\rule{2em}{0ex}}x=\frac{{W}_{n}\left(a{e}^{b}\right)}{a}$

with *n* as indicated.

Interated exponentiation is defined by the expression

$f\left(z\right)={z}^{{z}^{{z}^{{z}^{\u22f0}}}}$

whenever it converges: for real numbers that occurs for ${e}^{-e}\le z\le {e}^{1/e}$ . The expression can be evaluated with the Lambert function by rearranging into the latter’s defining equation:

$\begin{array}{c}f\left(z\right)={z}^{f\left(z\right)}={e}^{flnz}\\ -flnz\phantom{\rule{.3em}{0ex}}{e}^{-flnz}=-lnz\\ f\left(z\right)=-\frac{W(-lnz)}{lnz}\end{array}$

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

*Uploaded 2020.11.27 — Updated 2020.12.29*
analyticphysics.com