Find all functions $f: \mathbb R \rightarrow \mathbb R$ such that $f(xf(x)+f(y))=(f(x))^2+y$ $\; \forall \; x,y \; \in \mathbb R$
My Method:
Let $p(x,y): f(xf(x)+f(y))=(f(x))^2+y$
$p(0,x): f(f(x))=(f(0))^2+x$
Let $f(0)=a$
$\implies$
$f(f(x))={a^2}+x$
Now put $x=-a^2$
$\implies$
$f(f(-a^2))=0$
Let $f(-a^2)=b$
Now $p(b,b): f(bf(b)+f(b))=(f(b))^2+b$
$\implies$
$f(0)=0$
$\implies$
$f(f(x))=x^2$ $\cdots \cdots (i)$
Now $p(x,0): f(xf(x))=(f(x))^2$
Put $x=f(x)$
$\implies$
$f((f(x))^2)=(f(f(x)))^2$
$\implies$
$f((f(x))^2)=x^2$ by equation $(i)$
Now I am stuck Can anyone help me in solution.
Is there any other method to solve this?