<s>[INST] Evaluate $\int (3+4\sin x)^{-2} dx$ 
Evaluate: $\int\frac{dx}{(3+4\sin x)^2}$

My attempt: I have tried to express the integrand in terms of $\tan x$ and $\sec x$ but there was no use since the substitution $\tan x=z$ is of no use after that. I also tried to use Weierstrass substitution but i got a very complicated algebraic expression. Please help.
 [/INST] By integration by parts, we have
$$
\begin{aligned}
\int \frac{d x}{(3+4 \sin x)^{2}} =&-\frac{1}{4} \int \frac{1}{\cos x} d\left(\frac{1}{3+4 \sin x}\right) \\
=&-\frac{1}{4 \cos x(3+4 \sin x)}+\frac{1}{4} \underbrace{\int \frac{\sec x \tan x}{3+4 \sin x}}_{J} d x
\end{aligned}
$$
$$
J=\int \frac{\sec x \tan x}{3+4 \sin x} d x= \int \frac{\sin x}{(1+\sin x)(1-\sin x)(3+4 \sin x)} d x
$$
Resolving the integrand of the last integral yields $$
J=\frac{1}{2} \underbrace{ \int \frac{d x}{1+\sin x} }_{K} +\frac{1}{14}\underbrace{\int \frac{d x}{1-\sin x}}_{L}-\frac{12}{7} \underbrace{\int \frac{d x}{4 \sin x+3}}_{M}
$$
$$
\begin{aligned}
K&=\int \frac{1-\sin x}{\cos ^{2} x} d x=\int\left(\sec ^{2} x-\tan x \sec x\right) d x=\tan x-\sec x+C_{1}
\end{aligned}
$$
Similarly,
$$
L=\int \frac{1+\sin x}{\cos ^{2} x} d x=\tan x+\sec x+C_{2}
$$
Letting $t=\tan \frac{x}{2}$, $$
\begin{aligned}
M &=\int \frac{1}{4\left(\frac{2 t}{1+t^{2}}\right)+3} \cdot \frac{2 d t}{1+t^{2}}=2 \int \frac{d t}{3 t^{2}+8 t+3} =\frac{2 \sqrt{7}}{7} \ln \left|\frac{3 t-\sqrt{7}+4}{3 t+\sqrt{7}+4}\right|+C_{3}
\end{aligned}
$$
Now we can conclude that $$
\begin{aligned}
I=&-\frac{1}{4 \cos x(3+4 \sin x)}+\frac{\tan x}{7}-\frac{3 \sec x}{28} +\frac{6 \sqrt{7}}{49} \ln \left|\frac{3 \tan \frac{x}{2}+\sqrt{7}+4}{3 \tan \frac{x}{2}-\sqrt{7}+4}\right|+C\\=& \frac{6  \sqrt{7}}{49} \ln \left|\frac{3 \tan \frac{x}{2}+\sqrt{7}+4}{3 \tan \frac{x}{2}-\sqrt{7}+4}\right|-\frac{4 \cos x}{7(3+4 \sin x)}+C
\end{aligned}
$$
</s>