1Basic properties of W

DOI: 10.1201/9781003168102-1

In this chapter we study those properties of the Lambert W function which do not need knowledge on the complex function theoretic behavior of W.

We study in detail the equations which are solvable in terms of W, give a general formula for the derivatives, determine some integrals involving W, rigorously check the domain and range of the real Lambert function, and present convexity-concavity properties. At the end of the chapter we study the constant Ω, which is a special value of W.

1.1 Equations solvable in terms of W

1.1.1 Defining equation of W

The Lambert W function is defined as the solution of the equation

xex=a,(1.1)

where a is the known parameter, and e is the base of the natural logarithm. We look for the unknown x which satisfies (1.1). This x is the solution, so we write x=W(a). We call (1.1) as the defining equation of W.

We can therefore equivalently say that W(a) is the function which satisfies the equation

W(a)eW(a)=a.(1.2)

There is another equivalent way we may define W. Putting f(x)=xex, we have that

f(x)=a.(1.3)

The inverse of a function f is the function, denoted by f1, for which

f(f1(x))=x,andf1(f(x))=x.

So, if we want to solve (1.3) by finding x, we may use the inverse of f to write

f1(f(x))=f1(a).

On the left-hand-side we have x, so the solution is given as:

x=f1(a).

Since W(a)=x=f1(a), we have that W is the inverse function of xex. This observation will be pushed further in Section 1.5.

Some special values of the W function

Some special values of W can immediately be deduced. If a=0 in (1.1), then x=0 must hold, since the exponential function is never zero. Thus the solution of (1.1) when a=0 is x=0. Hence

W(0)=0.

If, in turn, a=e, we get that x=1 is a solution. Indeed,

1·e1=e.

This means that

W(e)=1.(1.4)

Similarly, if a=1e, then x=1 solves (1.1):

(1)e1=1e=a,

whence

W1e=1(1.5)

follows.

Another trivial, but still nicely looking, special case is

We·ee=e,(1.6)

which is just the consequence of the fact that W is the inverse of xex.

Equation (1.1) seems to be too special – but only at first sight. There are plenty of equations that can be transformed into the form of (1.1) and thus can be solved with the aid of W. In the following subsections we study such equations.

That (1.1) seems to be too “particular” still does not mean that it is not of high importance. B. Hayes writes in his paper [79]: “Those for whom W is a favorite function want to see it elevated to the canon of standard textbook functions, alongside log and sine and square root. […] The advocates of W do make a strong case. In a 2002 paper, Corless and Jeffrey argue that W is in some sense the smallest step beyond the present set of elementary functions. ‘The Lambert W function is the simplest example of the root of an exponential polynomial; and exponential polynomials are the next simplest class of functions after polynomials'.” The Corless-Jeffrey paper in question is [43].

1.1.2 Equations of the form xbx=a. The base b Lambert function

We know from our high school studies that the exponential function can be defined with many bases: 3x, 12x, etc. To solve equations like 3x=4, we need logarithm of base three: x=log3(4). But we also know that

loga(b)=logc(b)logc(a)(a,b,c>0;a,c1).(1.7)

(The natural base logarithm is denoted by log here and elsewhere.) This identity tells us that whatever is the base we want to calculate the logarithm for (in our case the base is three), we can always express that in terms of another base; knowing the logarithm in one base is enough. Applying (1.7), we express log3(4) in base e logarithm:

log3(4)=log(4)log(3).

A similar fact is true for the W function. Let us suppose that the solution of

xbx=a(1.8)

is given by the “base b” Lambert function, let us denote it by Wb(a). Our aim is to express Wb(a) in terms of the base e function which is just our W(a).

First, note that bx=exlogb. We now keep everything real. Complex solutions will be thoroughly studied later; we therefore suppose that b>0 (but b1) so that the logarithm stays real. By this expression for bx, (1.8) is the same as

xexlogb=a.

Now substitute y=xlogb:

ylogbey=a,

or

yey=alogb.

This is soluble in terms of the classical (base e) Lambert function:

y=W(alogb).

Since x=ylogb, and x=Wb(a) as well, we arrive at the base-change formula

Wb(a)=W(alogb)logb(0<b1).(1.9)

Our claim has been proven: it is enough to know Wb in base b=e.

1.1.3 Equations of the form x+bx=a

The Lambert function is capable to solve not only xex=a, but also its “additive variant”: x+ex=a. Let us put this latter equation into a more general form, with an arbitrary base:

x+bx=a.(1.10)

Here, again, b is positive, and different from one. How to solve this equation? Let us take the exponential of both sides. Since we have base b, the base b exponential is more convenient:

bx+bx=ba.

We use the identity bx+y=bxby:

bxbbx=ba.

If we substitute y=bx, we immediately see that we have our familiar equation

yby=ba.

The solution of this equation is given by the base b Lambert function:

y=Wb(ba).

We look for x, and we know that x=logby, and thus

x=logb(Wb(ba)).

In Section 1.2 we shall see that the logarithm of the Lambert function (in whatever base) can always be expressed in terms of W itself. To see this, we refer to (1.21); where the base b version comes by simply changing the base of the logarithms and of W: logbWb(a)=logbaWb(a). It is therefore possible to get rid of logb in the last displayed formula. Applying (1.21) we get our solution to (1.10):

x+bx=ax=aWb(ba).(1.11)

In terms of the base e Lambert function, this reads as

x+bx=ax=aW(balogb)logb.(1.12)

Example: 3x+52x=7

Let us apply our results and solve the equation

3x+52x=7.

We substitute y=3x to get rid of the factor of the linear term:

y+523y=7,

or, which is the same,

y+523y=7.

This equation can be solved with the help of (1.11). We find that a=7, b=523, and

y=7W5235143,

and x, the solution of the original equation, is one-third of y:

x=7313W5235143.

If we rather want to express this solution in terms of the base e Lambert function, we use (1.12) instead:

x=73W235143log52log5,

In Chapter 4 we shall see how to evaluate W numerically, so that one can find the numerical value of the above x by computer. One gets that

x0.525294.

1.1.4 Equations of the form x+logbx=a, and x·logbx=a

