Can anyone please explain and show (step by step) that how $ f \big( f ( x ) \big) = x $ in the following example?
One can show that for any Hamel basis $ H $ there exists a bijection $ \varphi : [ 0 , 1 ] \to H $. If we set $ \varphi ( t ) = h _ t $, then $ H = \{ h _ t | t \in [ 0 , 1 ] \} $. This observation leads to constructions of additive functions having interesting properties.
Example. Let $ f : \mathbb R \to \mathbb R $ be the additive function determined by the function $ s : H \to \mathbb R $ defined by: $$ s ( h _ t ) = \begin {cases} h _ t & \text {if } t \in \left[ 0 , \frac 1 2 \right] \\ - h _ t & \text {if } t \in \left( \frac 1 2 , 1 \right] \text . \end{cases} $$ Then it is easy to check that $ f \big( f ( x ) \big) = x $ for any $ x \in \mathbb R $.
Also, please explain and show (step by step) that how $ f \big( f ( x ) \big) = f ( x ) $ in the following example?
Another interesting example of a discontinuous additive function is obtained by considering the function $ s : H \to \mathbb R $ defined by $$ s ( h _ t ) = \begin {cases} h _ t & \text {if } t \in \left[ 0 , \frac 1 2 \right] \\ 0 & \text {if } t \in \left( \frac 1 2 , 1 \right] \text . \end{cases} $$ Then $ f \big( f ( x ) \big) = f ( x ) $ for any $ x \in \mathbb R $.
I was unable to do it and I am completely clueless.