Is the sum of two sine waves periodic? [closed]

Solution 1:

If $m>0$, $n>0$ and the ratio $\dfrac{m}{n}$ is rational: $$ \dfrac{m}{n} = \dfrac{a}{b}, \qquad a,b\in\mathbb{N}, $$ then the function $$f(x)=\sin(mx)+\sin(nx)\tag{1}$$ is $T$-periodic, where $$T = \dfrac{2\pi}{r\cdot GCD(a,b)},\tag{2}$$ where $r=\dfrac{m}{a} = \dfrac{n}{b}$, and $GCD(a,b)$ means greatest common divisor of $a,b$.

To see that the function $f(x)$ is $T$-periodic, calculate the value $f(x+T)$:

$$f(x+T) = \\ \sin(ar(x+T))+\sin(br(x+T)) = \\ \sin\left(arx+ar\cdot \dfrac{2\pi}{r\cdot GCD(a,b)}\right)+ \sin\left(brx+br\cdot \dfrac{2\pi}{r\cdot GCD(a,b)}\right) = \\ \sin\left(arx+a_1 \cdot 2\pi\right)+ \sin\left(brx+b_1 \cdot 2\pi\right)= \\ \sin(arx)+ \sin(brx)= \\ f(x),$$ since $\;a_1=\dfrac{a}{GCD(a,b)}\in\mathbb{N}$, $\;b_1=\dfrac{b}{GCD(a,b)}\in\mathbb{N}$.

Note: there is the reason to write the ratio $\dfrac{m}{n}$ in the form $\dfrac{m}{n}=\dfrac{a}{b}$, where $\dfrac{a}{b}$ is irreducible fraction; in this case expression $(2)$ will have simpler form: $$ T = \dfrac{2\pi}{r}.\tag{2'} $$


A bit more complicated is to show that the formula $(2)$ determines the smallest possible value for period.


If the ratio $\dfrac{m}{n}$ is irrational, then $f(x)$ isn't periodic. There should be some theorems related to this theme, but I cannot remember any.
Intuitively, for any irrational number $\alpha=\dfrac{m}{n}$ we can focus on its continued fraction and consider infinite sequence of its convergents $\left\{ \dfrac{a_1}{b_1},\dfrac{a_2}{b_2},\dfrac{a_3}{b_3}, \ldots \right\}$ to see 'almost periodic' behavior of such function $f(x)$.

Update: See Micah's elegant sketch of proof in the comments (concerning irrational $m/n$).


To feel the difference between rational and irrational ratio $\dfrac{m}{n}$, consider $m=6+ \varepsilon$, $n = 2 $, where $\varepsilon$ is very small irrational value. Then the continued fraction of the ratio $\alpha = \dfrac{m}{n}$ will have the form $$[3; c_1, c_2, \ldots ],\tag{3}$$ where $c_1$ is large number, other $c_j$ are just positive integer numbers.
Roughly, if consider $1$st convergent $\dfrac{a_1}{b_1}=\dfrac{3}{1}$, then function $f_1(x) = \sin(6x)+\sin(2x)$ has period $\pi$.
But focus on $c_1$: $2$nd convergent is $\dfrac{a_2}{b_2}=\dfrac{3c_1+1}{c_1}$, and function $f_2(x)=\sin\left( 6+\dfrac{2}{c_1} \right)x+\sin(2x)$ will have period $c_1\pi$.
If we focus on $c_2$, then period of $f_3(x)$ will be even larger. And so, each step we will have larger and larger period...

In the case if $\varepsilon$ is rational, the continued fraction $(3)$ is finite, so the process above (of increasing periods) for rational $\varepsilon$ is finite too, then we will stop at certain (large) period.

Solution 2:

The period of $\sin(n_1x)$ is $T_1 =\tfrac{2\pi}{n_1}$ and that of $T_2 =\sin(n_2x)$ is $\tfrac{2\pi}{n_2}$. These are the lengths on the real line after which the functions repeat. For combined period, we need the smallest value so that

$$n_1T_1 = n_2 T_2$$

where $n_1, n_2 \in \Bbb Z$. Thus as Oleg said, we need $\tfrac{T_1}{T_2} \in \Bbb Q$ for the sum to be periodic.