How many roots has the equation? Let $f(x)=x^3-3x+1$. How many roots has the equation: $f(f(x))=0$?
I tried to solve it graphically and found 7 roots. If there exists analytical solution?
 A: Hint:
Find the solutions of $f(x) = 0$. Than can be done with the Cardano method. If $z_1, z_2$ and $z_3$ are those solutions then use the same method to solve the equations:
$$\begin{cases}f(x) = z_1 \\ f(x) = z_2 \\ f(x) = z_3 \end{cases}$$
Those nine solutions will be the solutions of $f(f(x)) = 0$
A: We can easily see that there are three real roots to $f(x)$ since $f(-2)=-1$ and $f(-1)=3$, $f(1)=-1$ and $f(2)=3$. 
Now, for each of the three roots of $f(x)$,  $r_1,r_2,r_3$, with $-2<r_1<-1<r_2<1<r_3<2$, we want solutions to $f(x)=r_i$. There are always three distinct roots to this equation, since $1,-1$, the roots of $f'(x)$, are not roots of $f(x)-r_i$, since that value is not an integer for $x$ an integer, and thus specifically is never zero when $x$ is an integer.
So there are nine distinct roots, some potentially complex.
Now, the local maximum and minimum of $f(x)$ are at $x=-1$ and $x=1$, respectively, with values $f(-1)=3$ and $f(1)=-1$. So there are three real roots for $-1<r_i<3, i=2,3$, and only one real root for the $r_1$ outside of that range. So there are 7 real roots, and two complex roots.
