Consider the following problem:
Is it true, that any odd continuous function satisfying $f(2x) = 2f(x)$ is linear?
Does the following function (which I found here) can serve as a counterexample?
$$ f(x) = \begin{cases} x\cos(2\pi \log_2(x)), & \mbox{if } x>0 \\ 0, & \mbox{if } x=0 \\ x\cos(2\pi \log_2(-x)) & \mbox{if } x<0 \end{cases} $$
If it can, are there any "simpler" ones? I mean, that task was given on exam, and it would be rather difficult to come up with such a function on your own. By what strategy can one construct a similar counterexample from scratch? It feels like some piecewise linear function could do the trick, but I can't figure out, how to build it.