<s>[INST] How do I calculate: $\int \frac{dx}{3\sin^2 x+5\cos^2x}?$ How can I calculate this integral ?
$$\int \frac{dx}{3\sin^2 x+5\cos^2x}=\text{?}$$
Thank you! I've tried using universal substitution but the result was too complicated to be somehow integrated. Can you please give me a useful hint ?
 [/INST] By setting $x=\arctan t$, so that $dx=\frac{dt}{1+t^2}$, we get:
$$\int \frac{dx}{3\sin^2 x+5\cos^2 x} = \int \frac{dx}{3+2\cos^2 x} = \int \frac{dt}{(1+t^2)\left(3+\frac{2}{1+t^2}\right)}=\int\frac{dt}{5+3t^2}$$
so:
$$\int \frac{dx}{3\sin^2 x+5\cos^2 x} = C+\frac{1}{\sqrt{15}}\arctan\left(\sqrt{\frac{3}{5}} t\right)=C+\frac{1}{\sqrt{15}}\arctan\left(\sqrt{\frac{3}{5}} \tan x\right).$$
</s>