Evaluate $\int \frac{\cos 2x \: dx}{3 \sin x+4 \cos x}$ Evaluate 

$$I=\int \frac{\cos 2x \: dx}{3 \sin x+4 \cos x}$$

My Try:
$$I=\int \frac{(\cos x-\sin x)(\cos x+\sin x)dx}{3 \sin x+4 \cos x}$$
we have $$\cos x-\sin x=\frac{1}{25}(3 \sin x+4 \cos x)+\frac{7}{25}(3 \cos x-4 \sin x)$$  and
$$\cos x+\sin x=\frac{7}{25}(3 \sin x+4 \cos x)+\frac{-1}{25}(3 \cos x-4 \sin x)$$
So
$$\cos 2x=\frac{7}{625}(3 \sin x+4 \cos x)^2+\frac{48}{625}\left((3 \sin x+4 \cos x)(3\cos x-4 \sin x)\right)-\frac{7}{625}(3 \cos x-4 \sin x)^2$$
So
$$I=\frac{7}{625}\int (3 \sin x+4 \cos x)dx+\frac{48}{625}\int (3 \cos x-4 \sin x)dx-J$$
where 
$$J=\frac{7}{625}\int \frac{(3 \cos x-4 \sin x)^2dx}{3 \sin x+4 \cos x}$$
I got stuck up to integrate $J$. 

What about the following? Note that the denominator can be written as $$3 \sin x + 4 \cos x = 5 \sin (x + \theta)$$ where $\theta$ is easy to determine. The integral becomes $$I= \frac{1}{5} \int \frac{\cos 2x \: dx}{\sin (x + \theta)}.$$
Now change the variable of integration from $x$ to $y = x + \theta$ so that you now have to evaluate
$$I= \frac{1}{5} \int \frac{\cos (2y - 2 \theta) \: dy}{\sin y}$$ and use the expansion formula for $\cos (2 y - 2 \theta)$. Eventually you have to evaluate integrals of the form $ \int \frac{\cos 2 y}{\sin y} dy$ and $ \int \frac{\sin 2y}{\sin y} dy$ which are straight forward(?).
