periodic continous function $f$ I have a function $f: \mathbb{R} \longrightarrow \mathbb{R}$ that is continous with $f(x)=f(x+2)$ for all real numbers $x \in \mathbb{R}$. So, I have to show that an $a \in \mathbb{R}$ exists that $f(a)=f(a+1)$. I tried to proof this by using the periodicity of $f(x)$ and so I took a look on: 
$f_1: [0,2] \longrightarrow \mathbb{R}$ I concluded that this $f_1$ has also uniform continouity. Then I took the definition of uniform continouity $\forall \epsilon > 0\exists \delta> 0 \forall x\in\mathbb{R}, y\in\mathbb{R}: |x-y|<\delta \Rightarrow |f_1(x)-f_1(y)|<\epsilon$ Unfortunately, I don't know what to do next and I am also not sure whether the solutions, that I have done, are right. Can someone help me with that, please?
 A: Let $g(x)=f(x+1)-f(x)$. Let's notice that $g(0)=f(1)-f(0)$ and that $g(1)=f(2)-f(1)=f(0)-f(1)=-(f(1)-f(0))$. Therefore, $g(0), g(1)$ have opposite signs (one negative and one positive. there's a case where they're both $0$, and then we've proven what we want). Therefore according to the intermediate value theorem, the function $g$ must take all values between $g(1), g(0)$ in $(0,1)$  in particular, $0$, and therefore exists $x_0\in (0,1)$ such that $g(x_0)=0$ meaning $f(x_0)=f(x_0+1)$
A: Define $$ g(x) = f(x+1) - f(x)  $$
If it is ever zero you are done.
If $g$ is always positive, what happens? Always negative?
A: Let $f(a),f(b)$ respectively be the maximum and minimum of $f$ on $[0,2]$. Since the image of $f$ in $[0,2]$ is the same as its image on $\mathbb{R}$, these are also its global extremum on $\mathbb{R}$. 
Hence, $f(a) \geq f(a+1)$ and $f(b) \leq f(b+1)$ and the result follows from the IVT. Note if the above inequalities are equalities, we're already done. 
A: Define $g(x)=f(x+1)-f(x)$ for all $x\in\mathbb{R}$. Then $g(x+1)=-g(x)$ for all $x\in\mathbb{R}$. If $g$ is identically $0$ then the wanted conclusion about $f$ follows. If $g$ is not identically $0$ then for some $x_0$ it is the case that $g(x_0)\ne0$. Since $g$ is continuous and $g(x_0)$ and $g(x_0+1)$ have opposite sign, there must exist an $a\in[x_0,x_0+1]$ for which $g(a)=0$. Thus $f(a+1)-f(a)=0$ and we are done.
