2. The general solution of the equation $\cos \frac{x}{4}=\cos x$ is $(\quad)$, in $(0,24 \pi)$, the number of distinct solutions is ( ).
$$
x=\frac{8 m}{5} \pi \text { or } x=\frac{8 n \pi}{3}, 20
$$
2. 【Analysis and Solution】The original equation $\cos \frac{x}{4}=\cos x$ can be transformed into $\cos x-\cos \frac{x}{4}=0$,

which is $-2 \sin \frac{5 x}{8} \sin \frac{3 x}{8}=0$.
From $\sin \frac{5 x}{8}=0$, we get $\frac{5 x}{8}=m \pi, x=\frac{8 m \pi}{5}(m \in \mathbf{Z})$.
From $\sin \frac{3 x}{8}=0$, we get $\frac{3 x}{8}=n \pi, x=\frac{8 n \pi}{3}(n \in \mathbf{Z})$.
Notice that the function $f(x)=\cos x-\cos \frac{x}{4}$ is a periodic function with a period of $8 \pi$, within one period $(0,8 \pi)$, the roots of $f(x)=0$ are $0, \frac{8 \pi}{5}, \frac{16 \pi}{5}, \frac{24 \pi 32 \pi}{5}, \frac{8 \pi}{3}$, and $\frac{16 \pi}{3}$, a total of 7 roots. Therefore, in $(0,24 \pi)$, the number of distinct solutions is $3 \times 7-1$ $=20$.
$\therefore$ The solutions to $\cos \frac{x}{4}=\cos x$ are
$x=\frac{8 m}{5} \pi$ or $x=\frac{8 n}{3} \pi$,
where $m, n \in \mathbf{Z}$, and there are 20 distinct solutions in $(0,24 \pi)$.