Integral of $\frac{ \sqrt{\cos 2 x}}{\sin x}$ I am trying to solve the integral of $\frac{ \sqrt{\cos 2 x}}{\sin x}$. I converted this to $(\cot^2 x - 1)^{1/2}$ but after this I am stuck. I am not able to think of a suitable substitution. Any tips?

$\bf{My\; Solution::}$ Given $$\displaystyle \int\frac{\sqrt{\cos 2x}}{\sin x}dx = \int\frac{\sqrt{\cos^2 x-\sin^2 x}}{(\cos x+\sin x)-(\cos x-\sin x)}dx$$
So Integral $$\displaystyle =\int \frac{\sqrt{(\cos x+\sin x)\cdot (\cos x-\sin x)}}{(\cos x+\sin x)-(\cos x-\sin x)}dx = \int\frac{\sqrt{\frac{\cos x+\sin x}{\cos x-\sin x}}}{\left(\frac{\cos x+\sin x}{\cos x-\sin x}\right)-1}dx$$
Now we Can write $$\displaystyle \frac{\cos x+\sin x}{\cos x-\sin x}=\tan\left(\frac{\pi}{4}+x\right)$$
so Integral Convert into $$\displaystyle \int \frac{\sqrt{\tan\left(\frac{\pi}{4}+x\right)}}{\tan\left(\frac{\pi}{4}+x\right)-1}dy$$
Now Let $$\displaystyle \left(\frac{\pi}{4}+x\right)=y\;,$$ Then $dx=dy$
So Integral Convert into $$\displaystyle \int\frac{\sqrt{\tan y}}{\tan y-1}dy\;,$$ Now Let $$\displaystyle \tan y=t^2\;,$$ Then $\sec^2 y dy =2tdt$
So Integral Convert into $$\displaystyle \int \frac{2t^2}{(t^2-1)\cdot (t^4+1)}dt = \int \left[\frac{(t^4+1)-(t^2-1)^2}{(t^4+1)\cdot (t^2-1)}\right]dt$$
So Integral $$\displaystyle = \int\frac{1}{t^2-1}dt-\int\frac{t^2-1}{t^4+1}dt = -\frac{1}{2}\ln \left|\frac{t-1}{t+1}\right|-\int\frac{\left(1-\frac{1}{t^2}\right)}{\left(t+\frac{1}{t}\right)^2-\left(\sqrt{2}\right)^2}dt$$
$$\displaystyle = -\frac{1}{2}\ln \left|\frac{t-1}{t+1}\right|-\frac{1}{2\sqrt{2}}\ln \left|\frac{t^2-\sqrt{2}t+1}{t^2+\sqrt{2}t+1}\right|+\mathcal{C}$$
