MY AMERICAN SCIENTIST
SEARCH

HOME > PAST ISSUE > May-June 2005 > Article Detail

COMPUTING SCIENCE

# Why W?

W Coming and Going

There is an obvious family resemblance between single-U and W, between the equations eU = x and WeW = x. In the case of the forward W function, if we know how to calculate eW , then it's a trivial matter to calculate WeW : just multiply by W. The resulting curve is shown in the left part of Figure 2. In overall shape it looks much like the exponential curve, although for large W it rises more steeply. Where eW and WeW really part company is to the left of W=0. Whereas eW is always positive, WeW dips into negative territory, reaching a minimum at the point W=-1, x=-1/e. As W tends toward negative infinity, both eW and WeW approach 0, but one from above and the other from below.

Taking the inverse of this function—solving WeW = x for W instead of for x—finally brings us to the Lambert W function. Just how to solve for W is a matter I'll return to below, but for now it's enough to flip the graph of the function about its diagonal, as in the right side of Figure 2; the inverse graph is drawn in more detail in Figure 3. Just as the forward function resembles the exponential curve, the inverse function appears similar to the logarithm. The curves for log(x) and W(x) cross at x=e, where both are equal to 1. Where things get most interesting, again, is to the left of x=0. Whereas log(x) is undefined for any x ≤ 0, W(x) continues to have a value down to x=-1/e, or about -0.37. Indeed, when x lies in the range between -1/e and 0, W(x) has not just a value but two values. For example, W(-0.2) could be equal to either -0.26 or -2.54. Plugging either of these W values into the formula WeW yields the x value -0.2.

For a mathematical function, multiple values are an embarrassment of riches; a well-bred function is supposed to map each value in its domain to a single value in its range. But in practice multiple values are not uncommon, particularly with inverse functions. The square root is a familiar example: Whereas squaring 2 yields the unique result 4, the square root of 4 could be either +2 or -2. Some of the trigonometric functions are even worse. Every angle has just one sine, but the inverse function, the arc sine, wraps around to produce infinitely many values.

The problem with multivalued functions is knowing which value, or branch, to choose. Most calculators and programming languages give precedence to positive roots and to arc sine values between -90 and +90 degrees, but there is no fundamental justification for these choices. In the case of Lambert W, the part of the curve with W>-1 has been labeled the "principal branch," but again this is mainly a matter of convention. (In the complex plane, W has infinitely many branches.)