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>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.

Theorem: Any continuous map on a closed interval has a max and a min. 
Apply this to the interval $[0,p]$. Since for any $x \in R$ we have some $x_0 \in [0,p]$ such that $f(x)=f(x_0)$, the maximum on that sub-interval is in fact a global max.
Note: No differentiability assumption was made.
