If a function is convergent and periodic, then it is the constant function. I have to prove that if a function f is convergent : $$ \lim\limits_{x\to +\infty} f(x) \in \mathbb{R}$$ and f is a periodic function :
$$\exists T \in \mathbb{R}^{*+}, \forall x \in \mathbb{R}, f(x + T) = f(x)$$
Then f is a constant function.
Actually, this is obvious, but I can't figure out how to prove it formally ..
(I previously thought of this : The link between the monotony of a function, and its limit, but it doen't work because I assume the periodicity hypothesis, and then I use it to prove a contradiction ..)
Thanks !

Argue by contradiction. Suppose $f$ is not constant. Then there exist $a,b \in \mathbb{R}$ with $f(a) \neq f(b)$. Now suppose $c = \lim_{x \to \infty} f(x)$. Then for all $
\epsilon > 0$ there exists an $N > 0$ such that $|c - f(x)| < \epsilon$ for all $x > N$. Since $f$ is periodic, there exists $x > N$ with $f(x)=f(a)$. For this value of $x$, we find that $|c - f(a)| < \epsilon$. Since this holds for all positive $\epsilon$, we must have $c=f(a)$. In the same way, one can show that $c=f(b)$, contradicting the assumption that $f(a) \neq f(b)$.
(Of course, this proof by contradiction can be easily turned into a direct proof: given arbitrary $a,b \in \mathbb{R}$ one show that we must have $f(a)=f(b)$, so $f$ is constant.)
