<s>[INST] How to calcluate $\int \frac{1}{(2\sin x + 3\sin 2x - 2)^2+1}dx$ I know this integral exists - I've plugged it into Mathematica which spit out some answer.  But what I would really like to know is what techniques could be useful in calculating the integral $$\int \frac{1}{(2\sin x + 3\sin 2x - 2)^2+1}dx$$ by hand.
Edit: There have been put forth concerns that this question lacks 'context'.  This is somewhat surprising considering one can literally search for 'Calculate integral for' and have returned 10 if not 20 completely similar questions without any sort of 'context' to them.
To those concerned - this equation is a one specific instance of a family of equations that arise from the analysis of certain types of complexity classes.
Edit II: Previous attempts at solving integrals of this type have included integration by parts which didn't yield anything of much use.
 [/INST] Considering $$I=\int \frac{dx}{(2\sin (x) + 3\sin (2x) - 2)^2+1}=\int \frac{dx}{(2\sin( x) + 6\sin(x)\cos(x) - 2)^2+1}$$ use the tangent half angle substitution. This lead to $$I=\int \frac{2 \left(t^2+1\right)^3 }{ 5 t^8+32 t^7+84 t^6-226 t^4-96 t^3+276 t^2-64 t+5}\,dt$$ The hard part is the denominator but, fortunately, it does not show any real root. So $$\frac 52I=\int \frac{ \left(t^2+1\right)^3 }{(t^2+a^2)(t^2+b^2)(t^2+c^2)(t^2+d^2)}\,dt$$ Now, using partial fraction decomposition makes the integrand to be $$\frac A{t^2+a^2}+\frac B{t^2+b^2}+\frac C{t^2+c^2}+\frac D{t^2+d^2}$$ where  $$A=\frac{(a^2-1)^3}{\left(a^2-b^2\right) \left(a^2-c^2\right)
   \left(a^2-d^2\right)}$$ $$B=\frac{(b^2-1)^3}{\left(b^2-a^2\right) \left(b^2-c^2\right)
   \left(b^2-d^2\right)}$$ $$C=\frac{(c^2-1)^3}{\left(c^2-a^2\right) \left(c^2-b^2\right)
   \left(c^2-d^2\right)}$$ $$D=\frac{(d^2-1)^3}{\left(d^2-a^2\right) \left(d^2-b^2\right)
   \left(d^2-c^2\right)}$$ All of the above make $$\frac 52I=\frac{A }{a}\tan ^{-1}\left(\frac{t}{a}\right)+\frac{B }{b}\tan ^{-1}\left(\frac{t}{b}\right)+\frac{C }{c}\tan ^{-1}\left(\frac{t}{c}\right)+\frac{D }{d}\tan ^{-1}\left(\frac{t}{d}\right)$$ Numerically, we should find $a^2\approx 0.0206317$, $b^2\approx 1.00839$, $c^2\approx 3.75827$, $d^2\approx 12.7893$.
</s>