Find all nonconstant function $f:\mathbb{R}\to \mathbb{R}$ such that $f(x+2f(x)f(y))=f(x)+2xf(y)$

functional-equationsfunctions

Find all nonconstant function $f:\mathbb{R}\to \mathbb{R}$ such that $f(x+2f(x)f(y))=f(x)+2xf(y)$ for all $x,y\in \mathbb{R}$.

Let $P(x,y)$ be the assertion $f(x+2f(x)f(y))=f(x)+2xf(y)$.

$P(-\frac 12,-\frac 12)$ $\implies$ $f(-\frac 12+2f(-\frac 12)^2)=0$ and let $t=-\frac 12+2f(-\frac 12)^2$. Then $P(t,y)\Rightarrow 0=tf(y),\forall y\in \mathbb{R},i.e, t=0$. It implies that $f(-\frac 12)^2=\frac 14$ Note that if $f$ is a solution of this problem then so $-f$. Therefore, WLOG, we may asume that $f(-1/2)=-1/2$ and $f(0)=0$.

$P(-\frac 12,x)$ $\implies$ $f(-\frac 12-f(x))=-\frac 12-f(x)$

$P(-\frac 12, -\frac 12-f(x))$ $\implies$ $f(f(x))=f(x)$

I wonder if we can prove that $f$ is surjective?
Somebody help me. Thanks!

Best Answer

Edit: as pointed out by Mohsen Shahriari, this solution is wrong. The correct place to go is his solution here.

Hint: apply $f$ to both sides.

Solution:

Apply $f$ to both sides, from $f(f(x))=f(x)$ we get $$x+2f(x)f(y)=f(f(x)+2xf(y))$$ Let $y=0$, so $$x=f(f(x)).$$ Now it's clear.