Prove $\int_{0}^{\frac{\pi}{2}} \sqrt[n]{\tan x} dx = \frac{\pi}{2} \sec (\frac{\pi}{2n})$ without complex techniques

calculusdefinite integralsintegrationreal-analysis

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.

Best Answer

$$ \begin{align} \int_0^{\frac\pi2}\sqrt[n]{\tan(x)}\,\mathrm{d}x\ &=\int_0^\infty\frac{u^{1/n}\,\mathrm{d}u}{1+u^2}\tag{1a}\\ &=\frac12\int_0^\infty\frac{v^{\frac{1-n}{2n}}}{1+v}\,\mathrm{d}v\tag{1b}\\ &=\frac\pi2\csc\left(\pi\frac{n+1}{2n}\right)\tag{1c}\\[6pt] &=\frac\pi2\sec\left(\frac\pi{2n}\right)\tag{1d} \end{align} $$ Explanation:
$\text{(1a)}$: set $x=\tan^{-1}(u)$
$\text{(1b)}$: set $u=v^{1/2}$
$\text{(1c)}$: apply $(2)$ below
$\text{(1d)}$: $\csc(\pi/2+x)=\sec(x)$

Here is the argument from $(3)$ of this answer with more explanation: $$ \begin{align} \int_0^\infty\frac{x^{\alpha-1}}{1+x}\,\mathrm{d}x &=\int_0^1\frac{x^{-\alpha}+x^{\alpha-1}}{1+x}\,\mathrm{d}x\tag{2a}\\ &=\sum_{k=0}^\infty(-1)^k\int_0^1\left(x^{k-\alpha}+x^{k+\alpha-1}\right)\mathrm{d}x\tag{2b}\\ &=\sum_{k=0}^\infty(-1)^k\left(\frac1{k-\alpha+1}+\frac1{k+\alpha}\right)\tag{2c}\\ &=\sum_{k\in\mathbb{Z}}\frac{(-1)^k}{k+\alpha}\tag{2d}\\[6pt] &=\pi\csc(\pi\alpha)\tag{2e} \end{align} $$ Explanation:
$\text{(2a)}$: break the integral into two parts: $[0,1]$ and $(1,\infty)$
$\phantom{\text{(2a):}}$ substitute $x\mapsto1/x$ in the second part
$\text{(2b)}$: apply the series for $\frac1{1+x}$
$\text{(2c)}$: evaluate the integrals
$\text{(2d)}$: write as a principal value sum
$\text{(2e)}$: apply $(8)$ from this answer