# Show that if f is continuous and periodic then f attains both its minimum and its maximum.

Show that if f is continuous and periodic then f attains both its minimum and its maximum.

The solution is given below: But I wonder why he choose the k like this and is the solution does not contain any flaws?

I can not understand the general idea of the proof, could anyone explain it for me please?

• The proof seems unnecessarily involved to me. I would just observe that by periodicity, the image is $f(I)$ for some closed interval $I=[a,b]$, recall that the continuous image of a compact connected set is compact and connected, and that the only compact connected sets in $\mathbb R$ are closed (bounded) intervals. Thus, the image is of the form $[f(c),f(d)]$ for some $c,d\in I$.
– MPW
Oct 29, 2018 at 8:55
• I can not use this concepts until now ........ I need to see if the above proof is consistent or no @MPW Oct 29, 2018 at 8:59

Consider the picture below: We first divide the real line into the intervals $$[0,T]$$, $$[T,2T]$$,... (negative also but we assume that $$C>0$$ for this picture). Suppose that $$C$$ exists such that $$f(C)>M = \sup\{f(x):0\leq x \leq T\}.$$

We pick $$k$$ such that $$C\in [kT,(k+1)T]$$. This is possible since these intervals cover $$\mathbf{R}$$. This is precisely what the author means by letting $$k = \lfloor C/T \rfloor$$ that is the largest integer $$k$$ such that $$k\leq C/T$$ which implies that $$k\leq C/T\leq k+1$$ and therefore $$C\in [kT,(k+1)T].$$

Now $$kT\leq C\leq (k+1)T\Rightarrow 0\leq C-kT\leq (k+1)T-kT = T$$ and therefore this would imply that if we write $$C' = C-kT$$

$$f(C') = f(C-kT) = f(C) >M$$

However $$C'\in [0,T]$$ by the above inequality and therefore $$f(C')\leq M$$ thus we have derived a contradiction.

• but why he said contradicting that M is maximum ...... was it assumed that Mis maximum (I know that it was assumed that it is supremum not maximum)? Oct 29, 2018 at 8:45
• $f$ restricted to $[0,T]$ is continuous and $[0,T]$ is compact. What do you know about maximum and supremum of continuous functions on compact sets? Oct 29, 2018 at 8:47
• okay thank you :) Oct 29, 2018 at 8:51
• what will be the value for k if I want to proof hat f attains its minimum? Oct 29, 2018 at 9:31
• just repeat the proof exchanging supremum with infimum and maximum with minimum Oct 29, 2018 at 9:33

This proof, while correct, is very clumsy, to say the least.

Since $$f$$ is periodic any value taken by $$f$$ is already taken in the interval $$[0,T]=:J$$. The restriction of $$f$$ to $$J$$ is continuous, hence $$f\restriction J$$ takes a maximal value $$M$$ at some point $$\xi\in J$$. It follows that $$\max_{x\in{\mathbb R}} f(x)=M=f(\xi)$$.