Evaluate this integral: $\int\sqrt{\tan x } \ dx$
So I had an idea, which just looks too simple to be true, but correct me please, I believe it has to be wrong...
Rewrite as: $$\int\sqrt\frac{\sin x}{\cos x} dx$$
Make substitutions, and work around the terms: $$\sqrt{\cos x}=t$$ $$dt = -\frac{\sin x}{2\sqrt{\cos x}}dx$$ Now you have to look at the original integral and notice $\frac{dx}{\sqrt{\cos x}}$ is there, so work it around and get the sub.
Rewrite the original term in terms of $dt$.$$-\int\frac{\sqrt{\sin x}}{\sin x}2dt$$
See? Now intuitively, just do the integral which is very easy, and return the substituted $t$. The result is: $$-2\frac{\sqrt{\cos x}}{\sqrt{\sin x}}+C$$
To me, it seems wrong when I compare it to the results around the internet, but none of these operations seems illegal to me :)).
So what do you say?
Try: $$\int\sqrt{\tan x}dx=\int\frac{2u^2}{u^4+1}du=2\int{\frac{{u}^{2}}{\left({u}^{2}-\sqrt{2}u+1\right)\left({u}^{2}+\sqrt{2}u+1\right)}}du=$$ $$2 \int{\frac{u}{2\sqrt{2}\left({u}^{2}-\sqrt{2}u+1\right)}-\frac{u}{2\sqrt{2}\left({u}^{2}+\sqrt{2}u+1\right)}}du=$$ $$=-\frac{\ln\left({u}^{2}+\sqrt{2}u+1\right)}{2\sqrt{2}}+\frac{\ln\left({u}^{2}-\sqrt{2}\,u+1\right)}{2\sqrt{2}}+\frac{\arctan\left(\frac{2\,u+\sqrt{2}}{\sqrt{2}}\right)}{\sqrt{2}}+\frac{\arctan\left(\frac{2u-\sqrt{2}}{\sqrt{2}}\right)}{\sqrt{2}}+C$$