Taking the base b logarithm of both sides of xbx=a, we get the equivalent equation

logbx+x=logba,

and its solution is the same as that of xex=a:

logbx+x=logbax=Wb(a).

The constant is arbitrary on the right-hand side; we therefore write

x+logbx=ax=Wb(ba).(1.13)

This can be generalized to a much more general equation:

xc+dlogbhxf=ax=dfcWbcdfbadhcf1c.(1.14)

The calculations are left as an exercise.

The “multiplicative version”

x·logbx=a

can be solved by substituting x=by:

by·logbby=a,

or

yby=a.

This equation is just the defining equation of the base b Lambert function, so

y=Wb(a).

Recall that x=by, whence

x·logbx=ax=bWb(a).

We can simplify this expression by noticing that for the base b Lambert function we have Wb(a)bWb(a)=a, and thus

bWb(a)=aWb(a).

The previous displayed equation can therefore be rewritten as

x·logbx=ax=aWb(a).(1.15)

Sometimes the following generalization can be useful:

xa·logb(cxd)=ax=da2Wba2dcad1a.(1.16)

Example: x·log2(5x)=3

To solve x·log2(5x)=3, we substitute y=5x:

15ylog2(y)=3,

or

ylog2(y)=15.

By (1.15) we calculate that

y=15W2(15),

so

x=3W2(15).

In terms of the classical Lambert function this solution has the form

x=3log2W(15log2),

where we used the base change formula (1.9). The numerical value of x is 1.17459.

1.1.5 Equations of the form xx=a, and xy=yx

Notice that (1.15) helps to solve the equation

xx=a.

Just take logarithm:

xx=ax·logx=loga,

thus, according to (1.15), x=loga/W(loga).

xx=ax=logaW(loga).(1.17)

Now let us try to solve

xy=yx.

Transforming both sides with the use of xy=eylogx, we get

eylogx=exlogy.(1.18)

If we restrict ourselves to x and y such that the exponents are real (i.e., x,y>0), then the equality of (1.18) is equivalent to the equality of the exponents:

ylogx=xlogy.

Let us separate the variables:

1xlogx=1ylogy.

Substituting z=1/x, we get that

zlog1z=1ylogy,orzlogz=1ylogy.

This equation is again solvable by (1.15):

z=1ylogyW1ylogy.

For x, this means that

x=ylogyW1ylogy.

Let us write our result in its final form:

xy=yxx=ylogyW1ylogy.(1.19)

1.2 Equations satisfied by W

We defined W through an equation. The unknowns of equations are usually denoted by x, y, and the known parameters are denoted by the letters a,b,c. Just as we did in (1.1) and in the subsequent equations, this is why we used the notation W(a). However, we are used to denoting arguments of functions by x, y, z, and not with a. From now on, we will concentrate on the functional behavior of the Lambert function, so we will write W(x) in place of W(a).

Another remark is due. All the base b Lambert functions can be expressed in terms of the classical (base e) Lambert function, and we therefore will study only the latter without losing any generality. We spare a lot of space and time by not writing out explicitly the two redundant statements for both Wb and W=We.

1.2.1 The exponential and logarithm of W

During our high school studies, we often apply rules to solve (exponential, logarithmic, trigonometric) equations. These “rules” are called, in math jargon, functional equations. We know many of these: ax+y=ax·ay, log(xy)=logx+logy, and so on.

The Lambert function also satisfies interesting functional equations; the most straightforward are the following. From (1.2) (with the renaming ax) we immediately get that the exponential of the W function is expressible in a very simple way by W:

eW(x)=xW(x).(1.20)

By taking the logarithm of both sides of (1.2), we infer that the logarithm of W is an easy expression of W itself:

logW(x)+W(x)=logx.

That is,

logW(x)=logxW(x)(x>0).(1.21)

(If x>0, all the expressions are positive, so there is no problem of taking logarithms.)

1.2.2 W at some functional arguments

There is still more in (1.2) to be discovered. We shall prove that

W(x·logx)=logxx1e.(1.22)

We make the substitution xx·logx in (1.2):

W(x·logx)eW(x·logx)=x·logx.

For the easier formulation, let us denote W(x·logx) by y:

yey=x·logx.

It is now easy to see that if ey is chosen to be x, then y=logx, and the equation is satisfied. We therefore have that

y=W(x·logx)=logx,

as we stated.

Why this relation holds only for x1e will be clear later: we shall see that for x<1e the W(xlogx) function becomes complex, while log is still real (as far as x>0), so the two sides cannot be equal.

Notice that by substituting respectively x=1,e,1e, we recover the special values of W given in Section 1.1.1.

Substituting x1x in (1.22), we get

Wlogxx=logx(0xe).

1.2.3 Linear combination of two Lambert function values

In this subsection we first prove the validity of the functional equation

aW(x)+bW(y)=WxW(x)ayW(y)b(aW(x)+bW(y)),(1.23)

and then deduce some simple consequences of it.

We look for an expression for aW(x)+bW(y), so we write this into the defining equation (1.2):

[aW(x)+bW(y)]eaW(x)+bW(y)=f(x,y,a,b).

Here on the right-hand side we have a function of x,y,a, and b. The solution of this equation is, by definition, W(f(x,y,a,b)). That is,

W(f(x,y,a,b))=aW(x)+bW(y).(1.24)

We rewrite f(x,y,a,b) as

f(x,y,a,b)=[aW(x)+bW(y)]eaW(x)+bW(y)=

[aW(x)+bW(y)]eaW(x)ebW(y).

Recall that eW(x)=x/W(x) (see (1.20)). Upon elevating this to the ath and bth power, we get that

eaW(x)=xW(x)a;ebW(y)=yW(y)b,

and these are substituted into the last expression of f(x,y,a,b). We get that

f(x,y,a,b)=[aW(x)+bW(y)]xW(x)ayW(y)b.

Now we use this expression and (1.24) to arrive at (1.23).

Two immediate consequences are given by specializing (1.23) with a=b=1, and a=1, b=1, respectively:

W(x)+W(y)=W(xyW(x)+xyW(y)),W(x)W(y)=W(xW(x)W(y)y(W(x)W(y))).(1.25)

