I need to find all functions $f:\mathbb R \rightarrow \mathbb R$ which are continuous and satisfy $f(x+y)=f(x)+f(y)$

For $f(\frac1q x)$:

$$f(x) = f(q\cdot\frac1q x) = f(\frac1q x+\ldots+\frac1q x) = f(\frac1q x)+\ldots+f(\frac1q x) = qf(\frac1q x)$$

For $f(\frac pqx)$: Set $y=\frac xq$ to get $$f(\frac pqx) = f(p\frac xq) = f(py) = p\,f(y) = p\,f(\frac1q x) = p\cdot\frac1qf(x)$$

So now you know $f(\alpha x)=\alpha f(x)$ for all $x\in \mathbb Q$. Let $(\alpha_n)$ be a sequence of rational numbers converging to the real number $r$. Since $f$ is continuous, we have $\lim_{n\to\infty}f(\alpha_n x)=f(r x)$. On the other hand, since all $\alpha_n$ are rational, we have $\lim_{n\to\infty}f(\alpha_n x) = \lim_{n\to\infty} \alpha_n f(x) = r\,f(x)$. Since for every $r\in R$ there exists a sequence of rational numbers converging to it, we therefore have $f(rx)=r\,f(x)$ for all $r\in \mathbb R$.

Finally, we can get an explicit form by observing that $f(x) = f(x\cdot 1) = x\,f(1)$. Therefore with $f(1)=c$ arbitrary, we get $$f(x) = cx$$


$$f(x+y)=f(x)+f(x)$$ $$f(0)=0$$ $$f(-x)=-f(x)$$ All these are enough to state a linear function with no constant. Also,$$f'(x)=\dfrac{f(x+h)-f(x)}h$$ if $$f'(x)=\dfrac{f(h)}{h}=c$$

So, The only solution set is $f(x)=cx$

A confirmation too from wolfram. .


If you do not assume continuity of $f$, then it depends on the Axiom of Choice, stated as Zorn's Lemma. Consider the family $\cal L$ of linearly independent over $\mathbf Z$ subsets of $\mathbf{R}$. Given a chain of such sets,

$$L_1 \subset L_2 \subset \dotsm \subset L_n \subset \dotsm$$

we can prove $L = \bigcup_n L_n \in \cal L$. Suppose $L$ were not linearly independent over $\mathbf Z$. Then, there would be distinct $x_i \in L$ and nonzero integers $a_i$ such that

$$ a_1 x_1 + \dotsm + a_m x_m = 0 $$

But each $x_i$ must be in $L_n$ for some $n$. Let $N$ be the maximum of all such $n$. Then, each $x_i \in L_N$, and so $L_N$ is a $\mathbf Z$-dependent set, contrary to the assumption.

Since every chain has an upper bound, Zorn's Lemma states that there is a maximal member, $M$, of $\cal L$. Every real number $r$ must be a $\mathbf Z$=linear combination of a finite set of elements of $M$; otherwise, $M \cup \{r\}$ would be $\mathbf Z$-independant, contrary to $M$ being maximal. $M$ is a Hamel basis of $\mathbf R$.

And now, any permutation of $M$ extends by linearity to a discontinuous $f$ such that $f(x+y) = f(x) + f(y)$.