## Why W?

### By Brian Hayes

Should Lambert *W* be added to the canon of standard textbook functions?

Should Lambert *W* be added to the canon of standard textbook functions?

DOI: 10.1511/2005.52.104

No, not *that* *W*. I won't be drawn into presidential politics here. The *W* I want to discuss is something else entirely: the Lambert *W* function, a mathematical contrivance that has been getting a fair amount of attention lately. The buzz began in the world of computer-algebra systems such as Macsyma, Maple and Mathematica, but word of *W* has also been spreading through journal articles, preprints, conference presentations and Internet news groups. The *W* function even has its own poster (see http://www.orcca.on.ca/LambertW).

The concept at the root of *W* can be traced back through more than two centuries of the mathematical literature, but the function itself has had a name only for the past 10 years or so. (A few years longer if you count a name used within the Maple software but otherwise unpublished.) When it comes to mathematical objects, it turns out that names are more important than you might guess.

Ad Right

Without further ado, here is the definition of Lambert *W*: It is the inverse function associated with the equation:

*We ^{W}* =

What does that mean? Some readers of this column will grasp it instantly, but I am not going to pretend that I am one of them. It took me a while to figure out how *W* works, and even longer to see why the concept might be considered interesting or important. At the risk of inflicting severe tedium on those who are more adept at algebra and analysis, I want to retrace my own path toward understanding what *W* is all about. It's a fairly long and wiggly path.

In trying to make sense of the expression *We ^{W}* , the first question is not "why

Now, with *e* in hand, consider an equation somewhat simpler than the one for *W*; we might call it single-*U*:

*e ^{U}* =

This equation defines the exponential function, also written *exp(U)*. The function maps each given value of *U* to a corresponding value of *x*, namely *e* raised to the power *U*. If *U* is a positive integer, we can calculate the function's value by simple arithmetic: Just multiply *e* by itself *U* times. For nonintegral *U,* the procedure is not quite so obvious but is still well-defined; the left part of Figure 1 shows the elegant curve generated.

The equation *e ^{U}* =

There is an obvious family resemblance between single-*U* and *W*, between the equations *e ^{U}* =

Taking the inverse of this function—solving *We ^{W}* =

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.)

The Lambert *W* function may make a pretty curve, but what's it good for? Why should anyone care? By mixing up a few symbols we could generate an endless variety of function definitions. What makes this one stand out from all the rest?

If you ask the same question of more familiar functions such as *exp* and *log* and square root, the answer is that those functions are tools useful in solving broad classes of mathematical problems. With just the four basic operations of arithmetic, you can represent the solution of any linear equation. Adding square roots to the toolbox allows you to solve quadratic equations as well. Expanding the kit to include the trigonometric, exponential and logarithmic functions brings still more problems within reach. All of these well-known functions, and perhaps a few more, are classified as "elementary." The exact membership of this category is not written in stone, but it excludes more specialized tools such as Bessel functions.

A few years ago, a brief, unsigned editorial in *Focus*, the newsletter of the Mathematical Association of America, asked: "Time for a new elementary function?" The function proposed for promotion to the core set was Lambert *W*. Whether *W* ultimately attains such canonical status will depend on whether the mathematical community at large finds it sufficiently useful, which won't be clear for some years. In the meantime, I can list a few applications of *W* discovered so far.

One place where *W* turns up in pure mathematics is the "power tower," the infinitely iterated exponential

For large *x*, this expression soars off to infinity faster than we can follow it, but Euler showed that the tower converges to a finite value in the domain between *x* = *e ^{-e}* (about 0.07) and

