I find that roots of $$\tag{1} f(x)=f^{-1}(x),$$ where $f: \mathbb{R} \rightarrow \mathbb{R}$ are the same as those of $f(x)=x$ and $f^{-1}(x)=x$ if $f(x)$ is 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.
In general, I would like to know if it is necessarily true, are there exceptions? What could be a generalization of roots of (1) in the light of these two cases.
Edit: As per the answer/response of Aditya below self inverse functions may be exceptional to this conjecture.
Edit: Can there be some generalization wherein the roots of $f(x)=f^{-1}(x)$ would be same as that of $f(x)=p(x)$ and $f^{-1}(x)=p(x)$, what could be $p(x)$ other than $x$?
what you have written is not correct as there can exist functions such that $f(x) = f^{-1}(x) \ \forall x \in \mathbb{R} $ a example $f(x) = \frac{1}{x}$