TITLE: Compute $I=\int\frac{\sin x+\cos x}{\sin^2x+\cos^4x}\mathrm d x$
QUESTION [9 upvotes]: $$I=\int\frac{\sin x+\cos x}{\sin^2x+\cos^4x}\mathrm d x=?$$

I saw the related problem but that didn't help much. I attempted this question by splitting the numerator into $$I_1=\int\frac{\sin x}{\sin^2x+\cos^4x}\mathrm d x \text { and } I_2=\int\frac{\cos x}{\sin^2x+\cos^4x}\mathrm d x$$
For $I_1$, I set $t=\sin x$ and solved it the straightforward way. For $I_2$, I set $t=\cos x$ and again solved it the straightforward way.
My method got extremely lengthy in the end, while the question is supposed be decently okay. The answer that my book got is:
$$I=\frac 1{2\sqrt3}\ln\left|\frac{\sqrt3+t}{\sqrt3-t}\right|+\arctan t+C$$
for $t=\sin x-\cos x$. I have absolutely no clue how to get to such an easy result.

REPLY [5 votes]: If you want to do this the way that was suggested using $t=\sin x-\cos x$:
Then $$t^2=s^2-2sc+c^2\implies 4sc=2-2t^2$$
Also, $$t^4=1-4sc+4s^2c^2$$
So putting these results together gives $$4s^2c^2=t^4-2t^2+1$$
Meanwhile, the denominator of the integrand is $$s^2+c^4=s^2+c^2-s^2c^2=1-s^2c^2$$
$$=\frac 34+\frac 12t^2-\frac 14t^4$$
The numerator is just $dt$, so we end up with $$I=\int\frac{4dt}{3+2t^2-t^4}$$
$$=\int\frac{4dt}{(1+t^2)(3-t^2)}$$
This is very easily decomposed into $$\int\frac{1}{t^2+1}+\frac{1}{3-t^2}dt$$
The expected result follows immediately.