This question is about math education and is not research level, so do not hesitate to delete it if it feels inappropriate. I already asked it here a year ago:

but although Michael Hardy had some ideas about it, I think someone might have a more general argument.

I teach elementary mathematics to engineers, and I'd like to prove the theorem in the title: a real polynomial of degree $n$ has at most $n-1$ local extrema. If you use derivatives, it's basically a one liner, but since I did not introduce them, I'd like to know if there is a slick proof that uses only elementary facts about polynomials. (Subtleties such as the intermediate value theorem can be swept under the rug.)

Actually, I found one proof that uses derivatives only in disguise, but it is not really satisfying as it feels very 'ad hoc'. Let me give it so that it does not come up in an answer.

First, define a formal derivative $p'(x)$ of a given polynomial $p(x)$ by its action on the monomials, that is: $a\cdot x^k$ becomes $ka\cdot x^{k−1}$. (It seems that it is exactly what Rolle did when proving the first version of Rolle's Theorem in 1691, which predates calculus and was done only for polynomials.) Then, it is easy to show that this formal derivative obeys the usual product rule and that $p'(x)=q'(x)$ iff $q(x) = p(x) + b$ with $b\in\mathbb{R}$.

Now, $a\in\mathbb{R}$ is a local extremum of $p(x)$ iff $a$ is a root of even multiplicity of $p(x) - p(a)$, so $p(x)-p(a) = (x-a)^2\cdot q(x)$ for some $q(x)$. By the (formal) product rule, $p'(a)=0$. Since $p'(x)$ has degree $n-1$, there are no more than $n-1$ local extrema.

So, does anyone has a proof without derivatives, disguised or not ?