I have a continuous function $f$ over an interval $\left [ a,b \right ]$ such that $f(a)=f(b)$. Also $f$ admits no local extrema over this interval.
I can say that this function reaches a maximum and a minimum over this interval, let's call the maximum $c=f(x_1)$ and the minimum $d=f(x_2)$.
Then $c\neq d$ because otherwise the function would be constant over the interval and every point of it would be a local extremum.
Here's the step that I don't understand: Since $f(a)=f(b)$ we have either $a < x_1 < b$ or $a< x_2 < b$
I don't understand how can we have either of the inequalities alone! If we consider the maximum $c$ for example it couldn't be greater than $f(a)$ or $f(b)$ because then we would have a local maximum so it has to be equal to them and so do all the other points between $a$ and $b$ and we reach the constancy case again. Also why are the inequalities strict?
Thank you very much in advance.