# Are there periodic functions without a smallest period?

The Wikipedia page for periodic functions states that the smallest positive period $P$ of a function is called the fundamental period of the function (if it exists). I was intrigued by the condition that the function actually has a smallest period, so my question is, what properties of a function would cause it to be periodic but not have a smallest period?

• If you don't require the function to be continuous, every subgroup of $\mathbb{R}$ is the period group of a periodic function. Oct 31 '14 at 21:54
• Perhaps more interesting: are there periodic continuous non-constant functions with no smallest period? Nov 1 '14 at 9:30
• No, there doens't exist periodic continuous non-constant functions with no smallest period. Actually, it doesn't end there: there doesn't exist periodic "somewhere continous" non-constant functions with no smallest period. (That is, if you want a periodic function to have no smallest period, the you must make it either constant or nowhere continuous). There is a proof below. Nov 3 '14 at 7:16
• @Przemysław: I don't understand the motivation for the bounty. "This question has not received enough attention"?
– user856
Dec 25 '14 at 4:16
• @Rahul Alas, I can only choose one of the possibilities, not my own choice. And this would be "It is a Christmas gift". Dec 25 '14 at 4:19

For a nontrivial example, consider the Dirichlet function, which has $$\delta(x) = \begin{cases}0 & \text{ if x is rational}\\1 & \text{ if x is irrational}\end{cases}$$

Then $\delta(x)$ is periodic with period $r$ for every rational number $r$.

• I guess this is a consequence of the fact that there are irrationals(in fact infinitely many) between any 2 rationals? Oct 31 '14 at 23:25
• @Cruncher Actually no, rather it's because $\alpha$ is irrational if and only if $\alpha+r$ is, for any rational $r$. Oct 31 '14 at 23:34
• I noticed that this construction is constant, if you restrict the domain to only the rational numbers. I then wondered if there exist any construction, which is non-constant even if the domain is only the rational numbers. Turns out there does. One could define $f(x)$ to be $0$ if $x$ can be written with a finite number of decimals, and $1$ if $x$ requires infinitely many (repeating) decimals. This would be periodic with period $10^{-n}$ for any $n$. Nov 2 '14 at 16:08
• @MJD Your $f$ in the comment does not seem to be periodic, and in the next comment, you probably left "dense" out?
– JiK
Nov 3 '14 at 9:19
• Thanks. meant rationals of the form $k2^{-n}$.
– MJD
Nov 3 '14 at 12:53

Yes, for example constant function.

• I cannot believe I overlooked that. Oct 31 '14 at 21:53
• @PrzemysławScherwentke This appears to be the only continuous one, so it's certainly note-worthy! Although, I'm almost tempted to say that the period is 0 in this case. Oct 31 '14 at 23:26
• @Cruncher But the fundamental period is smallest positive period and every positive number is a period. Oct 31 '14 at 23:30
• #cruncher We don't consider zero to be a period because if we did, every function would be periodic, since $f(x+0) = f(x)$.
– MJD
Nov 1 '14 at 3:00
• @Kartik no, it should be a comment or an edit to the original question. Clearly the reply is "I mean besides constant" so it adds little value. Nov 2 '14 at 19:38

In fact, a continuous function of a real variable having arbitrarily small periods is necessarily a constant. Indeed, the set of periods is then a dense additive subgroup of the real line, and the function is constantly equal to its value at any point.

• Would be nice if you included a proof of the first statement. Nov 1 '14 at 19:16
• @Mehrdad Did you read the second sentence? Nov 2 '14 at 14:11
• @Mehrdad Left as an exercise for the reader. It's quite trivial. Nov 2 '14 at 21:17
• Actually, you don't need to suppose $f$ is globally continuous. You only have to suppose $f$ is continuous at at least one point for it to be constant. Nov 3 '14 at 7:26
• @Mehrdad Check out my comment XD
– BCLC
May 3 '18 at 11:20

You can show that if a periodic function is continuous at at least one point, and doesn't have a minimum period, then it is constant.

In other words: in order for a function to have arbitrarily small periods, it must be either constant or everywhere discontinuous.

The reasoning is simple: if $f$ doesn't have a smallest period, then the image of $f$ must be the same in every open interval. Therefore, no matter how small is $\varepsilon$, the oscillation of $f$ in any $(a, a+\varepsilon)$ (defined as $\sup f - \inf f$ restricted to that interval) is going to be the same as the global oscillation. Since the oscillation is constant as $\varepsilon\to 0$, and we know that the oscillation should converge to $0$ if we want $f$ to be continuous at $a$, we reach the conclusion that $f$ is nowhere continuous (allowing that $f$ is constant in the case that this global constant oscillation is $0$).

It is easy to obtain "examples" of constant functions. As MJD's answer says, an example of a non-constant function with arbitrarily small periods is the indicator function of the rationals ($1$ at the rationals and $0$ at the irrationals). As noted by Hagen von Eitzen in MJD's post, this function doesn't accept a smallest period because a real number $x$ is rational if and only if $x+r$ is also rational for any rational $r$ (hence any rational number is a period of this function).

Here's a large family of nontrivial examples with an uncountable set of periods. Select a Hamel basis $\{x_\alpha\}_{\alpha \in A}$ of $\mathbb{R}$ as a vector space over $\mathbb{Q}$, and let $f_\alpha: \mathbb{R} \to \mathbb{Q}$ be the extraction of the coefficient of some fixed $x_\alpha$. Then any rational multiple of any element of the Hamel basis other than $x_\alpha$ itself is a period of $f_\alpha$.