values of q for which tangent integral is converges 
Finding value of $q$ for which $$\int^{1}_{0}\frac{1}{(\tan (x))^{q}}dx$$ converges

What i try::
Let $\tan x=t.$ Then $\displaystyle dx=\frac{1}{\sec^2 (x)}dx=\frac{1}{1+t^2}dt$
And changing limits
$$I=\int^{\tan (1)}_{0}\frac{1}{(1+t^2)t^{q}}dt<\int^{\tan(1)}_{0}\frac{1}{t^2\cdot t^{q}}dt$$
$$I<\int^{\tan(1)}_{0}t^{-q-2}dt=\frac{1}{-q-1}\bigg(t^{-q-1}\bigg)\bigg|^{\tan(1)}_{0}=\frac{1}{-q-1}\cdot (\tan (1))^{-q-1}$$
Here $q\in\mathbb{R}-\{-1\}$ for which integral i converges
Can anyone plese explain me is my solution is right. If not then how do i solve it. Help me please.Thanks

As $x\to0$, $\tan x\sim x$ and so $I$ converges iff $\int_0^1\frac{dx}{x^q}$ converges,
that is iff $q<1$.
