Find all $f:\mathbb R\to \mathbb R$ such that $\forall x,y\in\mathbb R$ the given equality holds: $$xf(y)+yf(x)=(x+y)f(x)f(y)$$
My try:
whenever $y=0$, we have $$x\cdot f(0)\cdot(1-f(x))=0$$
So the solutions can be either generated by: $$f(x)=\begin{cases}c & c\in\mathbb R & x=0\\ 1 & x\neq 0\end{cases}$$
where $c$ generate an infinite amount of solutions, or it can be any function satisfying $f(0)=0$.
However, I can't seem to find a way to check such a solution on the initial equation (we have to check it since we've simply eliminated the impossible solutions and we've only found that the solutions can be somehow generated using the way I've shown).
Note that this generates the trivial solutions $f(x)=0$ and $f(x)=1$ as well.
Is my reasoning correct?
If so, how can I check whether all the generated functions satisfy the initial equation?
Off-topic, but do $f^2(x)$ and $f(x)^2$ denote the same concept? My teacher uses the former while my book uses the latter (for squaring $f(x)$). Which one is correct, or are both of them correct?