<<

2014 16th International Symposium on Symbolic and Numeric Algorithms for Scientific Computing

Branch differences and Lambert W

D. J. Jeffrey and J. E. Jankowski Department of Applied , The University of Western Ontario, London, Canada N6A 5B7 Email: [email protected]

Abstract—The Lambert W possesses In fact, this has already been noticed in a branches labelled by an index k. The value of W variety of contexts, with some instances pre- therefore depends upon the value of its argument dating the naming of the . z and the value of its branch index. Given two branches, labelled n and m, the branch difference For example, in [10], Jordan and Glasser, ap- is the difference between the two branches, when parently working independently, used a substi- x both are evaluated at the same argument z. tution equivalent to W (xe ) to evaluate the It is shown that elementary inverse functions definite have trivial branch differences, but Lambert W  ∞ √ u has nontrivial differences. The inverse sine func- e−w/2 w u, w , d where = −u tion has real-valued branch differences for real 0 1 − e arguments, and the natural function has purely imaginary branch differences. The a problem posed by Logan, Mallows & Shepp. Lambert W function, however, has both real- Karamata [11] derived a series expansion for valued differences and complex-valued differ- W as part of his solution of a problem posed by ences. Applications and representations of the branch differences of W are given. Ramanujan. Definite containing the tree T function, a cognate of W , used branch Keywords -; special functions; differences in [3]. Further applications can be elementary functions; Lambert W; multivalued functions seen in [12]. In order to establish the significance of I. INTRODUCTION branch differences, we begin by discussing the branches of some of the elementary functions. W The Lambert function is a multi-branched This will explain the meaning of ‘trivial differ- function (also called a ). ences’ referred to above. The branches are indexed by an k, W z ∈ C and written k.For , the branches are II. ELEMENTARY INVERSE FUNCTIONS defined for |z|→∞by [1] Branch information was added to the nat- Wk(z) Wk(z)e = z and Wk(z) → lnk z, ural logarithm function in [7]. Although the notation loga is widely used to denote log- z z πik k where lnk =ln +2 is the th branch arithm to the base a, this notation does not of logarithm. The branch cuts vary between apply to , since the base must branches. For the principle branch, the cut is be e. Therefore lnk denotes the kth branch −∞, − /e ( 1 ], while for other branches it is of logarithm. Modern convention places the −∞, ( 0]. branch cut for ln along the negative real axis Unlike the elementary multivalued functions, (−∞, 0] and hence the range of lnk obeys such as logarithm or the inverse trigonometric  lnk ∈ ((2k − 1)π, (2k +1)π]. Therefore, W functions, the branches of the Lambert for the logarithm function, two consecutive function are not trivially related. This means branches differ by the imaginary constant that the difference between branches is a new function with interesting and useful properties. lnk+1 z − lnk z =2πi .

978-1-4799-8448-0/15 $31.00 © 2015 IEEE 61 DOI 10.1109/SYNASC.2014.16 Figure 1. The domain of the sine function in the complex Figure 2. The range of the sine function in the complex z- plane, denoted the w-plane. The variable w will become plane, and the domain of the inverse sine functions. Before the argument of sin w, or equivalently, w will be mapped a point in this plane can be mapped to the w-plane, the to the z-plane (shown in figure 2) by the sine function. branch of the must be specified. Notice The red vertical lines separate the branch regions. Each that the real axes contain the red lines which map back to region between the red lines maps to the entire z-plane. the separating lines in the w-plane, and hence are branch When returning from z back to w using the inverse sine cuts in this plane. function, the branch information must be specified. Thus this figure is also the union of the ranges of each of the branches of invsink. and hence the branch difference is

invsink+2 z − invsink z =2π. Thus, there is no new function created by π taking the difference. Note in figure 1 that points differing by 2 are In contrast with logarithm, the inverse sine in regions 2 branches apart. Similar considera- function has real-valued differences. Without tions show that consecutive branches differ by branch information, inverse sine is denoted invsink+1 z − invsink z = π − 2 arcsin z. arcsin, but when branch information is added to the inverse sine, it is denoted invsink, for Thus in either case, no new function is cre- convenience in software implementation [6]. ated by the branch difference, and the existing We consider the pair of function is recovered. Further the difference in purely real. z =sinw, Therefore we turn to the Lambert W func- tion for more interesting properties. w =invsink z. III. ALGEBRAIC PROPERTIES To understand these equations, it is easiest to start in the w-plane, shown in figure 1, and As with Lambert W, there is an algebraic W consider the mapping under sine. The sine solved by . z,d ∈ C d function does not have branches, but each Theorem 1: For , satisfies the region labelled as a branch maps to the entire equation   z-plane as shown. Two points in the w-plane d d π exp = z (1) differing by 2 map to the same point e−d − 1 e−d − 1

