
98.1. Determine all functions $f$ defined in the set of rational numbers and taking their values in the same set such that the equation $f(x+y)+f(x-y)=2 f(x)+2 f(y)$ holds for all rational numbers $x$ and $y$.


Solution. Insert $x=y=0$ in the equation to obtain $2 f(0)=4 f(0)$, which implies $f(0)=0$. Setting $x=0$, one obtains $f(y)+f(-y)=2 f(y)$ of $f(-y)=f(y)$. Then assume $y=n x$, where $n$ is a positive integer. We obtain

$$
f((n+1) x)=2 f(x)+2 f(n x)-f((n-1) x)
$$

In particular, $f(2 x)=2 f(x)+2 f(x)-f(0)=4 f(x)$ and $f(3 x)=2 f(x)+2 f(2 x)-f(x)=$ $9 f(x)$. We prove $f(n x)=n^{2} f(x)$ for all positive integers $n$. This is true for $n=1$. Assume $f(k x)=k^{2} f(x)$ for $k \leq n$. Then

$$
\begin{aligned}
& f((n+1) x)=2 f(x)+2 f(n x)-f((n-1) x) \\
& =\left(2+2 n^{2}-(n-1)^{2}\right) f(x)=(n+1)^{2} f(x)
\end{aligned}
$$

and we are done. If $x=1 / q$, where $q$ is a positive integer, $f(1)=f(q x)=q^{2} f(x)$. So $f(1 / q)=f(1) / q^{2}$. This again implies $f(p / q)=p^{2} f(1 / q)=(p / q)^{2} f(1)$. We have shown that there is a rational number $a=f(1)$ such that $f(x)=a x^{2}$ for all positive rational numbers $x$. But since $f$ is an even function, $f(x)=a x^{2}$ for all rational $x$. We still have to check that for every rational $a, f(x)=a x^{2}$ satisfies the conditions of the problem. In fact, if $f(x)=a x^{2}$, then $f(x+y)+f(x-y)=a(x+y)^{2}+a(x-y)^{2}=2 a x^{2}+2 a y^{2}=2 f(x)+2 f(y)$. So the required functions are all functions $f(x)=a x^{2}$ where $a$ is any rational number.
