# Continuous function and periodic

A function $f: X\subset \mathbb{R} \rightarrow \mathbb{R}$ is periodic when exist $p \in (0, \infty)$ such that $f(x+p) = f(x)$ for all $x \in X$. Prove that all continuous and periodic functions $f: X\subset \mathbb{R} \rightarrow \mathbb{R}$ are bounded and reach the maximum and minimum values. The result is valid if $f: X\subset \mathbb{R} \rightarrow \mathbb{R}$ is countinuous and periodic?

I really don't know where I can start. The hint of the book tells me: Take $x_0, x_1 \in [0,p]$ points where $f|_{\{0,p\}}$ reach the maximum and minimum values. And the answer of question is satisfied with the proof of this?

• Do you know the extreme value theorem? Commented Oct 23, 2017 at 5:17
• Yes. That can help me? @ma
– BpZ
Commented Oct 23, 2017 at 5:23
• As a hint, you want to find a way to apply the EVT. That's a little tricky though, as it's only valid for compact subsets (closed and bounded, or of the form $[a,b]$ for $a,b\in\mathbb{R}$ with $a<b$). You'll need to find a good one to look at, apply it, and argue why this tells you something about $\mathbb{R}$. Commented Oct 23, 2017 at 5:24
• @Bella Patarroyo Please check your statement. In order to prove that $f$ is bounded we need some hypothesis for $X$. Commented Oct 23, 2017 at 5:38
• This is a exercises of Análisis real by Elon Lages Lima. Chapter 7, section 3 exercise 4. This is the book: vargasmat.files.wordpress.com/2011/05/anc3a1lisis-real-lima.pdf I don't find the english book, I'm sorry.
– BpZ
Commented Oct 23, 2017 at 5:45

Hint. If $X=\mathbb{R}$ then the property is true. Since $f$ is continuous and the interval $[0,p]$ is closed and bounded, it follows that $f$ attains in $[0,p]$ a maximum and a minimum value, by the Extreme value theorem. Moreover, for $x\in \mathbb{R}$ let $k:=\lfloor x/p \rfloor\in\mathbb{Z}$, then $t:=x-kp\in [0,p]$ and $$f(x)=f(x-kp)=f(t).$$ Can you take it from here?
Note that $f(x)=\tan(x)$ is a periodic and continuous function in $X=\mathbb{R}\setminus\{\pi/2+k\pi:k\in\mathbb{Z}\}\subsetneq\mathbb{R}$, which is NOT bounded.