f(y)=y2 for all y; or, for some positive integer n and integers c0,c1,…,cn−1 with
cr≡r2−r(modn)(0≤r≤n−1),
the function f(y)=y+cr, where r is the remainder of y modulo n.
Equivalently: there is an integer n≥0 such that f(y)−y is periodic with period n and f(y)≡y2(modn) for all y (for n=0, read “period 0” as no condition and “mod0” as equality). For example, n=1 gives f(y)=y+c, and n=2 gives f(y)=y for even y and f(y)=y+2 for odd y.
Proof
Put h(x)=f(x)−x and d(y)=y2−f(y).
Claim 1. The equation is equivalent to
h(x+d(y))=h(x)for all x,y.(1)
Proof. Subtracting x+y2+f(y) from both sides, the equation becomes h(x+y2)=h(x+f(y)) for all x,y. Replacing x by x−f(y) gives (1), and every step is reversible.
So the problem asks for all f such that every number d(y) is a period of h.
Claim 2. There is a unique integer n≥0 such that the periods of h are exactly nZ, and then
f(y)≡y2(modn)for all y.(2)
Proof. Let G be the set of all periods of h, i.e. the integers g with h(x+g)=h(x) for all x. It is closed under addition and negation, so G is a subgroup of Z and G=nZ for a unique n≥0. Condition (1) says exactly d(y)∈nZ for all y, which is (2).
Case n=0. Then d(y)=0 for all y, so f(y)=y2.
Case n≥1. Then h has period n, so h(y)=cr depends only on the remainder r of y modulo n, and f(y)=y+cr. By (2) with y=r, cr≡r2−r(modn).
Verification.f(y)=y2 gives d≡0, so (1) holds. If f(y)=y+cr with cr≡r2−r(modn), then h has period n, and for y≡r(modn),
d(y)=y2−y−cr≡r2−r−cr≡0(modn),
so d(y) is a period of h and (1) holds. ■
Solved it another way? Send a written solution to [email protected]. The most interesting solution, with the solver's name, will be posted.