Determine all $f : \mathbb R \rightarrow \mathbb R$ such that $f(f(x) + y) = f(x^2 - y) + 4yf(x)$. 
Determine all $f : \mathbb R \rightarrow \mathbb R$ such that $$f\big(f(x) + y\big) = f(x^2 - y) + 4yf(x)$$ for all $x,y\in\mathbb{R}$.

$f(x) = 0$ is obvious , but how can we find all other functions?
Thanks in advance!
 A: Let $f:\mathbb{R}\to\mathbb{R}$ satisfy
$$f\big(f(x) + y\big) = f(x^2 - y) + 4y\,f(x)$$
for all $x,y\in\mathbb{R}$.  By setting $y:=\dfrac{x^2-f(x)}{2}$ in the given functional equation, we get
$$\begin{align}f\left(\frac{x^2+f(x)}{2}\right)&=f\left(f(x)+\frac{x^2-f(x)}{2}\right)\\&=f\left(x^2-\frac{x^2-f(x)}{2}\right)+4\,\left(\frac{x^2-f(x)}{2}\right)\,f(x)\\&=f\left(\frac{x^2+f(x)}{2}\right)+4\,\left(\frac{x^2-f(x)}{2}\right)\,f(x)\end{align}$$
for all $x\in\mathbb{R}$.  Therefore, $4\,\left(\dfrac{x^2-f(x)}{2}\right)\,f(x)=0$ for each $x\in \mathbb{R}$.  Hence, we can conclude that, for each real number $x$, either
$$f(x)=0\text{ or }f(x)=x^2\,.\tag{*}$$
In particular, this means $f(0)=0$.
Suppose that there are two nonzero real numbers $s$ and $t$ such that $f(s)=0$ and $f(t)=t^2$.  Then, by plugging in $x:=s$ and $y:=t$ in the given functional equation, we have
$$t^2=f(t)=f\big(f(s)+t\big)=f(s^2-t)+4t\,f(s)=f(s^2-t)\,.$$
By (*), $f(s^2-t)=0$ or $f(s^2-t)=(s^2-t)^2$.  Thus, either
$$t^2=0\text{ or }t^2=(s^2-t)^2\,.$$
This means $t=0$, $s=0$, or $s^2=2t$.  Since $s$ and $t$ are nonzero, we obtain
$$s^2=2t\,.\tag{#}$$
However, (#) holds for any values of $s\neq 0$ and $t\neq 0$ such that $f(s)=0$ and $f(t)=t^2$.  It can then be easily seen (why?) that, unless 


*

*$f(x)=0$ for all $x\in\mathbb{R}$ or 

*$f(x)=x^2$ for all $x\in\mathbb{R}$, 


the equation (#) yields a contradiction.

I shall also solve the old (now changed) version.  Let $f:\mathbb{R}\to\mathbb{R}$ satisfy
$$f\big(f(x) + y\big) = f(x^2 - y) + 4x\,f(x)$$
for all $x,y\in\mathbb{R}$.  We proceed as before by setting $y:=\dfrac{x^2-f(x)}{2}$.  However, this time we get
$$4x\,f(x)=0$$
for all $x\in\mathbb{R}$.  Thus, if $x\neq 0$, then $f(x)=0$.  Now, by setting $x$ and $y$ to be $0$, we obtain
$$f\big(f(0)\big)=f(0)\,.$$
If $f(0)\neq 0$, then $f\big(f(0)\big)=0$, whence $f(0)=0$, which is a contradiction.  Therefore, $f(0)$ must be $0$, and so $f(x)=0$ for each $x\in\mathbb{R}$.
A: Here's another solution:
$$P(x,y)\implies f(f(x)+y)=f(x^2−y)+4yf(x)$$
$$P(x,-f(x))\implies f(0)=f(x^2+f(x))-4f(x)^2 \iff f(x^2+f(x))=f(0)+4f(x)^2$$
$$P(x,x^2)\implies f(x^2+f(x))=f(0)+4x^2f(x)$$
Combining the above 2 statements:$$ \implies f(0)+4f(x)^2=f(0)+4x^2f(x) \iff f(x)^2=x^2f(x)$$
Putting $x=0$ we get that $f(0)=0$, and it gives two cases:
Case 1: $f(x)=0 \ \ \ \forall \ x \in \mathbb{R}$
Case 2: there exists a real number $a$ such that $f(a) \ne 0$
Then $$f(a)^2=a^2f(a) \implies f(a)=a^2$$
$$f(a) \ne 0 \implies a^2 \ne 0 \implies a \ne0$$
So $f(a)=a^2$ for all $a \ne 0$, this and the fact that $f(0)=0$ gives $f(x)=x^2$ for all $x$
Checking back in the original equation, we get that both solutions work, the only solutions $\Box.$
