Find all functions from $f :\mathbb{R} \rightarrow \mathbb{R}$ such that it satisfies $|f(x)| = |x|$ , $f(f(-y))= -f(y)$ and $f(f(x))= f(x)$ $\forall$ $x,y \in \mathbb{R}$ .
What I did was: say $f(x) = x \forall x \in \mathbb R$ then it satisfies all conditions given ,so its a possible solution. If we have $f(x) = -x$ for some part in the domain of $f(x)$, we will get that by the second and third condition that $f(-x) = f(x)$ and $f(f(x))= -f(x)$ but now I am not getting how to show whether this is possible or not.
Let $f$ be a solution of all three conditions. We get, for $x \in \mathbb{R}$: $$f(x) = f(f(x)) = f(f(-(-x))) = - f(-x) $$ As such, $f$ is odd.
Suppose that, for a given $x \in \mathbb{R} \setminus \{0\}$, $f(x) \neq x$. Then, by using our conditions: $f(x) = - x$.
Thus: $$f(x) = f(f(x)) = f(-x)$$ Since $f$ is odd: $$f(-x) = - f(x)$$ And so: $$-x = f(x) = 0$$ Absurd, which gives: $$\forall x \in \mathbb{R}, \quad f(x) = x$$ And $f$ is the identity.