# Integral $\int \tan^{\frac{1}{n}}x \, \mathrm d x$

I was trying to find a recurrence relation for the integral of $$\int \tan^{\frac{1}{n}}x \, \mathrm d x$$, with $$n$$ being a natural number. By substitution the integral can be converted to the integral of $$\frac{nx^n}{x^{2n}+1}$$. Thanks in advance.

What you did is nice $$\int \Big[\tan(x)\Big]^{\frac{1}{n}} \, dx=n\int \frac{t^n}{t^{2n}+1}\,dt$$ The problem is that, for the general case, $$I_n=n\int \frac{t^n}{t^{2n}+1}\,dt=\frac{n\,t^{n+1}}{n+1}\,\, _2F_1\left(1,\frac{n+1}{2 n};\frac{n+3}{2n} ;-t^{2n}\right)$$ where appears the gausssian hypergeometric function. Trying to find a recurrence relation seems to be difficult. Using partial fraction decomposition using the roots of unity will be a nightmare and, probably, would not lead to anything.
$$I_1,I_2,I_3$$ are quite simple to compute but, for $$I_4$$, just have a look here. In fact, because of the power $$2n$$ in the denominator of the integrand, the result would be a linear combination of logarithms and arctangents with more and more terms.
On the other hand, if you were concerned by $$J_n=n\int_0^\infty \frac{t^n}{t^{2n}+1}\,dt=\frac{\pi}{2} \sec \left(\frac{\pi }{2 n}\right)$$ $$K_n=n\int_0^1 \frac{t^n}{t^{2n}+1}\,dt=\frac{1}{4} \left(H_{\frac{1}{4} \left(\frac{1}{n}-1\right)}-H_{\frac{1}{4} \left(\frac{1}{n}-3\right)}\right)$$ which, for large values of $$n$$, could be approximated by $$K_n=\frac{\pi }{4}-\frac{C}{n}+\frac{\pi ^3}{32 n^2}+O\left(\frac{1}{n^3}\right)$$ where $$C$$ is Catalan number.