Find all functions $f:\Bbb{R} \to \Bbb{R}$ such that for all $x,y, \in \Bbb{R} $ , $f(xf(x)+f(y))=x^2+y$
We can easily get a strong condition $f(f(y))=y $ by setting $x=0$ . By this equation we know $f$ is injective and surjective. I got lost from there. By observation I know $f(x)=x $ and $f(x)=-x$ are solution. So I was trying to make $x^2+y=f(xf(x)+f(y))$ close to $f(x)^2+y$ or $x^2+f(y)$. Any hints would be helpful.
Plugging in $x=y=-1$ shows that $f(0)=0$ and plugging in $x=0$ then shows that $f(f(y))=y$. This implies that $f$ is invertible, and plugging in $y=0$ shows that $$f(xf(x))=x^2=f(f(x^2)),$$ and hence $xf(x)=f(x^2)$ for all $x\in\Bbb{R}$. This shows that $f(-x)=-f(x)$ for all $x\in\Bbb{R}$, and that $$f(x^2+y)=xf(x)+f(y)=f(x^2)+f(y),\tag{1}$$ for all $x,y\in\Bbb{R}$, from which it follows that $f$ satisfies Cauchy's functional equation $$f(x+y)=f(x)+f(y).$$ Much has been said about this functional equation, which has many pathological solutions. Note that this means $f$ is $\Bbb{Q}$-linear, and if $f$ is either continuous at a point, bounded on an interval or monotonic on an interval, then $f$ is $\Bbb{R}$-linear and so $f(x)=cx$ for some $c\in\Bbb{R}$.
In an earlier version of this answer I rushed to the conclusion that $f(x)=cx$, which quickly implies that $c=\pm1$ and indeed both functions $f(x)=\pm x$ satisfy the functional equation.