z =sin(w)=sin(w +2π) , if and only if d = Wmn(z) for m, n ∈ Z.

62 Proof: Observe that Using (2), we see W z W z / W z W(−z) exp ( mn( )) = exp ( m( )) exp ( n( )) q cosech q = exp(W/2) − exp(−W/2) = Wn(z)/Wm(z) . (2)   W −z 1/2 −W −z −1( ) Wm W Wn = 0( ) Since = + , this becomes W0(−z) W  1/2 W n , W−1W0 exp ( mn)= −W0 W Wn = 2 + W0 W 1/2 which can be solved for n as =(W−1W0) , Wmn(z) Wn(z)= , (3) where the signs of the quantities have been exp(−Wmn(z)) − 1 taken into account when manipulating the and for Wm as square roots. Similarly   2 1/2 Wmn(z) −q coth q z Wm(z)= . (4) e = . 1 − exp(Wmn(z)) W0(−z)W−1(−z)

Since Wn exp(Wn)=z, then (1) follows. For Thus combining these expressions and taking the converse, assume (1) holds, then ∃n ∈ Z, the signs of the quantities into account, we see z such that that both sides of (5) equal . Corollary 1: If we make the substitution d q iv = Wn(z) . = in (5), then the equation becomes e−d − 1 v −v cot v e = z, (6) Look for d in the form d = v − Wn. Then sin v e−d z/W e−v =( n) and hence in which form it has appeared in a variety   −v of integration problems; for example, in [13] ze −v v − Wn = Wn − 1 = ze − Wn . the following integral was studied by Nuttall, Wn Bouwkamp and Hornor & Rousseau. v   Thus ve = z and v = Wm(z) for m ∈ Z.  π p p sin v v cot v πp e dv = ,p∈ N . Lauwerier [12] studied a parametric repre- 0 v p! W sentation of and his work gives another IV. RANGE OF BRANCH DIFFERENCE equation that can be solved in terms of W. We consider first the principal difference Theorem 2: For z ∈ and 0 0. The range of the left side of (5) is (0, 1/e], with and for x ∈ (−∞, −1/e] the maximum at q =0equal to 1/e, which W−1(x) − W−2(x) . (8) determines the restrictions on z in the theorem. Since for x ∈ [−1/e, 0),wehaveW0(x) ∈ Proof: We begin by recalling important [−1, 0] and W−1(x) ∈ (−∞, −1], we can note properties of the branches of W . The principal that W(x) ∈ [0, ∞). branch W0 has branch cut (−∞, −1/e], while

63 the branch cut for W−1 is (−∞, 0]. Further, be seen in the figure when (W) →∞and the both branches are closed on the top, meaning imaginary component of the domain becomes that for x ≤−1/e asymptotic to the [0, 2π]. The series expansions around the z = −1/e W0(x) = lim W0(x + iy) , y↓0 depend on the side of the branch cut. On the upper side, both W0 and W−1 have square- and for x<0 root singularities, while on the lower side W0 W−1(x) = lim W−1(x + iy) . remains singular, but W−1 is regular. In the y↓0 neighbourhood of −1/e, the expansions use p On the bottom of the branch cuts, we have the defined by [2] properties that for x ≤−1/e  p = 2(ez +1), lim W0(x + iy)=W−1(x) , (9) y↑0 to obtain for z ≥ 0 x ≤ 11 3 5 while for 0,wehave W(z)=2p + p + O(p ) , (15) 36 lim W−1(x + iy)=W−2(x) . (10) y↑0 while for z<0 we have 2 Finally, W0 is continuous at the line −1/e < W(z)=−1+p + W−2(−1/e)+O(p ) . x ≤ 0. (16) W Therefore, the branch cut for will be From (15), we see that the special value x = −∞, x ≤ ( 0] with the properties that for 0 −1/e on the upper side of the cut obeys

