2
$\begingroup$

The question is with regards to Lambert W Function:

Given $W(x)$, I need to calculate $W(-x)$.

Is there any way to do that?

I've searched through the function identities, but couldn't find anything useful.

Thank you.

$\endgroup$
5
  • 1
    $\begingroup$ Can you provide some context on the question? Where does it come from, why do you want to do this? $\endgroup$ May 19 '20 at 11:06
  • $\begingroup$ @GEdgar I think you mean: if $a = W(x)$ and $b=W(-x)$, can we write $a$ in terms of $b$? This is equivalent to: if $ae^a =x$ and $be^b=-x$, can we write $a$ in terms of $b$? $\endgroup$ May 19 '20 at 11:46
  • $\begingroup$ @JensRenders You are right. Then this amounts to: solve $ae^a = -be^b$ for $b$. $\endgroup$
    – GEdgar
    May 19 '20 at 11:57
  • $\begingroup$ @GEdgar Ineed, but without evaluating Lambert $W$ in $-ae^a$ explicitly, because $-ae^a$ is just $-x$. $\endgroup$ May 19 '20 at 12:02
  • 1
    $\begingroup$ Do you want the real-valued W function? In order for both $x$ and $-x$ to belong to the domain, you need $-1/e < x < 1/e$. $\endgroup$
    – GEdgar
    May 19 '20 at 12:07
1
$\begingroup$

This is just the start of what I am working on (hoping to get something better later).

Since we are restricted to the range $-\frac 1 e \leq x\leq \frac 1 e$, we could consider, around $x=0$ the expansion $$W(-x)\, W(x)=-x^2\sum_{n=0}^\infty a_n \,x^{2n}$$ where the $a_n$'s are the sequence $$\left\{1,2,\frac{22}{3},\frac{168}{5},\frac{18142}{105},\frac{2702944}{2835},\frac{ 286762684}{51975},\frac{66973259776}{2027025},\frac{9972382736698}{49116375},\cdots\right\}$$ which is not recognized by $OEIS$ which lead to quite good results except very close to $x=\frac 1 e$.

Similarly, we could write $$W(-x)+ W(x)=-2x^2\sum_{n=0}^\infty b_n \,x^{2n}$$ where the $b_n$'s are the sequence $$\left\{1,\frac{8}{3},\frac{54}{5},\frac{16384}{315},\frac{156250}{567},\frac{298598 4}{1925},\frac{7909306972}{868725},\frac{35184372088832}{638512875},\frac{508373 1656658}{14889875},\cdots\right\}$$

If required, these series expansions could be made much more compact transforming them is Padé approximants.

Similarly, we could write $$\frac{W(-x)\, W(x)}{W(-x)+W(x)}=\frac 12-\frac {x^2}3\sum_{n=0}^\infty c_n \,x^{2n}$$ where the $c_n$'s are the sequence $$\left\{1,\frac{38}{15},\frac{634}{63},\frac{75568}{1575},\frac{39393118}{155925}, \frac{301414530016}{212837625},\frac{1763848931644}{212837625},\frac{2716085710533 376}{54273594375},\cdots\right\}$$

Edit

We could do better using Winitzki's approximation $$W(x)\sim\frac{e x}{1+\frac{1}{a+\frac{1}{\sqrt{2 e x+2}}}}\qquad \text{where}\qquad a=\frac{1}{e-1}-\frac{1}{\sqrt{2}}$$ which is very good for the range of interest. So, $$\color{blue}{W(-x)=-W(x)\,\,\frac{1+\frac{1}{a+\frac{1}{\sqrt{2 e x+2}}}}{1+\frac{1}{a+\frac{1}{\sqrt{2-2 e x}}}}}$$ Since this is an approximation, we can use $a=-\frac 18$ and even retain $$W(-x)=-W(x)\frac{\left(4 \sqrt{2}-\sqrt{1-e x}\right) \left(7 \sqrt{1+e x}+4 \sqrt{2}\right)}{\left(4 \sqrt{2}-\sqrt{1+e x}\right)\left(7 \sqrt{1-e x}+4 \sqrt{2}\right) }$$

