Context
In the previous question, we were asked to prove Rolle's Theorem: If f is continuous on (a,b) and f (a) = f (b) = 0 then f (c) = 0 for a certain c in (a,b).
Question
In the case of I = [0, 1], give an example of a function fitting the description of part (a), non-constant on any sub-interval of [0,1], such that f '(c) = 0 for infinitely many c in (0,1)
My first guess of a function that fit the description was f(x) = sin (1/x), but that doesn't work because it isn't defined on [0,1], not continuous, f(0) =/=0 and f(1) =/= 0
Any help would be appreciated. Thank you!
At least for $x \not = 0$, you know $-1 \le \sin\left(\frac1x\right) \le 1$, and that it is differentiable, and that it changes sign infinitely often in $(0,1)$
So find some non-constant differentiable function which is always non-negative on $[0,1]$ with $g(0)=g(1)=0$, such as $g(x)=x(1-x)$
Now multiply these together
So $$f(x)=x(1-x)\sin\left(\frac1x\right)$$ for $x \not = 0$. To deal with continuity, define $f(0)=\lim_{x\to 0} f(x) = 0$. This will now meet the conditions as it too is differentiable in $(0,1)$ and changes sign infitiely often.
It looks like this red curve, bounded by $\pm g(x)$ in grey