Solution by jasperE3.
f(xf(x)+yf(y))=xf(x)+f(y)2.
The obvious thing to do is to swap x,y, it divulges that xf(x)+f(y)2=yf(y)+f(x)2 so f(x)2=xf(x)+f(0)2. Also, P(0,0)⇒f(0)2=f(0), so we may write f(x)2=xf(x)+f(0) instead.
Now square both sides of P(x,y), we get:
x2f(x)2+xyf(x)f(y)+xf(x)f(y)2+yf(y)3+f(0)=(xf(x)+yf(y))(xf(x)+f(y)2)+f(0)=(xf(x)+yf(y))f(xf(x)+yf(y))+f(0)=f(xf(x)+yf(y))2=(xf(x)+f(y)2)2=x2f(x)2+2xf(x)f(y)2+f(y)4
which, after some simplification, is:
xyf(x)f(y)+yf(y)3+f(0)=xf(x)f(y)2+f(y)4.
Setting x=y=0 gives f(0)4=f(0), so f(0)∈{0,1}. If f(0)=1, setting just y=0 gives xf(x)=0. In particular, f(1)=0, but then P(0,1)⇒1=0, contradiction. Sof(0)=0, and setting x=0, we have f(y)4=yf(y)3 so f(x)∈{0,x} for each x. Finally, note that if f(a)=a and f(b)=b then P(a,b)⇒f(a2+b2)=a2+b2, so our solutions are of the form f(x)={x0if x∈Sif x∈/S where {0}⊆S⊆R satisfies the closure property that if a,b∈S then a2+b2∈S. To see that all such functions satisfy the equation, we just takes cases on whether x or y are in S.
If x,y∈S, then P(x,y)⇔f(x2+y2)=x2+y2, true because x2+y2∈S.
If x∈S and y∈/S, then P(x,y)⇔f(x2)=x2, true because x2+02∈S.
If x∈/S and y∈S, then P(x,y)⇔f(y2)=y2, true because y2+02∈S.
If x,y∈/S, then P(x,y)⇔f(0)=0, true because 0∈S.