A few values for comparison $$\left( \begin{array}{ccc} x & \text{approximation} & \text{exact} \\ -0.35 & +0.261884 & +0.267777 \\ -0.30 & +0.231621 & +0.236755 \\ -0.25 & +0.199919 & +0.203888 \\ -0.20 & +0.166157 & +0.168916 \\ -0.15 & +0.129852 & +0.131515 \\ -0.10 & +0.090490 & +0.091277 \\ -0.05 & +0.047464 & +0.047672 \\ +0.00 & +0.000000 & +0.000000 \\ +0.05 & -0.052937 & -0.052706 \\ +0.10 & -0.112804 & -0.111833 \\ +0.15 & -0.181790 & -0.179491 \\ +0.20 & -0.263475 & -0.259171 \\ +0.25 & -0.364499 & -0.357403 \\ +0.30 & -0.500250 & -0.489402 \\ +0.35 & -0.732766 & -0.716639 \end{array} \right)$$

Update

Speaking about Padé approximants, we could also write (have a look here) $$W(x) \sim \log(1+x)\,P_{n,n}(x)$$ and then write $$W(-x)\sim W(x)\,\, \frac{\log(1-x) } {\log(1+x) }\,\, \frac{P_{n,n}(-x) } {P_{n,n}(x) }$$ Since the linked page gives the coefficients for $n=2$, I give you the next $$P_{3,3}(x)=\frac{1+\frac{26213 }{5194}x+\frac{82391 }{10388}x^2+\frac{85291 }{22260}x^3 } {1+\frac{14405 }{2597}x+\frac{76259 }{7791}x^2+\frac{564353 }{103880}x^3 }$$

In the linked answer, the answerer wrote that "probably one might do better with a minimax rational approximation". This is what I did for $-\frac 1e \leq x \leq \frac 1e$ writing $$W(x)\sim Q_{3,3}(x)= x\,\frac{a_0+a_1 x+a_2x^2}{b_0+b_1 x+b_2x^2+b_3 x^3}$$ the optimum parameters being $$a_0=1+\frac{13489}{3916800 e^6}+\frac{13489}{326400 e^4}-\frac{121401}{343400 e^2}$$ $$ a_1=\frac{228}{85}-\frac{13489}{326400 e^4}-\frac{94423}{343400 e^2}\qquad a_2=\frac{451}{340}+\frac{13489}{137360 e^2}$$ $$b_0=1+\frac{13489}{326400 e^4}-\frac{121401}{343400 e^2}$$ $$b_1=\frac{313}{85}-\frac{26978}{42925 e^2}\qquad b_2=\frac{1193}{340}\qquad b_3=\frac{133}{204}$$

So, the proposed approximation is $$W(-x) \sim W(x)\,\, \frac{Q_{3,3}(-x) } {Q_{3,3}(x) }$$

A new table for comparison with the previous one $$\left( \begin{array}{ccc} -0.35 & +0.274095 & +0.267777 \\ -0.30 & +0.236981 & +0.236755 \\ -0.25 & +0.203889 & +0.203888 \\ -0.20 & +0.168917 & +0.168916 \\ -0.15 & +0.131517 & +0.131515 \\ -0.10 & +0.091277 & +0.091277 \\ -0.05 & +0.047672 & +0.047672 \\ +0.00 & +0.000000 & +0.000000 \\ +0.05 & -0.052706 & -0.052706 \\ +0.10 & -0.111832 & -0.111833 \\ +0.15 & -0.179489 & -0.179491 \\ +0.20 & -0.259170 & -0.259171 \\ +0.25 & -0.357401 & -0.357403 \\ +0.30 & -0.488936 & -0.489402 \\ +0.35 & -0.700120 & -0.716639 \end{array} \right)$$ which seems to be much better.

$\endgroup$
1
$\begingroup$

Solve $ae^a=-be^b$ for $b$.
I found nothing explicit, but the Taylor series near $a=0$ is $$ b=-a-2\,{a}^{2}-4\,{a}^{3}-{\frac{28}{3}}{a}^{4}-24\,{a}^{5}-{\frac{ 328}{5}}{a}^{6}-{\frac{8416}{45}}{a}^{7}-{\frac{173216}{315}}{a}^{8}-{ \frac{104288}{63}}{a}^{9}-{\frac{2878496}{567}}{a}^{10}+O \left( {a}^{11 } \right) $$

Looking in the Online Enyclopedia of Integer Sequences, I conjecture that this is $$ b = -\sum_{j=1}^\infty \frac{S_{j-1} 2^{j-1}}{(j-1)!}\;a^j $$ where $(S_j)_{j\ge 0}$ is the sequence A007889. But it turns out that is not surprising. One of the formulas for the exponential generating function of A007889 involves the Lambert W function.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.