$$f(x)=f^{-1}(x), f:Rrightarrow R~~~~~~~(1)$$
are the same as those of $$f(x)=x$$ and $$f^{-1}(x)=x$$ if $$f(x)$$
an increasing function. If $$f(x)$$ is decreasing then roots of (1) are the same as
$$f(x)=-x$$ and $$f^{-1}(x)=-x.$$ Two functions: $$f(x)= x^3$$ and $$f(x)=-x^3$$ are examples.