TITLE: If $f:[0,\infty)\to [0,\infty)$ and $f(x+y)=f(x)+f(y)$ then prove that $f(x)=ax$
QUESTION [19 upvotes]: Let $\,f:[0,\infty)\to [0,\infty)$ be a function such that $\,f(x+y)=f(x)+f(y),\,$ for all $\,x,y\ge 0$. Prove that $\,f(x)=ax,\,$ for some constant $a$.

My proof :
We have , $\,f(0)=0$. Then , 
$$\displaystyle f'(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}=\lim_{h\to 0}\frac{f(h)}{h}=\lim_{h\to 0}\frac{f(h)-f(0)}{h}=f'(0)=a\text{(constant)}.$$
Then, $\,f(x)=ax+b$. As, $\,f(0)=0$ so $b=0$ and $f(x)=ax.$
Is my proof correct?

REPLY [9 votes]: By induction, $f(nx)=nf(x)$ for an integer $n$.
Now take any real $x$. From
$$\lfloor nx\rfloor\le nx\le\lceil nx\rceil,$$applying the non-decreasing function $f$, we deduce
$$f\left(\lfloor nx\rfloor\right)\le f(nx)\le f\left(\lceil nx\rceil\right).$$ 
By the above induction property,
$$\lfloor nx\rfloor f(1)\le nf(x)\le \lceil nx\rceil f(1),$$ and
$$\frac{\lfloor nx\rfloor}nf(1)\le f(x)\le \frac{\lceil nx\rceil}nf(1).$$
As $n$ can be arbitrarily large, by squeezing
$$f(x)=f(1)x.$$