How to integrate $\int \frac{3+2\cos x}{(2+3\cos x)^2}{dx}$ via substitution? $$\int \frac{3+2 \cos x}{(2+3 \cos x)^2}{dx}$$
$$\int \frac{2}{3(2+3 \cos x)}{dx} +\int \frac{5}{3(2+3 \cos x)^2}{dx}$$
I can't think of better substitution . Please tell me what will be better substitution for it .

Use the substitution $t=\tan\frac{x}{2}$. Hence 
$$
dx=\frac{2}{1+t^2}\qquad \cos x=\frac{1-t^2}{1+t^2}
$$ 
Therefore 
$$
\int\frac{3+2\cos x}{(2+3\cos x)^2}\,dx
=2\int\frac{t^2+5}{(t^2-5)^2}dt
=\int\frac{dt}{(t-\sqrt{5})^2}+\int\frac{dt}{(t+\sqrt{5})^2}
$$
Thus 
$$
\int\frac{3+2\cos x}{(2+3\cos x)^2}\,dx=-\frac{1}{t-\sqrt{5}}-\frac{1}{t+\sqrt{5}}+C=\frac{2t}{5-t^2}+C
$$
