How to solve the following functional equation:
Find all $f:\mathbb{R}\to\mathbb{R} $ such that: $$ f\left(x^2+f(y)\right)=y+f(x)^2 $$ Holds for every $x,y\in\mathbb{R}$.
A friend gave it to me, probably its an olympiad question.
I started with the equation $f(f(y))=y+f(0)^2$ which seems to be quite helpful, but I couldn't do it effectively. How to solve it properly?
This problem is from the IMO 92.
Let $P(x,y)$ be the assertion $f\left(x^2+f(y)\right)=y+f(x)^2$. Then: $$ P(0,y):\space f(f(y))=y+f(0)^2 $$ Thus we have $f\left(f\left(x^2+f(y)\right)\right)=f\left(y+f(x)^2\right) \iff x^2+f(y)+f(0)^2=f\left(y+f(x)^2\right)$. Let $Q(x,y)$ be this assertion. Furthermore, $P(0,y)$ implies, that $f$ is bijective. Therefore, let $a\in\mathbb R$ be, such that $f(a)=0$. Consequently: $$ Q(a,a):\space a^2+f(0)^2=0\iff a=f(0)=0 $$ Thus, $f(f(y))=y$. Now we have: $$ P(x,0):\space f(x^2)=f(x)^2\implies f(x)≥0\space\forall x\in\mathbb{R_{≥0}}\\ P(-x,0):\space f(x^2)=f(-x)^2\implies f(-x)^2=f(x)^2\implies f(-x)=-f(x)\space\left(\text{$f(x)=f(-x)$ is impossible, because $f$ is bijective.}\right)\\ P\left(x,f(y)\right):\space f\left(x^2+y\right)=f(y)+f(x)^2=f(y)+f(x^2)\implies f(y+z)=f(y)+f(z)\forall y\in\mathbb R, z\in\mathbb{R_{≥0}} $$ Now, we calculate $f(y-z)$ with $y\in\mathbb R, z\in\mathbb{R_{≥0}}$: $$ f(y-z)=-f(-y+z)=-f(-y)-f(z)=f(y)+f(-z) $$ Thus, we have $f(y+z)=f(y)+f(z)\space\forall y,z\in\mathbb R$. But we have $f(x)≥0\space\forall x\in\mathbb{R_{≥0}}$, so $f$ doesn't lay dense, and by Cauchy, we have that $f(x)=cx$ for some real constant $c$. Substituting this in the original equation, we can see, that $c=1$ and thus $f(x)=x$ is the only solution.