Better approximation for Lambert W Function near zero

approximationlambert-wpolynomials

I've looking for a polynomial approximation for Lambert W Function around zero.

I am aiming at the range of $0\leq x\leq e$, and if possible then even $-e\leq x\leq e$.

The asymptotic expansion (when limited to a finite number of iterations of course), yields a polynomial approximation for the range of $-1/e\leq x\leq1/e$.

I've found the following polynomial approximation for the range of $0\leq x\leq e$ in this answer:

$$W_0(z)\approx\ln(1+z)\frac{1+\frac{123}{40}z+\frac{21}{10}z^2}{1+\frac{143}{40}z+\frac{713}{240}z^2}$$

I've tested it to my satisfaction, but I would like ask a few questions here:

  1. Can it be easily extended to the range of $-e\leq x\leq e$?
  2. The author of that answers explains something about Padé approximant, and says that one might do a better approximation (which he/she did not bother to find due to the question in context). Would anyone be able to shed light on how to compute a better polynomial approximation?
  3. Is there perhaps a different approach to my goal, unrelated of the answer above?

Thank you!

Best Answer

The minimax rational approximation of $W(x)/\ln(1+x)$ on $[0,e]$ with numerator and denominator of degree $2$ is, according to Maple, $$ \frac{0.0396202320 + 0.1961951280 x + 0.1702729841 x^2}{0.0396188863 + 0.2161222712 x + 0.2405866129 x^2}$$ which has maximum absolute error approximately $0.00003396612388$ on that interval.

You're not going to be able to get an approximation on $[-e, e]$ because $W(x)$ has a branch point at $-1/e$ and all its branches are complex for $x < -1/e$. You could look for approximations on $[-1/e, e]$. Thus the minimax rational approximation of $W(x)/\ln(1+x)$ on $[-1/e, e]$ with numerator and denominator of degree $2$ is

$$\frac{0.0663274708 + 0.2304903265 x + 0.1716240158 x^2}{0.0663270883 + 0.2636065188 x + 0.2426002763 x^2} $$ with maximum absolute error approximately $0.00004705730323$ on that interval.

You can get better accuracy with higher-degree approximations.