Find all functions $f: \mathbb{Q} \rightarrow \mathbb{Q}$ such that for all $x, y$ in $\mathbb{Q}$,

$$
f(x+y)=f(x)+f(y)
$$
Let $f$ be a potential solution.

By adapting the recurrence from the previous exercise, for all $x \in \mathbb{Q}$, for all $n \in \mathbb{Z}$, we have $f(n x) = n \times f(x)$.

Thus, let $n$ be a non-zero integer, $f(1) = f\left(n \times \frac{1}{n}\right) = n f\left(\frac{1}{n}\right)$, hence $f\left(\frac{1}{n}\right) = \frac{1}{n} f(1)$.

Let $x \in \mathbb{Q}$, then $x$ can be written in the form $\frac{p}{q}$ with $p$ an integer and $q$ a non-zero natural number.

We then have $f(x) = f\left(p \times \frac{1}{q}\right) = p \times f\left(\frac{1}{q}\right) = \frac{p}{q} \times f(1) = x \times f(1)$. Once again, we verify that the solutions are indeed the linear functions with rational coefficients from $\mathbb{Q} \rightarrow \mathbb{Q}$.