Integrate :- $\int dx/(\sin(x) + a\sec(x))^2$ Please help me in evaluating this integral 
$$
\int \frac{1}{(\sin(x) + a \sec(x))^2}\,dx
$$
I tried by converting $\sec(x)$ to $\cos(x)$ and by solving it became more complicated so guys please guide me further.

Hint:
$$\dfrac1{(\sin x+a\sec x)^2}=\dfrac1{2(\sin x\cos x+a)^2}+\dfrac{\cos2x}{2(\sin x\cos x+a)^2}$$
The second part is elementary.
$$\dfrac1{(\sin x\cos x+a)^2}=\dfrac{\sec^2x(1+\tan^2x)}{(\tan x+a\tan^2x+a)^2}$$
Choose $\tan x=u$
