2. Given the function $f(x)=\log _{2} \frac{x-3}{x-2}+\cos \pi x$. If $f(\alpha)=10, f(\beta)=-10$, then $\alpha+\beta=$ $\qquad$
2. 5 .
It is easy to know that the domain of $f(x)$ is $(-\infty, 2) \cup(3,+\infty)$.
Then $f(5-x)=\log _{2} \frac{5-x-3}{5-x-2}+\cos (5-x) \pi$ $=-f(x)$.
Therefore, $f(x)$ is centrally symmetric about the point $\left(\frac{5}{2}, 0\right)$.
Also, when $x>3$,
$$
f(x)=\log _{2}\left(1-\frac{1}{x-2}\right)+\cos x \pi,
$$

Thus, $f(x)$ is monotonically increasing in the interval $(3,4)$, and
$$
f(4)=0 \text {. }
$$

By the monotonicity of $\log _{2}\left(1-\frac{1}{x-2}\right)$, we know that when $x>4$,
$$
f(x)>\log _{2} \frac{1}{2}-1=-2 \text {. }
$$

Therefore, $\beta \in(3,4)$ and is unique.
Similarly, $\alpha$ is also unique.
Thus, $\alpha+\beta=\frac{5}{2} \times 2=5$.