Show that $h$ is a constant. Suppose $h$ is a periodic function and has limit $l\in\mathbb{R}$ at $+\infty$. Show that $h$ is a constant.
Here is what I think.

Since $h(x)$ is a periodic function then $T\in\mathbb{R}^*$ such that $h(x+T)=h(x)$
And by the definition of limit $\lim_{x\to +\infty}h(x)=l$
$\forall \epsilon>0, \exists x_0, \forall x>x_0 $
$$|h(x)-l|<\epsilon$$

Consider interval $I=(x_0,x_0+T)$. Suppose we find $x_1,x_2 \in I $ such that $|h(x_1)-h(x_2)|=\epsilon_1>0$Let's take $\epsilon=\frac{\epsilon_1}{2}$ then $|h(x_1)-l|<\epsilon$ and $|h(x_1)-l|<\epsilon$. On the other hand, $|h(x_1)-h(x_2)|=|h(x_1)-l-(h(x_2)-l)|<|h(x_1)-l|+|(h(x_2)-l)|<\epsilon_1$. A contradiction.
