5. If $[a]$ denotes the greatest integer not exceeding the real number $a$, then the solution to the equation $[\tan x]=2 \sin ^{2} x$ is $\qquad$ .
5. $x=k \pi$ or $l \pi+\frac{\pi}{4}(k, l \in \mathbf{Z})$.

If $[\tan x]=0$, then
$$
\sin x=0 \Rightarrow x=k \pi(k \in \mathbf{Z}) ;
$$

If $[\tan x]=1$, then
$$
\sin x= \pm \frac{\sqrt{2}}{2} \Rightarrow x=l \pi+\frac{\pi}{4}(l \in \mathbf{Z}) ;
$$

If $[\tan x]=2$, then
$$
\sin x= \pm 1,
$$

the original equation has no solution.
In summary, the solution to the original equation is
$$
x=k \pi \text { or } l \pi+\frac{\pi}{4}(k, l \in \mathbf{Z}) .
$$