Is this proof correct? Prove that a continuous, periodic and non-constant function has a smallest period

I have to prove, as an exercise, that all real, continuous, periodic and non-constant functions cannot have an arbitrarily small period. This was my attempt:

Let $f:\mathbb{R}\rightarrow \mathbb{R}$ be a functions for which the hypothesis of the problem hold. Since $f$ is not constant, there are $z,y\in \mathbb{R}$ such that $f(z)\neq f(y)$, which entails that $|f(z)-f(y)|=D>0$. Suppose, WLOG, that $z>y$, and let there be $0<\epsilon<D$. Since $f$ is continuous, there exists $\delta>0$ such that $$|x-z|<\delta \implies |f(x)-f(z)|<\epsilon.$$ Now, suppose for the sake of contradiction that there is no least period. There exist, then, a period $T$ of $f$ such that $T<2\delta$. The following chain of implications holds: $$0<T<2\delta \implies \frac{2\delta}{T}>1 \implies \frac{(z-y+\delta)}{T}-\frac{(z-y-\delta)}{T}>1 \implies \exists n \in \mathbb{N}:$$$$\frac{z-y-\delta}{T}<n<\frac{z-y+\delta}{T}\implies z-y-\delta<nT<z-y+\delta \implies |y+nT-z|<\delta \implies |f(y+nT)-f(z)|=|f(y)-f(z)|=D<\epsilon.$$ But this is a contradiction, because we supposed at the beginning that $D>\epsilon$.

Can you spot any mistakes I overlooked? Could the writing be improved? How would consider it if it had been written in an exam paper?

• Looks good to me
– user384138
Commented Nov 8, 2016 at 20:36
• Looks perfect to me. A proof not by contradiction, but essentially the same idea, would be: For $x<y,$ for any $\epsilon >0 ,$ let $T$ be a period of $f$ with $0<T<\epsilon /2.$ There is a (unique) $n\in \mathbb N$ such that $x+nT<y\leq x+(n+1)T.$ Then $f(x+nT)=f(x)$ and $|y-(x+nT)|<\epsilon.$ So every nbhd of $y$ contains a point where the value of $f$ is $f(x).$ Since $f$ is continuous, therefore $f(y)=f(x).$ Commented Nov 8, 2016 at 21:53

Posted proof looks good. For an alternative approach, suppose there is no smallest (positive) period. Then there must exist a decreasing sequence $T_1, T_2, \cdots$ of periods with $lim_{n \to \infty} \;T_n = 0$.

For any given $x$, define the sequence $x_1 = x$ and $x_{n+1} = x_n - T_n \; \lfloor \frac{x_n}{T_n} \rfloor$ for $n \ge 1$. Then:

• $0 \le x_{n+1} \lt T_n$ for $n \ge 1$ by definition of $\lfloor \cdot \rfloor$

• $f(x) = f(x_1)$ by definition

• $f(x_{n+1}) = f(x_n)$ because $x_{n+1}-x_{n}$ is a multiple of $T_n$, so $f(x) = f(x_n)$ for $\forall n \ge 1$

It follows that $\lim_{n \to \infty} x_n = 0$, and by continuity of $f$ that$f(x) = \lim_{n \to \infty} f(x_n) = f(0)$ so that $f$ is a constant function, contradicting the hypothesis.

I think you are done after you found $\delta$.

Any period must include both $f(y)$ and $f(z)$, but locally it doesn't due to the continuous function requirement.