USJL wrote:
Find all $g:\mathbb{R}\rightarrow\mathbb{R}$ such that for all $x,y\in R$,
\[(4x+g(x)^2)g(y)=4g(\frac{y}{2}g(x))+4xyg(x)\]
$\boxed{\text{S1 : }g(x)=0\text{ }\forall x}$ is a solution. So let us from now look only for not allzero solutions.
Let $P(x,y)$ be the assertion $(4x+g(x)^2)g(y)=4g(\frac y2g(x))+4xyg(x)$
$P(2,0)$ $\implies$ $g(0)=0$
If $g(u)=0$, then $P(u,x)$ $\implies$ $ug(x)=0$ and so $u=0$ (since $g(x)$ is not allzero)
So $g(x)=0$ $\iff$ $x=0$
Let then $a=-\frac{g(1)}2\ne 0$ and $b=\frac 2{g(a)}\ne 0$ (so that $g(b)\ne 0$)
$P(a,b)$ $\implies$ $4a+g(a)^2=0$ and so $P(a,\frac{2x}{g(a)})$ $\implies$ $g(x)=-2ax$
Plugging this back in original equation, we get $a=-1$ and $\boxed{\text{S2 : }g(x)=2x\text{ }\forall x}$