Factorize $x^{2n}+1$ to evaluate $\int\tan^{1/n}(x)dx$ I've been attempting to find a formula for $\int\tan(x)^{1/n}dx, n\in\Bbb N$.  
I started out by performing the substitution $$u=\tan(x)^{1/n}$$
$$dx=\frac {nu^{n-1}}{1+u^{2n}}du$$ to transform the integral into $$n\int \frac{u^n}{1+u^{2n}}du$$
This is a relatively simple rational function, so it should be possible to solve via a partial fraction expansion. For the simple case where $n=2$, I was able to rewrite the integral as $$\frac{\sqrt2}{2}\left(\int\frac{u}{u^2-\sqrt2u+1}du - \int\frac{u}{u^2+\sqrt2u+1}du\right)$$
Which can then be solved by completing the square to yield $$\frac{\sqrt2}{4}\ln\left(\left(\sqrt{\tan{x}}-\frac{\sqrt2}{2}\right)^2+\frac{1}{2}\over\left(\sqrt{\tan{x}}+\frac{\sqrt2}{2}\right)^2+\frac{1}{2}\right)+\frac{\sqrt2}{2}\left(\arctan\left({\sqrt{2\tan{x}}-1}\right)+\arctan\left({\sqrt{2\tan{x}}+1}\right)\right)+C$$
However, I can't figure out how to factor the denominator for the partial fraction expansion of the general case. It will always be a product of $n$ irreducible quadratic factors, clearly, but I don't know how to locate them. I have managed to find the complex linear factors, using Euler's identity to find that they're of the form $$x\pm e^{im\pi\over{2n}}$$ where m is allowed to vary from 1 to $2n$. How can I combine these linear factors into real, irreducible quadratics for use in my partial fraction expansion? Alternatively, is there a simpler method of evaluating this integral? Any help would be vastly appreciated.

I do not think that this is an answer but it is too long for a comment.
Adressing this problem, you enter in the world of the gaussian hypergeometric function since $$I_n=n\int \frac{u^n}{1+u^{2n}}\,du=\frac{n \,u^{n+1} }{n+1}\,\, _2F_1\left(1,\frac{n+1}{2 n};\frac{3n+1}{2 n};-u^{2 n}\right)$$ which, as you showed, can simplify for $n=2$.
In other words, back to $x$, $$I_n=\int{\tan^{\frac 1n} (x)}\,dx=\frac{n \tan ^{\frac{n+1}{n}}(x)}{n+1}\,\,\, _2F_1\left(1,\frac{n+1}{2 n};\frac{3n+1}{2 n};-\tan
   ^2(x)\right)$$
Edit
In your comment, you reported that $$u^6+1=(u^2+\sqrt{3}u+1)(u^2-\sqrt{3}u+1)(u^2+1)$$ So, using partial fraction decomposition $$\frac{u^3}{1+u^6}=\frac{u}{3
   \left(u^2+1\right)}+\frac{u}{6 \left(u^2-\sqrt{3} u+1\right)}+\frac{u}{6 \left(u^2+\sqrt{3} u+1\right)}$$ which can be integrated leading to $$\int\frac{u^3}{1+u^6}\,du=-\frac{1}{6} \log \left(u^2+1\right)+\frac{1}{12} \log \left(u^2-\sqrt{3}
   u+1\right)+\frac{1}{12} \log \left(u \left(u+\sqrt{3}\right)+1\right)-\frac{\tan
   ^{-1}\left(\sqrt{3}-2 u\right)}{2 \sqrt{3}}-\frac{\tan ^{-1}\left(2
   u+\sqrt{3}\right)}{2 \sqrt{3}}$$ Here again, the logarithms can be combined together as well as the arctangents. 
Much more tedious is the factorization of $u^8+1$; it leads to
$$u^8+1=\left(u^2-2 u \sin \left(\frac{\pi }{8}\right)+1\right) \left(u^2+2 u \sin
   \left(\frac{\pi }{8}\right)+1\right)$$ $$ \left(u^2-2 u \cos \left(\frac{\pi
   }{8}\right)+1\right) \left(u^2+2 u \cos \left(\frac{\pi }{8}\right)+1\right)$$ leading to a small monster I shall not reproduce here (too long !).
Similarly, we could write $$u^{10}+1=(1+u^2)(u^8-u^6+u^4-u^2+1)$$ and the last term again can be factorized as the product of four quadratic polynomials.
$$\left(u^2-\sqrt{\frac{1}{2} \left(5-\sqrt{5}\right)} u+1\right)
   \left(u^2+\sqrt{\frac{1}{2} \left(5-\sqrt{5}\right)} u+1\right)$$
$$   \left(u^2-\sqrt{\frac{1}{2} \left(5+\sqrt{5}\right)} u+1\right)
   \left(u^2+\sqrt{\frac{1}{2} \left(5+\sqrt{5}\right)} u+1\right)$$
Looking for something else, I found this post where Dr.MV's answer would be very interesting for yur work.
