I really like it you mentioned that to solve for $x$ in $$f(f(x)) = 0$$ is equivalent to solve for $$f(x) = x_i$$ where $$x_i$$ for i = 1, 2, 3 are the (real) roots of f(x).
And if I may use this idea to solve for the problem, I found out the total number of real roots for $$f(f(x)) = 0$$ are 7 as well, and this method is so much better than my first approach and thank you,
Balarka for showing me something that I don't know!
View attachment 1575
[TABLE="class: grid, width: 500"]
[TR]
[TD]Solving for the number of real roots of $$f(x) = x_1=root_1$$ means the same thing as finding the number of intersection points between the curve $y=f(x)$ and $y=root_1$, as shown by the
green line and we see that in this case we have only one real root for $$f(x) = x_1=root_1$$.[/TD]
[TD]Solving for the number of real roots of $$f(x) = x_2=root_2$$ means the same thing as finding the number of intersection points between the curve $y=f(x)$ and $y=root_2$, as shown by the
purple line and we see that in this case we have only one real root for $$f(x) = x_2=root_2$$.[/TD]
[TD]Solving for the number of real roots of $$f(x) = x_3=root_3$$ means the same thing as finding the number of intersection points between the curve $y=f(x)$ and $y=root_3$, as shown by the
orange line and we see that in this case we have only one real root for $$f(x) = x_3=root_3$$.[/TD]
[/TR]
[/TABLE]
So there are a total of 7 intersection points and hence there are 7 real roots for $$f(f(x)) = 0$$!
Thanks!