Let f:R->R be such that f(x+y)=f(x)+f(y) and f(x.y)=f(x).f(y), x,y R. Prove that f(x)=0 or f(x)=x, x R.
It doesn't have to be continuous. It has already been shown that f(1)=1. Let x be a positive rational number. Then there is an integer p and a positive integer q such that x = p/q.
Therefore f(x) = f(p/q) = f(p)*f(1/q)
But
Furthermore, we can use a trick to show that f(1/q) = 1/q.
Ok. Now it is your turn:
i) Why is f(x) positive for all positive x?
ii) Why is f(x) monotonically increasing?
iii) Why is f(x)=x even for x in R\Q?
We don't need to assume the continuity of f.
i) f(x) is positive whenever x is positive.
Proof. Since x is positive, x has a positive square root, say, y = sqrt(x). Then
f(x) = f(y)*f(y) > 0 for all positive x.
ii) f(x) is monotonically increasing.
Proof. In fact, if y > x then y - x > 0, and, by proposition i), f(y-x) = f(y)-f(x) > 0 => f(y)>f(x).
iii) f(x)=x for all x in R.
Proof. Suppose f(x) < x for some x in R. There is, however, a rational number y such that f(x) < y < x. But y < x implies y = f(y) < f(x), i.e., f(x)<y<f(x), a contradiction.
You misunderstood me. I am not saying we need to have that is continuous. I am saying that we can show that is continuous at and thus with a little work it is continuous at all points. And thus, by the fact that and then we see that and since is dense in and a continuous function is determined on a dense subset the conclusion follows.
Your proof is equally good thought, good job!