Find all functions $ f : \mathbb R \to \mathbb R $ that satisfy $$ f \left( x ^ 2 + 2 y f ( x ) \right) + f \left( y ^ 2 \right) = f ( x + y ) ^ 2 $$ for all $ x , y \in \mathbb R $.
I tried a couple of standard approaches (for example, making $ f ( x ) = 0 $, or $ f ( x ) = 1 $), but non of them yielded a result. Could someone help me?
Setting $y = 0$ yields $$f(x^2) + f(0) = f(x)^2$$
Setting $x = 0$ yields $$f(2f(0)\cdot y) + f(y^2) = f(y)^2$$
Set $x = y = t$ then subtract the two equations to get that
$$f(2f(0)\cdot t) = f(0)$$ for all $t$. This means that $f$ must be a constant function or $f(0) = 0$. Assuming it's a constant function, and plugging in $f(x) = c$ into the original functional equation yields $$2c = c^2$$ for which the only solutions are $c = 0$ and $c = 2$. So the solutions from these are $f(x) = 0$ and $f(x) = 2$
If $f(0) = 0$, then the condition from setting $y = 0$ is $$f(x^2) = f(x)^2$$ for which the only solutions are functions of the form $f(x) = x^c$. Set $y = -x$ and plug in $f(x) = x^c$ to get
$$(x^2-2x^{c+1})^c+x^{2c}=0$$
The only value of $c$ that this holds true for all $x$ is $c = 1$. So the only solution with $f(x)$ not constant is $f(x) = x$.
Thus the set of solutions is $$f(x) = \{ 0, 2, x \}$$