Computing the integral of trig function under square root How can we solve this integral
$$\int \sqrt{\csc^2x -2} 
 \mathrm{d}x$$
My idea was substituting $\csc^2x=2\csc^2\theta$. Then the integral became $$\sqrt{2}\int \frac{\csc^2\theta-1}{\sqrt{2\csc^2\theta-1}} \mathrm{d}\theta$$ after a few simplifications. I don't know how to go about at this point. If i try breaking the numerator,still i would be left with an equivalent question of $$\int \sqrt{2\csc^2\theta-1}\mathrm{d}\theta$$ and $$\int \frac{\mathrm{d}\theta}{\sqrt{2\csc^2\theta-1}}$$
Could someone provide a cleaner approach to this problem or give new insights on how to further simply the above integrals?

Letting $u=\sqrt{\csc ^{2} x-2}$ transforms the integral into
$$\begin{aligned}
I&=-\frac{1}{2} \underbrace{\int \frac{u^{2} d u}{\left(u^{2}+2\right) \sqrt{u^{2}+1}}}_{J}\end{aligned}
$$
For the integral $J$, letting $t=\frac{u}{\sqrt{u^{2}+1}} $, we have $$ u^{2}=\frac{t^{2}}{1-t^{2}} \Rightarrow   u d u=\frac{t d t}{\left(1-t^{2}\right)^{2}}\Rightarrow \frac{d u}{\sqrt{u^{2}+1}}=\frac{t^{2}}{u^{2}} \cdot \frac{d t}{\left(1-t^{2}\right)^{2}}=\frac{d t}{1-t^{2}} $$
Plugging them yields
$$
\begin{aligned}
J&= \int \frac{1}{\frac{2-t^{2}}{1-t^{2}}} \cdot \frac{t^2}{1-t^2} \frac{d t}{1-t^{2}}\\&= \int\left(\frac{1}{1-t^{2}}-\frac{1}{2-t^{2}}\right) d t\\& =\frac{1}{2} \ln \left|\frac{1-t}{1+t}\right|+\frac{1}{2 \sqrt{2}} \ln \left|\frac{\sqrt{2}-t}{\sqrt{2}+t}\right|+C \\&= \frac{1}{2} \ln \left|\frac{u-\sqrt{u^{2}+1}}{u+\sqrt{u^{2}+1}}\right|+\frac{1}{2 \sqrt{2}} \ln \left|\frac{\sqrt{2}-\sqrt{u^{2}+1}}{\sqrt{2}+\sqrt{u^{2}+1}}\right|+C\end{aligned}$$
Now we can conclude that
$$I= \frac{1}{4} \ln \left|\frac{u+\sqrt{u^{2}+1}}{u-\sqrt{u^{2}+1}}\right|+\frac{1}{4\sqrt{2}} \ln \left|\frac{\sqrt{2}+\sqrt{u^{2}+1}}{\sqrt{2}-\sqrt{u^{2}+1}}\right|+C $$
