We have, $x+2 \tan\, x=\frac{\pi}{2}$
$\Rightarrow \,\tan\, x=\frac{\pi}{4}-\frac{x}{2}$
Let $y=\tan\, x$ and $y=\frac{\pi}{4}-\frac{x}{2}$
The curves $y=\tan\, x$ and $y=\frac{\pi}{4}-\frac{x}{2}$ in interval $[0,2 \pi]$, intersect at three points. The abscissa of these three points are the roots of the equation.