Solution by jasperE3.
f(f(x)2+f(x)f(y))=f(x2)+xy.
As before, f is surjective, and also injective since if f(a)=f(b) P(1,a) and P(1,b) give a=b.
P(0,x)⇒f(f(0)2+f(0)f(x))=f(0)⇒f(xf(0)+f(0)2)=f(0).
If f(0)=0, by surjectivity we can choose some x such that f(xf(0)+f(0)2)=0, contradiction.
So f(0)=0.
P(x,0)⇒f(f(x)2)=f(x2)⇒f(x)2=x2⇒f(x)∈{−x,x}.
If f(1)=1, P(1,1)⇒f(2)=0, contradiction so f(1)=1.
P(1,x)⇒f(1+f(x))=1+x⇒f(x+2)=f(1+f(1+f(x)))=f(x)+2.
P(x,y+2)⇒f(f(x)2+f(x)f(y)+2f(x))=f(x2)+xy+2x=f(f(x)2+f(x)f(y))+2x.
Since f is surjective, f(x)2+f(x)f(y) can take any value for fixed x=0 as y varies, so we obtain:
Q(x,y):f(y+2f(x))=f(y)+2x
for all x=0, but also true for x=0.
Q(x,0)⇒f(2f(x))=2x.
Q(2f(x),0)⇒f(4x)=4f(x).
Q(2f(x),y)⇒f(4x+y)=f(4x)+f(y)⇒f(x+y)=f(x)+f(y).
So f is additive, and since f(x)∈{−x,x} means it’s bounded on an interval (for example ∣x∣≤1 for all x∈(−1,1)) we have that f is linear. Since f(x)=−x isn’t a solution we’re left with f(x)=x.