<s>[INST] Finding number of solutions of $f(x)=f^{-1}(x)$ where $f(x)=x^3+x-1$ 
Let $f:\mathbb R\to\mathbb R, f(x)=x^3+x-1$. Find the number of solutions of the equation $f(x)=f^{-1}(x)$.

$f'(x)=3x^2+1\gt0\implies f(x)$ is an increasing function. From this can we say anything about the nature of $f^{-1}(x)$?
I know that a function and its inverse are mirror images in $y=x$. Not sure how to use that here.
Generally, we find inverse function by writing $x$ in terms of $y$, where $y=f(x)$. Here, $$y=x^3+x-1$$
Not able to obtain $f^{-1}(x)$ from this.
 [/INST] If $f(x)=f^{-1}(x)$ then $f(f(x))=x$, where
\begin{eqnarray*}
f(f(x))&=&f(x)^3+f(x)-1\\
&=&(x^3+x-1)^3+(x^3+x-1)-1\\
&=&x^9+3x^7-3x^6+3x^5-6x^4+5x^3-3x^2+4x-3.
\end{eqnarray*}
So you want to find the real roots of
$$x^9+3x^7-3x^6+3x^5-6x^4+5x^3-3x^2+3x-3=0.$$
The above is equivalent to
$$(x^3+x-1)^3+(x^3+x-1)-1=x,$$
which shows that the polynomial is divisible by $x^3-1$. Then a quick check shows that
$$x^9+3x^7-3x^6+3x^5-6x^4+5x^3-3x^2+3x-3=(x^3-1)(x^6+3x^4-2x^3+3x^2-3x+3).$$
Now to show that $x=1$ is the unique real solution, it suffices to show that the sextic factor has no real roots. It is not hard to express it as a sum of squares:
\begin{eqnarray*}
x^6+3x^4-2x^3+3x^2-3x+3&=&(x^3-1)^2+3x^4+3x^2-3x+2\\
&=&(x^3-1)^2+3x^4+3(x-\tfrac12)^2+\tfrac54.
\end{eqnarray*}
</s>