1

While working on a recreational math problem I have come to the point were I need to find the inverse of one of the two following functions; $$\frac{W_0(x)(W_{-1}(x)+1)}{(W_0(x)+1)W_{-1}(x)}$$ $$\frac{(W_0(x)+1)W_{-1}(x)}{W_0(x)(W_{-1}(x)+1)}$$ Were $W$ is the LambertW function (the solution to $W(x)e^{W(x)}=x$, $W_0(x)$ are the real solutions where $W_0(x) > -1$ and $W_{-1}(x)$ are the real solutions where $W_{-1}(x) < -1$). Looking at the graphs of both of the functions, the inverse of both appears to be the same function that is slightly less than $xe^x$ while $x$ is negative. Wolfram times out when given these functions but can find the inverse of simpler functions in the same vain. Sympy cannot handle it. I am smart enough to simplify the problem I was working on downto this but I am not smart enough to take the inverse of these functions.

When I call this recreational math I mean that in the strictest possible sense of I am doing it for fun. I have an undergrad degree in math and have spent 5 years on and off working on the greater problem that this is a part of in my free time. I have learned a lot in researching bits and pieces of that problem and this question is no where near the final I will need to tackle in the greater problem.

Smasheded
  • 11
  • 3

1 Answers1

1

It could be interesting to use the parametrization of Lambert function (have a look here).

For $x\in(-\tfrac1{\mathrm{e}},0)$ and $\alpha\in(0,1)$, defining

$$\color{blue}{\large x=\alpha ^{\frac{\alpha }{1-\alpha }} \log \left(\alpha ^{\frac{\alpha }{1-\alpha }}\right)}$$

the real branches of Lambert function can be parametrized as

$$\color{blue}{W_0(x)=\frac{\alpha \log (\alpha )}{1-\alpha }}\qquad \text{and} \qquad \color{blue}{W_{-1}(x)=\frac{ \log (\alpha )}{1-\alpha }}$$

For the first function $$y=\frac{W_0(x)\,(W_{-1}(x)+1)}{(W_0(x)+1)\,W_{-1}(x)}=\frac{\alpha \left(\frac{\log (\alpha )}{1-\alpha }+1\right)}{\frac{\alpha \log (\alpha )}{1-\alpha }+1}$$ which cannot be inversed but quite well approximated by the $[n,n]$ Padé approximant $P_n$ built around $\alpha=1$

This would give

$$P_2= -\frac{11 \alpha ^2+18 \alpha +1}{\alpha ^2+18 \alpha +11}$$

$$P_3=-\frac{57 \alpha ^3+239 \alpha ^2+121 \alpha +3}{3 \alpha ^3+121 \alpha ^2+239 \alpha +57}$$

$$P_4=-\frac{29 \alpha ^4+227 \alpha ^3+300 \alpha ^2+73 \alpha +1}{\alpha ^4+73 \alpha ^3+300 \alpha ^2+227 \alpha +29}$$

The respective errors of these approximants are $$\frac{(\alpha -1)^5}{525} \qquad \qquad \frac{(\alpha -1)^7}{8820} \qquad \qquad \frac{(\alpha -1)^9}{145530}$$

Considering the infinite norm

$$\Phi_n=\int_0^1 \Bigg( \frac{\alpha \left(\frac{\log (\alpha )}{1-\alpha }+1\right)}{\frac{\alpha \log (\alpha )}{1-\alpha }+1}-P_n \Bigg)^2\, d \alpha$$ they are

$$\Phi_2=1.99614\times 10^{-4} \quad\quad \Phi_3=3.70724\times 10^{-5} \quad\quad \Phi_4=1.01236\times 10^{-5}$$

So, at the price of a quadratic, cubic or quartic equation, we can have an approximate value of $\alpha$ and then $x$ from its definition.

A few numbers (using the chain $x\to \alpha \to y \to \alpha \to x$) $$\left( \begin{array}{cccc} x & x_{(2)} & x_{(3)} & x_{(4)} \\ -0.15 & -0.113812 & -0.140978 & -0.147205 \\ -0.20 & -0.185725 & -0.197052 & -0.199294 \\ -0.25 & -0.245433 & -0.249309 & -0.249885 \\ -0.30 & -0.299159 & -0.299925 & -0.299993 \\ -0.35 & -0.349985 & -0.350000 & -0.350000 \\ \end{array} \right)$$

Using $P_3$, the cubic to be solved for $\alpha$ is $$3 (y+19)\, \alpha ^3+ (121 y+239)\,\alpha ^2+ (239 y+121)\,\alpha+3(19y+1)=0$$

With $$p=\frac{10 (1249 y^2+1588 y+3643}{27 (y+19)^2}$$ $$q=\frac{40 (69404 y^3+118731 y^2+222576 y+318289)}{729 (y+19)^3}$$ the approximate solution is $$\alpha=2 \sqrt{\frac{p}{3}}\cos \left(\frac{1}{3} \cos ^{-1}\left(\frac{3 \sqrt{3} q}{2p^{\frac 32} }\right)\right)-\frac{121 y+239}{9 (y+19)}$$

Another thing which could be done is a series expansion around $\alpha=1$ followed by a power series reversion yo obtain $$\alpha=1-t +\frac {t^2}6 \sum_{n=0}^\infty a_n\,t^n \qquad \text{where} \qquad t= \frac 32(1+y)$$ the very first coefficients being

$$\left\{1,\frac{2}{15},\frac{1}{36},\frac{71}{9450},\frac{281}{11340 0},\frac{29}{30375},\frac{16859}{40824000},\frac{36557}{18860688 0},\frac{27230983}{282910320000}\right\}$$

Using the above terms, for $\alpha=\frac 1e$, the exact value is $y= -\frac{1}{(e-2) e}$ and the recomputed value is $\alpha=\color{red}{0.367879}001$