This type of integral, $\int \frac{dx}{a\cos^2 x + b\sin^2 x + c\sin x \cos x}$, is a standard form. The method of dividing by $\cos^2 x$ and substituting $u=\tan x$ is almost always the most efficient way to solve it. Be careful when completing the square and evaluating the final arctan integral.