- #51

- 125

- 48

Without loss of generality we can assume ##x_1## to be the smallest of the 3 values. Two possibilities arise.

1. ##x_1 \lt x_2 \lt x_3##. This means ##f(x_1) = x_2 \lt f(x_2) = x_3## and ##f(x_2) = x_3 \gt f(x_2) = x_1## and ##f(x_3) \lt f(x_1)##. So the function ##f## must be increasing at least for a sub-interval of ##(x_1, x_2)## and decreasing for a sub-interval of ##(x_2, x_3)## and since it is continuous, there must be some ##x_4 \in (x_2, x_3)## such that ##f(x_4) = x_2##. This is because the continuous method should take every value between ##f(x_2) and f(x_3)## for ##x \in (x_2, x_3)## and ##f(x_2) = x_3 \gt x_2 \gt x_1 = f(x_3)##. But this introduces a contradiction because ##f(f(f(x_4))) = f(f(x_2)) = f(x_3) = x_1 \neq x_4## i.e. given condition is not met some real-valued ##x##. Hence the assumption that ##f(x) \neq x## for some ##x## must be wrong.

2. ##x_1 \lt x_3 \lt x_2##. Here too, we can prove like in case (1) that assuming ##f(x) \neq x## for some ##x## must be wrong

Since both cases lead to violation of given condition, it follows that ##f(x) =x## for all ##x## is a necessary condition for ##f(f(f(x)))=x## for all ##x##