Problem

Source: 2022 Nordic Mathematical Olympiad

Tags: functional equation, algebra



Find all functions $f:\mathbb{R}\to\mathbb{R}$ such that $f(f(x)f(1-x))=f(x)$ and $f(f(x))=1-f(x)$, for all real $x$.