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

Is the sum of two sine waves periodic? Specifically, what will be the period of $$\sin(mx)+\sin(nx)$$ where $$m$$ and $$n$$ are real constants?

When $$m$$ and $$n$$ are integers, it is not difficult to show by definition that $$\sin(mx)+\sin(nx)$$ is periodic. But I don't know how to handle the general cases. Can anyone help?

• It depends on $m,n$. Are they integers? rationals? irrational? Apr 6 '18 at 13:51
• m and n are real numbers. Apr 6 '18 at 13:52
• then it depends on the ratio $m/n$: whether it is rational or irrational. Apr 6 '18 at 13:53
• math.stackexchange.com/questions/873723/… Apr 6 '18 at 14:09
• Apr 6 '18 at 17:10

## 2 Answers

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.

• Nice answer this! Apr 6 '18 at 14:24
• If $m/n$ is irrational, then $f$ is differentiable and $f'(x)=m+n$ if and only if $x=0$. So $f$ cannot be periodic. Apr 6 '18 at 18:33
• The case of irrational $m/n$ is one of the motivating examples of almost periodic functions. Apr 6 '18 at 18:54
• To prove that the value $T$ (described by $(2)$) is the smallest value of possible periods in the case of rational $m/n$, one can use trick mentioned by @Micah (thanks!): consider $f'$ and show that the smallest positive solution of eq. $f'(x)=m+n$ is $x=T$. Apr 6 '18 at 19:13
• FYI: I have voted to reopen this post. If you find this question worth answering, as I do, please vote to reopen it as well. Thanks.
– user9464
Nov 7 '19 at 13:08

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.

• You might want to change $n$ and $m$ to $n_1$ and $n_2$ or vice versa Apr 6 '18 at 19:12
• @infinite oops completely missed. Thanks a lot! Apr 7 '18 at 2:28