Solution by jasperE3.
Let P(x,y) denote
f(f(x)+f(y2))=x+f(y)2.
If f(u)=f(v), then comparing P(u,y) and P(v,y) gives u=v, so f is injective. Let a=f(0). From P(x,0),
f(f(x)+a)=x+a2,
so f is surjective.
Next,
P(0,y):f(a+f(y2))=f(y)2,
while
P(f(y)2−a2,0):f(f(f(y)2−a2)+a)=f(y)2.
By injectivity,
f(y2)=f(f(y)2−a2),
and then injectivity again gives
f(y)2=y2+a2.
Because f is surjective, some y has f(y)=0, forcing a=0. Thus f(f(x))=x and f(y)2=y2 for all x,y.
With a=0, substituting x↦f(x) gives
f(x+f(t))=f(x)+t(t≥0).
For every t≥0, we know f(t)=t or f(t)=−t. There cannot be positive u,v with f(u)=u and f(v)=−v: otherwise the last identity with x=−v and t=u gives
f(u−v)=f(−v)+u=u+v,
contradicting f(u−v)2=(u−v)2. Hence the sign is constant on the positive reals, and f(f(x))=x then determines the negative reals as well.
Thus the only solutions are
f(x)=x for all xandf(x)=−x for all x.
Both are easily verified in the original equation.