Evaluate the following integral:
$\int \sqrt{\cot \theta} d \theta$
let $\cot \theta$ as $x^{2}$
$-\operatorname{cosec}^{2} \theta d \theta=2 x d x$
$\mathrm{d} \theta=-\frac{2 \mathrm{x}}{1+\cot ^{2} \theta} \mathrm{dx}$
$\mathrm{d} \theta=-\frac{2 \mathrm{x}}{1+\mathrm{x}^{4}} \mathrm{dx}$
$\int-\frac{2 x^{2}}{1+x^{4}} d x$
re-writing the given equation as
$\int \frac{1+\frac{1}{x^{2}}+1-\frac{1}{x^{2}}}{\frac{1}{x^{2}}+x^{2}} d x$
$-\int \frac{1+\frac{1}{x^{2}}}{\left(x-\frac{1}{x}\right)^{2}+2} d x-\int \frac{1-\frac{1}{x^{2}}}{\left(x+\frac{1}{x}\right)^{2}-2} d x$
Let $x-\frac{1}{x}=t$ and $x+\frac{1}{x}=z$
So $\left(1+\frac{1}{x^{2}}\right) d x=d t$ and $\left(1-\frac{1}{x^{2}}\right) d x=d z$
$-\int \frac{d t}{(t)^{2}+2}-\int \frac{d z}{(z)^{2}-2}$
Using identity $\int \frac{1}{\mathrm{x}^{2}+1} \mathrm{dx}=\arctan (\mathrm{x})$ and $\int \frac{\mathrm{d} \mathrm{z}}{(\mathrm{z})^{2}-1}=\frac{1}{2} \log \left|\frac{\mathrm{z}-1}{\mathrm{z}+1}\right|+\mathrm{c}$
$-\frac{1}{2} \arctan \left(\frac{\mathrm{t}}{\sqrt{2}}\right)-\frac{1}{2 \sqrt{2}} \log \left|\frac{\mathrm{z}-\sqrt{2}}{\mathrm{z}+\sqrt{2}}\right|+\mathrm{c}$
Substituting $t$ as $x-\frac{1}{x}$ and $z$ as $x+\frac{1}{x}$
$-\frac{1}{2} \arctan \left(\frac{x-\frac{1}{x}}{\sqrt{2}}\right)-\frac{1}{2 \sqrt{2}} \log \left|\frac{x+\frac{1}{x}-\sqrt{2}}{x+\frac{1}{x}+\sqrt{2}}\right|+c$