Let $x_1,...,x_n \in \mathbb{R}$ such that $f(x_1) = f(x_2) = \space ... \space = f(x_n)$
$x_1\lt x_2\lt...\lt x_n$.
So we have the intervals $\left[x_1,x_2 \right],\left[x_2,x_3 \right],...,\left[x_{n-1},x_n \right]$
For each of those intervals, f is either positive or negative.
We will call them positive intervals or negative intervals.
(1) We can prove that there are $\frac{n}{2}+1$ positive intervals or negative intervals.
Let say there are $\frac{n}{2}+1$ positive intervals. [other case is same]
$x_1\lt x_2\lt...\lt x_n$.
So we have the intervals $\left[x_1,x_2 \right],\left[x_2,x_3 \right],...,\left[x_{n-1},x_n \right]$
For each of those intervals, f is either positive or negative.
We will call them positive intervals or negative intervals.
(1) We can prove that there are $\frac{n}{2}+1$ positive intervals or negative intervals.
Let say there are $\frac{n}{2}+1$ positive intervals. [other case is same]