Lambert W Function

  • #1
651
1

Main Question or Discussion Point

I hv this problem in Quantum physics, i tried to solve and eventually got this kind of a equation
[tex]5e^x-5=xe^x[/tex] I thought of solving it via Lambert Function and got

[tex] x=W[5(e^x-1)] [/tex]

How to go aboutt next?How can I evaluate this
 

Answers and Replies

  • #2
459
5
Usually, to evaluate 'special' function like these, I use the following Wolfram website (unless you have Mathematica or some other advanced math software at home):
http://functions.wolfram.com/

Once there, just go to 'Function Plotting.' Then choose 'Product Log' (this is what Mathematica calls the Lambert W function) from the list of elementary functions and hit 'Go.' Then click on 'Function Evaluation' on the bottom to go the page where you can evaluate the Lambert function to any precision!

In case you can't find it, here is a direct link:
http://functions.wolfram.com/webMathematica/FunctionEvaluation.jsp?name=ProductLog
 
Last edited:
  • #3
651
1
I dont have a numeric value for Z
 
  • #4
459
5
Last edited:
  • #5
uart
Science Advisor
2,776
9
I hv this problem in Quantum physics, i tried to solve and eventually got this kind of a equation
[tex]5e^x-5=xe^x[/tex] I thought of solving it via Lambert Function and got

[tex] x=W[5(e^x-1)] [/tex]

How to go aboutt next?How can I evaluate this
First thing is that using the lambertW function is not much help if you're still going to end up with x on both sides of the equation as you did above. If using W() doesn't give up a closed form solution then you are just as well off leaving it in the original exponential or log form and solving numerically.

Anyway in this case you can solve your original equation and get it in closed form with W. I dont have time to post the details right now but the solution is :

x = 5 + W(-5 exp(-5))

Note that there is also a second trivial solution of x=0. This second solution obviously can be found by inspection but it also comes from the above lambert function solution by using the fact that for arguments between -1/e and zero that W(.) has two real solutions.
 
Last edited:
  • #6
651
1
this was trivial, sorry i wasnt in my full concentration,
one can do it this way
[tex] -5=(x-5)e^{(x-5)+5} [/tex]
which eventually gives
x = 5 + W(-5 exp(-5))
 
  • #7
Gib Z
Homework Helper
3,344
4
Does that mean its solved? Im not that familiar with the function, other than it helps, or is the inverse....something with power towers...if you wanted you could have set y= ln(5/5-x) -x and used Newtons method to find the root.
 
  • #8
Gib Z
Homework Helper
3,344
4
In fact, I graphed it and the only root is zero...
 
  • #9
uart
Science Advisor
2,776
9
In fact, I graphed it and the only root is zero...
No there's definitely two solutions. One is x=0 and the other is x ~= 4.9651.
 
  • #10
Chris Hillman
Science Advisor
2,337
8
The most useful special function hardly anyone knows...

=Im not that familiar with the function
Someone was asking about mathematical anecdotes. I first encountered this one when I was an undergraduate. A graduate student studying wondrous creatures known as roller birds asked me for help in solving an equation from some problem in data analysis, which amounted to using the LambertW, which is by definition is "the" inverse function of [itex]y = x \, \exp(x)[/itex] (technically, at the level of real functions, this involves staying within a particular region of a Riemann surface). LambertW also is just what you need for the Kruskal-Szekeres chart for the Schwarzschild vacuum solution, and for many other things, e.g. in analysis of algorithms. Books on special functions do discuss this.

For the OP: do you have Maple or Mathematica? LambertW is a defined function in these symbolic computation systems. Maple help offers a lot of information about LambertW. If you can't find this there or elsewhere, I can tell you a power series expansion. With a little effort, I am sure you find a FORTRAN program (or C program) you can use to compute numerical values.
 
  • #11
CRGreathouse
Science Advisor
Homework Helper
2,817
0
If you can't find this there or elsewhere, I can tell you a power series expansion. With a little effort, I am sure you find a FORTRAN program (or C program) you can use to compute numerical values.
I think Keither Briggs has some nice code for that. Google w lambert and his name and you'll probably get it.
 
  • #12
uart
Science Advisor
2,776
9
Guys I'm pretty sure that the OP's problem wasn't the lack of lack means to evalute W, it was just that at first he couldn't get the problem into a suitable form to give him a numerical value for the required argument for the funtion. And now he's got it.

Does that mean its solved? Im not that familiar with the function...
Just to elaborate a bit on what was said above, and give a simple example.

The Lambert function is defined as the inverse of the function y = x exp(x). So W(const1) is automatically the solution of any equation of the form x exp(x) = const1.

Other forms of transcendental equation involving log and exp can often be rearraged (using change of variables and whatever tricks) into the above form to give a Lambert Function solution. Take a log-linear (linear combo of log(x), x and 1) type transcendental as a very easy example.

Say you wanted to solve : log(x) + ax = b

Just add log(a) to both sides to give : log(ax) + ax = b+log(a)

Then exponentiate each side : ax exp(ax) = a exp(b)

So ax = W(a exp(b)) and x = 1/a W( a exp(b) )
 
  • #13
3
0
hallo

can one please inform me if it is possible to use the lambert function method to solve systems of exponential equations (and not simply one equation in one uknown)?

thanks
 
  • #14
HallsofIvy
Science Advisor
Homework Helper
41,738
899
I hv this problem in Quantum physics, i tried to solve and eventually got this kind of a equation
[tex]5e^x-5=xe^x[/tex] I thought of solving it via Lambert Function and got

[tex] x=W[5(e^x-1)] [/tex]

How to go aboutt next?How can I evaluate this
Well, you haven't solved that equation at all! First get x on one side of the equation only THEN apply what special functions you have. Here, since the W function is the inverse of xex you are going to want to isolate that first.

[itex]5e^x- 5= xe^x[/itex] so [itex]5e^x- xe^x= 5[/itex], [itex](5- x)e^x= 5[/itex] or [itex](x-5)e^x= -5[/itex]

Let y= x-5 so x= y- 5. Then the equation become [itex]ye^{y-5}= -5[/itex] or [itex]ye^y(e^{-5})= -5[/itex]. Finally, we have [itex]ye^y= -5e^5[/itex] and can apply the W function to that: [itex]y= W(-5e^5)[/itex].

Since y= x- 5, [itex]x- 5= W(-5e^5)[/itex] so [itex]x= 5+ W(-5e^5)[/itex].
 
  • #15
HallsofIvy
Science Advisor
Homework Helper
41,738
899
hallo

can one please inform me if it is possible to use the lambert function method to solve systems of exponential equations (and not simply one equation in one uknown)?

thanks
Please do not "hijack" other people's threads to ask a new question- even if it is related to the topic- start your own thread.

To answer your question- yes, you can, pretty much the same way you solve any system of equations- try to reduce to one equation in one unknown, then use the W function is appropriate. How you reduce, of course, depends on the equations themselves.
 

Related Threads for: Lambert W Function

  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
2
Views
2K
  • Last Post
Replies
6
Views
5K
Replies
1
Views
2K
Replies
7
Views
3K
Replies
2
Views
2K
Replies
6
Views
3K
Replies
11
Views
12K
Top