As stated in the title; Let $f: \mathbb R \to \mathbb R $ be a continuous function satisfying $f(f(x))$ = $f(x)$ then
(a) $f$ must be constant
(b) $f(x) = x$ for all $x$ in range of $f$
(c) $f$ must be a non constant polynomial
(d) There is no such function
By randomly trying different functions I discovered that $f(x) = x$ and $f(x) = 1-x$ satisfy given property . So using this option (c) seems to be correct.
But , My question is that How can I make sure that these are the only functions that hold this property ? and if there are any other function (other than these two) then how should I find them .