*W* has another cameo role in the "omega constant," which is a distant of cousin of the golden ratio. The latter constant, with a value of about 1.618, is a solution of the quadratic equation 1/*x*= *x*-1. The omega constant is the solution of an exponential variant of this equation, to wit: 1/*e ^{x}* =

Of more practical import, *W* also appears in solutions to a large family of equations known as delay differential equations, which describe situations where the present rate of change in some quantity depends on the value of the quantity at an earlier moment. Behavior of this kind can be found in population dynamics, in economics, in control theory and even in the bathroom shower, where the temperature of the water now depends on the setting of the mixing valve a few moments ago. Many delay differential equations can be solved in terms of *W*; in some cases the two branches of the *W* function correspond to distinct physical solutions.

A recent article by Edward W. Packel and David S. Yuen of Lake Forest College applies the *W* function to the classical problem of describing the motion of a ballistic projectile in the presence of air resistance. In a vacuum, as Galileo knew, the ballistic path is a parabola, and the maximum range is attained when the projectile is launched at an angle of 45 degrees. Air resistance warps the symmetry of the curve and greatly complicates its mathematical description. Packel and Yuen show that the projectile's range can be given in terms of a *W* function, although the expression is still forbiddingly complex. (They remark: "Honesty compels us to admit at this point that the idea for using Lambert *W* to find a closed-form solution was really Mathematica's and not ours.")

Still another example comes from electrical engineering, where T. C. Banwell of Telcordia Technologies and A. Jayakumar of Anadigics show that a *W* function describes the relation between voltage, current and resistance in a diode. In a simple resistor, this relation is given by Ohm's law, *I=V/R*, where *I* is the current, *V* the voltage and *R* the resistance. In a diode, however, the relation is nonlinear: Although current still depends on voltage and resistance, the resistance in turn depends on current and voltage. Banwell and Jayakumar note that no explicit formula for the diode current can be constructed from the elementary functions, but adding *W* to the repertory allows a solution.

Other applications of *W* have been discovered in statistical mechanics, quantum chemistry, combinatorics, enzyme kinetics, the physiology of vision, the engineering of thin films, hydrology and the analysis of algorithms.

It's all very well to express the solutions of problems in terms of *W*, but then how do we find the value of the resulting function? In the case of logarithms and trigonometric functions, the standard method for many years was to look up the answer in a big printed table; now we push the appropriate button on a calculator. For *W*, however, there are no published tables, and so far no scientific calculator has a built-in Lambert *W* key. Several computer algebra systems know how to evaluate the *W* function, but if you don't have access to such software, you're on your own.

Suppose we already know how to calculate exponentials and logarithms; can we then solve the equation *We ^{W}* =

Dividing both sides of the equation by *W* gives *e ^{W}* =

*W = log(x) - log(W).*

We have succeeded in getting *W* off by itself on the left side, but unfortunately there's still a *log(W)* on the right. Thus we don't have a closed-form solution, a formula that would allow us to plug in an *x* and immediately get back the corresponding *W*. This failure is not merely a result of my ineptitude; no algebraic wizardry will yield a finite closed-form solution.

On the other hand, the equation above is not totally worthless. If we have a guess about the value of *W*, then we can plug it into the right hand side of the equation to get an even better guess, then repeat the process until we're satisfied with the accuracy of the approximation. For some values of *x*—well away from 0—this simple iterative scheme converges quickly on the correct result. The algorithms used in computer-algebra software are more efficient, accurate and robust, but they still rely on successive approximations.

The modern history of Lambert *W* began in the 1980s, when a version of the function was built into the Maple computer-algebra system and given the name *W*. Why *W*? An earlier publication by F. N. Fritsch, R. E. Shafer and W. P. Crowley of the Lawrence Livermore Laboratory had written the defining equation as *we ^{w}* =

A few years later Robert M. Corless and David J. Jeffrey of the University of Western Ontario launched a discussion of *W* and its applications in what has turned out to be a long series of journal articles and less-formal publications. The most influential paper, issued as a preprint in 1993 but not published until 1996, was written by Corless and Jeffrey in collaboration with Gonnet, David E. G. Hare of the University of Waterloo and Donald E. Knuth of Stanford University. This was the paper that named the function in honor of the 18th-century savant Johann Heinrich Lambert.

Lambert, who wrote on everything from cartography to photometry to philosophy, never published a word on the function that now bears his name. It was his eminent colleague Leonhard Euler who first described a variant of the *W* function in a paper published in 1779, two years after Lambert's death. So why isn't it called the Euler *W* function? For one thing, Euler gave credit to Lambert for the earliest work on the subject. Perhaps more to the point, Corless, Jeffrey and Knuth note that "naming yet another function after Euler would not be useful."

In the years between Euler and Maple, the *W* function did not disappear entirely. The Dutch mathematician N. G. de Bruijn analyzed the equation in 1958, and the British mathematician E. M. Wright wrote on the subject at about the same time. In the 1970s and 80s there were several more contributions, including that of Fritsch, Shafer and Crowley. Nevertheless, the literature remained widely scattered and obscure until the function acquired a name. In a 1993 article, Corless, Gonnet, Hare and Jeffrey remark: "For a function, getting your own name is rather like Pinocchio getting to be a real boy."

Some of the recent publications on *W* go beyond mere explication of mathematics; they carry a whiff of evangelical fervor. 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. I am reminded of another kind of canonization—a campaign for the recognition of a local saint, with testimonials to good works and miracles performed.

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."

But the elevation of *W* has not won universal assent. R. William Gosper, Jr., has suggested that a better choice might be the square of *W*, that is, *We ^{W2}* =

My own misgivings about Lambert *W* pertain not to the function itself but to the name. Again: Why *W*? Over the years, English-speaking people have inflicted far too many *W*s on the rest of the world, from the Wicked Witch of the West to the *W* boson to the World Wide Web. (Again I forgo comment on the current occupant of the White House.) We purse our lips painfully to pronounce doubleyou, doubleyou, doubleyou. With 26 letters to choose from, why do we keep fixing upon the only letter in the English alphabet with a polysyllabic name? (I acknowledge that I have made matters worse by writing this column, in which every sentence of the text includes at least one instance of the letter *w*.)

It's not too late to right the wrong. On a bus in Italy—a country that doesn't even have a *w* in its *alfabeto*—I overheard a fragment of a conversation: Someone was reading a URL and pronounced the first part "woo woo woo." It's a shrewd accommodation to linguistic wimperialism. We should all adopt it. Let us keep the letter but change the way we say it. Whether it's Lambert *W* or George W. or www, it's woo all the way.

© Brian Hayes

*For assistance with this article I offer warm thanks to Jonathan M. Borwein, David W. Cantrell, Robert M. Corless, David J. Jeffrey and Tim Royappa.*

×
## AMSCI ICON NAVIGATION:

**Click "American Scientist" to access home page**

×