Let $g$ be a continuous function on $\mathbb{R}$ such that: $\displaystyle\lim_{x \to 0} \:\dfrac{g(2x)-g(x)}{x}=l \in \mathbb{R}.$
I am supposed to prove that $g$ is differentiable at $0$ and $g'(0)=l$
Here is what I did: $$\displaystyle\begin{align} \lim_{x \to 0} \:\dfrac{g(2x)-g(x)}{x}&=\lim_{x \to 0}\:\frac{2(g(2x)-g(0))}{2x}-\dfrac{g(x)-g(0)}{x}\\&=\lim_{X \to 0}\:2\:\dfrac{g(X)-g(0)}{X} - \lim_{x \to 0}\:\dfrac{g(x)-g(0)}{x}\\ &=\lim_{x \to 0}\:\dfrac{g(x)-g(0)}{x}\\ &=l \end{align}$$ Since $\displaystyle\lim_{x \to 0} \:\dfrac{g(x)-g(0)}{x} = l$, then g is differentiable in $0$ and $g'(0)=l$
Is this valid? I'd appreciate any suggestion thanks.