Miquel-point wrote:
Determine all nonzero integers $a$ for which there exists two functions $f,g:\mathbb Q\to\mathbb Q$ such that
\[f(x+g(y))=g(x)+f(y)+ay\text{ for all } x,y\in\mathbb Q.\]Also, determine all pairs of functions with this property.
Let $P(x,y)$ be the assertion $f(x+g(y))=g(x)+f(y)+ay$
$P(x-g(x),x)$ $\implies$ $g(x-g(x))=-ax$ and so $g(x)$ is surjective
Let then $u$ such that $g(u)=0$ and $b=-f(u)-au$
$P(x,u)$ $\implies$ $g(x)=f(x)+b$ (and so $f(x)$ is surjective too)
And $P(x,y)$ becomes new assertion $Q(x,y)$ : $f(x+f(y)+b)=f(x)+f(y)+ay+b$
Subtracting $Q(-b,y)$ from $Q(x,y)$, we get $f(x+f(y)+b)=f(x)+f(f(y))-f(-b)$ and so, since surjective, $f(x+y+b)=f(x)+f(y)-f(-b)$
Which is also $f(x+b+y+b-b)=f(x+b-b)+f(y+b-b)-f(-b)$ and so $f(x-b)-f(-b)$ is additive, and, since in $\mathbb Q$, linear
So $f(x)=ux+v$ and $g(x)=ux+w$ for some $u,v,w\in\mathbb Q$
Plugging this back in original equation, we get $w=0$ and $a=u^2-u$ and any $v$
In order to have $ a$ nonzero integer, we have
$\boxed{a=n^2-n\text{ and }(f,g)\in\{(nx+v,nx),(1-n)x+v,(1-n)x)\}}$, which indeed fits, whatever is $n\in\mathbb Z\setminus\{0,1\}$ and $v\in\mathbb Q$