Solution by jasperE3.
f(x2+xy)=f(x2)+f(x)f(y).
P(0,0)⇒f(0)=0.
P(1,x)⇒f(x+1)=f(1)f(x)+f(1).
P(1,−1)⇒f(1)(1+f(−1))=0.
If f(1)=0, then P(1,x−1)⇒f(x)=0 which is a solution.
Otherwise assume f(−1)=−1.
P(1,1)⇒f(2)=f(1)2+f(1).
P(−1,2)⇒f(1)∈{1,−1}.
Case 1: f(1)=1
P(1,x)⇒f(x+1)=f(x)+1.
P(x,y+1)⇒f(x2+xy+x)=f(x2)+f(x)f(y)+f(x)⇒f(x2+xy+x)=f(x2+xy)+f(x).
For x=0, x2+xy can take any value, so f(x+y)=f(x)+f(y) for all x=0, but it’s also true for x=0.
Original equation becomes f(xy)=f(x)f(y) and it’s well-known that the only not allzero additive and multiplicative function is f(x)=x.
Case 2: f(1)=−1
P(1,x)⇒f(x+1)=−f(x)−1⇒f(x+2)=−f(x+1)−1=f(x).
P(x,y+2)⇒f(x2+xy+2x)=f(x2)+f(x)f(y)=f(x2+xy).
For x=0, x2+xy can take any value, so f(2x+y)=f(y) for all x=0, but it’s also true for x=0. Therefore f is constant, no further solutions appear after testing.