Solution by jasperE3.
Find all functions f:R→R such that
f(f(x)2+f(y))=xf(x)+f(y)
for all x,y∈R.
Claim: f(x)∈{0,x} for all x.
P(−1,−1)⇒f(k)=0 for k=f(−1)2+f(−1).
P(k,k)⇒f(0)=0.
P(0,x)⇒f(f(x))=f(x).
P(f(x),y)⇒f(f(x)2+f(y))=f(x)2+f(y), comparing with P(x,y) gives f(x)2=xf(x) hence the claim.
Let S={x∈R∣f(x)=x} with 0∈S. Easy to see from the equation that if x,y∈S then x2+y∈S.
Solution set is f(x)={x0if x∈Sif x∈/S with {0}⊆S⊆R closed under (x,y)↦x2+y, this is equivalent to the original equation. As BlazingMuddy pointed out, there are nontrivial examples, for instance S=(−1,∞), S=[0,∞), S={0}∪[1,∞), S=N, S=3Z, S=Q∩({0}∪[2,3]∪[4,∞)), so we don’t think theres a better way to characterize it.