Let $f: \mathbb{R} \to \mathbb{R} $ be a function such that $f(0)$ is rational and for real numbers $x$ and $y$ $$f \big(x+(f(y))^2 \big)=(f(x+y))^2$$ Find all functions satisfying above conditions.
My try:
Let $a \in \mathbb{R}$ be a number such that $f(a)=0$ and let $x=0$, $y=a$ in the equation, then $$f(0)=f(a)^2=0$$
Now let $y=0$, then
$$f (x)=(f(x))^2$$ Thus $f(x)=0, 1$.
Is this correct?
Edit: Considering @Travis's comment the above argument is not correct.
Let $f(0)=a$ and let $x=y=0$ in the equation, then $f(a^2)=a^2$. Now let $x=a^2$ and $y=0$, then $$f(2a^2)=(f(a^2))^2=a^4$$Once again let $x=2a^2$ and $y=0$, then $$f(3a^2)=(f(2a^2))^2=(a^4)^2=a^8$$Hence induction will show that $$f(na^2)=a^{2^n}$$For $n \in \mathbb{N}$. Any ideas how to proceed?
This answer is now complete: the only such $f$ are the constant $0$ and the constant $1$.
Things in block quotes will be true regardless of the assumptions made in the surrounding text.
As you point out,
Clearly $f=0$ is a solution. Otherwise, suppose $f(y)=1$. Then for all $x$, $f(x+1) = f(x+y)$, so letting $x=1$ we have $f(y-1) = 0$. [Call this property
DECREMENT.]On the other hand, whenever $f(y) = 0$ we have $f(x) = f(x+y)$ for all $x$. Therefore $f(x) = f(x+yn)$ for all $x$ and for all $n \in \mathbb{Z}$. [Call this property
TRANSLATE, and if $y$ is fixed with $f(y)=0$, letTRANSLATE(n)denote the fact that $f(x) = f(x+yn)$ for all $x$.]So suppose $f(0) = f(1) = 0$, and $f(y) = 1$. Then $f(y-1) = 0$ (
DECREMENT) but also $f(y-1) = f(y-1+1)$ (TRANSLATE(1)) which is $f(y) = 1$, a contradiction.So if $f(0) = 0$ but $f$ is nonzero, then $f(1) = 1$. Hence $f(2) = 0$ (since if not, it would be $1$ and hence we would have $f(2-1) = 0$ by
DECREMENT), and so $f(x) = f(x+2n)$ for all $x$ and all $n \in \mathbb{Z}$. That is, $f$ is defined by its values on $(-1, 1]$.Moreover, in that case $f\left(\frac{1}{n}\right) = 1$ for all $n>1$ because if $f\left(\frac{1}{n}\right) = 0$ then $0 = f(0) = f\left(0+\frac{1}{n} \times n \right)$ by
TRANSLATE(n), which is $f(1) = 1$, a contradiction.This means that $f\left(\frac{1}{n}-1\right) = 0$ for $n>1$, so for all $x \in \mathbb{R}, m \in \mathbb{Z}, n > 1$ we have $f(x) = f(x+m(\frac{1}{n}-1))$ by
TRANSLATE(m); in particular, letting $x=m$ we have $f(m) = f(\frac{m}{n})$ for all $m \in \mathbb{Z}, n > 1$. So letting $m=3n$, we have $f(3) = f(3n)$ for all $n > 1$; but $f(3) = f(1) = 1$ byTRANSLATE(2)and so $f(3n) = 1$. Letting $n=2$, we obtain $f(6) = 1$, but we already know $f(2k) = 0$ for all $k$ byTRANSLATE(2), so we obtain a contradiction.If ever $y = f(y)^2$, then $f(x+y) = f(x+y)^2$ for all $x$, so $f(x) \in \{0,1\}$ for all $x$. So it has a root unless it's the constant $1$ function.
In particular,
If $y$ is such that $f(y) = 1$, then $f(x+1) = f(x+y)^2$ for all $x$, so letting $x=y-1$ we obtain $1 = f(y) = f(1)^2$, so $f(1) = 1$ or $f(1) = -1$ (the latter being a contradiction). That is:
Note that by letting $x=0$, we see that $f$ has a fixed point at $f(y)^2$ for every $y$.
So, letting $y=0$, we obtain $f(x+f(0)^2) = f(x)^2$, which means that $f(x+f(0)^2)$ is a fixed point of $f$ for every $x$.
In particular, letting $x=-f(0)^2+z$,
Also let $x = y-f(y)^2$ to obtain
And let $x=0$ to obtain $f(f(y)^2) = f(y)^2$; that is, the square of anything in the range of $f$ is a fixed point of $f$, or
Now, let $x=f(y)^2$ and $y=0$ to obtain $$f(2a^2) = f(a^2)^2$$ where $a=f(0)$; so $f(2a^2) = a^4$ since the square of a fixed point $a$ is a fixed point $a^2$.
Let $x=\bar{x}, y=\bar{x}$ where $\bar{x}$ is a fixed point, to obtain $f(\bar{x} + f(\bar{x})^2) = f(2\bar{x})^2$, or $f(\bar{x} + \bar{x}^2) = f(2 \bar{x})^2$.
Let $x = \bar{x}^2, y=\bar{x}$ to obtain $f(\bar{x}^2+f(\bar{x})^2) = f(\bar{x}+\bar{x}^2)^2$.
Combining those facts, obtain:
And let $x=a^2, y=0$ to obtain $f(2a^2) = f(a^2)^2$, so $f(2a^2) = a^4$ since $a^2$ is a fixed point, so by the previous fact, $a^4 = f(2a)^4$; since $a=f(0)$ is in the range of $f$, and since $f$ is always positive, we have:
Now, we prove by induction that $f(na) = a$. Indeed, let $y=na$ and $x=a$. Then $$f(a+f(na)^2) = f(a(n+1))^2$$ which by inductive hypothesis means $$f(a+a^2) = f(a(n+1))^2$$ But we already know that $f(a+a^2) = f(2a)^2$ because that's just the definition of $f$ with $x=a, y=a$; so $f(a(n+1))^2 = f(2a)^2$, which we already know is $a$.
So
Let $n = m a$ to obtain:
In particular, let $a=\frac{p}{q}$, and let $m=q$, to obtain $f(qa^2) = a$.
But you have already shown that $f(ma^2) = a^{2^m}$ for every $m$, so we have $a = a^{2^q}$. That is, $a=0$ or $a=1$ (since $m \not = 0$); so $f$ hits $0$ or $1$.