TITLE: Sum of two periodic functions
QUESTION [31 upvotes]: Let $f$ and $g$ be two periodic functions over $\Bbb{R}$ with the following property: If $T$ is a period of $f$, and $S$ is a period of $g$, then $T/S$ is irrational. 
Conjecture: $f+g$ is not periodic.
Could you give a proof or a counter example?  It is easier if we assume continuity.  But is it true for arbitrary real valued functions?

REPLY [2 votes]: If each function has a smallest period, and otherwise fits the conditions, then a proof may be forthcoming by attempting to compute the smallest period of the sum and failing.  However, things become unclear if there is no smallest period, as in the case of the characteristic function of the rationals.  Progress might be made in this case by decomposing such a function as an infinite sum of periodic functions, or at least give more
counterexamples to study.  (e.g. Write the characteristic function of the rationals as
an infinite sum of functions of smallest period 1. )

REPLY [2 votes]: As a first start, if $f+g$ is periodic the period cannot be rational w.r.t to the period of $f$  and $g$.
Let us suppose that $T$ is the smallest period of $f(x)$, i.e. for all $x$, $f(x+T) = f(x)$.Similarly $S$ is the smallest period of $g(x)$, i.e. forall $x$, $g(x+S) = g(x)$. If $f+g$ had a period $Q$, and $\frac{Q}{T} = \frac{m}{n}$, we have that forall $x$, $f(x+nQ)+g(x+nQ) = f(x)+g(x)$. But $f(x+nQ)=f(x+mT)=f(x)$, Thus, forall $x$, $g(x+nQ)=g(x)$ and therefore $nQ$ is a period of $g$, which is impossible since it would mean that $\frac{T}{S}$ is rational.