<s>[INST] Evaluating $\int \frac{\sin{x}+\cos{x}}{\sin^4{x}+\cos^4{x}} \mathrm dx$ I am having real trouble evaluating this indefinite integral
$$\int{\frac{\sin{x}+\cos{x}}{\sin^4{x}+\cos^4{x}}}dx$$
Need I mention that I already tried WolframAlpha with little success? It returned a complicated expression full of many $\arctan$ terms.
Here is what I have already tried:


*

*Seperating denominator as $(1-\sqrt{2}\sin{x}\cos{x})(1-\sqrt{2}\sin{x}\cos{x})$ and applying partial fractions.

*Multiplying and dividing by $\sec^4{x}$


Please provide any help. It would be appreciated if you give a hint rather than the whole solution.
 [/INST] $$\sin^4x+\cos^4x=(\sin^2x+\cos^2x)^2-2\sin^2x\cos^2x=1-\frac{\sin^22x}2$$
If we set $\int(\sin x+\cos x)dx=\sin x-\cos x,\sin2x=1-u^2$
$$\implies \int{\frac{\sin{x}+\cos{x}}{\sin^4{x}+\cos^4{x}}}dx=2\int\frac{du}{2-(1-u^2)^2}=2\int\frac{du}{(\sqrt2+1-u^2)(\sqrt2-1+u^2)}$$
$$=\frac2{2\sqrt2}\int\frac{(\sqrt2+1-u^2)+(\sqrt2-1+u^2)}{(\sqrt2+1-u^2)(\sqrt2-1+u^2)}du$$
$$=\frac1{\sqrt2}\left(\int\frac{du}{\sqrt2-1+u^2}+\int\frac{du}{\sqrt2+1-u^2}\right)$$
Now apply $\displaystyle\int\frac{dy}{a^2+y^2}=\frac1a\arctan \frac ya+K$
and $\displaystyle\int\frac{dy}{a^2-y^2}=\frac1{2a}\ln\big|\frac{a+y}{a-y}\big|+C$
</s>