If the function given by $\displaystyle f(x) = \sin x + \cos px$ is periodic, prove that p is a rational number.
suppose $\displaystyle T \neq 0$ is a period of $\displaystyle f.$ then $\displaystyle \sin(x+T)+\cos(px+pT)=\sin x + \cos px.$ call this (1). put $\displaystyle x=0$ in (1) to get: $\displaystyle \sin T + \cos pT = 1.$ call this one (2). now differentiate (1) twice to get:
$\displaystyle \sin(x+T)+p^2 \cos(px+pT)=\sin x + p^2\cos px,$ and put $\displaystyle x=0$ to get: $\displaystyle \sin T + p^2 \cos pT=p^2.$ call this (3). now (2) and (3) give us: $\displaystyle (p^2-1)(\cos pT - 1)=0.$ therefore either $\displaystyle p^2=1$ and so
$\displaystyle p=\pm 1 \in \mathbb{Q},$ or $\displaystyle \cos pT = 1$ and thus by (2): $\displaystyle \sin T=0.$ hence $\displaystyle pT=2k \pi$ and $\displaystyle T=\ell \pi,$ for some integers $\displaystyle k$ and $\displaystyle \ell \neq 0.$ thus: $\displaystyle p=\frac{2k}{\ell} \in \mathbb{Q}.$
Period of $\displaystyle \sin x=2\pi$
Period of $\displaystyle \cos px=\frac{2\pi}{p}$
Period of $\displaystyle f(x)=L.C.M\left\{2\pi,\frac{2\pi}{p}\right\}$=$\displaystyle 2\pi L.C.M\left\{1,\frac{1}{p}\right\}$.
If f(x) is to be periodic then the L.C.M must exist.This L.C.M will exist only if p is a rational number and $\displaystyle 2\pi L.C.M\left\{1,\frac{1}{p}\right\}$also may not be the fundamental period.
How do you know that the period of the sum must be a period of both?
Assuming this, of course, the problem is easy; but you should supply proofs of your statements!
See my other thread.