Let be a continuous function $f\colon \mathbb{R}\to \mathbb{R}\:$ that has exact 3 local extrema. $f$ is NOT differentiable. Find the maximum number of local extrema that the function $f\circ f$ can have.
I do not know how to prove that but I obtained from my intuition that it must be 15. If we take for example a 8-degree polynomyal then $f\circ f$ is a 16-degree polynomyal and it does have maximum 15 local extrema.
The options of this multiple choice exercise are:
A)10 B)3 C)15 D)16
And the book says that the correct answer is C)15. And I don't know why. I need a complete proof.