5
$\begingroup$

what is the best available approximation ( say up to 10 digits ) for LambertW(x) or exp(LambertW(x)) for x > 2000

$\endgroup$
4

5 Answers 5

8
$\begingroup$

Extended answer

The approximation described below is original, explicit (in some sense), and very accurate. It is closely related to this question (second paragraph).

So, you want to approximate the solution $W(x)$ of $x=W(x)e^{W(x)}$, for large $x$ (the order of $x$ does not play a very significant role in what follows). First, define $$ \varphi (x,r) = 1 + \sum\limits_{k = 1}^{\left\lceil r \right\rceil } {\frac{{x^k [r - (k - 1)]^k }}{{k!}}} . $$ Now, consider the following series of approximations, where $r$ is assumed sufficiently large. The first one is $$ \tilde W^1 (x,r) = \frac{1}{r}\ln \varphi (x,r). $$ Subsequent approximations are defined recursively by $$ \tilde W^{n + 1} (x,r) = \frac{1}{r}\ln \bigg[\frac{{\tilde W^n (1 + \tilde W^n )}}{x}\varphi (x,r)\bigg]. $$

Example. For $x=2000$, even $r$ as low as $80$ gives quite accurate results: $$ \tilde W^5 (2000,80) \approx 5.83673149492073 $$ and $$ \tilde W^6 (2000,80) \approx 5.836731494908671, $$ while the exact solution (according to Wims Function Calculator) is $$ W(2000) = 5.836731494908178747.... $$ Based on many numerical results, this approximation seems quite interesting. Here is one further example. The Omega constant $\Omega$ is the value of $W(1)$: $$ \Omega = W(1) \approx 0.5671432904097838729999686622. $$ With $r$ as low as $30$, we already get the following impressive approximations: $$ \tilde W^1 (1,30) \approx 0.5710729200334063, $$ $$ \tilde W^2 (1,30) \approx 0.5674569334624368, $$ $$ \tilde W^3 (1,30) \approx 0.5671683899602143, $$ $$ \tilde W^4 (1,30) \approx 0.5671452994467842, $$ $$ \tilde W^5 (1,30) \approx 0.5671434512213455, $$ $$ \tilde W^6 (1,30) \approx 0.5671433032818183, $$ $$ \tilde W^7 (1,30) \approx 0.5671432914401158, $$ $$ \tilde W^8 (1,30) \approx 0.567143290492256, $$ $$ \tilde W^9 (1,30) \approx 0.5671432904163853, $$ $$ \tilde W^{10} (1,30) \approx 0.5671432904103123, $$ $$ \tilde W^{11} (1,30) \approx 0.5671432904098261, $$ $$ \tilde W^{12} (1,30) \approx 0.5671432904097873. $$ So, $\tilde W^{12} (1,30) - W(1) \approx 3 \times 10^{-15}$. It is interesting to compare this sophisticated approximation with the standard one obtained from the converging sequence $\Omega_n \to \Omega$ defined by $\Omega_{n+1} = e^{-\Omega_n}$ (with initial value $\Omega_0$). For example, with $\Omega_0 = 0.5$, we only get $$ \Omega_1 \approx 0.6065306597126334, $$ $$ \Omega_2 \approx 0.545239211892605, $$ $$ \Omega_3 \approx 0.5797030948780683, $$ $$ \Omega_4 \approx 0.5600646279389019, $$ $$ \Omega_5 \approx 0.5711721489772151, $$ $$ \Omega_6 \approx 0.5648629469803235, $$ $$ \Omega_7 \approx 0.5684380475700662, $$ $$ \Omega_8 \approx 0.5664094527469208, $$ $$ \Omega_9 \approx 0.5675596342622424, $$ $$ \Omega_{10} \approx 0.5669072129354714, $$ $$ \Omega_{11} \approx 0.5672771959707785, $$ $$ \Omega_{12} \approx 0.5670673518537281. $$

$\endgroup$
2
5
$\begingroup$

Your question is not really clear about what you mean by 'approximation.' The Lambert W(x) function is implemented in various software packages, as ProductLog[x] in Mathematica, for example. And Mathematica can compute numerical values for specific x out to as many digits as you like:

N[ProductLog[2000],25]=5.836731494908178747954545

You may instead be asking about the asymptotic expansion of W(x) as x goes to $\infty$. Here the Mathematica input

FullSimplify[Normal[Series[ProductLog[x], {x, Infinity, 0}]], Assumptions -> x > E]

returns

$\log (x)-\log (\log (x))+\log (\log (x))/\log (x)+(\log (\log (x))-2) \log (\log (x))/(2 \log ^2(x))$.

So one may say that

$W(x) = \log (x)-\log (\log (x))+\log (\log (x))/\log (x)+O\left(1/\log(x)\right)$.

(If you're unfamiliar with asymptotic analysis and the Big Oh notation, you might start with http://en.wikipedia.org/wiki/Big_O_notation )

$\endgroup$
2
  • 1
    $\begingroup$ Mathematica is wrong here; the error is not O(1/x) but Theta((log log x/log x)^3). $\endgroup$
    – Charles
    Mar 16, 2011 at 14:38
  • $\begingroup$ @Charles: Thanks! I tried to edit to fix this. $\endgroup$
    – Stopple
    Mar 23, 2011 at 22:53
1
$\begingroup$

You want to approximate the solution $w:=W(x)$ of the equation $we^w =x$, respectively, the solution $u:=\exp(W(x))$ of of the equation $u\log(u)=x$, in dependence on the parameter $x\ge 2000$. In general, solutions of such equations are easily approximated by means of iterative methods. You may use the Newton method (check the linked article for the quadratic bounds on the approximation). Anyway, the Newton Method is very fast once you are conveniently close to the solution: I guess that the best thing here is to start with a more rough but more stable method, and pass to the Newton iteration as soon as the error became sufficiently small. Anyway, for these particular equations, of course, you may find ready the study on various approximations in all details: check e.g. the wiki article on the Lambert W function and the external links therein.

$\endgroup$
1
$\begingroup$

If you want a good approximation on a given interval, you can sometimes do significantly better than asymptotics using Chebyshev/Pade approximations or the Remez algorithm.

$\endgroup$
1
  • $\begingroup$ Hi Professor Israel. Thank you for this answer. You have been very helpful on the mapleprimes. I am so glad to see you here. $\endgroup$ Mar 25, 2011 at 21:46
1
$\begingroup$

As Pietro says, $u=\exp(W(x))$ satisfies $u=x/\ln u$. This is a contraction mapping for large enough $u$, so just start with any old approximation, like $u=x/\ln x$, and do $u:=x/\ln u$ until it converges. For $x>1000$ it doesn't take more than about a dozen iterations to get 10 digits.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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