Solve the following integration $$\int \sqrt{cot\theta} d\theta$$
I tried to set $t=\sqrt{cot\theta},t^2=cot\theta$ and substitute into the original integration and get$$-\int\frac{2t^2}{1+t^4}dt$$, but then what can I do?

Consider the integral
\begin{align}
I = \int \sqrt{\cot(\theta)} \, d\theta.
\end{align}
Make the substitution $t = \sqrt{\cot(\theta)}$ to obtain the integral
\begin{align}
I = -2 \int \frac{t^{2} \, dt}{1+t^{4}}.
\end{align}
Now it can be seen that
\begin{align}
\frac{t^{2}}{1+t^{4}} &= \frac{t^{2}}{(1+i t^{2})(1- i t^{2})}  \\
&= \frac{1}{2i} \left( \frac{1}{1-i t^{2}} - \frac{1}{1+ i t^{2}} \right)
\end{align}
which leads to
\begin{align}
I = i \int \left( \frac{1}{1-i t^{2}} - \frac{1}{1+ i t^{2}} \right) \, dt.
\end{align}
Since 
\begin{align}
\int \frac{dt}{1+a t^{2}} = \frac{1}{\sqrt{a}} \, \tan^{-1}(\sqrt{a} t)
\end{align}
then the integral $I$ becomes
\begin{align}
I = i \left[ e^{\pi i/4} \tan^{-1}(e^{\pi i/4} t) - e^{- \pi i/4} \tan^{-1}(e^{- \pi i/4} t) \right].
\end{align}
By the $\tan^{-1}(x)$ addition and eliminating the complex components the result becomes
\begin{align}
I = \frac{1}{\sqrt{2}} \left[ \tan^{-1}\left( \frac{\sqrt{2} \, t}{1- t^{2}} \right) - \tanh^{-1}\left( \frac{\sqrt{2} \, t}{1+ t^{2}} \right) \right].
\end{align}
This leads to the result
\begin{align}
\int \sqrt{\cot(\theta)} \, d\theta = \frac{1}{\sqrt{2}} \left[ \tan^{-1}\left( \frac{\sqrt{2 \cot(\theta)}}{1-\cot(\theta)} \right) - \tanh^{-1}\left( \frac{\sqrt{2 \cot(\theta)}}{1+\cot(\theta)} \right) \right].
\end{align}
