# How do I calculate integral of $\int\frac{\text{d}x}{\sqrt{\tan(x)}}$ [duplicate]

I'm having problems calculating this integral.

$$\int\frac{\text{d}x}{\sqrt{\tan(x)}}$$

I don't even know where to begin...

Thanks

• Now the problem has become quite different. Is the tan in the radical or not? – imranfat Dec 6 '16 at 16:25
• From Wolfram: $$\int\frac{dx}{\sqrt{\tan x}}=\frac{1}{2 \sqrt{2}}\left(-2 \tan ^{-1}\left(1-\sqrt{2} \sqrt{\tan(x)}\right)+2 \tan^{-1}\left(\sqrt{2} \sqrt{\tan (x)}+1\right)-\log \left(\tan (x)-\sqrt{2}\sqrt{\tan (x)}+1\right)+\log \left(\tan (x)+\sqrt{2} \sqrt{\tan(x)}+1\right)\right)$$ – Ian Miller Dec 6 '16 at 16:26
• The OP edited the question such that the denominator was $\sqrt{\tan(x)}$. I think this most recent edit has obfuscated the question's intentions. – teadawg1337 Dec 6 '16 at 16:26
• yes, sorry. It is supposed to be $\sqrt{tan(x)}$ – Mc-Ac Dec 6 '16 at 16:28
• @Mc-Ac Apart from Lab's answer, if you u-sub $\sqrt{tanx}=t$ the integral becomes of the form $\frac{2}{t^4+1}$ and that integral has been worked out elsewhere on this website – imranfat Dec 6 '16 at 16:30

$$2\sqrt{\cot x}=\sqrt{\cot x}+\sqrt{\tan x}+\sqrt{\cot x}-\sqrt{\tan x}=\dfrac{\cos x+\sin x}{\sqrt{\cos x\sin x}}+\dfrac{\cos x-\sin x}{\sqrt{\cos x\sin x}}$$
As $\int(\cos x+\sin x)dx=\sin x-\cos x,$ choose $\sin x-\cos x=u$ for the first integral.