Let $n$ be a natural number. I want to calculate $$\int_0^{\pi/2} \sqrt[n]{(\tan x)}dx=\int_0^{\infty} \frac{x^n}{1+x^{2n}}dx$$ using contour integration.
I declare $f(z) = \frac{z^n}{1+z^{2n}}$. This function has $2n$ simple poles of the form $exp(i\frac{-\pi}{2n} + i\frac{\pi k}{n})$ for $k = 0,1,2, ... , 2n-1$.
My problem is to find which contour to use. I thought about using the following:
$\gamma_1(t) = t$, $t \in [0,R]$
$\gamma_2(t) = Re^{it}$, $t \in [0,\frac{\pi}{n}]$
$\gamma_3(t) = te^{i\frac{\pi}{n}}$, $t \in [0,R]$
This way I have only one pole in the contour and I can use the residue theorem. Is this a good approach? I somehow have problem with the calculations here.
Help would be appreciated