$$\int \sqrt{\frac{\csc x-\cot x}{\csc x+\cot x}}\frac{\sec x}{\sqrt{1+2\sec x}}dx$$
$$\int \frac{1}{\csc x+\cot x}\frac{\sec x}{\sqrt{1+2\sec x}}dx$$
This becomes $$-\int\frac{dt}{(t^2+t)\sqrt{t^2+2t}} $$ after putting $\cos x=t$. Solution to this is obtained by putting $t=\frac{1}{p}$  

Hence finally I get $$\int \sqrt{\frac{\csc x-\cot x}{\csc x+\cot x}}\frac{\sec x}{\sqrt{1+2\sec x}}dx=ln(2\sec x+1)+ln\Big(\frac{\sqrt{2\sec x+1}+1}{\sqrt{2\sec x+1}-1}\Big)$$
But the answer given is $$\sin^{-1}{\Big( \frac{1}{2}\sec^2\frac{x}{2}\Big)}$$