Find all functions $f: \mathbb{Q} \rightarrow \mathbb{Q}$ satisfying

$$
\forall x, y \in \mathbb{Q}, \quad f(x+y)=f(x)+f(y)
$$
By looking a bit, we suspect that the solutions will be the same as for the previous exercise, namely the linear functions $f(x)=a x$, but with $a \in \mathbb{Q}$ this time. We can of course start by relying on the previous exercise, by stating that there exists an integer $a$ such that $\forall n \in \mathbb{N}, f(n)=a n$. Let's deduce a few useful properties from this: for example, we can show by induction on $n$ that, $\forall n \in \mathbb{N}$, and $q \in \mathbb{Q}$,

$$
f(n q)=n f(q)
$$

The induction is immediate, by setting $x=n q$ and $y=q$. This result is true for any $q$, so in particular for $q=\frac{1}{n}$, in which case we get:

$$
f(1)=n f\left(\frac{1}{n}\right) \Longleftrightarrow f\left(\frac{1}{n}\right)=a \frac{1}{n}
$$

Now, let $p$ and $q$ be strictly positive integers. Then:

$$
f\left(\frac{p}{q}\right)=p f\left(\frac{1}{q}\right)=a \frac{p}{q}
$$

We are almost done, but be careful, we have only worked with positive numbers! There is one last observation to make, by setting $y=-x$, if $x$ is positive, we get

$$
f(0)=f(x)+f(-x) \Longrightarrow f(-x)=-f(x)=-a x=a(-x)
$$

Therefore, the only possible solutions over the rationals are also the linear functions, and we verify as for the previous exercise that they are all solutions.

## Remark 1.

The equation $f(x+y)=f(x)+f(y)$ is the most classic example of a functional equation and is called Cauchy's equation. We do not study it on $\mathbb{R} \rightarrow \mathbb{R}$, because the solutions are not necessarily characterizable: they are either linear functions or horrible functions, discontinuous at every point. A good exercise, however, is to show that the solutions on $\mathbb{R}$ of Cauchy's equation that are continuous or monotonic (increasing or decreasing) are only the linear functions. We can freely reuse what we have learned about Cauchy's equation in exercises: if after various manipulations we end up with this equation on a suitable domain $(\mathbb{N}, \mathbb{Z}, \mathbb{Q})$, we can immediately conclude that the solutions are linear (be careful not to forget the verification!)

After this introduction, we know how to solve functional equations by substitution, so let's move on to more challenging examples...