The only solution is f(x)=x for any x∈R.
Using f(x+1)=f(x)+1, it can be proved easily by induction that
f(x+n)=f(x)+n(1)
for any integer n.
Consider any rational number ba where a,b∈Z. For any positive integer k, we substitute x=ba+kb2 in (ii) to obtain
f(b3a3+3ka2+3k2ab3+k3b6)=f(x3)=f(x)3.
Since k,a,b∈Z, by (1), we obtain
f(b3a3+3ka2+3k2ab3+k3b6)=f(b3a3)+3ka2+3k2ab3+k3b6.
Also, by letting z=f(ba), we have
f(x)3=(z+kb2)3=z3+3kb2z2+3k2b4z+k3b6.
Comparing the two sides, since f(b3a3)=z3, we find that
3ka2+3k2ab3=3kb2z2+3k2b4z.
This implies b2z2+kb4z−a2−kab3=0, and hence
(bz−a)(bz+a+kb3)=0.
Since b=0, we cannot have bz+a+kb3=0 for all k∈Z+. Therefore, we must have bz−a=0, i.e. z=ba. This proves f(x)=x for any x∈Q.
Since Q is dense in R, for any x∈R, we can find a sequence {xn} of rational numbers converging to x. By the continuity, we have
f(x)=f(n→∞limxn)=n→∞limf(xn)=n→∞limxn=x.
It is easy to check that the identity function satisfies both conditions, so it is the only solution.