Sie sind auf Seite 1von 8

See discussions, stats, and author profiles for this publication at: https://www.researchgate.

net/publication/266301429

Unwinding the branches of the Lambert W function

Article  in  Mathematical Scientist · January 1996

CITATIONS READS
64 478

3 authors, including:

David J. Jeffrey Robert M. Corless


The University of Western Ontario The University of Western Ontario
159 PUBLICATIONS   9,669 CITATIONS    240 PUBLICATIONS   6,794 CITATIONS   

SEE PROFILE SEE PROFILE

Some of the authors of this publication are also working on these related projects:

MapleTech View project

All content following this page was uploaded by David J. Jeffrey on 15 June 2015.

The user has requested enhancement of the downloaded file.


This article was published in The Mathematical Scientist, 21, 1{7 (1996). The pagination
here is the same as the published version.

Unwinding the branches of the Lambert W function


D.J.Je rey* Monash University
D.E.G.Hare**, University of Waterloo
Robert M. Corless***, The University of Western Ontario
Abstract
An algebraic relation is derived that allows the di erent branches of the Lambert W
function to be concisely distinguished. The derivation relies on the unwinding number,
which is de ned here, for the manipulation of elementary functions in the complex plane.
Key words: Lambert W function unwinding number.
AMS 1991 Subject Classication: Primary 33E99
1. Introduction
Interest in the Lambert W function goes back at least to Lambert and Euler, albeit
that these two mathematicians studied it only indirectly, but the function did not receive
a permanent name until it was included in the library of Maple, the computer algebra
system. After gaining its name, it gained recognition. Many of the applications of were
W

found because of users discovering that Maple had used in the solution of a problem they
W

had posed. In addition to its applicability, the function has rich mathematical properties.
It is de ned to be the solution ( ) of
W z

()
W z e
W (z )
= z  (1)
where is a complex variable. The history, applications and properties of were recently
z W

reviewed in Corless et al.3], and so just two examples of the uses of are given here, in
W

order to convey the avour of its applications.


A common way to meet is through the problem of iterated exponentiation, which
W

is the evaluation of
zz
h z( )= zz 

whenever it makes sense. The function ( ) can be found in closed form by solving the
h z

Received 29 Nov 1995 revised 8 Jan 1996


* Dept Maths, Monash University, Victoria, Australia
** Symbolic Computation Group, University of Waterloo, Canada
*** Dept Applied Maths, UWO, Canada
1
equation ( ) =
h z z for ( ) (using Maple, for example), and getting
h(z) h z

( ) = ; (log; log )
h z
W
(2)
z
:
z

For more details and references on the problem, see Baker & Rippon 2].
Another application is the solution of linear constant-coecient delay equations 8].
Consider the simple delay equation
_ ( ) = ( ; 1) y t ay t (3)


subject to the condition on 0   1 that ( ) = ( ), a known function. Direct substi-


t y t f t

tution shows that exp( ( ) ) is a solution of (3). The starting condition can be matched
W a t

by noting that (1) does not de ne uniquely. If complex values are considered, multiple
W

solutions exist, denoted k ( ), for an integer. Then, by linearity, a solution of (3) is


W a k

1
X
y = ck exp( Wk a t ( ))  (4)
k= ;1
and the k can be determined to match ( ). One sees immediately that the solution will
c f t

grow exponentially if any of the k ( ) have positive real part, and this leads to important
W a

stability theorems in the theory of delay equations.


As a prelude to describing the branches k , it is useful to consider the branches
W

of some elementary functions that are multivalued. The manipulation of multivalued


functions in the complex plane has been the subject of renewed attention in recent years,
in an attempt to impose some uniformity on the operations of hand-held calculators and
computer programs. As a result, there is now substantial agreement on the principal
branches of the elementary functions 7]. The principal argument of a complex number z

satis es ; arg  , and the principal branch of its (natural) logarithm is de ned to
 < z 

