Find all functions $f(x)$ such that $f\left(x^2+f(y)\right)$=$y+(f(x))^2$
Let me summarize the proposed ideas and give a self-contained answer: Let $f : \Bbb{R} \to \Bbb{R}$ satisfy the functional equation
$$ f(x^2 + f(y)) = y + f(x)^2 \tag{*}$$
for all $x, y \in \Bbb{R}$.
Step 1. $f(0) = 0$.
(This solution is due to @Leo163.) Let $a \in \Bbb{R}$ be such that $f(a) = 0$. For instance, plugging $y = -f(x)^2$ to $\text{(*)}$ confirms the existence of such $a$. Then plugging $(x, y) = (a, a)$ to $\text{(*)}$ gives
$$ f(a^2) = f(a^2 + f(a)) = a + f(a)^2 = a.$$
Finally, plugging $(x, y) = (0, a^2)$ to $\text{(*)}$ gives
$$ 0 = f(a) = f(f(a^2)) = a^2 + f(0)^2. $$
This shows that $f(0) = 0$.
Step 2. $f$ satisfies various identities:
- $f(x^2) = f(x)^2$.
- $f(f(x)) = x$. In particular, $f$ is bijective.
- $f(-x) = -f(x)$.
- $f(x+y) = f(x)+f(y)$.
The identity 1 (resp. 2) follow by plugging $y = 0$ (resp. $x = 0$) to $\text{(*)}$. For 3, we may assume that $x \geq 0$. Then replacing $(x, y)$ in $\text{(*)}$ by $(x^{1/2}, f(-x))$, we have
$$ 0 = f(x - x) = f(-x) + f(x^{1/2})^2 = f(-x) + f(x) $$
and 3 follows. Finally, replacing $(x, y)$ in $\text{(*)}$ by $(x^{1/2}, f(y))$ gives
$$ f(x + y) = f(x) + f(y), \qquad \forall x \geq 0, \ y \in \Bbb{R}. $$
The restriction that $x \geq 0$ can be removed by combining this with 3: if $x < 0$, then
$$ f(x+y) = -f(-x-y) = -(f(-x) + f(-y)) = f(x) + f(y). $$
Step 3. $f(x) = x$.
If $x > 0$ then by the first identity of the previous step,
$$ f(x) = f((x^{1/2})^2) = f(x^{1/2})^2 > 0. $$
(We can exclude the equality because $f$ is bijective and $f(0) = 0$.) Combining this with the fact that $f$ is an odd function, we have:
$$ f(x) \geq 0 \quad \Longleftrightarrow \quad x \geq 0.$$
Now for any $x \in \Bbb{R}$,
$$ f(x) -x = f(x) - f(f(x)) = f(x - f(x)). $$
Therefore $f(x) - x \geq 0$ if and only if $x - f(x) \geq 0$, which implies that $f(x) = x$.
Remark. The Cauchy functional equation has pathological solutions which are also involution, and we need to use the extra structure given by the equation $\text{(*)}$ to exclude such possibilities. The first identity of Step 2 was essential in our solution.
Suppose $a$ is such that $f(a)=0$ (we know there is such $a$, it is enough to consider $y=-f(x)^2$ for some $x$), then substituting $x=a$ and $y=a$, we have $$f(a^2)=a.$$ Then, set $x=0$ and $y=a^2$, to obtain $$0=f(f(a^2))=a^2+f(0)^2.$$ Since we are only dealing with real numbers, it means that $f(0)=0$, and no other number has $0$ as image.
As consequences, we have $f(f(y))=y$ and $f(y^2)=f(y)^2$ for every $y\in\mathbb{R}$.
Here is a short approach without Cauchy equation. Starting from $f(0)=0$ by @Leo163, we obtain $f(f(x))=x$ by plugging $y=0$. This shows $f$ is a bijection. Now plug $y=f^{-1}(\zeta)$, we see $$f(x^2+\zeta)=f^{-1}(\zeta)+(f(x))^2\geq f^{-1}(\zeta)=f(\zeta)$$ Hence $f$ is monotone increasing. Now suppose for some $x_0$ we have $f(x_0)> x_0$, then $x_0=f(f(x_0))\geq f(x_0)> x_0$, a contradiction. Thus we have $f(x)\leq x$. Similarly we have $f(x)\geq x$, so $f(x)=x$.