Some consequences of the linear combination formulas

We shall see some special Lambert W values which can be deduced with the aid of the linear combination formula, and (1.25), in particular. The W function at x=1 is a special number which has its independent interest in several branches of mathematics [58]. The W(1) constant is denoted by Ω:

Ω:=W(1).(1.26)

Notice that, since W(1)eW(1)=1, Ω satisfies the equation

ΩeΩ=1.

Taking logarithm of both sides, we get yet another equation

Ω+logΩ=0,orlog1Ω=Ω.

A different expression for this constant is given upon letting x=y=1 in (1.25):

W2Ω=2Ω.(1.27)

Next, let x=e and y=1. It easily comes that

We+eΩ=1+Ω.

Further results come when x=1 and y=zez. Since W(zez)=z, we get from (1.25) that

Ω+z=WzezΩ+zezz=Wez(zeΩ+1).(1.28)

In particular (by setting z=2),

W2e2Ω+e2=2+Ω.

Using the identity 1Ω=eΩ, our expression can also be written as W(2eΩ+2+e2)=2+Ω.

A neat formula can be found for the real multiples of Ω also:

Ωx=WxΩx1x1e.(1.29)

The proof is done by easy symbolic manipulation. The statement holds if and only if

ΩxeΩx=xΩx1.

This is equivalent to

eΩx=1Ωx,(1.30)

or

ΩxeΩx=1.

The left-hand side is just (ΩeΩ)x. The base, ΩeΩ is one by definition, and its xth power is therefore also one, being equal to the right-hand side.

We still have to show that our identity is valid only when x1/e. The argument of W cannot be smaller than 1/e, because below this point W becomes complex, while Ωx remains real for all real x. It therefore comes that xΩx11/e is necessary. An inspection of the properties of the function xΩx1 shows that it is increasing, thus the limiting x we are looking for is the one for which

xΩx1=1/e.

This can be solved by the Lambert function, and the solution is 1/e.

A nice particular case of (1.29) (which comes by setting x=e) is:

WeΩΩe=eΩ.

Talking about formulas for W(x)+W(y), we remark that if this sum is known, then we can determine W(x)W(y) easily:

W(x)+W(y)=aW(x)W(y)=eaxy.(1.31)

Indeed, rearranging the right-hand side, we have

ea=xW(x)yW(y)=eW(x)eW(y)=eW(x)+W(y),

and this is equivalent to the left-hand side of (1.31).

To close this section, we remark that the case when x=1/Ω in (1.30) yields the quite handsome identity

Ω1Ω=1e.

(Note that this, however, is a simple consequence of the identity ΩeΩ=1, elevated to the (1/Ω) -th power.)

1.3 Differential and integral formulas

1.3.1 The derivative of W

When studying a function, we certainly ask about the derivative and primitive function of it. The derivative of W(x) is easy to find. Take the derivative of (1.2) (but now we use x in place of a) on both sides:

W(x)eW(x)+W(x)W(x)eW(x)=1.

After a rearrangement, we have an expression for W(x):

W(x)=1eW(x)(1+W(x)).

In place of eW(x) we write x/W(x), and we get that

W(x)=W(x)x(1+W(x)).(1.32)

The derivative of W(x) becomes singular when W(x)=1. This occurs when x=1e (recall (1.5)). At this point of singularity interesting things happen; we will investigate these questions later, when we study the branch structure of the Lambert function.

At the point x=0 the derivative will not be singular. The study of the Taylor series of W(x) around zero1 will reveal that limx0W(x)x=1 (see (1.53)). Therefore,

W(0)=1.

For x=1 and remembering that W(1)=Ω:

W(1)=Ω1+Ω.

1.3.2 Higher order derivatives

It is possible to find the general formula for the nth derivative of W(x):

W(n)(x)=Wn(x)pn(W(x))xn(1+W(x))2n1(n1).(1.33)

Here pn is a polynomial which satisfies the recursion

pn+1(x)=(1+x)pn(x)(nx+3n1)pn(x),(1.34)

with the initial value

p1(x)=1.

When writing pn(W(x)) we mean that at every occurrence of x one must substitute W(x). For example, by the recursion

p2(x)=(1+x)·0(x+31)·1=x2.

Thus

W(x)=W2(x)(W(x)2)x2(1+W(x))3.

Let us prove (1.33) and (1.34). The derivative given in (1.32) shows that p1(x)=1, indeed. Now we suppose that (1.33) holds, and we try to write W(n+1)(x) in the form

Wn+1(x)pn+1(W(x))xn+1(1+W(x))2(n+1)1.(1.35)

It will turn out that this is possible only if pn(x) satisfies (1.34). To shorten the subsequent lengthy formulas, we do not write out the argument of pn and W. Taking the derivative of (1.33), and simplifying a bit, we get

W(n+1)=Wn1xn+1(1+W)2n(npnW+pnWW)x(1+W)

Wpn(n(1+W)+x(2n1)W).

Let us write this expression such that it resembles more (1.35):

W(n+1)=Wn+1xn+1(1+W)2n+11+WW2[].

Clearly, the part 1+WW2[] must be pn+1. That is,

pn+1=1+WW2(npnW+pnWW)x(1+W)

Wpn(n(1+W)+x(2n1)W).

To make further simplifications, let us use (1.32) inside the square brackets. We get

pn+1=1+WW2npnW+pnW2Wpnn(1+W)W21+Wpn(2n1)=

1+WW2pnW2W2pnnW21+Wpn(2n1)=

(1+W)pn(1+W)pnnpn(2n1)=(1+W)pn(nW+3n1)pn.

We see that (1.34) indeed holds, if we consider pn+1 as a polynomial of W.

For possible applications, we list here the first pn polynomials.

p1(x)=1,p2(x)=x2,p3(x)=2x2+8x+9,p4(x)=6x336x279x64,p5(x)=24x4+192x3+622x2+974x+625,p6(x)=120x51200x45126x311758x214543x7776,p7(x)=720x6+8640x5+45756x4+137512x3+248250x2+255828x+117649.

1.3.3 The generating function and the coefficients of the pn(x) polynomials

