Q:

How to integrate $\int \frac1{(3+4\sin x)^2}\,dx$?

We are to solve  $$\int \frac1{(3+4\sin x)^2}\,dx.$$

I had tried expanding the denominator and substituting $\sin x$ in terms of $\tan(x/2)$ and then putting $\tan(x/2) =t$. But, this made the integration even more complex. I got a large bi-quadratic  equation in the denominator.
If I am able to get $\cos x$ in the numerator ,then the question can be proceeded from there.
Any ideas or other methods by which I could solve?
Thanks in advance.

A:

If we put $3 + 4 \sin(x) = u$, we get:
$$I = \int\frac{du}{u^2\sqrt{7 +6 u - u^2}}$$
Substituting $u = \frac{1}{t}$ yields:
$$I = -\int\frac{tdt}{\sqrt{7t^2 +6 t - 1}} =  -\frac{1}{14}\int\frac{(14t + 6)dt}{\sqrt{7t^2 +6 t - 1}} +\frac{3}{7}\int\frac{dt}{\sqrt{7t^2 +6 t - 1}}$$
The first term on the r.h.s. yields $-\frac{1}{7}\sqrt{7t^2 + 6 t -1}$, while the second term is easily evaluated by writing the argument of the square root  in terms of a perfect square and then doing a hyperbolic substitution.