be ln = ln j j + arg . The th branch of the logarithm is written lnk = ln + 2 ,


z z i z k z z ik

implying that ln0 is another representation of the principal branch. (On the matter of
z

notation, notice that although logk means logarithm to the base , there is no standard k

interpretation of lnk , so there need be no confusion of meaning.) The notation Ln denotes z

an unspeci ed branch. The range of each lnk in the complex plane is shown in gure 1.
z

Plotted horizontally is the real part of the logarithm: < lnk = ln j j. The imaginary part, z z

= lnk = arg +2 , is plotted vertically. The points that form the boundary between two
z z k

branches belong to the region below them, because of the de nition of arg . This closure z

also agrees with the `counter-clockwise continuous' convention (CCC) of Kahan 7].
Figure 2 shows the complex range of each k . The horizontal axis is = < , the
W  W

real part of the appropriate branch of , and the vertical axis is = = . The branch
W  W

boundaries obey either = 0 or = ; cot and correspond to cuts in the plane along
    z

portions of the negative real axis. The points on the boundaries belong to the branch
below them, which closure rule again satis es the counter-clockwise continuous (CCC)
convention 7]. The negative real axis is divided at = ;1, with  ;1 belonging to  

branch 0 and ;1 belonging to branch = ;1. It should be noticed that the dashed
 < k

asymptotes at odd multiples of coincide with the branch boundaries in gure 1. This is


a consequence of the fact that for j j ! 1, k ( ) ! lnk .


z W z z

2
ℑ(Ln z)


k=1

π Principal
k=0
0
ℜ(Ln z)
Branch

−π
k = −1
−2π

−3π

Figure 1. The ranges of the branches of the multivalued logarithm Ln . The heavy lines
z

are the boundaries between the branches, and the value of for each branch is shown.
k

Branch corresponds to lnk = ln + 2 , where ln = ln0 is the principal branch of


k z z ik z z

logarithm.

The current de nition of the branches is a little long-winded, and it would be a great
convenience if it could be replaced, or at least supplemented, by an algebraic relation that
directly discriminates between the branches of . Section 3 derives such a relation. It is
W

more concise, as a de nition, although the original de nition is more graphical. To derive
the result, we have used a method currently being explored in connection with computer
algebra systems.
Computer algebra systems, and humans for that matter, face the problem of how
to handle the fact that in the complex plane ln( ) 6= ln + ln , when logarithms are
zw z w

interpreted as principal branch. Any scheme should be suitable for automatic operation.
One proposed solution is to transfer the problem to the design of the user interface to
the system, and not develop any new mathematics. This possibility has been discussed,
amongst other issues, in Corless & Je rey 4]. Although plausible in the computer-algebra
context, an interface solution does nothing to alleviate the mathematical diculty. Here,
a mathematical idea called the unwinding number is described and applied. Similar ideas
have been discussed informally, particularly in electronic forums such as newsnet, but have
not appeared in print, although an unnamed function similar to the unwinding number
made a cameo appearance in the book by Apostol 1, theorem 1.54].
2. Denition and properties of the unwinding number
The unwinding number K( ) is an integer function de ned using the principal-value
z

logarithm. The de nition is


ln( z ) = + 2 K( )
e z i z : (5)

3
η = ℑ(W)

4π Branch k = 2

2π Branch k = 1

π
Principal
ξ = ℜ(W)
Branch k = 0
−π

−2π Branch k = −1

−3π
Branch k = −2
−4π

−5π

Figure 2. The ranges of the branches of . Each branch is given a number, the principal
W

branch being numbered 0. The boundaries of the branches are asymptotic to the dashed
lines, which are horizontal at integer multiples of . The boundary curves obey either


 = ; cot , for 2
  n < j j (2 + 1) , or = 0 for  ;1.
< n   

Equivalent de nitions use the oor function or the round function. If = is the imag- z

inary part of , then


z
   
K( ) = 2
z
; = = ;R =2
 z
(6)
z
:
 

Here, R is the round function with half-integers rounded down. Particular values of K are
8 1
when ;3 ; ,
>
< 0
 < y 

when
K( + ) = > ;1 when ;  ,  < y 
x iy
: 3 ,
  < y 

; when (2 ; 1)
n  (2 + 1) . n  < y n 

Only those properties of K that are of immediate relevance will be explored here.
From (6), it is clear that K( ) = K( = ), and also
z i z

K( + 2 ) = K( ) ;
z in z n  for an integer.
n (7)
This relation is very useful for removing one unwinding number from the argument of
another. The application of K in this paper is to the manipulation of logarithms, as
summarized by the following formulae.
ln( ) = ln + ln + 2 K(ln + ln )
zw z w i z w : (8)
ln( ) = ln ; ln + 2 K(ln ; ln )
z=w z w i z w : (9)

4
Both of these apply for any complex numbers and . The derivation of (8) is e ected z w

by taking logs of = exp(ln + ln ). The special case = 1 implies


zw z w w

K(ln ) = 0 (10)z :

While giving an example of working with K, we can derive a result that will be used
in section 4. If and are complex numbers for which j arg ; arg j , with arg the
a b b a < 

principal argument, then


ln = ln + ln
b a
b

a
: (11)
The derivation uses (8), (9) and (7).
ln = ln + ln(
b a b=a ) + 2 K (ln + ln( ))
i a b=a

= ln + ln( a b=a ) + 2 K (ln + ln ; ln + 2 K(ln ; ln ))


i a b a i b a

= ln + ln( a b=a ) + 2 K(ln ) ; 2 K(ln ; ln )


i b i b a :

The rst unwinding number is zero by (10) and the second by the condition on and . a b

3. A new relation for Lambert W


The main result of this article is, in the notation introduced,

( ) + ln ln
( ) = ln z  for = ;1 and 2 ;1 0) ,
k z =e
(12)
Wk z Wk z
k z otherwise.
The proof takes logarithms of (1). Omitting the argument of Wk z ( ) for clarity, we have
ln = ln ( k exp k ) = ln
z W W Wk + ln exp k + 2 K(ln k + ln exp
W i W Wk )
= ln k + k + 2 K(
W W i W k ) + 2 K(ln k + k + 2 K( k ))
i W W i W :

Equation (7) now cancels two of the unwinding numbers.


ln = ln
z Wk + Wk + 2 K(ln i Wk + Wk ) :

So it is required to show K(ln k + k ) = ; for 6= ;1, and this requires showing


W W k k

(2 ; 1) arg k + = k  (2 + 1) . Put = i , with ;


k  < W W  , and k = +
k  z re  <  W  i

in (1) and separate real and imaginary parts.


r cos =  ( cos ; sin )
e      (13)
r sin =  ( cos + sin )
e     : (14)
For 6= 0 or , divide (13) by (14).


cot = cot arg k cot ; 1 = cot(arg + = ) W 

cot arg k + cot


k k
W 
W W :

Thus and arg k + = k di er by an integer multiple of . Furthermore, by continuity,


W W 

this multiple is the same for all and , except possibly when is real and negative,
r W

5
because then arg is discontinuous. Putting the exceptions to one side, we identify
W

the multiple of by xing and considering ! 1. Since is asymptotically similar to


 r W

logarithm as j j ! 1, we have, for xed,


z

lim
!1(arg
r
Wk += Wk ) = rlim
!1 = + 2  k 

since arg Wk ! 0 as j j ! 1. Therefore for 6= 0 and for all ,


z  r

arg k + = k = + 2 W W k : (15)
The special case = 0 requires = 0 and is trivial the special case = requires either
k 

k = ;1 or = 0. If = ;1, then = corresponds to ;1  ;1 when  1 , and


k k  W r =e

then arg ;1 is discontinuous at = 3, gures 7 and 8]. Hence


W 

arg ;1 ( ) + = ;1( ) =
W z W z  for ; 1  =e z < 0 

and K = 0, as stated in the theorem. For the = 0 branch, k W0  ;1 also corresponds to


= and  1 , but in this case, (15) continues to apply.
 r =e

4. Application
De Bruijn 5] obtained an asymptotic expansion for the real values of 0 ( ), for W x x

real, when ! 1. This was generalized to all branches of ( ) for complex in the case
x W z z

j j ! 1 by Corless et al. 3]. In both cases, the derivations were based on a quantity ,
z v

for which an equation was derived that was valid in the asymptotic region. Here, (12) and
(11) are used to obtain an equation for that is valid for all and all branches.
v z

Generalizing de Bruijn, we de ne k by v

Wk z ( ) = lnk ; lnlnk + k ( )z z v z : (16)


For = 0,
k v0 is unbounded at = 0 1. We show that (suppressing the argument of k )
z  v

  n
ln lnk + k = 2 for = 0 and 2 (0 1),
k + ln 1 ; (17)
z v i k z 
v
lnk lnk z z 0 otherwise.
The proof treats separately the three cases arg k = 0 and arg W  Wk not equal to these
values. If arg 6= 0 , then substituting (16) into (12) gives
W 

lnk ; ln lnk +
z z vk + ln(lnk ; ln lnk + k ) = lnk
z z v z :

For all branches, arg k and arg lnk have the same sign, and so (11) applies, and results
W

in (17).
The special case arg k = 0 implies = 0 and is real and positive, and checking
W k z

this case is straightforward. Finally, if arg = , then can be 0 or ;1, and, for eitherW  k

value of , ;1 
k =e 0. Since = ;1 is a special case in (12), one might expect to see
z < k

a separate line for it in (17), but a factor 2 is introduced because of the two conditions
i

arg ;1 = but arg ;1 0, and this factor cancels the same factor in (12).
W  L <

6
Exponentiating (17) casts it in a more familiar form due to de Bruijn.
;v ; 1 + ln lnk ;
lnk = 0 (18)
z v
e
lnkz z
:

From (17), ;  =  , and any solution of (18) must satisfy this constraint to be
 v 

relevant. The last equation has been the starting point for several series expressions, both
asymptotic and convergent, for the Lambert W function 6].
References
1] T.M. Apostol (1974) Mathematical Analysis, 2nd Ed. Addison-Wesley, Reading MA.
2] I.N. Baker and P.J. Rippon (1985) A note on complex iteration. Amer. Math. Monthly,
92, 501{504.
3] R.M. Corless, G.H. Gonnet, D.E.G. Hare, D.J. Je rey and D.E. Knuth (1996) On the
Lambert function. Adv. Comput. Maths, in press.
W

4] R.M. Corless and D.J. Je rey (1992) Well, it isn't quite that simple. SIGSAM Bulletin,
26(3), 2{6.
5] N.G. de Bruijn (1961) Asymptotic Methods in Analysis, North-Holland, Amsterdam.
6] D.J. Je rey, R.M. Corless, D.E.G. Hare & D.E. Knuth (1995) Sur l'inversion de  yy e

au moyen de nombres de Stirling associ!es. C. R. Acad. Sc. Paris, Serie I, 320, 1449{
1452.
7] W. Kahan (1986) Branch cuts for complex elementary functions. In The State of the
Art in Numerical Analysis: Proceedings of the Joint IMA/SIAM Conference on the
State of the Art in Numerical Analysis, University of Birmingham, April 14-18, 1986,
Edited by M. J. D. Powell and A. Iserles, Oxford University Press.
8] E.M. Wright (1949) The linear di erence-di erential equation with constant coe-
cients. Proc. Roy. Soc. Edinburgh, A62, 387{393.

View publication stats

Das könnte Ihnen auch gefallen