The generating function of pn(x)

The generating function of a sequence encodes plenty of information about the sequence2. We are interested here in the generating function

f(x,y)=n=1pn(x)ynn!.

of the polynomial pn(x), introduced in the previous subsection. (Because of the presence of n! in the denominator such a generating function is called exponential.)

The recursion

pn+1(x)=(1+x)pn(x)(nx+3n1)pn(x)

results in the following partial differential equation:

yf(x,y)=(1+x)xf(x,y)xyyf(x,y)3yyf(x,y)+f(x,y).

The general solution of this equation is

fg(x,y)=g(ex(x+y+2xy+x2y))1+x.

Here g is an arbitrary function. The particular solution which corresponds to our generating function can be sorted out by checking, say, the coefficient of y in the Taylor series of fg(x,y). It turns out that this coefficient is

ex(1+x)g(xex).

On the other hand, this coefficient must equal p1(x)=1. Therefore, we have that

ex(1+x)c(xex)=1.

A quick check should convince the reader that g=W, whence g=W (up to an additive constant in general, but this constant is now zero). We therefore get that

f(x,y)=W(ex(x+y+2xy+x2y))1+x.

Notice that

f(0,y)=W(y)

follows immediately. Since

f(0,y)=n=1pn(0)ynn!,

we get that the pn(0)n! numbers are the Taylor series coefficients of the W function. We further develop this study in Section 1.4. Among others, we will prove that

pn(0)=(n)n1(n1).

The coefficients of pn(x)

Apart of the recursion (1.34), there is another way to explicitly represent the coefficients of pn(x). To this end, we write it in the form

pn(x)=(1)n1k=0n1βn,kxk.(1.36)

With the alternating sign we take into account that the pn polynomials seem to have positive coefficients for odd n, and negative for even n. If we can prove that βn,k is always positive, this is justified.

Our statement is the following:

βn,k=m=0k1m!2n1kmq=0mmq(1)q(q+n)m+n1.(1.37)

To prove this claim, rewrite (1.33) as

pn(W(x))=(1+W(x))2n1enW(x)dnW(x)dxn.(1.38)

We want to compare the coefficients of x on both sides. Although the right-hand side seems to be complicated, it is just a polynomial of W. First we deal with nth derivative of W. We will learn soon the Taylor series (1.52) of W. From the derivation of both sides of this formula n times, we get that

dnW(x)dxn=m=n(m)m1(mn)!xmn.

Substituting this into (1.38), and putting xex in place of x, we get

pn(x)=(1+x)2n1enxm=n(m)m1(mn)!xmn.

Next, we make use of the Taylor series

enx=m=0nmm!xm,

and multiply this with the rightmost sum. To isolate the coefficients of the powers of x, we still need to expand (1+x)2n1:

(1+x)2n1=i=02n12n1ixi.

After following all of these steps, we arrive at (1.37).

More on βn,k can be read in the Further Notes at the end of the chapter.

1.3.4 Derivatives of W(ex)

The expression for the derivatives of W(ex) are somewhat simpler than the ones for W(x) given in (1.33):

W(n)(ex)=qn(W(ex))(1+W(ex))2n1(n1).(1.39)

The very same method as above results in a recursion for the qn polynomials:

qn+1(x)=(x2+x)qn(x)(2n1)xqn(x)(n1),(1.40)

with q1(x)=x.

The coefficients of qn satisfy a nice formula:

qn(x)=k=0n1n1k(1)kxk+1.(1.41)

Here n1k is a so-called Eulerian number of the second kind, and satisfies the recursion

nk=(k+1)n1k+(2n1k)n1k1,

with 00=10=1, and 11=0. Using (1.40) and this recursion one can show the validity of (1.41).

Here are the first five qn polynomials:

q1(x)=x,q2(x)=x,q3(x)=2x2+x,q4(x)=6x38x2+x,q5(x)=24x4+58x322x2+x,q6(x)=120x5444x4+328x352x2+x,q7(x)=720x6+3708x54400x4+1452x3114x2+x

The Eulerian numbers of the second kind have a nice combinatorial interpretation, see [74] for details.

1.3.5 The differential equation of W

There is a differential equation which can be solved in terms of the Lambert function. This differential equation can be deduced as follows. Let y(x)=W(x), and consider (1.32), which yields the differential equation

y(x)(1+y(x))=y(x)x,(1.42)

or the equivalent

xy(x)+xy(x)y(x)y(x)=0.

This is a first-order, linear, homogeneous equation. Its solution is

y(x)=W(ecx),

where c is an arbitrary constant of integration. The non-homogeneous equation,

xy(x)+xy(x)y(x)y(x)=a,

has the solution

y(x)=a+(1a)Wxea+c11a1a.

The differential equation (1.42) can be generalized such that the Lambert function still suffices to solve the more general equation, too. The solution of the differential equation

y(x)(a+y(x))=by(x)x

with arbitrary but non-zero parameters a and b is

y(x)=aWecaxb/aa.

(If a, b or both are zero, the equation has trivial or elementary solutions.)

We shall see situations where the Lambert function comes to our help when solving differential equations coming from practical examples; see Part III of the book.

1.3.6 Some integrals of W

Owing to the fact that W(x) is an inverse function, it is very easy to find its primitive function W(x), and a whole host of other integrals as well.

The integral of Wn(x)

The method basically goes as follows. If W(x)=u, then x=ueu, and dx=(1+u)eudu. Hence

W(x)dx=u(1+u)eudu.

This integral is elementary:

u(1+u)eudu=eu(u2u+1)+c.

We therefore have that

W(x)=eW(x)(W(x)2W(x)+1)+c.

Upon substituting eW(x)=xW(x):

W(x)=xW(x)1+1W(x)+c.

Thus, for example,

01W(x)dx=Ω+1Ω1.

One can deduce a formula for the primitive function of the positive integer powers of W(x). The simplest formulas make use of the incomplete Gamma function. This is defined by

Γ(s,z)=zts1etdt((s)>0).(1.43)

One has that

uneudu=(1)nΓ(n+1,u)+c.(1.44)

Using our technique, we write

