Evaluating the indefinite trigonometric integral $\int \frac{dx}{(3+2\sin x)^2}$ 
$$\int \frac{dx}{(3+2 \sin x)^2}$$

ATTEMPT:-
Re Writing the integral as:
$I=\int \frac{2\cos x \sec x \,dx}{2(3+2 \sin x)^2}$ and using by parts:-
$\int u\,dv= uv-\int v\,du$
Here $u=\sec x \implies du=\sec x \tan x \,dx$
$\quad$ $dv=\frac{2\cos x \,dx}{2(3+2sinx)^2} \implies v=\frac{-1}{2(3+2\sin x)}$
$I=\frac{-\sec x\,dx}{2(3+2\sin x)} +\int \frac{\sec x \tan x \,dx}{2(3+2\sin x)}$
Let $I'=\int \frac{\sec x \tan x \,dx}{2(3+2\sin x)}$
$\implies I'=\int \frac{\sin x \,dx}{2\cos^2x(3+2\sin x)}$
$\implies I'=\int \frac{\sin \,dx}{2(1-\sin^2x)(3+2\sin x)}$ 
$\implies I'=\int \frac{-dx}{4(1+\sin x)} +\frac{3dx}{5(2\sin x+3)} + \frac{-dx}{20(\sin x-1)}$ which can be easily done by weierstrass's substitution.
But I am not able to modify my answer as given in the text.
Text Ans:-$\frac{2\cos x\,dx}{5(3+2\sin x)^2} + \frac{2}{5\sqrt{5}} \arctan\frac{(3\tan(\frac{x}{2})+2)}{\sqrt{5}} +c.$
My Ans:-$\frac{-\sec x\,dx}{2(3+2\sin x)} +  \frac{6}{5\sqrt{5}} \arctan\frac{(3\tan(\frac{x}{2})+2)}{\sqrt{5}}-10\tan x+15\sec x-15.$

Note $\sin x=\cos (\frac\pi2-x)=\frac{1-\tan^2(\frac\pi4-\frac x2)}{1+\tan^2(\frac\pi4-\frac x2)}$
$$\int \frac{dx}{3+2\sin x}=-2\int \frac{d(\tan(\frac\pi4-\frac x2))}{\tan^2(\frac\pi4-\frac x2) +5}=-\frac2{\sqrt{5}}\tan^{-1}
 \frac{\tan (\frac \pi4-\frac x2) }{ \sqrt{5}}
$$
$$\left( \frac{2\cos x}{3+2\sin x}\right)’ 
= -\frac{3}{3+2\sin x}+\frac{5}{(3+2\sin x)^2}
$$
Integrate both sides to obtain
\begin{align}
I=\int \frac{dx}{(3+2\sin x)^2}=\frac 2{5}\frac{\cos x}{3+2\sin x}- \frac{6}{5\sqrt5}\tan^{-1}
 \frac{\tan (\frac\pi4-\frac x2 )}{ \sqrt{5}}+C 
\end{align}
