Solution by jasperE3.
f(f(x)2+f(y)2)=xf(x)+f(y)2.
The only such f are of the form
f(x)={x0if x∈Sif x∈/S,
where {0}⊆S⊆R is any set with the closure property that if a,b∈S then a2+b2∈S.
All such f are indeed solutions, by taking cases on whether x∈S and whether y∈S.
Now we prove the form.
P(x,0)⇒f(f(x)2+f(0)2)=xf(x)+f(0)2.
P(0,x)⇒f(f(x)2+f(0)2)=f(x)2.
Comparing, f(x)2=xf(x)+f(0)2.
Squaring both sides of P(x,y) we have:
⇒⇒(f(x)2+f(y)2)f(f(x)2+f(y)2)+f(0)2=(xf(x)+f(y)2)2(f(x)2+f(y)2)(xf(x)+f(y)2)+f(0)2=(xf(x)+f(y)2)2xf(x)3+f(x)2f(y)2+f(0)2=x2f(x)2+xf(x)f(y)2.
and we can set x=y=0 to get f(0)4+f(0)2=0⇒f(0)=0. Therefore f(x)2=xf(x) for all x so if S={x∣f(x)=x} we indeed have {0}⊆S⊆R, f(x)=x for all x∈S, and f(x)=0 for all x∈/S. It remains to show that if a,b∈S then a2+b2∈S, but this is obviously true from the original equation.