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

$$
f(x+y)+f(x-y)=2 f(x)+2 f(y)
$$
We start by noting that the functions $c \cdot x^{2}$ are solutions (c $\in$ $\mathbb{Q}$). Let's show that these are the only solutions.

By taking $x=y=0$, we have $2 f(0)=4 f(0)$, so $f(0)=0$. For $x=0$, we get $f(-y)=f(y)$, so $f$ is even. Let's show that $f(n x)=n^{2} f(x)$, for all integers $n \geqslant 0$ and for all $x \in \mathbb{Q}$. This is true for $n=0$ and $n=1$. We fix $x$ and prove the property by induction on $n$. We replace $x$ by $n x$ and $y$ by $x$ in the functional equation, we get:

$$
f((n+1) x)=2 f(n x)+2 f(x)-f((n-1) x)=\left(2 n^{2}+2-(n-1)^{2}\right) \cdot f(x)=(n+1)^{2} f(x)
$$

Let $a=f(1)$ and show that $\forall x \in \mathbb{Q}, f(x)=a x^{2}$. This is true for $x \in \mathbb{N}$ because $f(x)=f(x \times 1)=$ $x^{2} \cdot f(1)=a x^{2}$, and by evenness it is true for $x \in \mathbb{Z}$.

In the general case, if $x=\frac{p}{q}, f(p)=f(q x)=q^{2} f(x)=a p^{2}$, so $f(x)=a x^{2}$.