<s>[INST] Trigonometric Integral $\int _0^{\pi/4}\:\frac{dx}{\cos^4x-\cos^2x\sin^2x+\sin^4x}$ Q. $$\int _0^{\pi/4}\:\frac{1}{\cos^4x-\cos^2x\sin^2x+\sin^4x}$$
My method:
$$\int_0^{ \pi /4} \frac{dx}{(\cos^2x+\sin^2x)^2-3\cos^2x \sin^2x}=\int_0^{ \pi /4} \frac{dx}{1-3\cos^2x\sin^2x} $$
Dividing numerator and denominator by $\cos^2x$ we have:
$$\int_0^{\pi /4}\frac{\sec^2x}{\sec^2x-3\tan^2x}dx=\int_0^{\pi /4}\frac{\sec^2x}{1-2\tan^2x}dx=\int _0^1 \frac{dt}{1-2t^2}=\int _0^1 \frac{1}{2}\frac{dt}{\frac{1}{2}-t^2}=\frac{1}{2\sqrt{2}}\log\left|\frac{1-\sqrt{2}t}{1+\sqrt{2}t}\right|_0^1=\frac{1}{2\sqrt{2}}\log\left|\frac{1-\sqrt{2}}{1+\sqrt{2}}\right|$$
But when we do the same integration by dividing the initial term by $\sec^4x$ and solving it yields an answer $$\frac{\pi }{2}$$
Am I wrong somewhere?
 [/INST] Basically, you make a change of variable $t=\tan(x)$; doing so, you have $$\int _0^{\frac{\pi }{4}}\:\left(\frac{1}{\cos^4x-\cos^2x\sin^2x+\sin^4x}\right)\:dx=\int _0^1\frac{t^2+1}{t^4-t^2+1}dt$$ and $$\int\frac{t^2+1}{t^4-t^2+1}dt=\tan ^{-1}\left(\frac{t}{1-t^2}\right)$$ 
I must say that I do not see where the $3$ disappeared.
</s>