Sum of two periodic functions is periodic?

It's more because for engineers, periods tends to have common divisors and hence the sum of two functions of periods $n x$ and $m x$ with $n,m∈ℕ$ is then $\mathrm{lcm}(n,m)x$.

For instance, in maths the usual counterexample is $\sin(x)$ and $\sin(x\sqrt 2)$ and that to get yourself into that situation in real life is difficult.

Another example, that happen to be highly strange and will never happen in practise: there exist two periodic functions $f$ and $g$ such that their sum is the identity function on $\mathbb R$ (yes, $∀x∈ℝ~~f(x)+g(x)=x$). But this time, even in math it is difficult to find yourself into this situation. (See this for how to do it, but it is a spoiler, it is really fun to look into it yourself.)


Let $f$ and $g$ two periodic function two non-constant periodic continuous functions of $\mathbb{R}\rightarrow\mathbb{R}$. Note $a>0$ the smallest period of f and $b$ the smallest period of g.

Find a necessary and sufficient condition for f + g is periodic.

Notice that If $b$ is a multiple of $a$, then $f+g$ is clearly periodic.

Plus, she $\frac{a}b \in \mathbb{Q}$, where $\frac{a}b=\frac{p}q$ then $aq=bp$ is clearly a period of $\quad f+g$

This condition is actually necessary.

Proof. By contradiction, assume $\frac{a}b \notin \mathbb{Q}$ and $f+g$ periodic and $c$ the smallest period of g, $\forall x\in \mathbb{R}$ we have, $$ f(x+c)+g(x+c)=f(x)+g(x), $$ What is better rewritten in the invariant form : $$ f(x+c)-f(x)=g(x)-g(x+c) $$ Denote $\gamma(x)$ the common value, then for $k,l$ integer we find $$ \gamma(x + ka + lb) = f (x + ka + lb + c) - f (x + ka + lb) $$ $$ = f (x + lb + c) - f (x + lb) $$ $$ = \gamma(x + lb) = g (x + lb + c) -g (x + lb) = g (x + c) -g (x) = \gamma(x) $$ Therefore, all real of $a\mathbb{Z}+b\mathbb{Z}$ is a period of $\gamma$ But $a\mathbb{Z}+b\mathbb{Z}$ is dense in $\mathbb{R}$ because $\frac{a}b \notin \mathbb{Q}$.

Therefore $\gamma$ is $\epsilon$-periodic fo all $\epsilon$.

As $\gamma$ is continuous, he is necessarily constant : $$ \gamma=\gamma_0 $$ Furthermore, $$ f(Id+c) = f + \gamma_0, $$ Then for all real x we have, $$ f(x+nc)=f(x)+n\gamma_0 $$ $$ \Longrightarrow \gamma_0=0 $$ because $f$ is continuous and periodic thus $f$ is bounded.

Therefore, $c$ is a common period of $f$ and $g$.

Then $c$ is in $a\mathbb{N^*}\bigcap b\mathbb{N^*}$, but he is empty because $\frac{a}b \notin \mathbb{Q}$. QED


Your question is interesting but a little vague. (It's also not completely clear that it's a math question, but I think there will turn out to be mathematical content.)

Let me just push the discussion in what I think is the right direction. Let $\frac{a}{b}$ be any nonzero rational number. Then

$f_{a/b}(x) = \sin x + \sin \frac{a}{b} x$ is periodic -- e.g. with period $2 \pi b$

whereas

$g(x) = \sin x + \sin \pi x$ is not periodic. (This is not completely obvious! See here for a nice proof.)

However there are rational numbers $\frac{a}{b}$ which are arbitrarily close to $\pi$, so the non-periodic function $g$ is the limit of periodic functions.

I think the crux of the matter is: everyone would have to agree (right?) that each of the functions $f_{a/b}$ occurs naturally in engineering, e.g. in the most basic analysis of harmonics. From a mathematical perspective the function $g$ looks equally "plausible" (and, mathematically speaking, it is a pointwise limit of "engineering-natural functions"). But does that imply that $g$ is an "engineering-natural function"? Perhaps not...

Or, to get a bit more "meta":

Is the notion of "engineering-natural functions" mathematically coherent? Is it natural or useful in engineering?