Solution by jasperE3/sqing-inequality-BUST/ja..
f(f(x)2+f(xy))=x2+f(x)f(y).
If f(a)=f(b):
P(a,1)⇒f(f(a)2+f(a))=a2+f(a)f(1).
P(b,1)⇒f(f(a)2+f(a))=b2+f(a)f(1)
so a2=b2.
Claim: f(x)=x for all x≥0.
P(0,x)⇒f(f(0)2+f(0))=f(0)f(x), if f(0)=0 then f is constant, but no constant solutions exist. Therefore we must have 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 xy>1 and so:
P(x,y)⇒f(x)2+xy=x2+yf(x), varying y we find that 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}.
For x≤0:
P(−1,x)⇒f(−1)f(x)=−x, and since f(−1)∈{1,−1} this gives us the two solutions f(x)=∣x∣ (which indeed satisfies the equation) and f(x)=x.