Prove that, if $\frac{\tau_i}{\tau_j}\in\Bbb Q\space j\ne i,\space i,j\in\{1,\ldots,n\},$ the function $f(x)=\sum_{k=1}^nf_k(x)$ 
Let $f_1,f_2,\ldots,f_n:\Bbb R\to\Bbb R$ be (non-constant) periodic functions with periods $\tau_1,\tau_2,\ldots,\tau_n\in\Bbb R^+$ respectively. Prove that, if $\dfrac{\tau_i}{\tau_j}\in\Bbb Q\space j\ne i,\space i,j\in\{1,\ldots,n\},$ the function $f(x)=\sum\limits_{k=1}^nf_k(x)$ is periodic.


My attempt:
I gave it a try by induction.
Let's look at the base case $n=2$ and let's take $g(x)=(f_1+f_2)(x),$ where $f_1(x)=f_1(x+\tau_1),\space\forall x\in\Bbb R$ and $f_2(x)=f_2(x+\tau_2)\forall x\in\Bbb R$. If $\dfrac{\tau_1}{\tau_2}\in\Bbb Q,$ then we either have $$\tau_1\in\Bbb Q^+\space\land\space\tau_2\in\Bbb Q^+$$ or $$\tau_1=q_1r\in\Bbb R\setminus\Bbb Q\space\land\space\tau_2=q_2r\in\Bbb R\setminus\Bbb Q,\quad q_1,q_2\in\Bbb Q^+,\space r\in\Bbb R^+\setminus\Bbb Q$$
In the first case, let $\tau_1=\dfrac{a}b,\space\tau_2=\dfrac{c}d$ and, WLOG, let's assume $\gcd(a,b)=1,\space\gcd(c,d)=1,\space a,b,c,d\in\Bbb N$ (I don't include $0$). Then:
$$\begin{aligned}f_1(x)&=f_1\left(x+\frac{a}b\right)=f_1(x+a),\forall x\in\Bbb R\\f_2(x)&=f_2\left(x+\frac{c}d\right)=f_2(x+c),\forall x\in\Bbb R\end{aligned},$$
but then, we can find $m,n\in\Bbb N$ s. t. $ma=nc=\gcd(a,c)=k,$ so $f_1(x)=f_1(x+k),\space\forall x\in\Bbb R$ and $f_2(x)=f_2(x+k),\space\forall x\in\Bbb R$ and therefore, $g(x)=(f_1+f_2)(x)=(f_1+f_2)(x+k)=g(x+k)\space\forall x\in\Bbb R$.
In the other case, analogously, let $q_1=\dfrac{a}b,q_2=\dfrac{c}d,\space\gcd(a,b)=1,\gcd(c,d)=1,a,b,c,d\in\Bbb N$ and let $r\in\Bbb R^+$. Then:
$$\begin{aligned}f_1(x)&=f_1\left(x+\dfrac{a}br\right)=f_1(x+ar),\forall x\in\Bbb R\\f_2(x)&=f_2\left(x+\dfrac{c}dr\right)=f_2(x+cr),\forall x\in\Bbb R\end{aligned}$$
and we can again find $\gcd(a,c)=ma=nc=k$ s. t. $g(x)=(f_1+f_2)(x)=(f_1+f_2)(x+kr)=g(x+kr)\forall x\in\Bbb R$.
Then, if we assume the statement holds for any $2\le m\le n$, i. e., that $g(x)=\sum\limits_{k=1}^m f_k(x)$, where the period of $f_k$ is $\tau_g=\dfrac{a_k}{b_k}\in\Bbb Q^+$ or $\tau_g=\dfrac{a_k}{b_k}r\in\Bbb R^+$ and therefore $g(x)=g(x+\gcd(a_1,a_2,\ldots,a_m))$ or $g(x)=g(x+\gcd(a_1,a_2,\ldots,a_m)r),2\le m\le n$, then:
if $$\tau_{n+1}=\dfrac{a_{n+1}}{b_{n+1}}\in\Bbb Q\space\land\space\tau_g\in\Bbb Q$$ or $$\tau_{n+1}=\dfrac{a_{n+1}}{b_{n+1}}\in\Bbb R^+\setminus\Bbb Q\space\land\space\tau_g\in\Bbb R^+\setminus\Bbb Q$$ $f(x)=g(x)+f_n(x)$ will be periodic with a period $\tau=\gcd(a_1,a_2,\ldots,a_n,a_{n+1})$ or $\tau=\gcd(a_1,a_2,\ldots,a_n,a_{n+1})r$ respectively.

May I ask for verification of my work so far and advice on what I have to correct/improve?
Thank you in advance!
 A: Some remarks concerning your proof:

*

*This part is wrong or misleading:
$$
ma=nc=\gcd(a,c)=k \, .
$$
$\gcd(a,c)$ is the greatest common divisor of $a$ and $c$. What you need is the least common multiple $\operatorname{lcm}(a, c)$ (or any common multiple) in order to get a common period of $f_1$ and $f_2$.


*The distinction whether $\tau_1$ and $\tau_2$ are both rational or both irrational is not needed.


*The assumption that the fractions $\tau_1 = a/b$ and $\tau_2 = c/d$ are in reduced form is not needed.
I would simplify the proof as follows: With $\tau = \tau_1$ and $r_k = \tau_k/\tau_1 \in \Bbb Q^+$ the periods of $f_1, f_2, \ldots, f_n$ are
$$ 
 r_1 \tau, \, r_2 \tau, \, \ldots, \, r_n \tau \,,
$$
respectively. The positive rational numbers $r_k$ can be written as $p_k/q$ with $p_k \in \Bbb N$ and a common denominator $q \in \Bbb N$.
Let $p = \operatorname{lcm}(p_1, p_2, \ldots, p_n)$ be the least common multiple of the numerators (or any common multiple, $p=p_1p_2 \cdots p_n$ would work as well). Then
$$
 \forall x: f_k(x) = f_k(x + p_k \frac{\tau}{q}) \\
 \implies \forall x: f_k(x) = f_k(x + p \frac{\tau}{q})
$$
so that $p \tau/q$ is a common period of all functions $f_1, \ldots, f_n$. It follows that $\sum_{k=1}^n f_k$ is periodic.
