Let $a, b \in R$ ($a<b$) and let $f: [a,b] \longrightarrow R$ a continuous function s.t. $f(a) = f(b)$. I need to show that there exist $\delta > 0 \in R$ s.t. $\forall t \in [0, \delta] \exists x \in [a,b-t]$ that $f(x+t)= f(x)$
What I've done: $f$ is continuous in the closed and bounded interval $[a,b]$, then $f$ must attain a maximum and a minimum so if the maximum is in the edges then we're done because $ f(a) = f(b)$. Otherwise it has to be within the interval. I want to take a $ \delta$ around the maximum and show that $f(x+t)= f(x)$ using the Intermediate value theorem.
Can you help me formalize it?
Thanks in advance!