> barefoot gigantor <email@example.com> writes: > >> what is the best available approximation ( say up to 10 digits ) for >> LambertW(x) or exp(LambertW(x)) for x > 2000 >> >> thank you for your help > > It isn't immediately obvious to me what "best" means. You are solving > for x in the equation y == x * E^x. A simple solution would be to start > with x = Log[y], then iterate x = Log[y] - Log[x] enough times that you > have as many correct digits as you need. The convergence is a little > slow, though, so you could use Newton's Method instead. You could still > start with x = Log[y], but then iterate x = (Log[y]-Log[x]+1) * x/(x+1).
To follow up, I just want to point out that for y > 2000, you only need three iterations to get the desired accuracy. It is asymptotic, so if x is large enough you need fewer iterations. The worst case is for y == 2000, where three iterations gives you a relative error of approximately 2*10^-13. To sum up:
x = Log[y]; x = (Log[y]-Log[x]+1) * x/(x+1); x = (Log[y]-Log[x]+1) * x/(x+1); x = (Log[y]-Log[x]+1) * x/(x+1);
gives you the value of LambertW[y] to the required accuracy for all y > 2000. (Actually, it does better than that. It gives a relative error of better than 10^-10 down to about y==32.)
Scott -- Scott Hemphill firstname.lastname@example.org "This isn't flying. This is falling, with style." -- Buzz Lightyear