# Does it exist a function for which the derivative changes sign more than countably many times?

Does there exist any function $f \in C^2[0,1]$; $f: [0,1] \mapsto [0,1]$, for which the derivative changes sign more than countably many times?

• No. Since $f\in\mathcal C^2[0,1]$, $f^\prime$ is continuous, so $\left\{\,x\,\big|\,f^\prime(x)>0\,\right\}$ is an open set and is the union of countable open intervals. Feb 20, 2013 at 14:22
• @FrankScience Why hide that perfectly good answer as a comment?
– mrf
Feb 20, 2013 at 14:25
• I agree with @mrf, make it an answer Frank. Feb 20, 2013 at 14:27
• @mrf I doubt it's a typo. We can consider a stronger one, say, if $f$ is only differentiable on $[0,1]$. Feb 20, 2013 at 14:27
• @FrankScience, I don't understand the "typo" comment. Was that really meant for me?
– mrf
Feb 20, 2013 at 14:43

How about a function $f'$ whose zero set is the Cantor set. And on complementary intervals with length $3^{-k}$, $k$ odd, the function is positive, while on complementary intervals with $3^{-k}$, $k$ even, the function is negative. Then could we say $f'$ "changes sign" at each point of the Cantor set (since there are positive values and negative values clustering at that point)?
• Each little bump is a $C^\infty$ bump... May 29, 2013 at 0:47