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.

\begin{aligned}
\int_{0}^{\frac{\pi}{2}} \sqrt[n]{\tan x} d x&=\int_{0}^{\frac{\pi}{2}} \sin ^{\frac{1}{n}} x \cos ^{-\frac{1}{n}} x d x\\
&= \int_{0}^{\frac{\pi}{2}} \sin ^{2\left(\frac{1}{2 n}+\frac{1}{2}\right)-1} x \cos^ {2\left(-\frac{1}{2n}+\frac{1}{2}\right)-1 }x d x\\
&=\frac{1}{2} B\left(\frac{1}{2 n}+\frac{1}{2},-\frac{1}{2 n}+\frac{1}{2}\right)\\
&=\frac{1}{2} \pi \csc \left[\pi\left(\frac{1}{2 n}+\frac{1}{2}\right)\right]\\
&=\frac{\pi}{2} \sec \frac{\pi}{2 n}
\end{aligned}
where the second last line using the property of Beta function:
$$B(x, 1-x)=\pi \csc (\pi x) \quad x \notin \mathbb{Z}.$$
