Solution by jasperE3.
f(xf(x)+f(y)2)=f(x)2+y2.
Let c=f(0).
Claim: if af(a)=bf(b) then a2=b2.
P(a,0)⇒f(af(a)+c2)=f(a)2.
P(b,0)⇒f(bf(b)+c2)=f(b)2.
Comparing, f(a)2=f(b)2.
P(0,a)⇒f(f(a)2)=c2+a2.
P(0,b)⇒f(f(a)2)=c2+b2.
Comparing, a2=b2.
Claim: f(0)=0, f(1)=1.
P(0,0)⇒f(c2)=c2.
P(c2,0)⇒f(c4+c2)=c4.
P(0,c2)⇒f(c4)=c4+c2.
So we can apply the first claim on c4+c2 and c4 to get (c4+c2)2=c8 with only solution c=0.
P(0,x)⇒f(f(x)2)=x2, so we obtain:
f(x4)=f(f(f(x)2)2)=f(x)4.
In particular, f(1)=f(1)4 so f(1)∈{0,1}. f(1)=0 would give P(1,1)⇒0=1, so we must have f(1)=1.
Claim: f is odd.
Recall that if f(a)2=f(b)2 then a2=b2 (from the first claim). So:
P(0,x)⇒f(f(x)2)=x2.
P(0,−x)⇒f(f(−x)2)=x2, so f(x)4=f(−x)4 which implies f(−x)2=f(x)2.
P(x,f(y)2)⇒f(xf(x)+y4)=f(x)2+f(y4).
P(−x,f(y)2)⇒f(−xf(−x)+y4)=f(x)2+f(y4), so (xf(x)+y4)2=(−xf(−x)+y4)2 and so xf(x)=−xf(−x). Combined with f(0)=0, this implies f is odd.
Claim: xf(x)≥0 for all x.
Suppose uf(u)<0 for some u. From f(f(x)2)=x2, f takes any nonnegative value, so there is some v with uf(u)+f(v)2=0. Then:
P(u,v)⇒0=f(u)2+v2⇒f(u)=0, contradiction.
From f(xf(x)+y4)=f(x)2+f(y4) the equation transforms into #199:
Q(x,y):f(x+yf(y))=f(x)+f(y)2
for all x≥0.
Claim: f(x+y+f(y))=f(x)+2f(y) for all x,y>0.
Take x,y>0:
Q(y,1)⇒f(y+1)=f(y)+1.
Q(x,y+1)⇒f(x+yf(y)+y+f(y)+1)=f(x)+f(y)2+2f(y)+1.
Note that f(y)≥0 from yf(y)≥0, so x+y+f(y)+1≥0 which allows us by Q(x+y+f(y)+1,y) to simplify this to:
f(x+y+f(y)+1)=f(x)+2f(y)+1.
Again, x+y+f(y)≥0 so by Q(x+y+f(y),1) we have:
f(x+y+f(y))=f(x)+2f(y)
as desired.
Claim: f(x)=x for all x>0.
If f(k)=0 then P(0,k)⇒k=0, so P(0,x)⇒f(f(x)2)=x2 implies (0,∞)⊆f(R+).
Recall that f(x+1)=f(x)+1 for all x≥0 by Q(x,1), it allows us to say that f(x+n)=f(x)+n for all x>0 and n∈Z≥0 (induction).
Then in f(x+y+f(x))=2f(x)+f(y), set y=n−f(x)>0 for some large enough n∈Z≥0, the equation becomes:
f(x)+n=f(x+n)=2f(x)+f(n−f(x))⇒f(n−f(x))=n−f(x).
Take any u>0, we can find some x for which f(x)=1−{u} since f takes every nonnegative value, and by the above equation for n=⌊u⌋+1 we have n−f(x)=u>0 and so:
f(n−f(x))=n−f(x)⇒f(⌊u⌋+{u})=⌊u⌋+{u}.
Finally, oddness gives f(x)=x<0 and so f(x)=x for all x whether x>0, x=0, or x<0.