Post Reply 
HP49-50G Lambert function
10-17-2020, 08:42 PM
Post: #1
HP49-50G Lambert function
Lamber function for HP49-50G
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.

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
« X X TYPE 'X*EXP(X)-Y' 'X' 1 ROOT UNROT 6 ==
IF
THEN DROP 'X' PURGE
ELSE 'X' STO
END "W(" Y + ")" + =>TAG
»
»

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 of the above expression:
x*e^(x/2) = sqrt 2

Divide by 2:
(x/2)*e^(x/2) = (sqrt 2) / 2

That has a 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


Attached File(s)
.doc  W.X_Y.DOC (Size: 287 bytes / Downloads: 1)
Find all posts by this user
Quote this message in a reply
Post Reply 


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 - 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 - Gil - 10-20-2020, 10:44 PM
RE: HP49-50G Lambert function - Gil - 10-21-2020, 11:44 AM



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