Linear upper bound for function involving Lambert W I have a function
$$f(x)=\frac{2-2x}{\ln x}W_{-1}\left(\frac{\ln x}{(2-2x)\sqrt x}\right)$$
Looking at the plot, it appears somewhat linear in shape and empirically, it seems that we have $\lim_{x\to\infty}f(x)/x=3$. Can this limit be proven, and if so, is there a simpler function that can act as an upper bound for $f(x)$? There is a related problem in which I need to check all integer values less than or equal to $f(x)$ for a given $x$ and I would like to find a simpler function for an upper bound that is still closely fitting enough to not drastically increase computation time.
Update: I have found a function that supplies an upper bound.
$$f(x)\leq2x-2+\frac{(4-4x)[\ln(\ln x)-\ln(x-1)+1-\ln4]}{\ln x}$$
I found this with the observation that $xe^x\geq\frac4{xe^2}$ and thus that $W_{-1}(x)\geq2-\ln4+2\ln(-x)$. Does this help prove the limit and is there a better upper bound still?
 A: According to this post we have that $$W_{-1}(y) = \log(-y) + \log(-\log(-y))+\ldots\qquad \text{for } y\to 0^{-}.$$ Applying this to your problem, we have that \begin{align*}\lim_{x\to +\infty} \frac{f(x)}{x} &= \lim_{x\to +\infty} \frac{2-2x}{x}\cdot \frac{1}{\log x}\,\left[\log\left(\frac{\log x}{(2x-2)\sqrt{x}}\right) + O(\log\log x)\right]  \\ &= -2\lim_{x\to +\infty} \frac{1}{\log x}\,\left[\log\log x -\log x^{3/2} + O(\log\log x)\right] \\ &= 3\end{align*} as you claimed.
A: Fact 1: It holds that, for all $x > 2$,
$$f(x) \le 3x \cdot \frac{(x - 1)(3\ln x + 2\ln 3 - 2)}{3x\ln x - 2x + 2}.$$
Fact 2: It holds that $f(x) \ge 3x$ for all $x > 2$.
By Facts 1-2, using the squeeze theorem, we have
$$\lim_{x\to \infty} \frac{f(x)}{3x} = 1.$$