lim W(x + iy)=W(x) W − /e W0 − /e − W−1 − /e y↓0 ( 1 )= ( 1 ) ( 1 ) − − − . = W0(x) − W−1(x) , (11) =( 1) ( 1) = 0 Further, for x<− /e, p, and hence (15) is while for −1/e < x ≤ 0 1 purely imaginary and for −1/e < x < 0 we lim W(x + iy)=W0(x) − W−2(x) , (12) have p and (15) are real. This can also be y↑0 seen because W−1(x)=W 0(x), where the and finally for x ≤−1/e bar denotes complex conjugate, for x<−1/e, implying that for x<−1/e lim W(x + iy)=W−1(x) − W−2(x) . (13) y↑0 W(x)=W0(x) − W 0(x)=2iW0(x) , The branch cut is illustrated in figure 3. The W x > x<− /e − /e ≤ upper side of the branch cut is labelled A,B,C, and 0( ) 0 for 1 .For 1 z − /e x<0,wehaveW0(x),W−1(x) ∈ R and with B showing the singular point = 1 , W >W − /e < x < and C the singular point at the origin. The 0 −1, implying that for 1 0 + lower side of the branch cut is labelled D,E,F. W(x) ∈ R . In order to map the axes in the domain of In figure 4 this is seen in AB mapping to the W to its range, we consider expansions around imaginary axis [0, 2π) and BC mapping to R+. infinity and around critical points. From the The point E maps to known expansions for W when |z|→∞,we obtain W0(−1/e)−W−2(−1/e) lnm z = −1 − W−2(−1/e) Wmn(z)=2πi(m − n)+ln lnn z ≈ 2.0888 + 7.4615 , + O(1/ ln(z)) . (14) and retains the square-root singularity because Thus for the principal difference, all points of W0. There are no singularities away from at infinity map to 2πi as can be seen in the branch cut and the remainder of the do- figure 4. When |z|→0, W0 is regular, while main maps smoothly to the region between the W−1 → ln z − iπ,soW → iπ − ln z. This can boundaries.

64 [3] Robert M. Corless, J. Hu and D.J. Jeffrey. Some definite integrals containing the TreeT function. Comm. Computer Algebra, 48:2, pp 33–41, 2014.

[4] Robert M. Corless and David J. Jeffrey. The Lambert W function. In N. J. Higham, editor, The Princeton Companion to Applied Mathe- matics. Princeton University Press, 2014.

[5] German A. Kalugin and David J. Jeffrey. Con- vergence in C of series for the Lambert W function. arXiv:1208.0754 [math.CA], 2012.

[6] D.J. Jeffrey. Multivalued elementary functions in computer-algebra systems. Proceedings AISC 2014. LNAI vol 8884, Springer 2014. Figure 3. The domain of W (the z-plane). The branch cut is shown as two lines, one representing the upper side [7] D.J. Jeffrey, D.E.G.Hare, Robert M. Corless. (ABC) and one representing the lower side (DEF). The Unwinding the branches of the Lambert W points B and E are either side of x = −1/e. function. Math. Scientist. Vol 21, 1–7, 1996.

[8] German A. Kalugin, David J. Jeffrey and Robert M. Corless. Bernstein, Pick, Poisson and re- lated integral expressions for Lambert W. Int. Trans. Special Functions. Vol 23(11) pp 817– 829, 2012.

[9] Ronald L. Graham, Donald E. Knuth, and Oren Patashnik. Concrete Mathematics. Addison- Wesley, Boston, 1994.

[10] William B. Jordan and M. L. Glasser. Solution of problem 68-17. SIAM Review, 12(1):153– 154, January 1970.

[11] J. Karamata. Sur quelques problemes` poses´ par Ramanujan. J. Indian Math. Soc., 24:343–365, 1960.

[12] H.A. Lauwerier. The asymptotic expansion of Figure 4. The range of W0(−1)(z). The letters corre- the statistical distribution of N.V. Smirnov. Z. spond to the points labelled by the same letters in the Wahrscheinlichkeitstheorie., 2:61–68, 1963. domain of W, shown in figure 3. Notice that the image lines BA and EF, together with the images of the other [13] A.H. Nuttall. A Conjectured Definite Integral. 2πi axes in the domain converge to as a result of (14). Problem 85-16. SIAM Review, 27, p. 573. 1985.

[14] Frank W. J. Olver, Daniel W. Lozier, and REFERENCES Ronald F. Boisvert. NIST Handbook of Mathe- matical Functions. Cambridge University Press, [1] Robert M. Corless, Gaston H. Gonnet, D. E. G. 2010. Hare, David J. Jeffrey, and Donald E. Knuth. On the Lambert W function. Advances in Computational Mathematics, 5:329–359, 1996.

[2] Robert M. Corless, David J. Jeffrey and Donald E. Knuth. A of Series for the Lambert W Function. Proceedings of the ACM ISSAC, Maui, 195–203,1997.

65