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?
 A: Assuming that you are working on an interval in which $\sin\theta>0$, you can use the fact that\begin{align}\sqrt{\csc^2\theta-2}&=\frac1{\sin\theta}\sqrt{1-2\sin^2\theta}\\&=\frac{\sin\theta}{1-\cos^2\theta}{\sqrt{2\cos^2(\theta)-1}}.\end{align}And now, you can use the substitution $\cos\theta=x$ and $-\sin\theta=\mathrm dx$. So, all that remains is to compute$$\int\frac{\sqrt{2x^2-1}}{1-x^2}\,\mathrm dx,$$which turns out to be equal to\begin{multline}\frac12\log \left(-\sqrt{2 x^2-1}-2 x+1\right)-\frac12\log\left(-\sqrt{2 x^2-1}+2 x+1\right)+\\-\sqrt{2}\log\left(\sqrt{4 x^2-2}+2 x\right)+\operatorname{arctanh}(x).\end{multline}
A: Note that
\begin{align}
\int \sqrt{\csc^2x -2} 
 \ dx=&\int \frac{\csc^2x -2} {\sqrt{\csc^2x -2} }dx\\
 =& \int \frac{\csc^2x} {\sqrt{\cot^2x -1} }dx
-2\int \frac{\sin x} {\sqrt{1-2\sin^2x} }dx\\
=& -\int \frac{d(\cot x)} {\sqrt{\cot^2x -1} }
+ 2\int \frac{d(\cos x)} {\sqrt{2\cos^2x-1} }\\
\end{align}
A: Letting $u=\sqrt{\csc ^{2} x-2}$ transform the integral into
$$\begin{aligned}
I&=-\frac{1}{2} \int \frac{u^{2} d u}{\left(u^{2}+2\right) \sqrt{u^{2}+1}}\\& = \frac{1}{2} \underbrace{\int \frac{d u}{\sqrt{u^{2}+1}}}_{\sinh ^{-1} u+C_1}  + \underbrace{ \int \frac{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}} $ gives $u d u=\frac{t d t}{\left(1-t^{2}\right)^{2}}$ and
$$
\begin{aligned}
I &=\int \frac{d t}{\frac{2-t^2}{1-t^{2}}\left(1-t^{2}\right)} \\
&=\int \frac{d t}{2-t^{2}} \\
&=\frac{1}{\sqrt{2}} \tanh ^{-1}\left(\frac{t}{\sqrt{2}}\right)+C_{2}\\&= \frac{1}{\sqrt{2}} \tanh ^{-1}\left(\frac{u}{\sqrt{2} \sqrt{u^{2}+1}}\right)+C_2
\end{aligned}
$$
Now we can conclude that
$$
I=-\frac{1}{2} \sinh ^{-1} \left(\sqrt{\csc ^{2} x-2}\right) +\frac{1}{\sqrt{2}} \tanh ^{-1}\left(\frac{\sqrt{\csc ^{2} x-2}}{\sqrt{2} \cot x}\right)+C
$$
A: If you're asking how to simplify the bottom integral's integrand, you can note that $\csc{(x)} = \frac{1}{\sin{(x)}}$ and $1 - \cos^2{(x)} = \sin^2{(x)}$ to get
$$\frac{1}{\sqrt{2\csc^{2}\left(\theta\right)-1}} = -\frac{-\sin\left(\theta\right)}{\sqrt{\cos^{2}\left(\theta\right)+1}}.$$
I think you got it from here.
A: 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 $$
A: Hint Where $\sin x > 0$, rewrite the integral as
$$\int \frac{\sqrt{2 \cos^2 - 1} \,dx}{\sin x} = \int \frac{\sin x \sqrt{2 \cos^2 x - 1} \,dx}{\sin^2 x} = -\int \frac{\sqrt{2 u^2 - 1} \,du}{1 - u^2} .$$
Then applying the Euler substitution $\sqrt{2 u^2 - 1} = \sqrt{2} u + t$ yields the rational integral $$\sqrt{2} \int 
\left(\frac{1}{t^2 + 2 t - 1} - \frac{1}{t^2 - 2 t - 1} - \frac{1}{t}\right) dt .$$
