I came across a question: If $f(x)=x^3-x+1$ then find the number of real distinct values of $f(f(x))=0$.
Here is what I interpreted the $f(f(x))$ as:
I assumed $a, b$ and $c$ to be the roots of $f(x)$, now if we put $a, b$ or $c$ in the $f(f(x))$ then it becomes $f(0)$ which will be equal to $1$.
I saw a solution where they differentiated the polynomial $f(x)$. They made the graph of $f(x)$ using first order derivative test. Then for $f(f(x))$, they put in $x=a, b, c$ (assumed roots of $f(x)$ ). Then we got three lines for $x=a$, a line below $-1$, for $b$ a line between $0$ and $1$ and for $c$, a line between $1$ and $3$. I am unable to understand why we put $a,b$ and $c$ as $x$ and then how did we get these ranges?



$f(f(x)) = (x^3 - x + 1)^3 - (x^3 - x + 1) + 1$.
Solve that $9$th-order polynomial for $f(f(x)) = 0$.
Here is a plot of $f(f(x))$
$f(f(x))$ has a single real root at $x = -1.57387$.
Also, here is a plot of $f(x)$:
Your assumption that there are three real roots of $x^3 - x + 1$ is invalid.
Enough yet?