# $f:\mathbb{R}\to\mathbb{R}$ is continuous and periodic ($f(x+1)=f(x)$), prove that $\exists m\in\mathbb{R}: f(m+\pi)=f(m)$.

## What I have got:

Let's take $$g(x):=f(x+\pi)-f(x)$$ Now we must show that $\exists m\in\mathbb{R}:g(m)=0$. We see that as $f$ is periodic, $g$ is also a periodic function. Now let's suppose that $\forall x\in\mathbb{R}$ $g(x)\neq 0$. This means that $g(x)$ is strictly positive or negative. Now, because $f$ is periodic and continuous, it has $\max$ and $\min$. Is $f$ is strictly positive and $f(m)$ is $\max$, we get g(x)<0.

## Is the last sentence a contradiction? How should the proof go? Am I approaching the problem right?

• Yes, this is essentially correct. Note that after defining $g$, you can skip a lot of the words you wrote. Just let $m$ be such that $f(m)$ is maximal. Then $g(m)\le0$, and $g(m-\pi)\ge0$. Oct 30, 2017 at 20:48
• This is correct. The assumption that $g$ is always positive (or always negative) leads to a contradiction when $f(m)=\max f$ (or $f(m)=\min f$ ) so there must exist $x$ with $g(x)=0.$.... & $f$ attains its max and min is because $\{f(x): x\in [0,1]\}$ contains all the values of $f,$ and the function $f|_{[0,1]}$ ... (which is $f$ restricted to the domain $[0,1])$... is continuous so it attains its sup and inf. Oct 31, 2017 at 0:02