Solution by jasperE3.
f(f(x)2+f(x)f(y))=x2+f(xy).
If f(a)=f(b):
P(a,1)⇒f(f(a)2+f(a)f(1))=a2+f(a).
P(b,1)⇒f(f(a)2+f(a)f(1))=b2+f(a)
so a2=b2.
Claim: f(x)=x for all x≥0.
P(0,0)⇒f(2f(0)2)=f(0)⇒4f(0)4=0⇒f(0)=0.
Similarly, if f(k)=0 for any k then k=0.
P(x,0)⇒f(f(x)2)=x2.
From this equation, we obtain two things: that [0,∞)⊆f(R) and that:
f(x4)=f(f(f(x)2)2)=f(x)4.
Substituting x=1, the last equation turns into f(1)4=f(1), and since f(1)=0, f(1)=1.
P(1,x)⇒f(f(x)+1)=f(x)+1, and since f(x)+1 can take any value ≥1 we have f(x)=x for all x≥1.
For 0<x<1 we have, for large enough y, y>1 and y2+yf(x)>1 and xy>1 and so:
P(y,x)⇒y2+yf(x)=y2+xy⇒f(x)=x.
So whether x=0, 0<x<1, or x≥1 we have f(x)=x.
Now f(f(x)2)=x2 becomes f(x)2=x2 and so f(x)∈{−x,x}.
If f(−k)=k for some k>0 then:
P(x,k)⇒f(f(x)2+kf(x))=x2+f(xk).
P(x,−k)⇒f(f(x)2+kf(x))=x2+f(−xk)
and so comparing, f is even and we get the solution f(x)=∣x∣ which indeed fits.
If there is no such k, then f(x)=x for all x.