Help to evaluate $\int_{0}^{\pi}\sec(x)\sqrt{\tan\left(\frac{x}{2}\right)}\ln^n\tan\left(\frac{x}{2}\right)dx$ I am trying to evaluate this integral
$$I=\large\int_{0}^{\pi}\sec(x)\sqrt{\tan\left(\frac{x}{2}\right)}\ln^n\tan\left(\frac{x}{2}\right)\mathrm dx$$
Making a substitution $\large u=\frac{x}{2}$
$\large \mathrm dx=\mathrm 2du$  
$$I=2\large \int_{0}^{\pi/2}\sec(2u)\sqrt{\tan(u)}\ln^n\tan(u)\mathrm du$$
Using trigonometrical identities, making a transformation
$$I=-2\large \int_{0}^{\pi/2}\sec(2u)\cdot \frac{\sqrt{\tan(u)}\ln^n\tan(u)}{\tan^2(u)-1}\mathrm du$$
Doing another substitution $\large v=\tan(u)$
$\large \mathrm du=\frac{1}{\sec^2(u)}\mathrm dv$
$$\large I=-2\int_{0}^{\infty}\frac{\sqrt{v}\ln^n(v)}{v^2-1}\mathrm dv$$
Doing another substitution $\large y=\sqrt{v}$
$\large \mathrm dv=2\sqrt{v}\mathrm dy$
$$\large I=-64\int_{0}^{\infty}\frac{y^2\ln^n(y)}{y^4-1}\mathrm dy$$
$$\large I=-64\int_{0}^{\infty}\frac{y^2\ln^n(y)}{(y^2+1)(y-1)(y+1)}\mathrm dy$$
Using partial fraction decomposition
$$\large I=-32\int_{0}^{\infty}\frac{\ln^n(y)}{y^2+1}\mathrm dy+16\int_{0}^{\infty}\frac{\ln^n(y)}{y+1}\mathrm dy-16\int_{0}^{\infty}\frac{\ln^n(y)}{y-1}\mathrm dy$$
I can't continue from this point... I would like some help, please.
 A: Split the integral at $v=1$ and let $v \to \frac{1}{v}$ in the second integral to obtain
$$ I_n \equiv - 2 \int \limits_0^\infty \frac{\sqrt{v} \ln^n (v)}{v^2 - 1} \, \mathrm{d} v = -2 \int \limits_0^1 \frac{[- \ln(v)]^n}{1-v^2} \left[v^{-1/2} + (-1)^{n-1} v^{1/2}\right] \, \mathrm{d} v \, . $$
Now let $v = \mathrm{e}^{-t}$ and expand the denominator into a geometric series:
$$ I_n = -2 \int \limits_0^\infty t^n \sum \limits_{l=0}^\infty \mathrm{e}^{-(2l+1)t} \left[\mathrm{e}^{t/2} + (-1)^{n-1} \mathrm{e}^{-t/2}\right] \, \mathrm{d} t \, . $$
Interchange summation and integration (monotone convergence theorem), make linear substitutions in the exponents and use the definition of the gamma function to find
$$ I_n = -2 n! \sum \limits_{l=0}^\infty \left[\frac{1}{\left(2l + \frac{1}{2}\right)^{n+1}} + \frac{(-1)^{n-1}}{\left(2l + \frac{3}{2}\right)^{n+1}}\right] = - 2^{n+2} n! \sum \limits_{m=0}^\infty \frac{(-1)^{(n-1) m}}{(2m+1)^{n+1}} \, .$$
For odd values of $n$ the sum is given by the Dirichlet lambda function:
\begin{align}
I_{2k-1} &= -2^{2k+1} (2k-1)! \lambda (2k) = -2^{2k+1} (2k-1)! \left(1-2^{-2k}\right) \zeta (2k) \\
&= - \frac{4^k (4^k-1) \lvert \mathrm{B}_{2k} \rvert}{2 k} \pi^{2k} \, , \, k \in \mathbb{N} \, .
\end{align}
$\mathrm{B}_{2k}$ are the Bernoulli numbers. For even $n$ one can use the Dirichlet beta function:
$$I_{2k} = - 2^{2k+2} (2k)! \beta(2k+1) = - \lvert \mathrm{E}_{2k} \rvert \pi^{2k+1} \, , \, k \in \mathbb{N} \, . $$
$\mathrm{E}_{2k}$ are the Euler numbers. In general, your integral is given by
$$ I_n = - a_n \pi^{n+1} \, , \, n \in \mathbb{N} \, ,$$
where $(a_n)_{n \in \mathbb{N}_0}$ is this sequence.
Note that these results suggest $I_0 = - \pi$, which is indeed true if we take the Cauchy principal value:
$$ I_0 \equiv - 2 \operatorname{PV} \int \limits_0^\infty \frac{\sqrt{v}}{v^2 - 1} \, \mathrm{d} v  = -2 \int \limits_0^1 \frac{\mathrm{d}v}{\sqrt{v} (1+v)} = - 4 \int \limits_0^1 \frac{\mathrm{d}w}{1+w^2} = - \pi \, . $$
