Evaluate $\int \sqrt {3 \tan^2 \theta - 1} d \theta$ Evaluate $I=\int \sqrt {3  \tan^2 \theta - 1} d \theta$
My attempt
$\tan \theta = t, $ then $I = \int \frac{\sqrt {3t^2-1}}{1+t^2} dt   $
Now integrating by parts,
I = $\sqrt {3t^2-1} \tan^{-1} t- \int( \frac{6t}{2\sqrt {(3t^2-1)}} \tan^{-1} t) dt$
Now i am struck... How to proceed.

The result of @Manthanein can be obtained without much difficulty.
The integral can also be written as $$\int \sqrt{3\sec^2 \theta -4} \, \mathrm d\theta$$
Now, substitute $$\begin{align}3\sec^2 \theta -4 &=x^2\\ \implies 3\sec^2 \theta \tan \theta \, \mathrm d\theta &= x \, \mathrm dx \\ \implies (x^2+4)\sqrt{\dfrac{x^2+1}3}\,\mathrm d\theta &=x\,\mathrm dx \\ \implies \mathrm d\theta &=\dfrac{\sqrt 3 x\,\mathrm dx}{(x^2+4)\sqrt{x^2+1}}\end{align}$$
Hence the integral now becomes $$\int\dfrac{\sqrt3 x^2 \mathrm dx}{(x^2+4)\sqrt{x^2+1}}$$
and the rest follows.
