Post Reply 
Lambert W function
05-17-2020, 08:48 AM (This post was last modified: 05-17-2020 08:51 AM by Stevetuc.)
Post: #1
Lambert W function
This cas program uses fsolve to calc Lambert fn

Code:
#cas
lmb(x):=
fsolve(equal(w*e^w-x,0),w)
#end

Graph from wikipedia
   

If x <0 lmb(x) returns both principal and negative branch solutions :

lmb(-0.5/e) returns [−2.67834699002,−0.231960952987]

lmb(-1/e) returns −0.999999842597 (negative and principal branch converge at -1 when x=-1/e)

lmb(1) returns 0.56714329041

lmb(2) returns 0.852605502014
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)