Prove $\int_{0}^{\frac{\pi}{2}} \sqrt[n]{\tan x} dx = \frac{\pi}{2} \sec (\frac{\pi}{2n})$ without complex techniques Prove
$$\int_{0}^{\frac{\pi}{2}} \sqrt[n]{\tan x} \,dx = \frac{\pi}{2} \sec \left(\frac{\pi}{2n}\right)$$
for all natural numbers $n \ge 2$.
There are several answers (A1 A2) to this integral but they all involve the gamma function or the beta function or contour integration  etc. Can one solve this using only 'real' 'elementary' techniques? For $n = 2$ and $n = 3$ it can be solved using only elementary substitutions and partial fractions.

Here is to integrate with partial fractions. Utilize the factorization
$ 1+y^{2n} = \prod^n_{k=1} (y^2-2y\cos a_k +1 )$, with $a_k=\frac{(2k-1)\pi}{2n}$
\begin{align}
&\int_{0}^{\frac{\pi}{2}} \sqrt[n]{\tan x} \,dx \\
=&\ \frac12 \int_{0}^{\frac{\pi}{2}} \sqrt[n]{\tan x}+\sqrt[n]{\cot x} \ {dx }
\overset{y^n=\tan x} = \frac 12\int_0^\infty\frac{n(y^n+y^{n-2})}{1+y^{2n}}dy\\
= &\ \frac12 \int_0^\infty \sum_{k=1}^n \frac{(-1)^{k+1}\sin 2a_k}{y^2-2y\cos a_k +1 }dy
=- \sum_{k=1}^n (-1)^{n-k}a_k\cos a_k\\
=&-\frac{d}{dt}\bigg(\sum_{k=1}^n (-1)^{n-k}\sin a_k t\bigg)_{t=1}= - \frac{d}{dt}\bigg(\frac{\sin \pi t}{2\cos\frac{\pi t}{2n}}\bigg)_{t=1}
= \frac\pi2 \sec\frac\pi{2n}
\end{align}
