<s>[INST] Evaluation of $ \int\sqrt{\frac{\csc x-\cot x}{\csc x+\cot x}}\cdot \frac{\sec x}{\sqrt{1+2\sec x}}dx$ 
Evaluation of $\displaystyle \int\sqrt{\frac{\csc x-\cot x}{\csc x+\cot x}}\cdot \frac{\sec x}{\sqrt{1+2\sec x}}dx$

$\bf{My\; Solution::}$ We can write it as $$\displaystyle \int \sqrt{\frac{1-\cos x}{1+\cos x}}\cdot \frac{1}{\sqrt{\cos ^2x+2\cos x}}dx$$
$$\displaystyle = \int\sqrt{\frac{(1-\cos x)}{(1+\cos x)}\times \frac{(1+\cos x)}{(1+\cos x)}}\times \frac{1}{\sqrt{(1+\cos x)^2-1}}dx$$
$$\displaystyle  = \int \frac{\sin x}{(1+\cos x)}\times \frac{1}{\sqrt{(1+\cos x)^2-1}}dx$$
Now Let $(1+\cos x) = t\;,$ Then $\sin xdx = -dt$
So Integral $$\displaystyle = -\int \frac{1}{t}\times \frac{1}{\sqrt{t^2-1}}dt =-\sec^{-1}(t)+\mathcal{C} = -\sec^{-1}\left(1+\cos x\right)+\mathcal{C}$$
So $$\displaystyle \int\sqrt{\frac{\csc x-\cot x}{\csc x+\cot x}}\cdot \frac{\sec x}{\sqrt{1+2\sec x}}dx = -\sec^{-1}\left(2\cos^2 \frac{x}{2}\right)+\mathcal{C}$$
But Answer Given as $\displaystyle = \sin^{-1}\left(\frac{1}{2}\sec^2 \frac{x}{2}\right)+\mathcal{C}$
Plz help me where i am wrong, Thanks 
 [/INST] Everything is Ok, for matching the answer See here, $$\displaystyle -\int \frac{1}{t}\times \frac{1}{\sqrt{t^2-1}}dt =\csc^{-1}(t)+\mathcal{C} = \csc^{-1}\left(1+\cos x\right)+\mathcal{C}\\
= \csc^{-1}\left(2\cos^2 \frac{x}{2}\right)+\mathcal{C}$$
Now use, $$\csc^{-1}x=\sin^{-1}(1/x)$$ You will get answer as you want.
</s>