Does f(x)~g(x) imply $f(x) \asymp g(x)$? I'm going to be clear about definitions before I start so there's no ambiguity. Let D be a subset of the complex numbers and let $f: D \to \mathbb{R}^{+}$ be a positive real-valued map defined on D. We will write $f(x) = O(g(x))$ if $g: D \to \mathbb{R}^{+}$ and there exists a positive constant A such that:
$\displaystyle |f(x)| \leq Ag(x)$
for all x in D. If we have that $f(x) = O(g(x))$ and $g(x) = O(f(x))$, then we write $f(x) \asymp g(x)$. If D is unbounded (like the naturals or non-negative reals) then we will also write $f(x) \sim g(x)$ to mean:
$\displaystyle \lim_{|x| \to \infty} \frac{f(x)}{g(x)} = 1.$
The point of all this: I've occasionally used in proofs the intuition that $f(x) \sim g(x)$ implies $f(x) \asymp g(x)$, though the converse is definitely false. I've set about trying to convince myself with a proof, but I've only got as far as proving it for $D = \mathbb{N}$, and even putting D as the non-negative reals gets me close but not quite there. Any ideas?
 A: The result is false if $D$ is not closed: take a boundary point $a\not\in D$ and let $f(x)=|x-a|$ and $g(x)=1+f(x)$.
If $D$ is closed, it is true. There is some $R>0$ so that $\tfrac12 f(x) < g(x) < 2f(x)$ whenever $|x| > R$. On the other hand, on the compact set $\{x\in D\colon |x|\le R\}$ there are bounds $0 < m \le f(x) \le M$ and $0 < m \le g(x) \le M$. The result $f(x)\asymp g(x)$ follows immediately.
A: My version would be this: $f(x) \sim g(x) \Longrightarrow f(x) \asymp g(x)$ is TRUE with the usual definitions, which differ from what we see above.  Suppose $f, g$ are positive functions on $\mathbb R$.  I want to write
$$
f(x) = O(g(x)) \text{ as } x \to \infty
$$
iff
$$
\limsup_{x \to \infty} \frac{f(x)}{g(x)} < \infty ,
$$
then write $f(x) \asymp g(x)$ iff $f(x) = O(g(x))$ and $g(x) = O(f(x))$, which is to say
$$
0 < \liminf_{x\to\infty} \frac{f(x)}{g(x)} \le \limsup_{x \to \infty} \frac{f(x)}{g(x)} < \infty .
$$
With THIS definition, it is a consequence of $f(x) \sim g(x)$ with the stated definition:
$$
\lim_{x\to\infty} \frac{f(x)}{g(x)} = 1.
$$
A: If $f$ and $g$ are functions $\mathbb{R} \rightarrow \mathbb{R}$, it is common to write $f(x) = O(g(x))$, or $f(x) \ll g(x)$, to mean that $|f(x)| \leq A g(x)$ for sufficiently large $x$. For example, one might see
$$\pi(x; q, a) \gg \frac{x}{\phi(q) \log(x)},$$
where the left hand side is the number of primes $\leq x$ congruent to $a$ modulo $q$. I don't think any analytic number theorist would hesitate to write this (if $(a, q) = 1$), even though the left side is zero for $x < a$. 
In other words, at least in the part of mathematics I'm familiar with, the claim you make is true, even if the functions are not continuous, if you implicitly assume that you are allowed to choose $D$ to avoid any trouble spots.
