parmenides51 wrote:
Find all functions $f : Q \to Q$, such that $$f(x + f (y + f(z))) = y + f(x + z)$$for all $x ,y ,z \in Q$
Let $P(x,y,z)$ be the assertion $f(x+f(y+f(z)))=y+f(x+z)$
Let $a=f(0)$ and $c=f(1)$
$P(0,x-f(0),0)$ $\implies$ $f(f(x))=x$
Applying $f()$ to both sides of $P(x,y)$, we get
New assertion $Q(x,y,z)$ : $x+f(y+f(z))=f(y+f(x+z))$
$Q(f(y)-a,x,a)$ $\implies$ $f(x+y)=f(x)+f(y)-a$ (remember $f(a)=f(f(0))=0$)
And so, since in $\mathbb Q$, $f(x)=cx+a$
Plugging this back in original equation, we get
$\boxed{\text{S1 : }f(x)=x\quad\forall x\in\mathbb Q}$, which indeed fits
$\boxed{\text{S2 : }f(x)=a-x\quad\forall x\in\mathbb Q}$, which indeed fits, whatever is $a\in\mathbb Q$