Let $f : \Bbb R \rightarrow \Bbb R$ be a func such that $p>0$, that $f(x+p) = f(x)$ for all $x \in \Bbb R$ . Show that $f$ has an absolute max and min Problem: Let $f : \Bbb R \rightarrow \Bbb R$ be a contiunous function such that for some real number $p&gt;0$, $f(x+p) = f(x)$ for all $x \in \Bbb R$. Show that $f$ has an absolute max and min.

Thoughts:
By rolle's theorem, I know that between $f(x+p)$ and $f(x)$ there has to be a local minimum if $f$ is differentiable on this open interval, but I am outright confused by the precise statement of the question, and in fact I have included an image which may be a counter-example if the question has not been stated properly(sorry for the crudeness of the image) assuming the function continues in this manner infinitely 

Edit: As per a comment, since $f$ is not shown to be differentiable on this interval, then Rolle's theorem does not apply. 

Also see my answer for a response to my initial confusion.
Recall that if a real-valued function $g(x)$ is continuous on a closed and bounded interval $[a,b]$, then it has a global maximum and minimum on $[a,b]$.

And since $f(x)$ is periodic with period $p$, it follows that $f$ is determined by its values on $[0,p]$. Therefore the global maximum for $f$ on $[0,p]$ is a global maximum for $f(x)$ on $\mathbb{R}$.
I feel I should add an interesting fact that was the basis of my confusion. Take any $x \in \Bbb R$. Then for some $p &gt; 0$, $f(x+p) = f(x)$, and $f((x+p) + p) = f(x+p) = f(x)$ and so continuing on in this way $f(x+np) = f(x)$ for all $n \in \Bbb N$.