5. The number of zeros of the function $y=\tan (2015 x)-\tan (2016 x)+\tan (2017 x)$ in $[0, \pi]$ is
5.2017

Analysis: Since $\tan (2015 x)+\tan (2017 x)=\frac{2 \tan (2016 x)}{1-\tan ^{2}(2016 x)}(1-\tan (2015 x) \tan (2017 x))$, thus
$$
\begin{array}{l}
\tan (2015 x)+\tan (2017 x)=\tan (2016 x) \\
\Leftrightarrow \frac{2 \tan (2016 x)}{1-\tan ^{2}(2016 x)}(1-\tan (2015 x) \tan (2017 x))=\tan (2016 x) \\
\Leftrightarrow \tan (2016 x)=0 \text { or } 1+\tan ^{2}(2016 x)=2 \tan (2015 x) \tan (2017 x)
\end{array}
$$

And
$$
\begin{aligned}
& 1+\tan ^{2}(2016 x)-2 \tan (2015 x) \tan (2017 x) \\
= & 1+(\tan (2015 x)+\tan (2017 x))^{2}-2 \tan (2015 x) \tan (2017 x) \\
= & 1+\tan ^{2}(2015 x)+\tan ^{2}(2017 x)>0
\end{aligned}
$$

Therefore, only $\tan (2016 x)=0$, i.e., $x=\frac{k \pi}{2016}$, since $x \in[0, \pi]$, hence $k=0,1, \mathrm{~L}, 2016$, thus there are 2017 zeros.