Find all pairs of functions $f, g: \mathbb{R} \rightarrow \mathbb{R}$ such that for all $x, y \in \mathbb{R}$, we have $g(f(x+y))=f(x)+2 x+y \cdot g(y)$
(found by Elias Caeiro)

By taking $y=0$, we get $g(f(x))=f(x)+2 x$, and by taking $x=0$, we have $g(f(y))=$ $f(0)+y g(y)$, so

$f(x+y)$

$=g(f(x+y))-2(x+y)$

$=f(x)+2 x+y g(y)-2(x+y)$

$=f(x)+2 x+g(f(y))-f(0)-2(x+y)$

$=f(x)+2 x+f(y)+2 y-f(0)-2(x+y)$

$=f(x)+f(y)-f(0)$

By replacing $f$ with $h$, where $h(x)=f(x)-f(0)$, we get $h(x+y)=h(x)+h(y)$, so for all $r \in \mathbb{R}, h$ is linear on $r \mathbb{Q}$ and $f$ is of the form $f(z)=a z+b$ on $r \mathbb{Q}$.

For $z \in r \mathbb{Q}^{*}$, by taking $y=f(n z)$ where $n$ is an integer, we have

$g(f(y))$

$=f(y)+2 y$

$=f(f(n z))+2 f(n z)$

$=f(a n z+b)+2(a n z+b)$

$=f(a n z)+f(b)-f(0)+2(a n z+b)$, which is a polynomial of degree 1 in $n$, since $f$ is affine on $a z \mathbb{Q}$.

We also have

$g(f(y))$

$=f(0)+y g(y)$

$=f(0)+f(n z) g(f(n z))$

$=f(0)+(a n z+b)(f(n z)+2 n z)$

$=f(0)+(a n z+b)(a n z+b+2 n z)$, which is a polynomial of degree at most 2 in $n$.

We deduce that the coefficient of degree 2 of this polynomial is zero, so $a z(a z+2)=0$ and $a$ must necessarily be 0 or -2.

The values of $a$ and $b$ are bounded, so $f$ is bounded on any bounded interval, and since $f$ satisfies the Cauchy equation (up to a constant), $f$ is affine, of the form $a z+b$ with $a$ equal to 0 or -2.

$f$ cannot be constant because we would have $2 x=g(f(x))-f(x)=g(b)-b$ for all $x$, which is obviously impossible.

Therefore, $f$ is of the form $f(x)=-2 x+b$. For any non-zero $x$, $b=f(x)+2 x=$ $g(f(x))=f(0)+y g(y)=b+y g(y)$, so $y g(y)=0$ and $g(y)=0$. $f(0)=g(f(0))$, so $f(0)$ can only be zero, and $g(0)$ as well. The only solution is therefore $f(x)=-2 x$ and $g(x)=0$, which is easily verified to be a solution.