# Approximating Lambert W-function as a fraction of logarithm

I need to solve an equation and I was able to find a solution in terms of Lambert W-function. However I need to solve the same equation for another set of parameters. I need to compare the root of those two equations but the relation is too complicated, The major complexity is posed because of Lambert W-function. Therefore I need to find a way to approximate $$W(x)$$ with logarithm.

I know the results that $$W(x) \approx \ln x - \ln \ln x + \frac{\ln \ln x}{\ln x}+\cdots$$ and also I know that

$$\lim_{x\to \infty} \frac{W(x)}{\ln x} = 1$$

However non of these are helpful.

I was wondering is there anyway I can find a relation like $$W(x) \approx \alpha \ln x$$ for a known $$\alpha$$ when $$x$$ is large but bounded?

I am interested in $$x \in (10^3,10^4)$$

• Maybe useful see researchgate.net/publication/… good luck ! Commented Dec 30, 2021 at 13:24
• What is the range in which you want to approximate $W(x)$ this way ? Commented Dec 30, 2021 at 13:35
• @Peter the range of $x$ in $W(x)$ is $(10^3,10^4)$. Commented Dec 30, 2021 at 13:42
• @K.K.McDonald A better approximation, in the sense of the norm given by Claude, for your interval is $$W(x) \approx \ln x - \ln \ln x + \alpha \frac{{\ln \ln x}}{{\ln x}}$$ with $\alpha = 0.996924749596985635453490\ldots$.
– Gary
Commented Dec 31, 2021 at 1:23
• @Gary, thank you, this is a very good approximation, but unfortunately I can't use it in my problem, I was trying to get rid of that pesky $\ln \ln x$ term somehow and it worked with $\alpha \ln x$. I'm sure your nice suggestion will come in handy i future problems. Commented Dec 31, 2021 at 7:02

In order to get the approximation you look for, consider the norm $$\Phi(\alpha)=\int_{10^3}^{10^4} (W(x)-\alpha \log (x))^2\, dx$$

The definite integral is known. Now, differentiating $$\Phi(\alpha)$$ with respect to $$\alpha$$ we have a nasty linear equation; numerically, its solution is $$\alpha=0.778164$$.

The simplest would be a linear regression. Done, it leads to the same parameter and $$R^2=0.999941$$ $$\begin{array}{clclclclc} \text{} & \text{Estimate} & \text{Standard Error} & \text{Confidence Interval} \\ \alpha & 0.778164 & 0.000063 & \{0.778040,0.778287\} \\ \end{array}$$

Edit

We can improve the approximation adding a linear term. So, now the norm $$\Psi(\alpha,\beta)=\int_{10^3}^{10^4} (W(x)-\alpha \log (x)-\beta)^2\, dx$$

All required antiderivatives are known. Differentiating with respect to $$\alpha$$ and $$\beta$$ leads to two linear equations from which $$\alpha=0.864126\qquad \text{and} \qquad \beta=-0.731281$$

The improvement is interesting $$\Phi_{\text{min}}=23.1588\quad \text{and} \quad \Psi_{\text{min}}=0.0740 \quad\implies\quad \frac{\Phi_{\text{min}} } {\Psi_{\text{min}} }=313$$

• Thank you, I'll use this one! Commented Dec 30, 2021 at 15:54
• WE could do better. Tell what are your limitations. Commented Dec 30, 2021 at 15:56
• I think this is good enough, although I do not know what do you mean by limitations! I was going to use this approximation to compare solution of two set of optimization problems and the equations I referred to are K.K.T. conditions. Then I have to replace the solution in objective and compare but comparing two Lambert-W is not easy, specially when you have a huge sum of functions with Lambert-W argument! Now I have to check if something can be done with this approximation, or else I have to come back for some other idea! Commented Dec 30, 2021 at 15:59
• @K.K.McDonald. For example, for this range, $W(x)=0.864124 \log(x)-0.731259$ is better. We could add the square of the logarithm .... Commented Dec 30, 2021 at 16:04
• I got it now, but only the linear term is best, because I have terms of the form $\frac{W(x_1)-\alpha_1}{W(x_2)-\alpha_2}$ and using linear approximation make it much more easier, thank you! Commented Dec 30, 2021 at 16:07