Functional equation $f(x)=f(\sqrt{x})$ If we take an equation $f(x)=f(\sqrt{x})$ defined for positive $x$ then it is quite easy to see that it is constant; $f(x)=f(0)$ if continuous at zero.
My question is: What would happen if we take $f$ to have a discontinuity at zero? Do we simply get a constant function everywhere but zero, or does the answer change completely? 
 A: If you don't need continuity at $1$, you can define it as follows.
Given any periodic function $h(x)$, so that $h(x)=h(x+1)$. Then define for $x>1$:
$$f(x)=h(\log_2\log_2 x)$$
Define $f(x)=f(1/x)$ if $x<1$.
Then $$f(\sqrt x) = h(\log_2 (1/2 \log_2 x))=h(-1 + \log_2\log_2 x) = h(\log_2\log_2 x) = f(x)$$
(You could actually use two periodic functions, $h_1$ and $h_2$, and use one for $x<1$ and the other for $x>1$.)
A: Your original statement is not quite right.  Instead, we have


*

*If $f$ is continuous at $0$, then $f$ is constant on $[0, 1)$.

*If $f$ is continuous at $1$, then $f$ is constant on $(0, \infty)$.

*If $f$ is continuous at $\infty$ (i.e. $f(x)$ has a limit as $x \to \infty$)
then $f$ is constant on $(1, \infty)$.
If you do not require $f$ to be continuous at one of these three points, $f$
could be very irregular.
See this as follows:


*

*Define a function $g: \mathbb{R} \to \mathbb{R}$ however you please on $(1, 2]$ and $[-2, -1)$.  Also define $g(0)$ however you please.

*Let $g(2x) = g(x)$ for all $x$.

*Finally, let $f(x) = g(\ln x)$ for $x > 0$, and let $f(0)$ be whatever you want.
A: How about this: Let $\sim$ be an equivalence relation defined by $a \sim b$ provided there exists an $n \in \mathbb{Z}$ so that $a^{(1/2)^n}=b$, and let $\pi: \mathbb{R}^{\geq 0} \to \mathbb{R}^{\geq 0}/\sim$ be the standard $x \mapsto [x]$ map. You can define a map $j: \mathbb{R}^{\geq 0} / \sim \to \mathbb{R}^{\geq 0}$ however you want, for example, if $\mathbb{Q} \cap [x] \neq \varnothing$ then $j([x])=0$, and otherwise $j([x])=1$. Then you can see what sort of properties the map $j\pi$ has.
