<s>[INST] How to evaluate the integral $\int_{0}^{\frac{\pi}{2}}\sqrt[n]{\tan\theta} d \theta$, where $n\geq 2$? In my post, I started to investigate the integral $\int_0^{\frac{\pi}{2}} \sqrt{\tan \theta} d \theta$ and then$\int \sqrt[3]{\tan \theta} d \theta$ in post.
After encountering the Beta Functions, I want to try to apply it to the integral.
$$
\begin{aligned}
\int_0^{\frac{\pi}{2}} \sqrt{\tan \theta} d \theta &=\int_{0}^{\frac{\pi}{2}} \sin ^{\frac{1}{2}} \theta \cos ^{-\frac{1}{2}} \theta d \theta \\
&=\int_{0}^{\frac{\pi}{2}} \sin ^{2\left(\frac{3}{4}\right)-1} \theta \cos ^{2\left(\frac{1}{4}\right)-1} \theta d \theta \\
&=\frac{1}{2} B\left(\frac{3}{4}, \frac{1}{4}\right) \\&=\frac{\pi}{\sqrt2} 
\end{aligned}
$$
I then go further to $$
I_n=\int_{0}^{\frac{\pi}{2} }\sqrt[n]{\tan \theta} d\theta.
$$
Similarly
$$
\begin{aligned}
I_n&=\int_{0}^{\frac{\pi}{2}} \tan ^{\frac{1}{n}  } \theta d \theta \\
&=\int_{0}^{\frac{\pi}{2}} \sin ^{\frac{1}{n} } \theta \cos ^{-\frac{1}{n} } \theta d \theta \\
&= \int_{0}^{\frac{\pi}{2}} \sin ^{2\left(\frac{n+1}{2 n}\right)-1} \theta \cos ^{2\left(\frac{n-1}{2 n}\right)-1} d \theta \\
&=\frac{1}{2} B\left(\frac{n+1}{2 n}, \frac{n-1}{2 n}\right)
\end{aligned}
$$
Applying the theorem $$
B(x, 1-x)=\pi \csc (\pi x), \textrm{ where } x\notin Z
$$
gives
$$
\boxed{\int_{0}^{\frac{\pi}{2}} \sqrt[n]{\tan \theta} d \theta =\frac{\pi}{2} \csc \left(\frac{n+1}{2 n} \pi\right)=\frac{\pi}{2} \sec \left(\frac{\pi}{2 n}\right)}
$$
which is unexpectedly beautiful and decent.
Furthermore
Replacing $\frac{1}{n}$ by $a$ yields
$$\boxed{
\int_{0}^{\frac{\pi}{2}} \tan ^{a} \theta d \theta =\frac{\pi}{2} \csc \left(\frac{a+1}{2} \pi\right)=\frac{\pi}{2} \sec \frac{a \pi}{2}}
$$
For example, $$
\int_{0}^{\frac{\pi}{2}} \sqrt[3]{\tan \theta} d \theta =I\left(\frac{1}{3}\right) =\frac{\pi}{2} \sec \left(\frac{ \pi}{6}\right)=\frac{\pi}{\sqrt{3}} $$
$$\int_{0}^{\frac{\pi}{2}} \sqrt[6]{\tan \theta} d \theta =I\left(\frac{1}{6} \right)=\frac{\pi}{2} \sec\left(\frac{\pi}{12}\right)=\pi \sqrt{2-\sqrt{3}}$$
$$
\int_{0}^{\frac{\pi}{2}} \tan ^{\frac{1}{e}}\theta d\theta =\frac{\pi}{2} \sec \frac{\pi}{2 e}
$$
$$
\int_{0}^{\frac{\pi}{2}} \tan ^{\frac{1}{\pi}} \theta d \theta=\frac{\pi}{2} \sec \frac{1}{2}
$$
checked by Wolframalpha.
My question: Is there a method without using Beta Functions?
 [/INST] Do the change of variable $w = \tan \theta$
$$ I = \int_0^{\frac{\pi}{2}} \sqrt[n]{\tan \theta} d \theta  = \int_{0}^{\infty} \frac{w^{\frac{1}{n}}}{1+w^2}dw $$
Recall the integral representation of the $\sec(x)$ function:
$$ \sec(x) = \frac{2}{\pi}\int_{0}^{\infty} \frac{t^{\frac{2x}{\pi}}}{t^2+1}dt \quad |x|<\frac{\pi}{2}$$
Of course this formula can be proven using the complete beta function but it can also be proven using contour integration around a branch point, the first answer here contains both proofs. There are other other methods prescinding the beta function, here is a good compilation.
If we put $\displaystyle x = \frac{\pi}{2n}$:
$$ \sec\left(\frac{\pi}{2n}\right) = \frac{2}{\pi}\int_{0}^{\infty} \frac{t^{\frac{1}{n}}}{t^2+1} dt$$
$$\Longrightarrow \int_{0}^{\infty} \frac{t^{\frac{1}{n}}}{t^2+1} dt = \frac{\pi}{2} \sec\left(\frac{\pi}{2n}\right)$$
</s>