Determine the functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that for all $x, y \in \mathbb{R}$

$$
f\left(x^{2}-y^{2}\right)=(x-y)(f(x)+f(y))
$$
## We still follow the example a bit

1. We notice that the function $f(x)=0$ is a solution

$$
f\left(x^{2}-y^{2}\right)=0 \quad(x-y)(f(x)+f(y))=(x-y) \times(0+0)=0
$$

Similarly, $f(x)=x$ is also a solution

$$
f\left(x^{2}-y^{2}\right)=x^{2}-y^{2} \quad(x-y)(f(x)+f(y))=(x-y)(x+y)=x^{2}-y^{2}
$$

After a bit of reflection, we see that in fact, functions of the form $f(x)=k x$ for $k \in \mathbb{R}$ are also solutions

$$
f\left(x^{2}-y^{2}\right)=k x^{2}-k y^{2} \quad(x-y)(f(x)+f(y))=(x-y)(k x+k y)=k x^{2}-k y^{2}
$$

2. If we choose $x=y=0$.

$$
f(0)=f\left(0^{2}+0^{2}\right)=(0-0) \times(f(0)+f(0))=0
$$

So $f(0)=0$.

3. We try $y=0$

$$
f\left(x^{2}+0\right)=(x-0)(f(x)+f(0))=x f(x)
$$

So $f\left(x^{2}\right)=x f(x)$ (maybe interesting, we don't know yet). If we now try $x=0$ we have

$$
f\left(0-y^{2}\right)=(0-y)(f(0)+f(y))=-y f(y)
$$

So $f\left(-y^{2}\right)=-y f(y)$. By combining these two results (with $x=y$ for the first one), we then have that $f\left(-y^{2}\right)=-f\left(y^{2}\right)$. Since any positive number can be written in the form $y^{2}$, we deduce that for all $t \geqslant 0$

$$
f(-t)=-f(t)
$$

Definition:

(a) We say that $f$ is an odd function if $f(-t)=-f(t)$ for all $t$. (Example: $f(t)=t$, $f(t)=t^{3}$, etc.)

(b) We say that $f$ is an even function if $f(-t)=f(t)$. (Example: $f(t)=1$ or $f(t)=t^{2}$, etc.)

4. Trick: The left-hand term of $f\left(x^{2}-y^{2}\right)=(x-y)(f(x)+f(y))$ does not change if we change $y \rightarrow(-y)$. We can write two equations

$$
\left\{\begin{array}{l}
f\left(x^{2}-(-y)^{2}\right)=(x+y)(f(x)+f(-y))=(x+y)(f(x)-f(y)) \quad \text { because } f(-y)=-f(y) \\
f\left(x^{2}-(-y)^{2}\right)=f\left(x^{2}-y^{2}\right)=(x-y)(f(x)+f(y))
\end{array}\right.
$$

We then have

$$
\begin{aligned}
(x+y)(f(x)-f(y)) & =(x-y)(f(x)+f(y)) \\
x f(x)+y f(x)-x f(y)-y f(y) & =x f(x)-y f(x)+x f(y)-y f(y) \\
y f(x)-x f(y) & =-y f(x)+x f(y)
\end{aligned}
$$

So $2 y f(x)=2 x f(y)$. Conclusion for all $x, y \in \mathbb{R}$

$$
y f(x)=x f(y)
$$

This is a very useful equation that will allow us to conclude. If we now fix $y=1$ then

$$
1 \times f(x)=x \times f(1)
$$

If we write $k=f(1)$ we then have $f(x)=k x$. Conclusion: the only possible solutions are functions of the form $f(x)=k x$. (Remark: for $y=2$ this gives $2 f(x)=x f(2)$ so $f(x)=\frac{f(2)}{2} \times x$, same conclusion with $\left.k=\frac{f(2)}{2}\right)$.

Synthesis: We have already shown that functions of the form $f(x)=k x$ are solutions.