$f$ is a continuous and periodic function and $t$ a real number. Prove that $\exists x \in \mathbb{R}$ such that $f(x+t)=f(x)$ Graphically I can see it but I'm having trouble proving it.
I tried the method here with t=T/2  Periodic function with period $T$; show that there exists a point in the interval with $f(x) = f(x + T /2).$
but I couldn't make it work.
Any help would be welcome.
Edit: Okay this is an attempt:
$$g(x)=f(x+t)-f(x)$$
Let's suppose that: $$g(x) \neq 0 \text{  } \forall x \in \mathbb{R} $$
$g$ is a continuous function so by the mean value theorem $\forall x$ $$g(x)>0 \text{ or }g(x)<0 $$
Let's suppose that $g>0$ so $f(x+t)>f(x)$
$f$ is continuous and periodic function so it's bounded and reaches its bounds:
$\exists x_0 \text { such that } f(x_0)\geq f(x)$
but then  we have $f(x_0+t)>f(x_0)$ which is absurd.
Is this correct?
 A: Let $x_1\in\mathbb{R}$ be a number such that $f(x_1)$ is a global maximum of $f(x)$. Similarly, let $x_2$ be a number such that $x_2>x_1$ and $f(x_2)$ is a global minimum of $f(x)$. We are assured that these exist since $f(x)$ is periodic and continuous. Define the function
$$g(x)=f(x+t)-f(x)$$
We will show that this continuous function has a zero regardless of the $t$ chosen. We have that
$$g(x_1)=f(x_1+t)-f(x_1)\leq f(x_1)-f(x_1)=0$$
$$g(x_2)=f(x_2+t)-f(x_2)\geq f(x_2)-f(x_2)=0$$
If either of $g(x_1)$ or $g(x_2)$ is equal to $0$, then we are done. If not, then $g(x_1)<0$ and $g(x_2)>0$ implies that there exists $x\in (x_1,x_2)$ such that $g(x)=0$.
A: Let $n=\lfloor t/T\rfloor$ so that $t=nT+r$ with $0\leq r<T$. Then
$f(t)=f(nT+r)=f(r)$.
Define $\phi(s)=f(s+r)$. The function $\phi$ is also $T$ periodic and has the same range as $f$. Being continuous, the range of $f$( and hence of $\phi$ )is an interval $I=[a,b]=f([0,T])=\phi([0,T])$.
By continuity, there are  $x^*,x_*\in[0,T]$ for which $f(x^*)=b$, and $f(x_*)=a$. It follows that
$\phi(x^*)-f(x^*)=f(x^*+r)-f(x^*)\leq 0$ and $\phi(x_*)-f(x_*)=f(x_*+r)-f(x_*)\geq 0$. Again, by continuity, in the interval with endpoints $x_*$ and $x^*$ there exists a point $x'$ such that $\phi(x')-f(x')=0$. That is
$$f(x')=f(x'+r)=f(x'+r+nT)=f(x'+t)$$
