2. How many solutions of the equation

$$
\sin 3 x-\sin x+\cos 2 x=1
$$

lie in the interval $[2,24] ?$
2. We transform the equation into $\sin 3 x-\sin x=1-\cos 2 x=2 \sin ^{2} x$, i.e., $2 \sin x \cos 2 x=2 \sin ^{2} x$. One possibility is $\sin x=0$, i.e., $x=k \pi$ for $k \in \mathbb{Z}$. In the case $\sin x \neq 0$, after canceling with $2 \sin x$, we get $\cos 2 x=\sin x$, i.e., $1-2 \sin ^{2} x=\sin x$. Let's introduce the substitution $\sin x=t$. Then we obtain the quadratic equation $2 t^{2}+t-1=0$, and its solutions are $t_{1 / 2}=\frac{-1 \pm \sqrt{1+8}}{4}=\frac{-1 \pm 3}{4}$, i.e., $t_{1}=\frac{1}{2}$ and $t_{2}=-1$. Therefore, $\sin x=\frac{1}{2}$ or $\sin x=-1$, i.e., $x=\frac{\pi}{6}+2 k \pi, x=\frac{5 \pi}{6}+2 k \pi$ or $x=-\frac{\pi}{2}+2 k \pi$ for $k \in \mathbb{Z}$.

It remains to count how many of the found solutions are in the interval [2,24]. Since $0<2<\pi$ and $7 \pi<24<8 \pi$, we have 7 solutions of the form $x=k \pi$ (for $1 \leqslant k \leqslant 7$). Further, since $\frac{\pi}{6}<2<\frac{13 \pi}{6}$ and $\frac{37 \pi}{6}<24<\frac{49 \pi}{6}$, we have 3 solutions of the form $x=\frac{\pi}{6}+2 k \pi$ (for $1 \leqslant k \leqslant 3$). Then, since $0<2<\frac{5 \pi}{6}$ and $\frac{41 \pi}{6}<24<\frac{53 \pi}{6}$, we have 4 solutions of the form $x=\frac{5 \pi}{6}+2 k \pi$ (for $0 \leqslant k \leqslant 3$). Finally, since $-\frac{\pi}{2}<2<\frac{3 \pi}{2}$ and $\frac{15 \pi}{2}<24<\frac{19 \pi}{2}$, we have 4 solutions of the form $x=-\frac{\pi}{2}+2 k \pi$ (for $1 \leqslant k \leqslant 4$).

Therefore, the total number of solutions in the desired interval is $7+3+4+4=18$.