<s>[INST] Definite integral of $1/(2\sin^4x + 3\cos^2x)$ I have $f = \frac 1 {(2\sin^4x + 3\cos^2x)}$ which area should be calculated from $0$ to $\frac{3\pi}2 $.
I noticed that $$\int_0^{\frac{3\pi}2} f \,dx= 3\int_0^{\frac{\pi}2} f \,dx$$
I tried to calculate this integral with the Weierstrass substitution:
$t = \tan{\frac x2}$
I got this integral:
$$6\int_0^1 \frac{(1+t^2)^3}{32t^4+3(1-t^4)^2} \,dt$$
My second try: I divided and multiplied on $\cos^4x$.
$$\int_0^{\frac{\pi}2} f \,dx = \int_0^{\frac{\pi}2} \frac1{(2\tan^4x + \frac3{\cos^2x})\cos^4x}  \,dx$$
$t = \tan x, dt = \frac{dx}{\cos^2x}, \cos^2x = \frac1{\tan^2 x +1}$
I got:
$$ \int_0^\infty \frac{t^2+1}{2t^4 + 3t^2 + 3} \,dt$$
Nothing of this helps me to calculate the area by getting primitive function.
 [/INST] To evaluate $\int_0^\infty\frac{t^2+1}{t^4+\frac32 t^2+\frac32}$ we'll first write $t^4+\frac32 t^2+\frac32=(t^2+at+b)(t^2-at+b)$ with $a:=\sqrt{\frac32-\sqrt{6}},\,b:=\sqrt{\frac32}$. Hence $$\int_0^\infty\frac{t^2+1}{(t^2+at+b)(t^2-at+b)}=\frac{1}{2ab}\int_0^\infty\sum_\pm\frac{a\pm (1-b)t}{t^2\pm at+b}dt\\=\frac{1}{2ab}\left[\sum_\pm\left(\pm\frac{1-b}{2}\ln(t^2\pm at+b)+\frac{a(1+b)}{\sqrt{4b-a^2}}\arctan\frac{2t\pm a}{\sqrt{4b-a^2}}\right)\right]_0^\infty\\=\frac{1+b}{2b\sqrt{4b-a^2}}\left[\sum_\pm\left(\frac{\pi}{2}\mp\arctan\frac{a}{\sqrt{4b-a^2}}\right)\right]\\=\frac{\pi(1+b)}{2b\sqrt{4b-a^2}}=\frac{\pi(2+\sqrt{6})\sqrt{2\sqrt{6}+1}}{6\sqrt{23}}.$$(You'll want to double-check my arithmetic at the end.)
</s>