0
$\begingroup$

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!

$\endgroup$
1
  • 1
    $\begingroup$ These are not polynomial approximations. They are rational approximations to $W(x)/\ln(1+x)$. $\endgroup$ Jun 9, 2020 at 18:30

1 Answer 1

2
$\begingroup$

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.

$\endgroup$
6
  • $\begingroup$ Thank you! Your last (second) approximation is for $x\in[-1/e,e]$? $\endgroup$ Jun 9, 2020 at 18:45
  • $\begingroup$ Yes, that's what I said. $\endgroup$ Jun 9, 2020 at 18:47
  • $\begingroup$ Awesome (and very useful) answer, thank you very much!!! $\endgroup$ Jun 9, 2020 at 19:33
  • $\begingroup$ I would like to ask one more thing: since I am already handling the range $[-1/e,1/e]$ accurately, I technically need to handle only the range $[1/e,e]$. Will Maple generate a more accurate 2nd-degree approximation if I narrow the input range in your first example? $\endgroup$ Jun 9, 2020 at 19:44
  • 1
    $\begingroup$ Yes, on a smaller interval you should get a better approximation. In this case, for degrees $2$ and $2$ Maple is telling me "error curve fails to oscillate sufficiently; try different degrees". With numerator of degree $1$ and denominator $3$, it gives me $${\frac { 0.276972170484786+ 0.332660424982433\,x}{ 0.277527230334148 + 0.466289676939177\,x+ 0.00150785702317642\,{x}^{2}- 0.000244712398927012\,{x}^{3}}} $$ with maximum error $6.281026638 \times 10^{-6}$. $\endgroup$ Jun 9, 2020 at 23:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .