Concept:
For SHM, the displacement must be a single sine or cosine function of time. Functions such as \(\sin^2(\omega t)\) can be rewritten using trigonometric identities to determine periodicity.
Step 1: Analyze (A).
\[
\sin^2(\omega t)=\frac{1-\cos(2\omega t)}{2}
\]
This is periodic and behaves as SHM form with angular frequency \(2\omega\).
\[
2\omega t=2\pi
\]
\[
T=\frac{\pi}{\omega}
\]
Thus,
\[
A \rightarrow (S)
\]
Step 2: Analyze (B).
\[
\cos(\omega t)+\cos(2\omega t)
\]
This is a sum of two cosine functions of different frequencies.
Hence it is periodic but not simple harmonic motion.
\[
B \rightarrow (Q)
\]
Step 3: Analyze (C).
\[
\sin^2(2\omega t)=\frac{1-\cos(4\omega t)}{2}
\]
Angular frequency \(=4\omega\).
\[
T=\frac{2\pi}{4\omega}=\frac{\pi}{2\omega}
\]
Thus,
\[
C \rightarrow (R)
\]
Step 4: Analyze (D).
\[
\cos(\pi+\omega t)=-\cos(\omega t)
\]
\[
\cos(\pi+\omega t)+\cos(\omega t)=-\cos(\omega t)+\cos(\omega t)=0
\]
This is constant and hence non-periodic.
\[
D \rightarrow (P)
\]
Final matching:
\[
A-S,\; B-Q,\; C-R,\; D-P
\]
\[
\boxed{(2)}
\]