HP49-50G,VER16.2 Lambert Funktion Wk(x), k=k= 0, ±1, ±2, ±3, ±4..., x real or complex
|
01-14-2024, 01:58 PM
(This post was last modified: 02-11-2024 09:13 PM by Gil.)
Post: #1
|
|||
|
|||
HP49-50G,VER16.2 Lambert Funktion Wk(x), k=k= 0, ±1, ±2, ±3, ±4..., x real or complex
My apologies, I deleted my whole previous post discussion relative to Lambert function W(x).
Here a partial summary of it with the newest version 16.2 of W(x). This version permits to calculate Wk(x), like WolframAlpha does, k being the branch number of W(x) and is equal to 0, ±1, ±2, ±3, ±4... x may be a real or a complex number. Input a) k and x: - k, in stack level 2, for the branch - and argument x, in stack level 1 b) or simply x when by default k is supposed to be 0 (here, note the following, however: if there is already a number like 0, ±1, ±1., ±2, ±2., ±3, ±3., etc. in stack level 2, that number will be automatically taken as the branch level). Output a) Wk(x): w< b) automatically 2 solution outputs W0(x): w1 & W-1(x): w2, for x real -1/e<=x<=0 Observations a) For initial guess of W-1 iteration process & -1/e<x<0, see Wikipedia; b) when possible, we try to find W, with the built-in ROOT solver for 'W×EXP(W)-x'; c) for complex solution W, we try to use likewise the built-in MLSV solver for ['W×EXP(W)-x']; d) for limit values, for instance by endless search near -1/e, we used instead one of the many methods proposed by Albert Chan in his own Lambert thread; e) likewise, we used one of the many methods proposed by Albert Chan in his own Lambert thread when the output could be clearly much improved; f) see also initial guesses according to Albert Chan, http://www.finetune.co.jp/~lyuka/technot...bertw.html, for W0 (and also for other integer values of k≠0); g) general calculation of the different k branches, see https://www.johndcook.com/blog/2021/11/1...ch-number/ h) up to now, all test results, with k=0, ±1, ±2, ±3, ±4..., and x real or complex number, corresponded largely (with the exception, generally, of the last two digits) to WolframAlpha outputs; i) however, contrarily to Wolfram Alpha, for inputs like {100 0}, ie k=100, argument=0, the program output is double, whereas Wolfram simplifies the result to -infinity: for x—> -0, ie just negative, result here is a complex form: "-infinity + i×200PI"; for x—> 0+, ie just positive, result will also present a complex form: "-infinity+i×199PI; j) the same applies for instance for {50, infinity}, ie k=50 & x a "real" (9.99999999999E499) that tends to infinity, for which the program, here again, gives a complex output: "infinity + i×100PI", when Wolfram simplifies the answer and just gives infinity; k) extreme tiny input x ≠0, in particular ±1E-497, ±1E-498 ±1E-499, are accepted and calculated correctly; l) entering the algebraic expression '-1/e' as input, you will get W0 & W-1 = exactly -1: W0('-(1/e)'~-.367879441171): -1 & W-1('-(1/e)'~-.367879441171): -1; but entering the approximate value of -1/e, ie the real number -.367879441171, will produce the double, different output W0(-.367879441171): -.999997710398 & W-1(-.367879441171): -1.00000141421. |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)