Determine all functions $f$ on $\mathbb R$ such that $f(x^2+yf(x))=f(x)f(x+y)$ for all $x,y$ Find all functions $f: \mathbb R \rightarrow \mathbb R$ such that
$$f(x^2+yf(x))=f(x)f(x+y). $$ for all $x,y$  real numbers.
I think that the only three solutions are: $f(x)=0$, $f(x)=1$ and $f(x)=x$.
I would appreciate any suggestions.
 A: 
Remark (1). Let $f:\mathbb{R} \rightarrow \mathbb{R}$ is a solution of given functional equation such that $f$ is non constant function with $f(1)=1$. Define 
  $$Fix(f)=\{ x>0\ : \ f(x)=x \}.$$
  $(1)$ For any $x\in Fix(f)$ and any $y\in \mathbb{R}$
  $$f(xy)=xf(y).$$
$(2)$ $Fix(f)$ is a subgroup of the multiplicative group of positive real numbers.
$(3)$ If $Fix(f)\neq \{1\}$, then the set $Fix(f)$ is dense in $\mathbb{R}^+$. If $f$ be a continuous function, then $$f(x)=x$$ for all $x\in \mathbb{R}$.


Proof. Letting $y:=y-x$ in functional equation, we have 
$$f(x^2+(y-x)f(x))=f(x)f(y)\ \ \ \ \ \ \ (*)$$
for all $x, y\in \mathbb{R}$. Also Substituting $x:=0$ in functional equation, we have 
$$f(x^2)=f(x)^2\ \ \ \ \ \ \ (**)$$
for all $x\in \mathbb{R}$. This implies that the function $f$ is positive on non-negative reals. 
$(1)$ Let $x\in Fix(f)$, then $f(x)=x$ and form $(*)$
$$f(x^2+(y-x)f(x))=f(xy)=xf(y)$$
for any $y\in \mathbb{R}$.
$(2)$ Since $f(1)=1$, so $1\in Fix(f)$. Now if $x, y\in Fix(f)$, we have form $(1)$
$$f(xy)=xf(y)=xy,$$
and so $xy\in Fix(y)$. For any $x \in Fix(f)$, we have form $(1)$
$$1=f(1)=f(x*\frac{1}{x})=xf(\frac{1}{x})$$
and so $\frac{1}{x}\in Fix(f)$.
$(3)$ There is $x_0\neq 1$ such that $x_0\in Fix(f)$. Define the function $\phi:Fix(f) \rightarrow R$ as follow
$$\phi(x)=\ln (x)$$
for all $x\in Fix(f)$. Then $\phi(Fix(f))$ is an additive subgroup of real numbers. From $(**)$ we can show that 
$$x_0^\frac{1}{2^n} \in Fix(f)$$
for all natural $n$. Therefore the additive subgroup $\phi(Fix(f))$ can not be a discrete and it must be dense in $\mathbb{R}$. This implies that $Fix(f)$ is dense on the positive real line.
Now $f$ be a continuous function, then $Fix(f)=\mathbb{R}^+$ and from $(**)$, we get that
$$f(x)^2=x^2$$
and also letting $y=0$ in $(*)$, we have 
$$f(x^2-xf(x))=0$$
for all $x\in \mathbb{R}$. Therefore $f(x)=x$ for all $x\in \mathbb{R}$.

Update:

Counterexample: Let $f:\mathbb{R} \rightarrow \mathbb{R}$ is a function as follow:
  $$f(x)=\begin{cases} x\ \ \text{ if }x\in F\\ 0\ \ \ \text{ if }x\in N\end{cases}$$ 
  for all $x\in \mathbb{R}$, in which $N$ is the set of real numbers which are transcedental over $\mathbb{Q}$ and $F$ be the set of real numbers which are algebraic over $\mathbb{Q}$. Then the function $f$ is a solution of given functional equation.


Proof. You can show that $F\cap N=\emptyset$, $F.N=N$ and $F+N=\mathbb{R}$. We have the functional equation as follow (from 
$(*)$):
$$f(x^2+(y-x)f(x))=f(x)f(y)\ \ \ \ \ \ \ (*)$$
for all $x, y\in \mathbb{R}$. Now let $x\in N$, then $x^2\in N$ and so 
$$f(x^2+(y-x)f(x))=f(x^2)=f(x)^2=0=f(x)f(y)=0$$ 
for all $y\in \mathbb{R}$. In other case, let $x\in F$, we have
$$f(x^2+(y-x)f(x))=f(x^2+(y-x)x)=f(xy)=^? xf(y) $$ 
for all $y\in \mathbb{R}$. If $y\in F$, then $xy\in F$ and
$$xy=f(xy)=xf(y)=xy.$$
If $y\in N$, then $xy\in N$ and 
$$0=f(xy)=xf(y)=0.$$ 
Therefore the function $f$ is a solution of the functional equation $(*)$ and proof is done. 


Remark (2). Let $f:\mathbb{R} \rightarrow \mathbb{R}$ is a solution of given functional equation such that $f$ is non constant function with $f(1)=1$. Define 
  $$N(f)=\{ x>0\ : \ f(x)=0 \}.$$ 
  $(1)$ $N(f)\cap Fix(F)=\emptyset$ and
  $$N(f). Fix(F)=N(f)$$
  $(2)$ Let $Fix(f)\neq \{1\}$, then $f(x)=x$ if only if $N(f)=\emptyset$. 

Questioner had guessed that the function $f(x)=x$ is only non constant solution of functional equation. I try to proved it i.e., if $Fix(f)\neq \{1\}$ then $f(x)=x$. In this regard, I asked a question here, the answere helped to find a counterexample.
A: COMMENT.-An example when the domaine is $\mathbb R\setminus\{-1\}$ instead of $\mathbb R$
$$f(x)=\begin{cases} 1\text{ when }x=1\\ 0\text{ when }x\ne 1\end{cases}$$
$$x=1\Rightarrow\begin{cases} f(x)f(x+y)=1\cdot f(1+y )=f(1+y)\\f(x^2+yf(x))=f(1+y\cdot 1)=f(1+y)\end{cases}$$
$$x\ne 1\Rightarrow \begin{cases} f(x)f(x+y)=0\cdot f(x+y)=0\\f(x^2+yf(x))=f(x^2+y\cdot0)=f(x^2)=0\end{cases}$$
