Integral $\int\!\sqrt{\cot x}\,dx $

Find the integral

$$\int\!\sqrt{\cot x}\,dx $$
How can one solve this using substitution?

Can this be solved by complex methods?

Solutions Collecting From Web of "Integral $\int\!\sqrt{\cot x}\,dx $"

Consider $I_1=\int (\sqrt{\tan x}+\sqrt{\cot x})dx$

Put $ x=\arctan t^2\implies dx= \frac{2t}{1+t^4}dt$

Then, $I_1=2\int \frac{t(t+\frac{1}{t})}{1+t^4}dt=2\int \frac{1+\frac{1}{t^2}}{(t-\frac{1}{t})^2+2}dt$

Put $t-\frac{1}{t}=z\implies (1+\frac{1}{t^2})dt=dz$

Then $I_1=2\int \frac{1}{z^2+2}dz =\sqrt{2}\tan^{-1}\left(\frac{z}{\sqrt{2}}\right)+c=\sqrt{2}\tan^{-1}\left(\frac{\sqrt{\tan x}-\sqrt{\cot x}}{\sqrt{2}}\right)+c$

Similarly, $I_2=\int (\sqrt{\tan x}-\sqrt{\cot x})dx$

First substitute is same, then, in denominator make term $(t+1/t)^2-1$ and substitute $t+1/t=z$ which gives $I_2$

Then $I_3=\int \sqrt{\cot x}dx=\frac{I_1-I_2}{2}$

$$\cot x =t^2$$
$$dx=\frac{-2t}{1+t^4}{dt}$$
$$-\int\frac{2t^2}{1+t^4}{dt}$$
$$-\left[\int \frac{1+\frac{1}{t^2}}{\left(t-\frac{1}{t}\right)^2 +2}dt +\int \frac{1-\frac{1}{t^2}}{\left(t + \frac{1}{t}\right)^2 – 2}dt\right]$$
$$-\left(\frac{1}{\sqrt2}\tan^{-1}\left[\frac{\cot x -1}{\sqrt{2\cot x}}\right] +\frac{1}{2\sqrt2}\log\left|\frac{\cot x +1-\sqrt{2\cot x}}{\cot x +1+\sqrt{2\cot x}}\right|\right)$$

Off of WolframAlpha, but it should be enough to answer your question.

solution