$\displaystyle I$ is an open interval. Let $\displaystyle f:I\to\mathbb{R}$ be a function of class $\displaystyle C^1$ and $\displaystyle K\subset I$ compact. If all critical points of $\displaystyle f$ in $\displaystyle K$ are nondegenerate then there exists only finitely many of them in $\displaystyle K$.

I've proven that if $\displaystyle c\in I$ is a nondegenerate critical point of the differentiable function $\displaystyle f:I\to\mathbb{R}$ then there exists $\displaystyle \delta>0$ such that $\displaystyle c$ is the only critical point of $\displaystyle f$ in $\displaystyle (c-\delta,c+\delta)$. This should be helpful.