Solution by AIME4096.
We claim that the complete solution set is precisely the family of functions obtained as follows. Let T be a set of real numbers, and for each t∈T, let Bt⊆R be a set such that the collection Bt−t:t∈T is a partition of R. Let S=⋃t∈TBt, and suppose that a∈Bt, b∈S⟹a(1+b)∈Bt for every t∈T. Define f:R→R by f(x)=x+t whenever x∈Bt−t. Then f satisfies f(x+f(x)f(y))=f(x)+f(x)f(y) for all x,y∈R, and every solution arises in exactly this way. We now prove this characterization. Let P(x,y) denote the assertion f(x+f(x)f(y))=f(x)+f(x)f(y).
Lemma 1. For a function f:R→R, define g(x)=f(x)−x. Then P(x,y) is equivalent to g(x+f(x)f(y))=g(x) for all x,y∈R.
Proof. We have
g(x+f(x)f(y))=f(x+f(x)f(y))−(x+f(x)f(y))=f(x)+f(x)f(y)−x−f(x)f(y)=f(x)−x=g(x)..
Thus P(x,y) implies the stated identity. Reversing the calculation shows that the stated identity implies P(x,y). Hence the two conditions are equivalent. □
Lemma 2. Let T=g(R), and for each t∈T define At=x∈R:g(x)=t. Then the sets At form a partition of R, and for every x∈At, f(x)=x+t.
Proof. Since T is the image of g, every x∈R belongs to at least one set At. Since g(x) has a unique value, x belongs to exactly one such set. Thus the At form a partition of R. If x∈At, then g(x)=t, so f(x)−x=t, and therefore f(x)=x+t. □
Lemma 3. For each t∈T, define Bt=f(At). Then At=Bt−t, and if a∈Bt and b∈f(R), then a(1+b)∈Bt.
Proof. Let a∈Bt. Then there exists x∈At such that f(x)=a. Since x∈At, Lemma 2 gives f(x)=x+t, so a=x+t, and hence x=a−t. Thus Bt−t⊆At. Conversely, if x∈At, then f(x)∈Bt, and Lemma 2 gives x=f(x)−t, so x∈Bt−t. Hence At=Bt−t. Now let a∈Bt and b∈f(R). Choose x∈At and y∈R such that f(x)=a,f(y)=b. By Lemma 1, g(x+f(x)f(y))=g(x), so g(x+ab)=t. Thus x+ab∈At. Applying f and using P(x,y),
f(x+ab)=f(x)+f(x)f(y)=a+ab=a(1+b)..
Since x+ab∈At, its image belongs to Bt. Therefore a(1+b)∈Bt. □
Lemma 4. Every solution f can be reconstructed from the sets Bt of Lemma 3 by f(x)=x+t∀x∈Bt−t.
Proof. By Lemma 3, the sets Bt−t are exactly the sets At, and these sets partition R. If x∈Bt−t=At, then Lemma 2 gives f(x)=x+t. Thus the original function is completely determined by the family (Bt)t∈T. □
Lemma 5. Conversely, suppose that T and the sets Bt satisfy Bt−t:t∈T is a partition of R and a∈Bt, b∈S:=⋃t∈TBt⟹a(1+b)∈Bt. Define f by f(x)=x+t whenever x∈Bt−t. Then f satisfies P(x,y).
Proof. Because the sets Bt−t form a partition of R, the definition of f is well-defined. Fix arbitrary x,y∈R. Let t∈T be the unique element such that x∈Bt−t. Then there exists a∈Bt such that x=a−t. Hence, by definition, f(x)=a. Since f(y)∈S, the assumed closure property gives a(1+f(y))∈Bt. Therefore a(1+f(y))−t∈Bt−t. But, note that
a(1+f(y))−t=a+af(y)−t=x+f(x)f(y)..
Thus x+f(x)f(y)∈Bt−t. By the definition of f,
f(x+f(x)f(y))=x+f(x)f(y)+t=(x+t)+f(x)f(y)=f(x)+f(x)f(y)..
Hence P(x,y) holds for every x,y∈R. □
Therefore the complete solution set is
f(x)=x+t∀x∈Bt−t,
where Bt−t:t∈T is a partition of R and
a∈Bt, b∈t∈T⋃Bt⟹a(1+b)∈Bt.
Note that this characterization is necessary and sufficient, so it describes every solution and no others as desired. ■