HP49-50G Lambert function
|
10-18-2020, 10:22 AM
Post: #2
|
|||
|
|||
RE: HP49-50G Lambert function
Lambert function for HP49-50G
Version 1.2* W.Y=>X Having the value Y, find the X value such that (...X) × EXP (...X) = Y. The program gives almost instantaneous answer, but do no tamper on previously registered variable. * On that version 2, I slightly modified the code when testing possible existence of variable X: I included here the case of possible existing variable X being a program. Here is the program code: « "Lambert W(Y): Having result Y, W(Y) finds / gives X such that (X * EXP X) = Y W(X * EXP X) =X " DROP =>Y « IFERR 'X' 'X' RCL THEN ELSE END 'X*EXP(X)-Y' 'X' 1 ROOT UNROT DUP2 SAME IF THEN DROP2 'X' PURGE ELSE SWAP STO END "W(" Y + ")" + =>TAG » » The same calculation example may apply: Example of use: What is the Lambert x value for y=(sqrt 2) /2? 1) 2 SQRT 2 / gives. 707 2) 2 SQRT 2 / W.Y=>X gives 0.4506 Application: Solve x^2*e^x=2 Take square root, on both sides, of the above expression: x*e^(x/2) = sqrt 2 Divide both sides by 2: (x/2)*e^(x/2) = (sqrt 2) / 2 The above result has a[/u] form of: "(X..X)" * e ^"(X..X) " = (sqrt 2)/2 Then W ["(X..X)" * e ^"(X..X)"] = W [(sqrt 2)/2] Or "X.. X" = W [(sqrt 2)/2] In our case we have: W[(x/2)*e^(x/2)] = W[(sqrt 2) / 2] Or x/2 = W[(sqrt 2) / 2] Or x = 2 * W[(sqrt 2) / 2] = 2 * 0.4506 = 0.9012 Remarks welcome. Regards, Gil Campart |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
HP49-50G Lambert function - Gil - 10-17-2020, 08:42 PM
RE: HP49-50G Lambert function - Gil - 10-18-2020 10:22 AM
RE: HP49-50G Lambert function W(z) - Gil - 10-19-2020, 09:06 AM
RE: HP49-50G Lambert function - Gil - 10-19-2020, 09:13 AM
RE: HP49-50G Lambert function - Albert Chan - 10-20-2020, 01:48 AM
RE: HP49-50G Lambert function - Gil - 10-19-2020, 09:40 AM
RE: HP49-50G Lambert function - Gil - 10-20-2020, 08:28 AM
RE: HP49-50G Lambert function - Gil - 10-20-2020, 08:42 AM
RE: HP49-50G Lambert function - Albert Chan - 10-20-2020, 04:40 PM
RE: HP49-50G Lambert function - Gil - 10-20-2020, 10:44 PM
RE: HP49-50G Lambert function - Albert Chan - 10-21-2020, 02:54 AM
RE: HP49-50G Lambert function - Albert Chan - 10-21-2020, 12:13 PM
RE: HP49-50G Lambert function - Gil - 10-21-2020, 11:44 AM
|
User(s) browsing this thread: 1 Guest(s)