An awkward Functional Equation Find all $f:\mathbb{R} \rightarrow \mathbb{R}$ satisfying
$$f(f(y)+x^2+1)+2x=y+(f(x+1))^2$$
for all $x,y \in \mathbb{R}.$
I proved that $f$ is bijective, but I am stuck there. Any help please?
 A: Taking $x=0$ we get
\begin{align}
&f(f(y)+1) = y + f(1)^2 \\
\iff &y = f(f(y)+1)-f(1)^2 \end{align}
From it one can see that $f$ is in fact a bijection, since $f(y)=f(z)$ implies
$$f(f(y)+1)-f(1)^2 = f(f(z)+1)-f(1)^2,$$
and consequently $y=z$. Next, take $y=2x$ on the original equation, then
$$ f(x^2+f(2x)+1) = f(x+1)^2.$$
Substituting $f(x+1)^2$ on the original equation:
$$f(x^2+f(y)+1)-y = f(x^2+f(2x)+1)-2x$$
Thus, for fixed $x$, one can see that $g_x(y) := f(x^2+f(y)+1)-y$ is constant, let's say equals $C_x$. Given that $f$ is a bijection, it's immediate that $f(x^2+f(y)+1)$ is a bijection in $y$ for fixed $x$, then we conclude from $g_x(y)$ being constant that $f(x^2+f(y)+1) = y + C_x$. (Note that $C_x = f(x^2+f(2x)+1)-2x$)
Supposing $f$ to be differentiable *, one can fix $x$ and differentiate "$f(x^2+f(y)+1)= y + C_x$" in $y$, in order to obtain
$$ f'(y)f'(f(y)+c) = 1, \quad \forall c\geqslant 1, y\in\mathbb{R} $$
(The $c\geqslant 1$ comes from $x^2+1$) It follows easily that $f'\equiv 1$, and then $f(x) = x+C$ for some real $C$. From $f(x^2+f(2x)+1) = f(x+1)^2$ follows $C=0$ and, finally, that $f$ must be the identity.
-
*PS: I think it's possible to solve it without the hypothesis of differentiability, but at the moment I have no clue how to do it.
