Post Reply 
[HP41] Lambert function RPN; question
12-26-2022, 04:04 PM
Post: #3
RE: [HP41] Lambert function RPN; question
Two years ago, we had developed a more sophisticated lambertw function (actually e^W)

x*e^x = a      // x = W(a), by definition

Let y = ln(x) --> f = y*ln(y) - a = 0

Newton's method for y: y = y - f/f' = (y+a)/(ln(y)+1)

It extended W for complex numbers, and can get both branches for real argument.
(10-21-2020 03:05 PM)Albert Chan Wrote:  Example, to calculate eW(-log(2)/2), both branch 0 and -1:

2 LN 2 +/- /   → a = -0.3465735902799726547086160607290883
XEQ "eW"       → e^W0(a) = 0.5
− 0.3 R/S      → e^W-1(a) = 0.25

For e^W-1(a), -1/e < a < 0, any positive guess below -a work.

Update: a good guess for e^W-1(a), -1/e < a < 0, is 2a²
For above case, 2a² already gives 0.24022

Just replace "− new-guess R/S", with this: "− − + × R/S"

c = W(-ln(c)) / -ln(c) = 1 / e^W(-ln(c))

Above quoted example, (√2) = 2


We can reuse infinite tetration formula to solve for a^x = b*x
Let z = b*x, c = b√a

z = a^(z/b) = c^z = c^c^z = ... = c

https://github.com/isene/hp-41_wlambert example, 2^x = 3*x, for x

2 LN 3 / +/-      // -ln(c) = -0.2310490601866484364724107071527255
XEQ "eW"         // 1/z(0) = 0.7280844118213892196256653246326560
− − + × R/S    // 1/z(-1) = 0.1006083268252766116679239025157516

x = z/3

x(0) = 0.4578223732320550555738866680640553
x(-1) = 3.313178380475634845996561019588785
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: [HP41] Lambert function RPN; question - Albert Chan - 12-26-2022 04:04 PM



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