# 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.

• What are the bounds? – Jacky Chong Oct 28 '16 at 1:24
• Well I was looking for the indefinite integral...but if it helps the discussion, the lower bound would be 0 and the upper bound 2Pi. – C Shreve Oct 28 '16 at 4:30
• Please edit your question to add additional context. What is the source of the integral? Why is it of interest? Of the infinite number of integrals that could be posed, why focus on this one? Information of this sort makes the question more useful for others. – Carl Mummert Oct 29 '16 at 18:27
• @CarlMummert that is not what missing context means. Missing context means that the asker has yet to prove that they attempted to solve their problem before asking us. – The Great Duck Oct 31 '16 at 4:36
• @CShreve the existence of posts that break the rules does not give you the right to break the rules. Those questions are also likely closed. – The Great Duck Oct 31 '16 at 4:37

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$.
• @CShreve. To me, this problem was a challenge and I wanted to see what a human being could do by hand. Where I have been tricky is when I had to look at the polynomial in $t^8$ for which I used a solver for the roots. Once I dentified that all roots are complex, then it became quite easy to make it in a formal way. – Claude Leibovici Oct 31 '16 at 5:27