Can anyone help me with this?
If, in a functional equation problem, I do some substitutions and found out that $f\Bigl(\bigl(x+f(x)\bigr)^2\Bigr) = \bigl(x+f(x)\bigr)^2$, in which $f(x)$ is a function that maps a real number to a real number $(f:\mathbb{R}\to\mathbb{R})$, can we imply that $f(x)$ is surjective over the positive reals?
Thanks for any help.
Define $f\colon \Bbb R\to\Bbb R$ as $$f(x)=\max\{x,1,1-x\}=\begin{cases}x&x\ge1\\1&0\le x\le 1\\1-x&x\le 0\end{cases} $$ Then $$f((x+f(x))^2) = (x+f(x))^2 $$ holds for all $x\in \Bbb R$. Indeed, for $x\le 0$, we have $$f((x+f(x))^2)=f((x+(1-x))^2)=f(1)=1=(x+(1-x))^2.$$ For $0\le x\le 1$, we have $$f((x+f(x))^2)=f(\underbrace{(x+1)^2}_{\ge1})=(x+1)^2=(x+f(x))^2. $$ For $x\ge 1$, we have $$f((x+f(x))^2)=f(\underbrace{4x^2}_{>1})=4x^2=(x+f(x))^2.$$
Clearly, $f(x)\ge1$ for all $x$, so that the desired surjectivity over the positive reals does not hold.