Integration by substitution trig I need to integrate $\frac {1}{2-\cos x}$ and I am given $t=\tan(x/2)$. What should I do with it?

$$t=\tan\frac{x}{2}\Longrightarrow x=2\arctan t\Longrightarrow dx=\frac{2}{1+t^2}dt\Longrightarrow$$
$$\int\frac{dx}{2-\cos x}=2\int\frac{dt}{1+t^2}\cdot\frac{1}{2-\frac{1-t^2}{1+t^2}}=2\int\frac{dt}{1+3t^2}=\ldots$$
And now you're left with a rather easy, almost immediate, integral.