Wn(x)dx=un(1+u)eudu=uneudu+un+1eudu.

By making use of (1.44), we immediately get that

Wn(x)dx=(1)nΓ(n+1,W(x))Γ(n+2,W(x))+c(n1).

This can further be simplified if we make use of a recurrence of the incomplete Gamma function:

Γ(s+1,z)=sΓ(s,z)+zsez.(1.45)

One can then see that

Wn(x)dx=(1)n+1nΓ(n+1,W(x))+xWn(x)+c(n1).

Another formula is

Wn(x)dx=xWn(x)+xk=1n1(1)nkn·n!(k+1)!Wk(x)+c(n1),(1.46)

which does not involve any other function except W itself.

The integral of xnW(x)

To calculate the integrals of xnW(x) we shall make use of the integral identities

unenudu=(1)nnn+1Γ(n+1,nu)+c(n1),(1.47)

un+1enudu=(1)n+1nn+2Γ(n+2,nu)+c(n1),(1.48)

We then have that

xnW(x)dx=un+1e(n+1)u(1+u)du=

un+1e(n+1)udu+un+2e(n+1)udu=

(1)n+1(n+1)n+2Γ(n+2,(n+1)u)+(1)n+2(n+1)n+3Γ(n+3,(n+1)u)+c=

(1)n+1(n+1)n+2Γ(n+2,(n+1)u)1n+1Γ(n+3,(n+1)u)+c.

Substituting back u=W(x), we have an intermediate formula:

xnW(x)dx=(1)n+1(n+1)n+2Γ(n+2,(n+1)W(x))1n+1Γ(n+3,(n+1)W(x))+c.

The recursion (1.45) helps to shorten this formula. An elementary calculation results that

xnW(x)x=(1)n(n+1)n+3(n+2,(n+1)W(x))(1)nn+1xn+1W(x)+c.

This formula is not valid when n is a non-integer number, but it can be extended to real values between 1 and zero. This integral will be the Mellin transform of W.

1.3.7 The Mellin transform of W

The Mellin transform of a function f is

(Mf)(s)=0ts1f(t)dt.(1.49)

This transformation has many applications [48], and it is an invertible transformation because the original function f can be determined by its Mellin transform:

f(t)=12πicic+its(Mf)(s) ds.

Here a<c<b, and a and b are the boundaries of the infinite vertical strip a<(s)<b on which the integral in (1.49) converges.

To determine the Mellin transform of the Lambert function, we shall need the Gamma function:

Γ(s)=Γ(s,0)=0ts1etdt((s)>0).

With this function, MW has a surprisingly simple (and nice) expression:

(MW)(s)=(s)ssΓ(s)(1<(s)<0).(1.50)

At s=1,0 the integral as well as the expression on the right-hand side diverges. On other points of the limiting vertical lines of the strip 1<(s)<0 the integral diverges but the right-hand-side has finite values.

Let us now prove (1.50). We will use the usual correspondences

W(t)=u,t=ueu,dt=(1+u)eudu.

With these

(MW)(s)=0ts1W(t)dt=0(ueu)s1u(1+u)eudu=

0useusdu+0us+1eusdu.

These integrals are evaluable in terms of Γ(s):

0useusdu=(s)sΓ(s)(1<(s)<0),0us+1eusdu=(s)2sΓ(s+2)(2<(s)<0).

In the last integral, we use the functional equation

Γ(s+1)=sΓs

twice, so that Γ(s+2)=(s+1)sΓ(s). Then a simple algebraic manipulation gives (1.50). That 1<(s)<0 must hold comes from the intersection of the conditions of the last two displayed integrals.

1.3.8 The Laplace transform of W(et)

The Laplace transform is another useful functional transformation with many practical applications. The Laplace transform is defined as

(Lf)(s)=0estf(t)dt.

The Laplace transform of the Lambert function would need the evaluation of the integral

0ueuesueudu,and0u2euesueudu.

But these integrals do not have a known expression in terms of usual special functions. Therefore, we determine the Laplace transform of W°exp instead:

[(Wexp)](s)=0estW(et)t=ss2(1s,s)+s((s)>0).

In this expression Ω is the Omega constant, defined in (1.26).

The proof goes as follows. We substitute

W(et)=u,sot=logu+u,dt=1u+1du,

and the limit of integration at t=0 becomes Ω (ueu=1, so u=Ω); and at t= it is u=. Hence

0estW(et)dt=Ωues(logu+u)1u+1du=

Ωusesudu+Ωus+1esudu.

Both of these integrals can be expressed in term of the incomplete Gamma function (see (1.43)):

Ωusesudu=ss1Γ(1s,sΩ),Ωus+1esudu=ss2Γ(2s,sΩ).

To get the wanted formula, we just use the recursion (1.45) to transform Γ(2s,sΩ) into Γ(1s,sΩ).

1.4 The Taylor series of W0

The Taylor series of W is determined by the Lagrange inversion theorem. Lagrange's formula is often useful when we try to find the Taylor series of an inverse function. It says that if y=f(x) (so that x=f1(y)), then around a point y0=f(x0) the series of f1(y) is given as

f1(y)=x0+n=1(yy0)nn!n1xn1xx0f(x)y0nx=x0.(1.51)

In our case f(x)=xex=y, and x=W(y). We choose the point x0 to be zero (thus y0=0 as well). The Lagrange inversion formula for the Lambert W function reads

W(y)=n=1ynn!n1xn1xxexnx=0.

This is continued as follows:

n=1ynn!n1xn1xxexnx=0=n=1ynn!n1xn1enxx=0=

n=1ynn!(n)n1enxx=0=n=1(n)n1n!yn.

We therefore get that the Taylor series of W (substituting the letter x in place of y)

W(x)=n=1(n)n1n!xn|x|<1e.(1.52)

A quick application of the ratio test yields that

(n1)n(n+1)!xn+1(n)n1n!xn=n+1nn1|x|=1+1nn1+1n|x|e|x|.

Whence it comes that

|x|<1e,

as it is written in (1.52).

The W function therefore behaves around x=0 as

W(x)=xx2+32x383x4+12524x5545x6+O(x7).

It follows that,

