$f(x^2) = 2f(x)$ and $f(x)$ continuous

I ran into a problem recently where I obtained the following constraint on a function. $$f(x^2) = 2f(x) \,\,\,\, \forall x \geq 0$$ and the function $f(x)$ is continuous. Can we conclude that $f(x)$ is of following form? $$f(x) = \begin{cases} a\log(x) & \text{for } x \geq 1\\ 0 & \text{for }x \in [0,1]\end{cases} \tag{$\star$}$$ where $a \in \mathbb{R}$. It is easy to conclude for $x \in [0,1)$ it should be zero, since $f(0) = 0$ and $f(x) = \dfrac{f(x^{2^n})}{2^n}$. Now letting $n \to \infty$, thanks to continuity, we can conclude that $f(x) = 0$ for $x \in [0,1)$.

But how do I show $(\star)$ for $x \geq 1$? If not under what further constraints, will I be able to conclude ($\star$)? This is similar to the Cauchy functional equation $f(xy) = f(x) + f(y)$, but with $y=x$.


The answer is no: the given condition is enough weaker than the Cauchy functional equation that other solutions exist. In brief, one can prescribe essentially arbitrary values on a fixed interval of the form $[t,t^2]$ and then extend the function "periodically".

For example, note that every real number $x>1$ can be written uniquely as $x=e^{2^k y}$, where $k$ is an integer and $y\in[1,2)$. Let $h\colon [1,2]\to\mathbb R$ be any continuous function with $h(2)=2h(1)$, and define $$ f(x) = \begin{cases} 0, &\text{if } 0\le x\le 1, \\ 2^k h(y), &\text{if } 1<x=e^{2^ky} \text{ as above}. \end{cases} $$ Then $f$ has the required property.

Here's a graph of $f(x)$ when $h(y) = |y-7/5|-1/5$:

funny graph

Note for example the value $f(4) \approx f(e^{7/5}) = -1/5$ and the related values $f(16) \approx f(e^{14/5}) = -2/5$, $f(2) \approx f(e^{7/10}) = -1/10$, and $f(\sqrt2) \approx f(e^{7/20}) = -1/20$.


By change of variable, what we have (equivalently) is the following problem:

If $g(x)$ is a continuous function on $x\geq 0$, and $$g(2x)=2g(x).$$ Then, does it follow that $g(x)=g(1)x$ for all $x\geq 0$?

The answer is NO. Dividing the functional equation by $2x$, we have $$\frac{g(2x)}{2x}= \frac{g(x)}{x},$$ for all $x>0$.

Then $g(x)=xh(x)$ where $h$ satisfies the functional equation: $$h(2x)=h(x),$$ for all $x>0$.

This can give a lot of solutions other than constant functions. For example, $$h(x)=2^{-n}x, \textrm{ if $x\in [2^n, 2^n+2^{n-1}]$}\\ -2^{-n}(x-2^{n+1})+1, \textrm{ if $x\in [2^n+2^{n-1}, 2^{n+1}]$} $$


Let $\begin{cases}x_1=\log_2x\\f_1(x_1)=f(x)\end{cases}$ ,

Then $f_1(2x_1)=2f_1(x_1)$

Let $\begin{cases}x_2=\log_2x_1\\f_2(x_2)=f_1(x_1)\end{cases}$ ,

Then $f_2(x_2+1)=2f_2(x_2)$

$f_2(x_2)=\Theta(x_2)2^{x_2}$ , where $\Theta(x_2)$ is an arbitrary periodic function with unit period

$f(x)=\Theta(\log_2\log_2x)\log_2x$ , where $\Theta(x)$ is an arbitrary periodic function with unit period