Evaluate $\int \frac{a^2\sin^2 x+b^2\cos^2 x}{a^4\sin^2 x+b^4\cos^2 x}dx$ Evaluate
$$\int \frac{a^2\sin^2 x+b^2\cos^2 x}{a^4\sin^2 x+b^4\cos^2 x}\text dx$$
I would have given my attempt to this question but honestly, I think my attempts to solve this did nothing but only complicated it further.
Any hints or suggestions are welcome.Please verify that your method gives answer:$$\frac 1{a^2+b^2}(x+\tan^{-1} ({\frac {a^2\tan x}{b^2}}))+C$$
 A: Hint:
We have $$I = \int \frac{a^2\sin^2 x + b^2\cos^2 x}{a^4\sin^2 x + b^4\cos^2 x}\, dx = \int \frac{[a^2-b^2]\sin^2 x + b^2}{[a^4-b^4]\sin^2 x + b^4}\, dx $$ $$= (b^2-\frac{(a^2-b^2)b^4}{a^4-b^4})\int \frac{1}{(a^4-b^4)\sin^2 x + b^4}\, dx + \int \frac{a^2-b^2}{a^4-b^4} \, dx$$
The first integral can be easily calculated by using a substitution $u = \tan x$.
A: Write $$\begin{align}\frac{a^2\sin^2 x+b^2\cos^2 x}{a^4\sin^2 x+b^4\cos^2 x}&=\frac1{a^2+b^2}\cdot \frac{(a^4+a^2b^2)\sin^2 x+(b^4+a^2b^2)\cos^2 x}{a^4\sin^2 x+b^4\cos^2 x}\\&=\frac1{a^2+b^2}\cdot \frac{a^4\sin^2 x+b^4\cos^2 x+a^2b^2}{a^4\sin^2 x+b^4\cos^2 x}\\&=\frac1{a^2+b^2}\cdot \left(1+\frac{a^2b^2}{a^4\sin^2 x+b^4\cos^2 x}\right)\\&=\frac1{a^2+b^2}\cdot\left(1+\frac{\frac{a^2}{\cos^2x}}{\frac{a^4}{b^2}\tan^2x+b^2}\right)\\&=\frac1{a^2+b^2}\cdot\left(1+\frac{\frac{a^2}{\cos^2x}}{\frac{a^4}{b^2}\tan^2x+b^2}\right)\end{align}$$ Now $$\frac{a^2\sec^2x}{b^2\left(1+\frac{a^4}{b^4}\tan^2x\right)}={\tan^{-1}}'\left(\frac{a^2\tan x}{b^2}\right)$$ and integrating $1$ give $x$. Combining the two with a constant yields the required answer.
