The equation looks hard to solve. It’s said to be transcendental, ie not algebraic, like a polynomial equation. But the Lambert W function is the right tool for solving that equation exactly. Many transcendental equations are not hard to solve. This one is easy, if you have the right tools for the purpose.
The equation a*exp(bx) + bx = c above shows up in models of diodes or photovoltaic cells, in the relationship between current I and voltage V. If you solve for either I in terms of V, or for V in terms of I, you will end up with an equation of the above form. See the website http://pvpmc.org for some background about photocells and diodes, a circuit diagram for a diode equivalent of a photocell, and the Shockley model of the diode. Or there are many other resources.
You might think that equation above is a bit special, because the constant b appears in two places. But if one has some other coefficient in front of x, simply multiply the equation by a constant factor so you get bx both in the exponential and as the linear x term. And put the constant c on the right hand side. That is a very tidy way to write the equation relating a linear variable and its exponential, and that is the form which I will solve here.
Write y = exp(bx). Thus bx is log(y). Rewrite the equation as ay + log(y) = c.
We want log(ay) on the left, to match the ay term. So add log(a) to each side:
ay + log(y) + log(a) = c + log(a)
Since the sum of two logs is the log of the product, that becomes
ay + log(ay) = c + log(a)
Now take exponentials. We get
exp(ay)*ay = exp(c + log(a)) = a*exp(c)
The left hand side is in the form that defines the Lambert W function, namely w*exp(w) = z, which is the definition of w = LamW(z). So we have
ay = LamW(a*exp(c))
Divide by a, and recall that y is exp(bx), to get
exp(bx) = y = (1/a)*LamW(a*exp(c))
Now take logs, and divide by b, to get the solution for x:
x = (1/b)*log((1/a)*LamW(a*exp(c))
This solution, in its diode application, is used in modeling of diode and photocell arrays. It is very fast compared to having to find solutions by manual searching, because computer software is widely available to calculate the LamW function. (Just as there are sine, tangent, exponential, log, square root, and many other functions available in the software that we can use without having to write our own subroutines.)
Now, let’s think a bit more widely. If two diodes are in parallel, their currents add. That is like adding two Lambert W functions. If two diodes are in series, their currents satisfy a harmonic mean relationship, of the form 1/x1 + 1/x2 = 1/x. Will it surprise you that there is a LamW interpretation of that? Basically, one can make an analogue computer out of diodes, that will do arithmetic using LamW functions as a basis.
Recall the delay differential equation solution mentioned in a prior post? Also LamW. Actually, a sum of LamW evaluations, one per branch, if one is working in the complex plane. Like a Fourier series, but better because it incorporates delay. Delay of course happens in electronic circuits — more LamW interaction with analog computer ideas.
A tremendous amount of money is spent running particular programs on digital computers. Runs of models in density functional theory (DFT) or lattice quantum chromodynamics (QCD) can take days or weeks of supercomputer time. And the job is never done. Once a solution is obtained, one decides to use more points in the grid or lattice, and to use more digits of precision to deal with noise in the result arising from discrete approximations to nature.
Meanwhile, nature manages to compute quite well physically. Want to know the lattice constant for the Gold FCC crystal? Measure a chunk of the metal, determine its specific mass, and do a little arithmetic. Or use some sort of diffraction technique. Lots of ways to get the job done. Want the most cumbersome, slowest method? Use DFT. You will be lucky to choose an algorithm and discretization that gives you a value within 3 percent of reality. It is acceptable in some circles to get a rough idea, and even to use that rough idea to confirm a hypothesis about crystal structure. Maybe not for Gold — that is pretty well known — but for more complicated materials.
Nature, however, is not so tolerant. If you take a chunk of gold metal, and increase its lattice constant by 2 percent, it will melt! To get the lattice constant up by a couple of percent, you will have to add energy, and bring the metal up to about 1350-1400 Kelvin. Whereupon it melts. It’s not melting because of the temperature, not directly. Rather, at a lattice constant about 1.02 times room temperature lattice constant, gold can no longer hold its FCC crystal structure, and the atoms start to become mobile — what we call melting or liquid.
If we cannot answer all questions about nature using digital computers, maybe we should be giving nature a chance to answer some of those questions for us. Thus my fondness for analog computation, geometric solutions and such.
Best wishes,
Ken Roberts
02-Jun-2014