Subfield: Algebra


Question: Find all functions $f$ from the set of real numbers into the set of real numbers which satisfy for all real $x, y$ the identity

$$
f(x f(x+y))=f(y f(x))+x^{2} .
$$

Solution:
It is no hard to see that the two functions given by $f(x)=x$ and $f(x)=-x$ for all real $x$ respectively solve the functional equation. In the sequel, we prove that there are no further solutions.

Let $f$ be a function satisfying the given equation. It is clear that $f$ cannot be a constant. Let us first show that $f(0)=0$. Suppose that $f(0) \neq 0$. For any real $t$, substituting $(x, y)=\left(0, \frac{t}{f(0)}\right)$ into the given functional equation, we obtain

$$
f(0)=f(t)
\tag{1}
$$

contradicting the fact that $f$ is not a constant function. Therefore, $f(0)=0$. Next for any $t$, substituting $(x, y)=(t, 0)$ and $(x, y)=(t,-t)$ into the given equation, we get

$$
f(t f(t))=f(0)+t^{2}=t^{2},
$$

and

$$
f(t f(0))=f(-t f(t))+t^{2}
$$

respectively. Therefore, we conclude that

$$
f(t f(t))=t^{2}, \quad f(-t f(t))=-t^{2}, \quad \text { for every real } t
\tag{2}
$$

Consequently, for every real $v$, there exists a real $u$, such that $f(u)=v$. We also see that if $f(t)=0$, then $0=f(t f(t))=t^{2}$ so that $t=0$, and thus 0 is the only real number satisfying $f(t)=0$.

We next show that for any real number $s$,

$$
f(-s)=-f(s) \text {. }
\tag{3}
$$

This is clear if $f(s)=0$. Suppose now $f(s)<0$, then we can find a number $t$ for which $f(s)=-t^{2}$. As $t \neq 0$ implies $f(t) \neq 0$, we can also find number $a$ such that $a f(t)=s$. Substituting $(x, y)=(t, a)$ into the given equation, we get

$$
f(t f(t+a))=f(a f(t))+t^{2}=f(s)+t^{2}=0
$$

and therefore, $t f(t+a)=0$, which implies $t+a=0$, and hence $s=-t f(t)$. Consequently, $f(-s)=f(t f(t))=t^{2}=-\left(-t^{2}\right)=-f(s)$ holds in this case.

Finally, suppose $f(s)>0$ holds. Then there exists a real number $t \neq 0$ for which $f(s)=t^{2}$. Choose a number $a$ such that $t f(a)=s$. Substituting $(x, y)=(t, a-t)$ into the given equation, we get $f(s)=f(t f(a))=f((a-t) f(t))+t^{2}=f((a-t) f(t))+f(s)$. So we have $f((a-t) f(t))=0$, from which we conclude that $(a-t) f(t)=0$. Since $f(t) \neq 0$, we get $a=t$ so that $s=t f(t)$ and thus we see $f(-s)=f(-t f(t))=-t^{2}=-f(s)$ holds in this case also. This observation finishes the proof of (3).

By substituting $(x, y)=(s, t),(x, y)=(t,-s-t)$ and $(x, y)=(-s-t, s)$ into the given equation,



we obtain

$$
\begin{array}{r}
f(s f(s+t)))=f(t f(s))+s^{2} \\
f(t f(-s))=f((-s-t) f(t))+t^{2}
\end{array}
$$

and

$$
f((-s-t) f(-t))=f(s f(-s-t))+(s+t)^{2},
$$

respectively. Using the fact that $f(-x)=-f(x)$ holds for all $x$ to rewrite the second and the third equation, and rearranging the terms, we obtain

$$
\begin{aligned}
f(t f(s))-f(s f(s+t)) & =-s^{2} \\
f(t f(s))-f((s+t) f(t)) & =-t^{2} \\
f((s+t) f(t))+f(s f(s+t)) & =(s+t)^{2} .
\end{aligned}
$$

