HP49-50G,VER16.2 Lambert Funktion Wk(x), k=k= 0, ±1, ±2, ±3, ±4..., x real or complex
|
01-14-2024, 05:03 PM
Post: #4
|
|||
|
|||
RE: Lambert Funktion Wk(x), k=k= 0, ±1, ±2, ±3, ±4..., x real or complex
(01-14-2024 02:50 PM)Gil Wrote: Yes, it's the algorithm that I found with the given reference. If you meant given reference here, it is guaranteed to return correct branch. x = W(a, k), we rewrite definition of branch k as function. f(x) = x + log(x) - log(a) - 2*k*pi*I f'(x) = 1 + 1/x Newton: x ← x - f/f' Solve for f(x)=0 thus guaranteed correct branch. Without signed zero, code assumed real a == a+0*I For illustration, here is lambertw code that support signed zeros. lua> require'expW' lua> I.W(-0.1, -1) (-3.577152063957297-0*I) lua> I.W(I.conj(-0.1), -1) (-4.44909817870089-7.3070607892176085*I) Technically, W-1(-0.1) does not exist. (we have 2 different limits!) By convention, we returned W-1(-0.1+0*I), which does exist. For comparison, W0(-0.1) does exist. lua> I.W(-0.1, 0) (-0.11183255915896298+0*I) lua> I.W(I.conj(-0.1), 0) (-0.11183255915896298-0*I) Note that 2nd result is conjugate of 1st. In general: W(a,k) = conj(W(conj(a),-k)) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)