Proof of Fact 1:
Let
$$y := \frac{1}{3x} \cdot \frac{2-2x}{\ln x}W_{-1}\left(\frac{\ln x}{(2-2x)\sqrt x}\right).$$
Then we have
$$\frac{3xy\ln x}{2 - 2x} = W_{-1}\left(\frac{\ln x}{(2-2x)\sqrt x}\right)$$
or
$$\frac{3xy\ln x}{2 - 2x}
\mathrm{exp}\left({\frac{3xy\ln x}{2 - 2x}}\right)
= W_{-1}\left(\frac{\ln x}{(2-2x)\sqrt x}\right)\mathrm{exp}\left(W_{-1}\left(\frac{\ln x}{(2-2x)\sqrt x}\right)\right)$$
or
$$\frac{3xy\ln x}{2 - 2x}\,
\mathrm{exp}\left({\frac{3xy\ln x}{2 - 2x}}\right) = \frac{\ln x}{(2-2x)\sqrt x}$$
or
$$y\,\mathrm{exp}\left({\frac{3xy\ln x}{2 - 2x}}\right)
= \frac{1}{3x^{3/2}}$$
or
$$\ln y + \frac{3xy\ln x}{2 - 2x} = -\ln (3x^{3/2}). \tag{1}$$
Using $\ln y \le y - 1$ for all $y > 0$, we have
$$y - 1 + \frac{3xy\ln x}{2 - 2x} \ge -\ln (3x^{3/2})$$
which results in
$$y \le \frac{(x - 1)(3\ln x + 2\ln 3 - 2)}{3x\ln x - 2x + 2}.$$
Thus, we have
$$f(x) \le 3x \cdot \frac{(x - 1)(3\ln x + 2\ln 3 - 2)}{3x\ln x - 2x + 2}.$$
We are done.
$\phantom{2}$
Proof of Fact 2:
Let
$$z := W_{-1}\left(\frac{\ln x}{(2-2x)\sqrt x}\right).$$
According to definition, we have $z < -1$ and
$$z \mathrm{e}^{z} = \frac{\ln x}{(2-2x)\sqrt x}. $$
It suffices to prove that
$$\frac{1}{3x} \cdot \frac{2-2x}{\ln x} z \ge 1$$
or
$$z \le \frac{3x\ln x}{2 - 2x}.$$
Since $\frac{3x\ln x}{2 - 2x} < -1$ and $z\mapsto z\mathrm{e}^z$ is strictly decreasing on $(-\infty, -1)$, it suffices to prove that
$$z \mathrm{e}^z \ge \frac{3x\ln x}{2 - 2x}\mathrm{exp}\left(\frac{3x\ln x}{2 - 2x}\right)$$
or
$$\frac{\ln x}{(2-2x)\sqrt x} \ge \frac{3x\ln x}{2 - 2x}\mathrm{exp}\left(\frac{3x\ln x}{2 - 2x}\right)$$
or
$$\frac{1}{3x^{3/2}} \le \mathrm{exp}\left(\frac{3x\ln x}{2 - 2x}\right)$$
or
$$-\ln 3 - \frac32\ln x \le \frac{3x\ln x}{2 - 2x}$$
or
$$\ln x\le \frac23(x - 1)\ln 3$$
which is true (easy).
We are done.
A: If you look for a linear approximation (which is an upper bound), you can develop $f(x)$ as a Taylor series around $x=a$.
This would give
$$f(x)=\alpha +\beta\,(x-a)+O\left(\left(x-a\right)^2\right)$$ with
$$\alpha=-\frac{2 (a-1) }{\log (a)}\,Z$$
$$\beta=\frac{Z }{a (Z+1) \log ^2(a)}\Big[(a-1) \log (a)-2(a (\log (a)-1)+1)\,  Z\Big]$$ where
$$Z=W_{-1}\left(-\frac{\log (a)}{2 (a-1) \sqrt{a}}\right)$$
The next term of the expansion (too messy to be printed here) is small, always negative and asymptotic to $0^-$.
Let $a=10^k$ and compute the values of $\beta$
$$\left(
\begin{array}{cc}
 k & \beta \\
 1 & 3.68771 \\
 2 & 3.41665 \\
 3 & 3.29467 \\
 4 & 3.22655 \\
 5 & 3.18361 \\
 6 & 3.15422 \\
 7 & 3.13289 \\
 8 & 3.11671 \\
 9 & 3.10403 \\
 10 & 3.09383 \\
 11 & 3.08545 \\
 12 & 3.07844
\end{array}
\right)$$
$$\beta \sim 3+\frac{750}{786 k+125}$$
Edit
$$fx)=\frac 1 {\sqrt x} \,\frac{W_{-1}(y)}{y}\qquad \text{with} \qquad  y=\frac{\log (x)}{2 (1-x) \sqrt{x}} $$
For bounds, using the tight bounds given in year $2013$ by Chatzigeorgiou (have a look here)
$$-1-\sqrt{2u}-u < W_{-1}(-e^{-u-1}) < -1-\sqrt{2u}-\frac{2}{3}u \qquad \text{for} \qquad u>0$$ let
$$u=-1-\log \left(-y\right)$$ Since $y<0$ then
$$f(x) > -\frac 1 {\sqrt x} \frac{-2 \log (-y)+3 \sqrt{2} \sqrt{-\log (-y)-1}+1}{3 y}$$
$$f(x) <\frac 1 {\sqrt x} \frac{\log (-y)-\sqrt{2} \sqrt{-\log (-y)-1}}{y}$$
Expanded as a series for large values of $x$, the first term of the upper bound write
$$\frac{x \left(3 \log (x)-2 \log (\log (x))+2 \sqrt{3 \log (x)-2 \log (\log   (x))-2+\log (4)}+2 \log (2)\right)}{\log (x)}$$ showing the desired limit.
