Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $ f(x^2+y^2) + f(xf(y) + f(x)f(y)) = (f(x+y))^2. $
My attempt:
Plugging in $x=y=0$ we get $f(0) + f(f(0)^2) = f(0)^2. $ Setting $x:=y$ and $y:=x$ gets us $f(xf(y)+f(x)f(y)) = f(yf(x)+f(x)f(y)).$ Setting $f(0)=a$ and plugging in $x=0$ and $ y=a $, we get $f(a^2) + f(af(a)) = f(a)^2. $ $x=a$ and $ y=0 $ gives us $ f(a^2) + f(a^2+af(a)) = f(a)^2.$ How can I continue?