Finishing the solution to this functional equation. I am trying to solve the below functional equation for $f$ (where $f: \mathbb{R} \to \mathbb{R}$):
$$ f(x^2+y)=f(f(x)-y) + 4f(x)y $$
(Source: https://web.evanchen.cc/handouts/FuncEq-Intro/FuncEq-Intro.pdf: &quot;Iran TST 1996&quot;)
Here's what I've got so far:
Substituting $y=0$ we have $f(x^2) = f(f(x))$
Substituting $y=f(x)$ we have
$$f(x^2+f(x)) = f(0) + 4f(x)^2$$
$$f(0) = 0 $$
Letting $x=0$ we can show the function is even.
Finally letting $y = -x^2$ we can simplify to yield
$$f(x) (x^2 - f(x)) = 0 $$
And this is where I'm stuck. Given that it's an Olympiad I'm fairly sure that actually the only solutions are $f(x) = x^2$ and $f$ is identically zero and that there will not be any pathological solutions that have discontinuities - though I have not been able to show this.
My ideas that I've tried:

Showing $f$ is injective when not identically zero (on $\mathbb{R}^+$ that is), this doesn't seem to go anywhere useful.
Showing that $f$ is surjective (again onto $\mathbb{R}^+$) when not identically zero, as if that is the case we always must choose $x^2$ instead of zero other we miss out a positive number. However I haven't been able to find any way to show this either.
Use inequalities to show that if $f$ is not identically zero then the inequality $f(x) \geq 0$ that we have from our current information (either $f$ is zero or the square of a real) is strict when $x \neq 0$, but again I couldn't do anything with this either.
We know that for each $x\in\mathbb R$, either $f(x)=x^2$ or $f(x)=0$.
Let $A=\{x\neq0\mid f(x)=0\}$ and $B=\{x\neq0\mid f(x)=x^2\}$. Then $A$, $B$ partition $\mathbb R\setminus\{0\}$.
Suppose both are non-empty. Take $a\in A$ and $b\in B$. Sub $x=a,y=-b$ to get $f(a^2-b)=b^2$. Since $b\neq0$, we must have $b^2=(a^2-b)^2\implies a^2=2b$ (as $a\neq0$).
This implies $\lvert A\rvert\leq2$ and $\lvert B\rvert=1$, a clear contradiction. So one of $A$, $B$ is empty, and we recover the two solutions.
Hint Take
\begin{equation}
y = \frac{f(x)-x^2}{2}
\end{equation}
This leads to $\forall x, f(x)\in \{0, x^2\}$, hence we can write $f(x) = x^21_x$ where $\forall x\in{\mathbb R}, 1_x\in\{0,1\}$. Let us rewrite the functional equation as
\begin{equation}
y^2(1_{x^2+y}-1_{x^2 1_x - y})+2x^2 y(1_{x^2+y}+1_{x^2 1_x-y}-2. 1_x)
+ x^4(1_{x^2+y}-1_{x^2 1_x-y}) = 0
\end{equation}
This equation must be satisfied for all $x, y$ but the coefficient of $y^2$ here can be only $-1,0 ,1$, the coefficient of $2x^2 y$  can be only $-2, -1, 0, 1, 2$ and the coefficient of $x^4$ can be only $-1,0,1$.
Let $x$ be given such that $x\not=0$ and $1_x=1$ (or equivalently $f(x) = x^2\not=0$). Clearly the coefficients of $y^2$ and $y$ can be non zero for at most a finite number of $y$'s because in this case, $y$ must be a solution of a polynomial equation of degree 1 or 2 chosen among 44 such non trivial equations. It follows that for all $y$ but a finite number of them one has
\begin{equation}
1_{x^2+y} = 1_{x^2 1_x-y} = 1
\end{equation}
Hence $1_z = 1$ for all $z\in{\mathbb R}$ except on a finite set and $f(z) = z^2$ except perhaps on this finite set.