i need someone to verify if i'm doing anything wrong on proving the following theorem (i'm new to real analysis and formal proofs). Also, suggestions on how to write it better would be appreciated.
$f: I\rightarrow R$ differentiable. Beteween two consecutives roots of $f'$ there is at most one root of $f$
I think i can see why this is true.
Informal Attempt: Let $g$ be a constraint of $f$ to the interval $[a,b]$, $a<b$, $g: [a,b]\rightarrow R$. if $f'(a)=g'(a)$ and $f'(b)=g'(b)$ are consecutive zeros of $f'$, they are the sole zeros of $g'$. By the Weierstrass extreme value theorem, since $g$ is continuous and $[a,b]$ is a compact set, we know $g$ obtains its extreme values. Since the only two zeroes of $g'$ are, by its very definition, $a$ and $b$, they must be these extreme values.
From this point on, i know that, by "looking" at the graph of $g$, it must intersect the $x$ axis at most once, otherwise there would be other $g'(x)=0$. How can i write this down formally? Have i missed anything? After proving that result for $g$, I intended to apply it to $f$ and get to the final result.
Thanks for your attention.