TITLE: Integrate: $\int \frac{\sin(x)}{9+16\sin(2x)}\,\text{d}x$.
QUESTION [6 upvotes]: Integrate: $$\int \frac{\sin(x)}{9+16\sin(2x)}\,\text{d}x.$$
I tried the substitution method ($\sin(x) = t$) and ended up getting $\int \frac{t}{9+32t-32t^3}\,\text{d}t$. Don't know how to proceed further. 
Also tried adding and substracting $\cos(x)$ in the numerator which led me to get $$\sin(2x) = t^2-1$$ by taking $\sin(x)+\cos(x) = t$. 
Can't figure out any other method now. Any suggestions or tips?

REPLY [6 votes]: To attack this integral, we will need to make use of the following facts:
$$(\sin{x} + \cos{x})^2 = 1+\sin{2x}$$
$$(\sin{x} - \cos{x})^2 = 1-\sin{2x}$$
$$\text{d}(\sin{x}+\cos{x}) = (\cos{x}-\sin{x})\text{d}x$$
$$\text{d}(\sin{x}-\cos{x}) = (\cos{x}+\sin{x})\text{d}x$$
Now, consider the denominator.
It can be rewritten in two different ways as hinted by the above information.
$$9+16\sin{2x} = 25 - 16(1-\sin{2x}) = 16(1+\sin{2x})-7$$
$$9+16\sin{2x} = 25 - 16(\sin{x}-\cos{x})^2 = 16(\sin{x}+\cos{x})^2-7$$
Also note that 
$$\text{d}(\sin{x}-\cos{x})-\text{d}(\sin{x}+\cos{x}) = 2\sin{x}\text{d}x$$
By making the substitutions 
$$u = \sin{x}+\cos{x}, v = \sin{x}-\cos{x}$$
The integral is transformed into two separate integrals which can be evaluated independently.
$$2I = \int \frac{\text{d}v - \text{d}u}{9+16\sin{2x}} = \int \frac{\text{d}v}{25-16v^2} + \int \frac{\text{d}u}{7-16u^2}$$
The remainder of this evaluation is left as an exercise to the reader.