2. In the interval $[0, \pi]$, the number of solutions to the trigonometric equation $\cos 7 x=\cos 5 x$ is $\qquad$
7
2.【Analysis and Solution】The original equation can be transformed into $-2 \sin 6 x \sin x=0$, whose solutions are $x=k x, x=\frac{l}{6} \pi(k, l \in \mathbf{Z})$, so all solutions of the given equation can be expressed as $x=\frac{l}{6} \pi(l \in \mathbf{Z})$. When $l=0,1,2, \cdots, 6$, $x \in[0, \pi]$.
Therefore, the number of solutions in the interval $[0, \pi]$ is 7.