TITLE: What operations is this asymptotic relation closed under?
QUESTION [7 upvotes]: For all positive functions $f$ and $g$ of the real variable $x$, let $\sim$ be a relation defined by
$f \sim g$ if and only if $\lim_{x \rightarrow \infty} \frac{f(x)}{g(x)} = 1$
Then if $f \sim g$, we have for example, that $f^2 \sim g^2, \sqrt{f} \sim \sqrt{g}, f+g \sim 2g$, but we do NOT have that $e^f \sim e^g$. What other operations preserve, or do not preserve the asymptotic relation $\sim$?

REPLY [6 votes]: There seems to be a connection between this question and the beautiful Karamata theory of regular variation.   
A positive function $F$ is regularly varying both at $0$ and $\infty$ if and only if $F(t)=t^pL(t)=t^qK(t)$ where $p$ and $q$ are real and 
$L$ and $K$ are slowly varying at 0 and $\infty$ respectively, which implies in particular (due to the uniform convergence theorem for slowly varying functions)
that
$$ \lim_{t\to0^+}\sup_{|a-1|\le \delta}\left|\frac{L(at)}{L(t)}-1\right| \to 0 
\qquad \text{and} \quad
 \lim_{t\to\infty}\sup_{|a-1|\le \delta}\left|\frac{K(at)}{K(t)}-1\right| \to 0, 
$$
for some $\delta>0$.  
Now, it follows that whenever $f\sim g$ then $F\circ f \sim F\circ g$, provided that
(i) $F$ is continuous, and (ii) $F$ is regularly varying both at 0 and $\infty$. 
The proof is a straightforward (but slightly tedious) $\frac\epsilon 3$ argument based on (a) the fact that $$f(x)=g(x)(1+h(x)) \quad\text{ where  }h(x)\to0,$$ (b) uniform continuity of $F$ on any compact interval $[b,c]\subset(0,\infty)$, and (c) the limit relations above.
While conditions (i) and (ii) on $F$ are sufficient, (ii) is not necessary:
The function $$F(t)=t(2+\sin\ln t)$$ is a counterexample. This function is not regularly varying since $\lim_{t\to0} F(at)/F(t)$ does not exist when
$\ln a=\pi$. However, whenever $f\sim g$ it is true that $F\circ f\sim F\circ g$.
This is due to the fact that $$\sin(\ln g(x)+\ln(1+h(x))-\sin\ln g(x)\to0 \qquad \text{ whenever } h(x)\to0,$$ by the uniform continuity of $\sin$.
Generalizing this example seems to yield a class that preserves $\sim$ consisting of all continuous $F$ such that
$F(t)= t^p G(L(t))$ where $L$ is slowly varying at 0 and $G$ is bounded away from 0 and $\infty$ and is  uniformly continuous, with a similar representation at $\infty$.
Naturally, the class of positive $F$ that preserve $\sim$ is closed under composition and products.  I don't have any of the classic texts on regular variation handy, but it is conceivable that necessary and sufficient conditions are known.