Problem 17 in chapter 3 of Spivak book If $f(x)=0$ for all $x$, then f satisfies $f(x+y)=f(x)+f(y)$ for all $x$ and $y$, and also $f(xy)=f(x)f(y)$ for all $x$ and $y$. Now suppose that $f$ satisfies these two properties, but that $f(x)$ is not always $0$. Prove that $f(x)=x$ for all $x$, as follows:
a)Prove that $f(1)=1$.
b) Prove that $f(x)=x$ if $x$ is rational
c) Prove that $f(x)>0$ if $x>0$ (This part is tricky, but if you have been paying attention to the philosophical remarks accompanying the problems in the last two chapters , you know what to do.)
I can do a) and b). However, part c is just weird: It is obvious as daylight: if $x>0$, then by part b), $f(x)>0$, yet Spivak warns me that it is tricky.
So, my question is: What is wrong with my thinking? Is Spivak wrong? I have consulted the answer book and discovered that its way of solving the problem is super weird!
I thank you very much for your answer.
 A: Part (b) says that $f(x)=x$ only for rational $x$ and you need to show that $f(x)>0$ for all real $x>0$. So the requirements are different.
But I think continuity of $f$ is crucial for the above problem. Otherwise it doesn't hold.
A: Nothing guarantees that $f(x) = x$ when $x$ is irrational. Similarly, we don't know that $f(x)$ is continuous. 
To state a direct problem, you might try to show that $f(\pi) \neq -1$. Why not?
A: I disagree with the answers that say continuity is required.
If $x \geq 0$, then write $f(x) = f((\sqrt{x})^2) = f(\sqrt{x})f(\sqrt{x}) \geq 0$.
Now this shows that the function $f$ is increasing: if $x \leq y$, then $y-x \geq 0$, so $f(y) - f(x) = f(y-x) \geq 0$ by the previous statement. Therefore $f(x) \leq f(y)$.
Now let $r$ be any real number. Then for any rational numbers $q$ and $q'$ such that $q \leq r \leq q'$, we have $q = f(q) \leq f(r) \leq f(q') = q'$. If we had $f(r) \ne r$, this would lead to a contradiction by selecting some $q$ or $q'$ between $r$ and $f(r)$. This is something we can do because the set of rational numbers is dense in the set of real numbers.
A: It's funny that you say it's easy. I actually believe it's impossible. We need the fact that every positive real number is square but we don't know this yet. Spivak supports me in this. From the next chapter, page 58:

[...] nonnegative numbers are not yet known to have square roots. This objection is really unanswerable at the moment [...]

The least upper bound property isn't introduced until later so all we know is that the real numbers are an ordered field, and the theorem is not generally true for ordered fields. For instance, in $\mathbb{Q}(\sqrt2)$ we have the function $$f(a+b\sqrt2) = a - b\sqrt2$$ which satisfies $f(x+y)=f(x)+f(y)$ and $f(xy)=f(x)f(y)$.
