This is a functional equation question from Thailand MO 2023.
Let $f: \mathbb{R} \rightarrow \mathbb{R}$ that satisfies the equation $$f(x)f(y)f(x-y) = x^2f(y) - y^2f(x)$$ for all $x,y \in \mathbb R$. Find all $f$.
$\textbf{My attempt: }$ By letting $x=y=0$, we have that $f(0)^3 =0 \implies f(0)=0$. Setting $y=x\neq 0$, we have that $0 = x^2f(x)$, so $f(x) = 0$ is a solution. By inspection, I also notice that $f(x) = x$ and $f(x) = -x$ are solutions. I've also tried manipulating two expressions
\begin{alignat}{2} f(x)f(y_1)f(x-y_1) &= x^2f(y_1) - {y_1}^2f(x)\\ f(x)f(y_2)f(x-y_2) &= x^2f(y_2) - {y_2}^2f(x)\\ \implies f(y_1)\left[f(x - y_1) - f(x -y_2)\right] &= {y_2}^2-{y_1}^2 \end{alignat} This doesn't seem helpful and I'm not sure where to go from here. I suspect these are the only solutions? Help would be greatly appreciated!
Suppose $P(x,y): f(x)f(y)f(x-y) = x^2f(y)-y^2f(x)$
As you noted, $f(0)=0$. From $P(y,x)$ and $P(x,y)$, one gets $f(x)f(y)\cdot(f(x-y)+f(y-x))=0$
Case $1$: $f(x)=0$
Case $2$: $f(x)\neq 0$.
$f(x-y)=-f(y-x)$. Taking $t \to x-y$ shows $f$ is odd, since $f(t)=-f(-t)$. Then, $P(x,-x)$ shows $f(2x)\cdot f(x) =2x^2$ and $P(2x,x)$ shows $2\cdot f(x)=f(2x)$. This gives $f^2(x)=x^2$ and that $f(x)=x$ or $f(x)=-x$. This can mean that the functions be entirely $x$, or $-x$, or perhaps be a function which is $x$ for some interval and $-x$ for some other.
But the third possibility leads to contradictions. Take $a,b \neq 0$. By way of contradiction, suppose $f(a)=a$ while $f(b)=-b$. $f(a-b)$ may be $a-b$ or $b-a$. In either case, we get from $P(a,b)$ that either $a=0$ or $b=0$, which contradicts our initial supposition. This shows the one $f$ can't be $x$ and $-x$ for different $x$. So we get two solutions $f(x)=x\ \ \forall x$ or $f(x)=-x \ \ \forall x$, where $f(x)\neq 0 \implies x\neq 0$.
Similarly, we can show that $f(x)$ can't be some function which is $0$ on some interval and non-zero (ie $\pm x$) on some other. Take $a,b\neq 0$ such that $f(a)=0$ and $f(b)=\pm b$. Then $P(a,b): a^2(\pm b) =0$ but this contradicts that $a,b$ are non-zero.
Hence, $f(x)=0 \ \forall x\lor f(x)=x\ \ \forall x \lor f(x)=-x \ \forall x$ are the solutions. Note that we can claim this for the case $2$ solutions since $f(0)$ is already known to be $0$.
NOTE: I have elaborated this post to present a better idea of the solution.