I'm annoyed by quite a simple problem in calculus (I apologize in advance if I'm not using adequate terms in English, I don't take the course in English nor am I a native speaker):
Let $f:\mathbb R\longrightarrow \mathbb R$ be a function which is continuous at $0$ and satisfies $f(x)=f(2x)\,\forall x\in\mathbb R$.
My question is how do I formally prove that for every $x<0$ $f(x)=c_1$, and for every $x>0$ $f(x)=c_2$, where $c_1,c_2\in \mathbb R$? After proving those two statements (or at least one of them WLOG) it would be quite easy to prove that $f(0)=c_1=c_2$ by the definition of continuity of $f(0)$ and thus $f(x)$ is constant. Those two statements are just so obvious to see that I can't think of any formal way of proving so without "cheating". Thanks in advance!