Problem

Source: 2020 Israel Olympic Revenge P1

Tags: functional equation, algebra, olympic revenge, function, symmetry



Find all functions $f:\mathbb{R}\to \mathbb{R}$ such that for all $x,y\in \mathbb{R}$ one has \[f(f(x)+y)=f(x+f(y))\]and in addition the set $f^{-1}(a)=\{b\in \mathbb{R}\mid f(b)=a\}$ is a finite set for all $a\in \mathbb{R}$.