Subject: Generalized Lambert W function - premature commit
From: Barton Willis
Date: Thu, 17 May 2012 10:41:53 +0000
> I have accidentally committed some code for Generalized Lambert
> W function to src/specfn.lisp. Still getting my head around git.
Good timing. Yesterday, I started looking at some generalized Lambert
code I wrote this past fall. To support to_poly_solve, my code has
functions that tries to match input to things such such as
x*log(x). The matching code adds quite a bit of complexity to the
simplification of the Lambert function.
We'll find a way to blend our code. My code is already about 250
lines--maybe it deserves its own file?
Demo of what I have:
(%i5) generalized_lambert_w(0,x);
(%o5) lambert_w(x)
(%i6) assume(0<=x,x<=1/%e);
(%o6) [x>=0,%e^(-1)>=x]
(%i7) generalized_lambert_w(-1,x*log(x));
(%o7) log(x)
(%i8) generalized_lambert_w(0,log(4/9)/3);
(%o8) log(2/3)
(%i9) generalized_lambert_w(-1,log(x)/((1-x)*x^(1/(x-1))));
(%o9) generalized_lambert_w(-1,log(x)/((1-x)*x^(1/(x-1))))
(%i10) subst(x=8,%);
(%o10) -(8*log(8))/7
As I recall the (cool looking) picture
draw2d( x_voxel = 60, y_voxel = 60, fill_color = navy, region(y*(x*sin(y)+y*cos(y)) > 0,x,-8,8,y,-12,12));
has something to do with the branches of the generalized Lambert.
--bw