Negation of monotonicity of a continuous function
So I am given a continuous function mapping a connected domain to the reals, i.e .
I want to show that if f is not strictly monotone and f is continuous, we have with such that:
or
As for what I've tried, using the negation of strictly monotone, we have that f must be increasing and decreasing in two intervals and i.e.:
or
The problem comes when I look to combine the two into a single inequality. In an effort to combine these, the only way I see of doing it (directly) would be casewise. If anyone could provide a hint or (less preferred) a complete direct proof I would appreciate it.