Post Reply 
HP49-50G Lambert function
10-21-2020, 02:54 AM
Post: #11
RE: HP49-50G Lambert function
(10-20-2020 10:44 PM)Gil Wrote:  But
W(-191.,0.): (3.0807478,-8.212851).
not equal W(-191_Wolfram Œ): (3.742525,2.544493).

Strange?

Could you have a check in your program for w(-191 + 0i)?

There are many solutions to w*exp(w) = -191

>>> y = eW(-191)
0 (-56.8217567265+11.8431109072j)
1 (-35.6200433622+23.0040034786j)
2 (-34.9016087888+23.7270165869j)
3 (-34.9018254893+23.7292860973j)
4 (-34.9018255003+23.729286094j)
>>> log(y)
(3.742525902068365+2.5444934919969335j)

Besides speed, another benefit of solving for y = e^W:
Recovering W = log(y), |W.imag| ≤ pi

Quote:By the way, when solving for
x^2 = 2 ^x,
I find only 2 real solutions : -. 766 and 2; no way to find by calculus the missing real solution x=4.

Assume x is real, and x > 0:
2 log(x) = x log(2)
(1/x) log(1/x) = -log(2)/2 = a

>>> a = -log(2)/2
>>> 1/eW(a)
0 (0.499474906605+0j)
1 (0.500000902271+0j)
2 (0.500000000003+0j)
3 (0.5+0j)
4 (0.5+0j)
(2+0j)

For W-1, we try guess from below.
[Image: 320px-Mplwp_lambert_W_branches.svg.png]

>>> 1/eW(a, y=0.2)
0 0.2
1 (0.240506189867-0j)
2 (0.24956480343-0j)
3 (0.24999902269-0j)
4 (0.249999999995-0j)
(4.0000000000000018+0j)

Now, for x < 0:
2 log(-x) = x log(2)
(-1/x) log(-1/x) = log(2)/2 = -a

>>> -1/eW(-a)
0 (1.30724304932+0j)
1 (1.30435370354+0j)
2 (1.3043511789+0j)
3 (1.3043511789+0j)
4 (1.3043511789+0j)
(-0.76666469596212317+0j)
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 - Albert Chan - 10-21-2020 02:54 AM
RE: HP49-50G Lambert function - Gil - 10-21-2020, 11:44 AM



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