# Finding the roots of a function applied twice

I saw this problem a few days ago and still haven't cracked it. Therefore, I thought I might ask you all for help.

The graph of $$f(x)$$ has four roots on the interval $$[-5,5]$$. How many different roots does $$f(f(x))$$ have? Here is a picture of the graph of $$f(x)$$:

We stumbled across this problem a week ago during math club and we were unable to solve it; our teacher didn't know the answer, either. Any help would thus be greatly appreciated!

• $x$ is a root of $f\circ f$ if $f(x)$ is a root of $f$. so: $f(x)$ should be $-4$, $-2$, $2$ or $4$ Mar 15, 2021 at 19:25

## 2 Answers

The roots of $$f(x)$$ are $$x=-4,-2,2,4$$, according to your graph, so for $$f(f(x)) = 0$$, we have $$f(x) = -4,-2,2,4$$ because $$f(x)$$ took the place of $$x$$. So, we need to examine when $$f(x) = -4,-2,2,4$$.

From the graph we see that $$f(x)$$ is never $$-4$$

From the graph we see that $$f(x)=-2$$ at $$2$$ values of $$x$$.

From the graph we see that $$f(x) = 2$$ at $$4$$ values of $$x$$

From the graph we see that $$f(x) = 4$$ at $$2$$ values of $$x$$

Thus, that makes $$8$$ values of $$x$$ total that $$f(f(x)) = 0$$, so it has $$8$$ roots.

Notice that $$f(f(x)) = 0$$ if and only if $$f(x) \in S=\{-4,-2,2,4\} ,$$ since $$S$$ is the set of the roots of $$f$$.

So you should find how many times $$f(x) = y$$, with $$y$$ being a value in $$S$$. I suggest to draw four horizontal lines, respectively on $$y=-4$$ (which lies outside the graphics), $$y=-2$$, $$y=2 and$$y=4$. You can notice that the line $$y=-4$$ has zero intersections with the graph of the function $$f$$; the line $$y=-2$$ has 2 intersections; the line $$y=2$$ has 4 intersections and the line $$y=4$$ has other 2 intersections$.

The equation $$f(f(x)) = 0$$ has thus 8 solutions.