Solution by maromex.
Let P(x,y) be the given assertion f(f(x2)+f(y2))=x2+f(y)2.
Comparing P(x,y) and P(y,x) we get x2+f(y)2=y2+f(x)2. This means [f(x)^2 = x^2+C] for some real constant C.
P(x,x):f(2f(x2))=x2+f(x)2=2x2+C.
So we have
(2x2+C)2=f(2f(x2))2=4f(x2)2+C=4x4+5C
for all real x. The polynomials (2x2+C)2 and 4x4+5C must have the same x2 coefficient, so 4C=0. This means C=0 and so
f(x)2=x2
for all real x. Plugging this into the given assertion we get
f(f(x2)+f(y2))=x2+y2
(x2+y2)2=f(f(x2)+f(y2))2=(f(x2)+f(y2))2=f(x2)2+2f(x2)f(y2)+f(y2)2=x4+2f(x2)f(y2)+y4.
This means 2f(x2)f(y2)=2x2y2, which means f(x)f(y)=xy for any x,y>0. Note that f(x)2=x2 means f(x)∈{x,−x} for all real x. We now have f(x)=x for all x>0 or f(x)=−x for all x>0.
Case 1: f(x)=x for all x>0
Using this and f(x)2=x2 for all real x, the given equation becomes f(x2+y2)=x2+y2, which is true as x2+y2≥0 (note that f(0)=0 too). We get
f(x)={xxg(x)x≥0x<0
where g:(−∞,0)→{−1,1} is any function.
Case 2: f(x)=−x for all x>0
Using this and f(x)2=x2 for all real x, the given equation becomes f(−x2−y2)=x2+y2. As −x2−y2 takes any nonpositive real value, we have f(x)=−x for all x≤0. So we get f(x)=−x for all real x in this case.
Combining cases, we get f(x)={xxg(x)x≥0x<0 where g:(−∞,0)→{−1,1} is any function, or f(x)=−x for all real x.