Does $\lim_{x \to +\infty} 2g(2x) - g(x) = 0$ imply $\lim_{x \to +\infty} g(x) = 0$? Suppose I have a function $g : [0, \infty) \to [0, \infty)$ such that 
$$
\lim_{x \to +\infty} 2g(2x) - g(x) = 0,
$$
and for every $M>0$, the restriction $g\vert_{[0,M]}$ is bounded (for instance, this is the case if $g$ is continuous).
Does it follow that $ \lim_{x \to +\infty} g(x) = 0$ ?

I know that $$4g(4x)-g(x) = 2(2g(4x) - g(2x)) + (2g(2x)-g(x)) \to 0, \quad
x \to \infty$$ so $2^n g(2^n x) - g(x) \to 0$ for any $n \geq 1$.
If $g$ is bounded from above by $B>0$, then $|g(2^n x)| \leq \left| \dfrac{2^n g(2^n x) - g(x)}{2^n} \right| + \dfrac{B}{2^n}$, so I guess by taking $x$ and $n$ large enough, we can get $g(x) \to 0$. What about the general case?
 A: $$g(x)=\left\{
\begin{array}{ll}
... \\
\tan x, & x\in({\pi\over4},{\pi\over2}) \\
{1\over2}\tan{x\over2}, & x\in({\pi\over2},{\pi}) \\
{1\over4}\tan{x\over4}, & x\in(\pi,2\pi) \\
{1\over8}\tan{x\over8}, & x\in(2\pi,4\pi) \\
...
\end{array}
\right.
$$
provides a counterexample if $g(x)$ does not have to be continuous (or bounded, for that matter). Otherwise your own proof with some minor patches works just fine.
A: If we assume that for every $A > 0$ the restriction $g \upharpoonright [0, A]$ is bounded, the claim is true.
Let $\varepsilon > 0$ and pick $A > 0$ such that $\left| g(2x) - \frac{1}{2} g(x) \right| \leqslant \varepsilon$ for $x \geqslant 2A$. From the assumpion, there is $B \geqslant 2 \varepsilon$ such that $|g(x)| \leqslant B$ for $A \leqslant x \leqslant 2A$. 
Now let $x_0 \in [A, 2A]$ and $x_n = 2^n \cdot x_0$. It's straightforward to prove by induction that 
$$|g(x_n)| \leqslant 2 \varepsilon + \frac{B-2\varepsilon}{2^n}.$$ 
It remains to pick $N \in \mathbb{N}$ such that
$$\frac{B - 2 \varepsilon}{2^N} \leqslant \varepsilon$$
and note that for each $x \geqslant 2^N \cdot A$ there is a sequence $x_n$ as above such that $x = x_M$ for some $M \geqslant N$, so $|g(x)| \leqslant 3 \varepsilon$. 
