## Task 3A - 241233A

Determine all functions $f$ with the following properties:

(1) $f$ is defined for all rational numbers.

(2) $f(1)=1$.

(3) For all rational numbers $x$ and $y$, $f(x+y)=f(x)+f(y)+xy(x+y)$.
It is $f(0)=f(0+0)=2 \cdot f(0)+0$, so $f(0)=0$ and for all rational numbers $x$ thus

$$
0=f(0)=f(x+(-x))=f(x)+f(-x)+x \cdot(-x) \cdot(x-x)=f(x)+f(-x)
$$

and thus $f(-x)=-f(x)$.

Furthermore, for all natural numbers $n$ the equation holds

$$
f(n+1)=f(n)+f(1)+n \cdot 1 \cdot(n+1)=f(n)+n^{2}+n+1
$$

so that for all natural numbers $n$ directly

$$
\begin{aligned}
f(n)=\sum_{k=0}^{n-1} k^{2}+k+1= & \frac{(n-1) n(2 n-1)}{6}+\frac{(n-1) n}{2}+n=\frac{(n-1) n(2 n-1+3)}{6}+n= \\
& =n \cdot\left(\frac{(n-1)(n+1)}{3}+1\right)=\frac{n^{3}+2 n}{3}
\end{aligned}
$$

Thus, the equation $f(p)=\frac{p^{3}+2 p}{3}$ holds for all integers $p$.

Moreover, for all rational numbers $x$ and all natural numbers $n$

$$
f((n+1) x)=f(n x+x)=f(n x)+f(x)+n \cdot(n+1) \cdot x^{3}
$$

so that inductively

$$
\frac{f(n x)-n f(x)}{x^{3}}=\sum_{k=0}^{n-1} k^{2}+k=\frac{(n-1) n(2 n-1)}{6}+\frac{(n-1) n}{2}=\frac{2 n-1+3}{6} \cdot n \cdot(n-1)=
$$

$$
=\frac{(n-1) n(n+1)}{3}=\frac{n^{3}-n}{3}
$$

thus $f(n x)=n f(x)+\frac{n^{3}-n}{3} \cdot x^{3}$.

Therefore, for any rational number $x=\frac{p}{q}$ with integer $p$ and natural $q>0$:

$$
\frac{p^{3}+2 p}{3}=f(p)=f\left(q \cdot \frac{p}{q}\right)=q \cdot f\left(\frac{p}{q}\right)+\frac{q^{3}-q}{3} \cdot \frac{p^{3}}{q^{3}}
$$

or

$$
\begin{aligned}
f(x)=f\left(\frac{p}{q}\right)=\frac{1}{q} \cdot\left(\frac{p^{3}+2 p}{3}\right. & \left.-\frac{q^{3}-q}{3} \cdot \frac{p^{3}}{q^{3}}\right)=\frac{1}{q} \cdot\left(\frac{p^{3}+2 p}{3}-\frac{p^{3}}{3}+\frac{p^{3}}{3 q^{2}}\right)=\frac{2 p q^{2}+p^{3}}{3 q^{3}}= \\
& =\frac{2}{3} \cdot \frac{p}{q}+\frac{1}{3} \cdot \frac{p^{3}}{q^{3}}=\frac{2 x+x^{3}}{3}
\end{aligned}
$$

Thus, the function $f(x)=\frac{2 x+x^{3}}{3}$ defined for all rational numbers $x$ can at most satisfy all the given conditions. Indeed, $f(1)=\frac{2+1}{3}=1$ and for any rational numbers $x$ and $y$ then

$$
\begin{gathered}
f(x)+f(y)+x y(x+y)=\frac{2 x+x^{3}+2 y+y^{3}+3 x y(x+y)}{3}=\frac{2(x+y)+x^{3}+3 x^{2} y+3 x y^{2}+y^{3}}{3}= \\
=\frac{2(x+y)+(x+y)^{3}}{3}=f(x+y)
\end{gathered}
$$

so the function $f(x)=\frac{2 x+x^{3}}{3}$ is the only one that satisfies the problem statement.