Lambert W function?



Well, I asked because I suspected that there was a rationale, and I am not
into recklessly changing other people's code :-)

I understand the point about the removable singularity, but nevertheless, it
presents a problem. Consider the following in Maple vs. Maxima:

Maple:
> LambertW(x)/diff(LambertW(x),x);
                         (1 + LambertW(x)) x

Maxima:
(%i1) lambert_w(x)/diff(lambert_w(x),x);
                                                  lambert_w(x)
(%o1)           lambert_w(x) (lambert_w(x) + 1) %e

This makes it much harder to simplify complicated expressions that involve
both Lambert's W and its derivative. (In particular, I ran across it when
constructing a metric in ctensor that involved Lambert's W.)

Maple defines the derivative of Lambert's W as W/[x(1+W)], possibly for this
reason. So perhaps having a removable singularity is the lesser of two
evils?

What do you think?


Viktor




 

-----Original Message-----
From: Barton Willis [mailto:willisb at unk.edu] 
Sent: Tuesday, May 20, 2008 4:03 PM
To: Viktor T. Toth
Cc: 'Oliver Kullmann'; maxima at math.utexas.edu
Subject: RE: [Maxima] Lambert W function?


-----"Viktor T. Toth" <vttoth at vttoth.com> wrote: -----

>Presently, it is defined as
>
>     W' = exp(-W)/(W+1)
>
>which is equivalent I believe to
>
>     W' = W/[x(W+1)],
>
>since W(x)/x = 1/[x/W(x)] = 1/exp(W(x)) = exp(-W(x)).
>
>However, I believe the latter form is preferable as it contains no
>exponential term and thus lends itself to algebraic simplifications more
>easily. Is there a reason that I may not be aware of why the first form of
>the derivative was used?

Yes, there is a good reason: exp(-W)/(W+1) doesn't have a removable
discontinuity at zero, but W/[x(W+1)] does. With W' = W/[x(W+1)] we'll
get a mess for a Taylor expansion of lambert_w centered at zero. See
specfun.lisp CVS revision 1.23. Thanks for asking :)

Barton

P.S. lambert_w isn't in the user documentation :(