Combination of Simple Harmonic Motions Will the combination of 2 Simple Harmonic motions will be an SHM in itself?
For example for simple functions such as 
$$\ f(t)=\sin\omega t-\cos\omega t$$ I can use trigonometry to show that it can be expressed as $$\ f(t)=\sqrt 2\sin(\omega t-\pi/4) $$.
But what about functions given in the questions given below?
[Ref: “NCERT Class 11th (XI) Physics, Part 2”, Digital Designs; notes on p. 357 and Problem 14.4, p. 359 <link> ]
In (b) I can express the function as a combination of 
$\sin\omega t$ and $\sin3\omega t$.
Each of these 2 terms can independently express an SHM but will their combination do the same?

As an answer to part (b) and (d) ,the book says that the superposition of two SHM is always periodic but never an SHM. (I believe that this is incorrect.Maybe a typo)
Moreover, at the end of the chapter there is a note:

I am getting pretty confused.
Can anybody tell me when the combination of 2 SHM's be an SHM/periodic/not periodic?
 A: Consider the superposition of two simple harmonic motions
\begin{equation}
x(t) = x_1(t) + x_2(t) = A_1 \cos \left( \omega_1 t + \phi_1 \right) + A_2 \cos \left( \omega_2 t + \phi_2 \right).
\end{equation}
The first motion $x_1(t)$ is periodic with period $T_1 = \frac{2\pi}{\omega_1}$ and the second motion $x_2(t)$ is periodic with period $T_2 = \frac{2\pi}{\omega_2}$. Clearly the sum of both is only periodic if $n T_1 = m T_2$ where $n$ and $m$ are positive integers (thanks to user fibonatic for pointing out the most general case). To see this, simply write 
\begin{equation}
x\left(t+nT_1\right) = x_1\left(t+nT_1\right) + x_2\left(t+mT_2\right) = x_1(t) + x_2(t) = x(t).
\end{equation}
Moreover if the period of both harmonic motions is the same $\omega_1 = \omega_2 = \omega$, we can write
\begin{align}
x(t) & = A_1 \left[ \cos(\omega t) \cos \phi_1 - \sin(\omega t) \sin \phi_1  \right] + A_2 \left[ \cos(\omega t) \cos \phi_2  - \sin(\omega t) \sin \phi_2  \right] \\
& = \left[ A_1 \cos \phi_1  + A_2 \cos \phi_2  \right] \cos(\omega t) - \left[ A_1 \sin(\phi_1) + A_2 \sin \phi_2  \right] \sin(\omega t) \\
& = A \cos \left( \omega t + \phi \right),
\end{align}
where used the sum rule $\cos\left( \alpha + \beta \right) = \cos \alpha \cos \beta - \sin \alpha \sin \beta$, and we defined
\begin{align}
A \cos \phi & = A_1 \cos \phi_1  + A_2 \cos \phi_2  \\
A \sin \phi & = A_1 \sin \phi_1  + A_2 \sin \phi_2 .
\end{align}
This can be generalized to an arbitrary sum of harmonic motions with the same period:
\begin{equation}
\sum_i A_i \cos \left( \omega t + \phi_i \right) = A \cos \left( \omega t + \phi \right).
\end{equation}
Another way to understand this, is to note that the harmonic equation is a linear differential equation; any linear combination of solutions is also a solution.
Conclusion
The sum of two harmonic motions with frequencies $\omega_1$ and $\omega_2$ is periodic if the ratio $\frac{\omega_1}{\omega_2}$ is a positive rational number. If the ratio is irrational, the resulting motion is not periodic. 
If, moreover, the frequencies of the two harmonic motions are equal, the resulting motion is also a harmonic motion with the same frequency.
