How to find the period of the sum of two trigonometric functions

I want to know if there exists a general method to find the period of the sum of two periodic trigonometric function. Example:

$$f(x)=\cos(x/3)+\cos(x/4).$$


The period of $\cos\dfrac xk$ is $2\pi k$

So, the period of $\cos\dfrac x3$ is $2\pi\cdot3$ and that of $\cos\dfrac x4$ is $2\pi\cdot4$

As $\dfrac{2\pi\cdot4}{2\pi\cdot3}=\dfrac43$ is rational

So, the period of $\cos\dfrac x3+\cos\dfrac x4$ will be a divisor of lcm$(6\pi,8\pi)=24\pi$

Now try with the divisors of $24$