We will show that f(x)=x for all x. Substituting 0 for x in ∗ we obtain
(1)f(f(y)+1)=y+(f(1))2.
Then substituting 0 for x and f(y)+1 for y in ∗ and using (1) we get
f(y+(f(1))2+1)=f(y)+1+(f(1))2
and now substituting x2+y for y gives
f(x2+y+(f(1))2+1)=f(x2+y)+1+(f(1))2.
Now using (1) and ∗ for the left hand side we get
f(y)+1+(f(1+x))2−2x=f(x2+y)+1+(f(1))2
and hence
(2)f(x2+y)−f(y)=(f(x+1))2−2x−(f(1))2.
In particular,
(3)f(x2+y)−f(y)=f(x2)−f(0).
Now letting y=0 and x=1, y=0 and x=−1, and y=1 and x=1 in (2) we obtain (f(2))2−2−(f(1))2=f(1)−f(0)=(f(0))2+2−(f(1))2 and f(2)=2f(1)−f(0).
(4)f(x2+y)=f(x2)+f(y)
and hence
(5)f(x+y)=f(x)+f(y)
for all x and y. Combining (4) with (1) we also get
f(f(y))=y
for all y, and using this and (5) we obtain
(6)f(x2)+2x=(f(x))2+2f(x)
from ∗. Now using the equations obtained by substituting y+f(x), f(x) and y for x in (6) gives f(2yf(x))=2xf(y) for all x and y. Using (5) we get f(yf(x))=xf(y), and hence f(xy)=f(x)f(y) for all x and y. In particular, f(x2)=f(x)2 for all x and now (6) gives f(x)=x for all x.