Suppose an arbitrary polynomial $f(x) = x^n+a_{n-1}x^{n-1}+...+a_0$ has $k$ local maximum points and $l$ local minimum points. Prove
$$k = \begin{cases} \ l-1, & if\ n\ is\ even \\\ l, & if\ n\ is\ odd \end{cases}$$
By intuition, $f(x)$ decreases from -∞, so it must achieves a local minimum first. So $k=l$ or $k=l-1$. Then $f'(x) = 0$ has $n-1$ roots. So $k+l=n-1$. If n is even, $n-1$ is odd, $k=l-1$; if n is odd, $n-1$ is even, $k=l$.
But how can I prove it mathematically?
Your intuition is generally correct. I would use this intuition to prove it using mathematical induction. Seems like a nice practice for that.
The statement is obvious for $n = 1$, $n = 2$. Using induction you could prove the statement for an arbitrary $n$.
One thing to take caution: the leading order monomial has coefficient zero. You need to scale things up as you go about the proof. Also besides using derivative you might, as the other answers suggest, consider using continuities.
Have fun!