Does this limit imply that a function is "close" to Lambert W? Suppose I am given the following limit involving function $f(n)\geq 0$:
$$\lim_{n\rightarrow\infty}\log n-f(n)-\log f(n)=c$$
where $c$ is a constant.
I am wondering if that implies that $f(n)$ is "close to" Lambert W function $W(ne^{-c})$ in the following sense:
$$\lim_{n\rightarrow\infty}|f(n)-W(ne^{-c})|=0$$
I think that it is true by the following logic, however, I am not sure about the last step (or whether the logic is correct in the first place):
$$\begin{array}{ll}
&\lim_{n\rightarrow\infty}\log n-f(n)-\log f(n)=c\\
\Rightarrow&\forall\epsilon>0~\exists n_0\text{ such that } \forall n\geq n_0:\\
&c-\epsilon\leq\log n-f(n)-\log f(n)\leq c+\epsilon \text{ by the definition of the limit}\\
\Rightarrow&e^{c-\epsilon}\leq\frac{n}{f(n)e^{f(n)}}\leq e^{c+\epsilon}\\
\Rightarrow&ne^{-c-\epsilon}\leq f(n)e^{f(n)}\leq ne^{-c+\epsilon}\\
\Rightarrow&W(ne^{-c-\epsilon})\leq f(n)\leq W(ne^{-c+\epsilon})    \text{       by the fact that }f(n)\geq 0
\end{array}$$
Up to this point, I am sure of my steps.  Here is where it gets complicated for me.  I perform the Taylor series expansion around $\epsilon=0$ to obtain the following:
$$W(ne^{-c-\epsilon})=W(ne^{-c})-\epsilon\frac{W(ne^{-c})}{1+W(ne^{-c})}+\epsilon^2\frac{W(ne^{-c})}{2(1+W(ne^{-c}))^3}+\mathcal{O}(\epsilon^3)$$
$$W(ne^{-c+\epsilon})=W(ne^{-c})+\epsilon\frac{W(ne^{-c})}{1+W(ne^{-c})}+\epsilon^2\frac{W(ne^{-c})}{2(1+W(ne^{-c}))^3}+\mathcal{O}(\epsilon^3)$$
Now, the first term in the expansion is what I need to subtract from the entire inequality and the second term in the expansion can be upper-bounded by $\epsilon$ since $\frac{W(x)}{1+W(x)}\leq 1$ when $x\geq 0$.  If I could somehow justify ignoring the third term, then I'd be done, as that would imply:
$$-\epsilon\leq f(n)-W(ne^{-c})\leq \epsilon$$
However, I am not sure if I can do that, or, if I can, how to justify that step.
Can anyone help?
 A: You know, I don't think you need the Taylor's series.  You already have $W(ne^{-c-\epsilon}) \le f(n) \le W(ne^{-c+\epsilon})$.  Subtract $W(ne^{-c})$ all the way through your inequality.  You get 
$W(ne^{-c-\epsilon}) - W(ne^{-c})  \le f(n) - W(ne^{-c}) \le W(ne^{-c+\epsilon}) - W(ne^{-c})$.
The left and right sides of this inequality both go to 0 as $\epsilon \rightarrow 0$.  What more do you need?
I think you really had it solved -- I've put this in the answer section because it was kind of hard to write in a comment.
A: Your steps are valid, and as Betty mentioned you want to look at
$$
W(ne^{-c-\epsilon}) - W(ne^{-c})  \le f(n) - W(ne^{-c}) \le W(ne^{-c+\epsilon}) - W(ne^{-c}),
$$
which holds for all $n \geq n_1$, say.
It is a consequence of the asymptotic formula for the Lambert function that
$$
\lim_{x \to \infty} W(\alpha x) - W(x) = \log \alpha,
$$
And for this problem we have $x = ne^{-c}$ and $\alpha = e^{\pm \epsilon}$.   This means that we can find an $n_2$ such that
$$
W(ne^{-c+\epsilon}) - W(ne^{-c}) \le \epsilon + \log e^\epsilon = 2\epsilon
$$
and
$$
-2\epsilon = -\epsilon + \log e^{-\epsilon} \leq W(ne^{-c-\epsilon}) - W(ne^{-c})
$$
for all $n \geq n_2$.  Then if we take $n \geq \max\{n_1,n_2\}$ we have
$$
-2\epsilon \leq f(n) - W(ne^{-c}) \leq 2\epsilon,
$$
so that
$$
\lim_{n \to \infty} f(n) - W(ne^{-c}) = 0.
$$