limx0W(x)x=1.(1.53)

For further reference, we note that the above series represents a part of the principal branch of the W function. This principal branch has a much larger domain than the disk |x|<1e; in fact, its domain is the whole complex plane. Hence (1.52) represents only a small portion of W; we address this issue in some detail in the next section and give full details in Chapter 2.

1.5 The number of real solutions of xex. The two real branches of W

Let us have a look at the graph of the function f(z)=zez:

Clearly, f(z) is negative for negative z, zero at z=0, and it is positive for positive z (see Figure 1). A quick analysis of f(z)=ez(1+z) reveals that f(z) strictly increases for z>1, and strictly decreases if z<1. The global minimum point is therefore at z0=1, where f(1)=1e. This also means that f does not take real values less than 1e.

FIGURE 1 The plot of zez (z is real). This function has a global minimum at z=1, with value 1/e.

It is therefore seen that

zez=x(1.54)

has no solution when x<1e; there is one solution when x=1e; it has two solutions when 1e<x<0 (both of these solutions are negative); and it has a unique non-negative solution for all x0. Notice that when 1e<x<0, one of the solutions falls into the interval ],1[, and the other is in ]1,0[.

By its very definition, the inverse W=f1 serves to give us these solutions. However, W is not a function, because at the points of the interval 1e,0 it takes two values.

In such cases, we say that the inverse function has multiple branches. These branches serve to distinguish among solutions, and help to refer to the different solutions in a consistent way. If properly defined, these branches become functions.

A remark is due here. We shall see in Chapter 2 that for all non-zero x, equation (1.54) has infinitely many complex solutions. Among these solutions, there is always at most two real solutions. We often refer to the branches that give real solutions as the real branches.

Hence, there are two real branches of the Lambert function: for 1ex<0 the branch W1(x) will give the smaller negative solution, and W0(x) gives the other one. Moreover, W0(x) gives that non-negative solution, too, which is unique for x0. The branch W0(x) will be called principal branch of the Lambert W function. The collection of all the branches together constitutes the Lambert W function.

For the moment we do not define W1(x) on the intervals ,1e, and [0,[, and we similarly do not define W(x) for x smaller than 1e. These are complex functions, and will be investigated in Chapter 2. Thus

W1:1e,0],1],(1.55)

W0:1e,[1,[.(1.56)

The graphs of these two functions (which are the mirror images of the graph of xex with respect to the line y=x) are given in Figure 2.

FIGURE 2 The continuous plot is the graph of W0(x), the dashed plot depicts W1(x). The two plots connect at the point (x,y)=(1/e,1).

The point x=1e is a branch point of the multi-valued Lambert function: the two branches take the same value in the branch point:

W11e=W01e=1.

On this graph, this is the point where the continuous and dashed plots meet. (This is completely the same phenomenon as with the square root function: if f(x)=x2, then f1(x) has two branches: f1(x)=x, and f+1(x)=x; with f1(0)=f+1(0)=0.)

It is now clear that the Taylor series (1.52) belongs to the principal branch W0(x). Indeed, (1.52) is valid on the interval I=1e,+1e and it is real there. Only the W0 branch is real on I, so the validity of our statement is seen.

1.6 Convexity and concavity of W0 and W1

Properties of W0

Now that we know that the real Lambert function is, in fact, two functions, let us study their basic real analytic properties separately.

Figure 2 suggests that the principal branch W0 is strictly increasing. The sign of the first derivative will justify this. The derivative of W0 is, by (1.32),

W0(x)=W0(x)x(1+W0(x)).

Note that W0(x)x is positive on the whole domain of the real W0 (at x=0 W0 has only a removable singularity, see (1.53)). Moreover, 1+W0(x)>0, too, on D0=1e,. Therefore

W0(x) is strictly increasing on 1e,.

The sign of the second derivative informs us about the convexity of the function. The second derivative of W0(x) is

W0(x)=W0(x)2(W0(x)+2)x2(W0(x)+1)3.

The sign of this expression is determined by the sign of W0(x)+2(W0(x)+1)3. We have just seen that 1+W0(x)>0 on D0, and this is even more so for 2+W0(x). The negative sign therefore makes the whole expression negative: W0(x)<0 on D0. Hence

W0(x) is concave on 1e,.

This analysis was given through the properties of the inverse function, xex, in [22]. In this paper, it was also deduced that not only W0(x) but also xW0(x) is concave, while W0(x)x is convex on D0. The reader can readily check these statements.

Properties of W1

We check the monotonicity and concavity properties for the other real branch, W1 in the interior of its domain D1=1e,0. The first derivative is

W1(x)=W1(x)x(1+W1(x)).

Clearly, W1(x)x is positive on D1, while 1+W1(x) is negative, so W1(x)<0 on D1. We get that

W1(x) is strictly decreasing on 1e,0.

The second derivative is

W1(x)=W1(x)2(W1(x)+2)x2(W1(x)+1)3.

The relevant terms are (W1(x)+1)3 and W1(x)+2. It is plain that the former is negative on the whole D1. These negative values turn to be positive with the minus one factor. We get that the sign of W1(x) is determined by W1(x)+2.

We have just seen that W1 strictly decreases, so W1(x)+2 changes sign only once. It occurs when

W1(x)=2,i.e., whenx=2e2.

On 1e<x<2e2 the values taken by W1(x)+2 are positive, and are negative on 2e2<x<0. We therefore get the following fact.

W1(x)isconvexon]1e,2e2[,anditisconcaveon]2e2,0[.

That is, W1 has an inflection point at x=2e2.

1.7 The Ω constant

The Ω=W(1) constant was introduced in Subsection 1.2.3. Now that we know more about the branches of the Lambert function, we can more correctly say that Ω is the value at x=1 of the principal branch of W. That is,

Ω=W0(1).

Ω satisfies nice equations like

ΩeΩ=1,log1Ω=Ω.

Numerical methods – which we will learn about later – help us to find the value of Ω. For 20 digits, its value is

Ω=0.5671432904097838729999686

The last digit is not rounded (the following digit is also six).

1.7.1 Ω is transcendental

The Ω constant is not a rational number; it cannot be written as a fraction ab with a,b integers. In this respect, it is similar to, for example, 2 which is non-rational also. But at least 2 can be gotten as the solution of an algebraic equation: the second degree equation

x22=0

has two solutions: x1,2=±2. Numbers which are solutions of some algebraic equation (with rational coefficients3) are called algebraic numbers. There are numbers which are not algebraic; these are the transcendental numbers. Two famous examples of transcendental numbers are e and π.

The Ω constant is also a transcendental number. This statement can be proven by the use of the Lindemann–Weierstrass theorem[11]. This theorem (in a form given by A. Baker) says that if α1,,αn are distinct algebraic numbers, then eα1,,eαn are linearly independent over the algebraic numbers. For our purpose, the statement suffices in the particular case when n=1. Then it states that if α is algebraic, then eα is transcendental. Let α=Ω. If Ω were algebraic, then eΩ would be transcendental. But eΩ=1Ω, and the reciprocal of an algebraic number is algebraic, so we get a contradiction. The reason of the contradiction is that our initial assumption (Ω is algebraic) is false.

The Ω constant is transcendental.

This transcendence observation can be strengthened for other values of W, regardless of whether this value is complex or real. A complex number can be algebraic, as the number i=1 shows. It arises as the solution of x2+1=0. So, in this respect there is not much difference between real and complex numbers. Another example is: iπ is transcendental. If it was algebraic, eiπ was transcendental, but eiπ=1 (this is the famous formula of Euler), an algebraic number. The Lindemann–Weierstrass theorem thus shows that iπ is transcendental.

After this short detour, we go back to the values of W. Let x be an algebraic number (in particular, it can be an arbitrary rational number a/b=x). Then eW(x)=xW(x). If W(x) were algebraic, xW(x) were algebraic, too, which would mean that eW(x) is algebraic. But the Lindemann–Weierstrass theorem does not permit the exponentials of algebraic numbers be algebraic. We do not get contradiction only if W(x) is transcendental. We therefore get a nice number theoretical result for a huge class of Lambert function values:

For algebraic values x, the number W(x) is transcendental.

1.7.2 The Adamchik integral (in a generalized form)

V. Adamchik gave a nice integral representation for 11+Ω:

11+Ω=1(exx)2+π2dx.

A more general form is valid [1]4, from which Adamchik's result comes when a=1, b=0:

1a211+W01aeb/a=1(exaxb)2+(aπ)2dx(a>0,b).(1.57)

The finding of the integral is a nice application of the Residue Theorem, and the knowledge of the branch structure of the Lambert function. Here we use information which will be available only in the second chapter, so the reader might come back to this calculation after being acquainted with that knowledge.

We will calculate the contour integral

γR1(ezazb)2+(aπ)2dz,

where the contour γR is the usual semi-circle contour depicted in Figure 3. Let us determine where the integrand is singular. To this end, we need to solve the equation

(ezazb)2+(aπ)2=0,

FIGURE 3 The γR semi-circle contour used in the text.

which is equivalent to

ezazb=±iaπ.(1.58)

This equation is solvable in terms of the Lambert function, see (1.12). What was not mentioned around (1.12) is that there are infinitely many solutions, indexed by an integer k. This integer identifies the branches of W, so (1.12) would better be written as

x+bx=ax=aWk(balogb)logb.

This means that the solutions of (1.58) are

zk±=±iπbaWk1aeb/a(k).

In order to be able to analyze the positions of these zk's (we want to see whether they fall inside the curve γR), we restrict the argument of Wk to be a positive real number. Thus we want a to be positive, but b can be arbitrary. When the argument of Wk runs through the positive reals, the values of Wk run through a curve on the complex plane, from minus infinity to plus infinity, but the imaginary parts are bounded. From what we will learn in Chapter 2, it turns out that (W1(t))>π for all t>0, so (W1(t))<π, and so

(W1(t)+iπ)<0.

This means that z1+ is certainly below the real axis, out of the curve γR, and this is even more so for z1. Since the ranges of Wk lay above W1 if k>1, the only singularities which possibly fall inside γR are zk± if k0. When k<0, (W1(t))>π, and thus even z1 is above the real axis, let alone z1+ or zk± for all k<1. We still need to consider z0±. This belongs to the principal branch, and W0 is real on positive real numbers. This means that z0 does not fall into γR, but z0+ does (if R is not too small).

How many of these singularities fall inside the curve depends, of course, on R. Let this number be n=n(R). After all of these considerations, we have that

γR1(ezazb)2+(aπ)2dz=

2πik=n0Res1(ezazb)2+(aπ)2,zk++

2πik=n1Res1(ezazb)2+(aπ)2,zk.

We calculate the residue with zk+:

Res1(ezazb)2+(aπ)2,zk+=limzzk+zzk+(ezazb)2+(aπ)2=

12(ezk+azk+b)(ezk+a).

To reach the last step, we used L'Hospital's rule.

Notice that

ezk+=eiπbaWk1aeb/a=eb/aeWk1aeb/a=

eb/aWk1aeb/a1aeb/a=aWk1aeb/a.

Euler's eiπ=1 formula was used, together with (1.20). The residue is thus easily seen to be

Res1(ezazb)2+(aπ)2,zk+=12πia21Wk1aeb/a+1.

Same calculation shows that at zk

Res1(ezazb)2+(aπ)2,zk=12πia21Wk1aeb/a+1.

These, therefore, all cancel out except the residue in z0+. Hence

γR1(ezazb)2+(aπ)2dz=1a21W01aeb/a+1.

In the last step we tend with R to infinity, and show that the integral on the semi-circle vanishes, and what only remains is the integral on the real line. Let the semi-circle contour be denoted by CR. Then, by using |x||y||x+y| in the second step,

CR1(ezazb)2+(aπ)2dzCR1|(ezazb)2+(aπ)2|dz

CR1|ezazb|2(aπ)2dzCR1|eRaRb|2(aπ)2dz=

1|eRaRb|2(aπ)2CR1dz=Rπ|eRaRb|2(aπ)2.

The last expression certainly tends to zero when R, and the proof of (1.57) is finished.

1.7.3 A log-exponential integral

The integral representation that we are going to present is valid not only for Ω=W0(1), but also for a range of values of W0(x):

W0(x)=1π0πlogeeitxeiteeitxeitdt(1/exe).(1.59)

In particular, for the Ω constant

Ω=1π0πlogeeiteiteeiteitdt.

This formula was found by the author during working on the manuscript [37]. The proof needs two basic integral evaluations:

sin(at+b)sin(at+d)dt=t2cos(bd)sin(2at+b+d)4a,sin(at+b)sin(ct+d)dt=sin[(ac)t+bd]2(ac)sin[(a+c)t+b+d]2(a+c).

The first integral is the item 2.532/4, and the second one (which is valid only when a2c2) is 2.523/1 in [72].

The corollary of these two, when m and n are integers, is the following:

0πsin(mt)cos(mt)dt=π2,if m=n;0,if mn.

Next, we use the Taylor expansion

ex=m=01m!xm,

and De Moivre's formula

eit=cost+isint(t).

It follows that

ejeit=m=0jmeimtm!=m=0jmm!(eimt)=m=0jmsin(mt)m!.

With this result we can evaluate the following integral:

0πejeitsin(nt)dt=0πm=0jmsin(mt)m!sin(nt)dt=

m=0jmm!0πsin(mt)sin(nt)dt=jnn!π2.

This is valid for all real j.

We are now ready to prove (1.59). Substituting j=n in place of j in our last integral, dividing the two extremal sides by n, and multiplying by 2πxn, we get

(n)n1n!xn=2π0πxneneitsin(nt)ndt.

Summing over n=1,2,, and considering the Taylor series (1.52), we get that the left-hand-side is W0(x), so at this moment we have that

W0(x)=2π0πn=1xneneitsin(nt)ndt.(1.60)

In the next step we make use of the simply-provable identity

n=1xnsin(nt)n=i2log1eitx1eitx.

The sum inside the integral can be put in a single form:

0πn=1xneneitsin(nt)nt=0πi2log1eitxeeit1eitxeeitdt=

=120πlogeeiteitxeeiteitxdt=120πlogeeiteitxeeiteitxdt.

Substituting this into (1.60), the proof of (1.59) is established.

That the result is valid only when x>1/e can easily be seen: the principal branch becomes complex when x<1/e, while on the right-hand side we always have a real number. On the other hand, as xe, the argument of the logarithm under the integrand tends to plus infinity when t0. After the turning point (when x=e+ε) the value of the integral decreases, while W(x) keeps growing monotonically. Thus the representation loses its validity when x>e.

1.7.4 A log-trigonometric integral

Another integral for Ω was found by the author (and, independently and earlier, by Kalugin et al. [103]) after encountering with the problem of Nuttall [139] and its solution by Bouwkamp [23]. This integral representation reads as

Ω=1π0πlog1+sinttetcottdt.

In fact, the following representation is valid for the principal branch W0(x):

W0(x)=1π0πlog1+xsinttetcottdt.(1.61)

From this, the result for Ω comes by setting x=1.

The proof of (1.61) is not hard, once we have the Nuttall–Bouwkamp integral:

0πsinttexp(tcott)νdt=πννΓ(1+ν) for ν0.

(Here ν is not necessarily an integer number. Γ is the Euler Gamma function. We only need the fact that Γ(ν+1)=ν! for non-negative integer ν.) Divide both sides by ν, multiply with (1)ν1xν, and sum for all ν1 integers. On the left-hand-side we get

0πlog1+xsinttetcottdt.

On the right-hand side, we have the following sum:

πν=1(ν)ν1ν!.

The sum is nothing else but the (1.52) Taylor series of the principal branch of the Lambert W function. Our result is therefore proven.

Although we used the Taylor series to connect the integral to W0, numerical calculations show that (1.61) is valid on a large subset of (also in x=1 although this point does not belong to the convergence domain of the Taylor series). The exact set on which (1.61) is valid is not known.

Notice that the substitution x=1/e and (1.5) yields a nice integral for π:

π=0πlogexexexcotxsinxdx.

Further notes

  1. Some more words on history. The equation xex=a or its variants like xx=a were studied by several people during the last centuries before the W function was formally introduced. See the pages of Ramanujan's “Lost Notebook” around Example 3(iii) [18]. See also Wright's papers mentioned in the Prelude, or Eisenstein's article [55]. Knoebel [107] studied the equation xy=yx and compiled a very good and extensive list of bibliography.

  2. Additional differential equations. We saw in Subsection 1.3.5 that several differential equations can be solved in terms of W. There are many more such differential equations. A good collection of these can be found in [52].

  3. Properties of βn,k. The βn,k coefficients of the pn polynomials (see (1.36)) have nice properties that were discovered in [102]. The authors presented (1.37), and other connections between βn,k and counting sequences. Among others, it is proved there that for n3, both of the sequences (k!βn,k)k=0n1 and (βn,k)k=0n1 are log-concave. A sequence ak is log-concave, if ak1ak+1ak2. A consequence of this fact (for non-negative sequences) is that a log-concave sequence strictly grows, reaches a maximum in at most two positions, then it strictly decreases. (This fact can directly be observed on p. 1.3.2, after omitting the negative signs.)

  4. W0 is a Bernstein function on ]0,[. Another property of the (βn,k) sequence is proved to be important. It can be shown that all the βn,k numbers are positive, see Theorem 3.4 in [102]. This observation has an interesting consequence. It yields that the principal branch W0 is a Bernstein function. A function f:]0,[]0,[ is a Bernstein function if it is infinitely many times differentiable, and the derivatives alternate in sign:

    (1)n1f(n)(x)0(x>0,n1).

    Putting together (1.33), (1.36), and the positivity of βn,k we get that W0 is a Bernstein function. Bernstein functions enjoy nice properties and have many applications [157].

  5. The Lambert function is not Liouvillian. The question arises whether W is not a genuinely new function but can be expressed in terms of “more elementary” functions. It turns out [26] that W is not a composition of a finite number of exponentials, constants, roots, and integrals of these but rather a genuinely new function.

  6. Problem. Determine the domain of validity of (1.61).