Adding up these three equations now yields $2 f(t f(s))=2 t s$, and therefore, we conclude that $f(t f(s))=t s$ holds for every pair of real numbers $s, t$. By fixing $s$ so that $f(s)=1$, we obtain $f(x)=s x$. In view of the given equation, we see that $s= \pm 1$. It is easy to check that both functions $f(x)=x$ and $f(x)=-x$ satisfy the given functional equation, so these are the desired solutions.
It is no hard to see that the two functions given by $f(x)=x$ and $f(x)=-x$ for all real $x$ respectively solve the functional equation. In the sequel, we prove that there are no further solutions.

Let $f$ be a function satisfying the given equation. It is clear that $f$ cannot be a constant. Let us first show that $f(0)=0$. Suppose that $f(0) \neq 0$. For any real $t$, substituting $(x, y)=\left(0, \frac{t}{f(0)}\right)$ into the given functional equation, we obtain

$$
f(0)=f(t)
\tag{1}
$$

contradicting the fact that $f$ is not a constant function. Therefore, $f(0)=0$. Next for any $t$, substituting $(x, y)=(t, 0)$ and $(x, y)=(t,-t)$ into the given equation, we get

$$
f(t f(t))=f(0)+t^{2}=t^{2},
$$

and

$$
f(t f(0))=f(-t f(t))+t^{2}
$$

respectively. Therefore, we conclude that

$$
f(t f(t))=t^{2}, \quad f(-t f(t))=-t^{2}, \quad \text { for every real } t
\tag{2}
$$

Consequently, for every real $v$, there exists a real $u$, such that $f(u)=v$. We also see that if $f(t)=0$, then $0=f(t f(t))=t^{2}$ so that $t=0$, and thus 0 is the only real number satisfying $f(t)=0$.

We next show that for any real number $s$,

$$
f(-s)=-f(s) \text {. }
\tag{3}
$$

This is clear if $f(s)=0$.

Now we prove that $f$ is injective. For this purpose, let us assume that $f(r)=f(s)$ for some $r \neq s$. Then, by $(2)$

$$
r^{2}=f(r f(r))=f(r f(s))=f((s-r) f(r))+r^{2},
$$

where the last statement follows from the given functional equation with $x=r$ and $y=s-r$. Hence, $h=(s-r) f(r)$ satisfies $f(h)=0$ which implies $h^{2}=f(h f(h))=f(0)=0$, i.e., $h=0$. Then, by $s \neq r$ we have $f(r)=0$ which implies $r=0$, and finally $f(s)=f(r)=f(0)=0$. Analogously, it follows that $s=0$ which gives the contradiction $r=s$.

To prove $|f(1)|=1$ we apply (2) with $t=1$ and also with $t=f(1)$ and obtain $f(f(1))=1$ and $(f(1))^{2}=f(f(1) \cdot f(f(1)))=f(f(1))=1$.

Now we choose $\eta \in\{-1,1\}$ with $f(1)=\eta$. Using that $f$ is odd and the given equation with $x=1, y=z$ (second equality) and with $x=-1, y=z+2$ (fourth equality) we obtain

$$
\begin{aligned}
& f(z)+2 \eta=\eta(f(z \eta)+2)=\eta(f(f(z+1))+1)=\eta(-f(-f(z+1))+1) \\
& \quad=-\eta f((z+2) f(-1))=-\eta f((z+2)(-\eta))=\eta f((z+2) \eta)=f(z+2) .
\end{aligned}
$$

Hence,

$$
f(z+2 \eta)=\eta f(\eta z+2)=\eta(f(\eta z)+2 \eta)=f(z)+2 .
$$

Using this argument twice we obtain

$$
f(z+4 \eta)=f(z+2 \eta)+2=f(z)+4 .
$$

Substituting $z=2 f(x)$ we have

$$
f(2 f(x))+4=f(2 f(x)+4 \eta)=f(2 f(x+2)),
$$



where the last equality follows from (4). Applying the given functional equation we proceed to

$$
f(2 f(x+2))=f(x f(2))+4=f(2 \eta x)+4
$$

where the last equality follows again from (4) with $z=0$, i.e., $f(2)=2 \eta$. Finally, $f(2 f(x))=$ $f(2 \eta x)$ and by injectivity of $f$ we get $2 f(x)=2 \eta x$ and hence the two solutions.