Let $I = \int [\sqrt{\cot x} + \sqrt{\tan x}] \, dx = \int \sqrt{\tan x} (1 + \cot x) \, dx$.
Substitute $\tan x = t^2$,so $\sec^2 x \, dx = 2t \, dt$. Since $\sec^2 x = 1 + \tan^2 x = 1 + t^4$,we have $dx = \frac{2t}{1 + t^4} \, dt$.
Then $I = \int t \left(1 + \frac{1}{t^2}\right) \frac{2t}{1 + t^4} \, dt = 2 \int \frac{t^2 + 1}{t^4 + 1} \, dt$.
Divide numerator and denominator by $t^2$: $I = 2 \int \frac{1 + \frac{1}{t^2}}{t^2 + \frac{1}{t^2}} \, dt = 2 \int \frac{1 + \frac{1}{t^2}}{(t - \frac{1}{t})^2 + 2} \, dt$.
Let $u = t - \frac{1}{t}$,then $du = (1 + \frac{1}{t^2}) \, dt$.
$I = 2 \int \frac{du}{u^2 + (\sqrt{2})^2} = 2 \cdot \frac{1}{\sqrt{2}} \tan^{-1} \left(\frac{u}{\sqrt{2}}\right) + C = \sqrt{2} \tan^{-1} \left(\frac{t - \frac{1}{t}}{\sqrt{2}}\right) + C$.
Substituting $t = \sqrt{\tan x}$,we get $I = \sqrt{2} \tan^{-1} \left(\frac{\tan x - 1}{\sqrt{2 \tan x}}\right) + C$.