Solution by gghx.
We claim the only solution is f(x)≡x, which obviously works. We now show it is the only solution. Let P(x,y) denote the assertion that f(x+f(y)2)=f(x)+y2.
Note that P(0,y):f(f(y)2)=f(0)+y2 and P(−f(y)2,y):f(−f(y)2)=f(0)−y2. This shows that f is surjective.
We can rewrite the original equation as f(x+f(y)2)=f(x)+f(f(y)2), and since f is surjective this means f(x+y2)=f(x)+f(y2).
Let Q(x,y) denote the assertion that f(x+y2)=f(x)+f(y2).
Q(0,0):f(0)=0.
Q(−y2,y):f(−y2)=−f(y2), so f is odd.
Hence, f(x+y)=f(x)+f(y) for all reals x,y.
Note that f(y4)=f(f(f(y)2)2)=f(y)4. Hence, f is bounded below by 0 over the positive reals, and is thus linear. The only linear function that works is f(x)=x.