Trigonometric integrals. Integrate $\int\frac{1}{\cos^4x-\cos^2x\sin^2x+\sin^4x}\mathrm{d}x$ I tried factoring the denominator but does not seem to suit the factorization of quadratic. Is there another way?

\begin{align*}
 J &= \int \frac{1}{\cos^4 - \cos^2 x \sin^2 x + \sin^4 x} dx \\
   &= \int \frac{\sec^4}{1 - \tan^2 x + \tan^4 x} dx 
\end{align*}
Let $u = \tan x$ and $\sec^2 x = \tan^2 x + 1$
$$ J = \int \frac{(1+\tan^2 x) \sec^2 x}{1- \tan^2 x +\tan^4 x} dx $$
again $ u = \tan x$
$$ J = \int \frac{u^2 + 1}{u^4 - u^2 + 1} du $$
Since $ \int \frac{u^2 + 1}{u^4 - u^2 + 1} du = \arctan(\frac{u}{1-u^2}) + c $
$$ J = -\arctan(2\cot(2x)) + c$$
