Evaluation of the definite integral: $\int_0^{\pi/2}x\tan(x)^pdx$ The integral:
$$J=\int_{0}^{\pi/2}x\,\tan^{p}\left(x\right)\,{\rm d}x$$ has the solution:
$$J=\dfrac{\pi}{4\sin\left(\frac{\pi}{2}p\right)}\left[\Psi\left(\dfrac{1}{2}\right)-\Psi\left(\dfrac{1-p}{2}\right)\right]$$
where the function $\Psi(\dot{})$ is the 'Digamma' function. How can be proven this result?
Thanks.

We have:
$$ J=\int_{0}^{+\infty}\frac{x^p}{1+x^2}\arctan(x)dx,$$
but since $\arctan x=\Im\log(1+xi)=-\Im\log(1-xi)$,
$$ J=\frac{1}{2}\Im\int_{0}^{+\infty}\frac{x^p}{1+xi}\log(1+xi)\,dx-\frac{1}{2}\Im\int_{0}^{+\infty}\frac{x^p}{1-xi}\log(1-xi)\,dx$$
hence:
$$ J=\frac{1}{2}\Im\left.\frac{d}{d\alpha}\int_{0}^{+\infty}x^p(1+xi)^{\alpha-1}dx\right|_{\alpha=0}-\frac{1}{2}\Im\left.\frac{d}{d\alpha}\int_{0}^{+\infty}x^p(1-xi)^{\alpha-1}dx\right|_{\alpha=0}$$
and the problem boils down to finding:
$$I_\alpha=\int_{0}^{+\infty}x^p(1+x i)^{\alpha-1}dx,$$
that depends on the Euler Beta function. We have:
$$ I_\alpha = \exp\left(-\frac{(p+1)\pi i}{2}\right)\frac{\Gamma(p+1)\Gamma(-p-\alpha)}{\Gamma(1-\alpha)}$$
whose imaginary part is:
$$ \Im I_\alpha= -\cos\left(\frac{\pi}{2}p\right)\frac{\Gamma(p+1)\Gamma(-p-\alpha)}{\Gamma(1-\alpha)}.$$
So we have:
$$ J=-\Gamma(p+1)\cos\left(\frac{\pi}{2}p\right)\frac{d}{d\alpha}\left.\frac{\Gamma(-p-\alpha)}{\Gamma(1-\alpha)}\right|_{\alpha=0}$$
and by exploiting $\frac{dg}{d\alpha}=g\cdot\frac{d}{d\alpha}(\log g)$, $\frac{d}{dz}\log\Gamma(z) = \psi(z)$ and the reflection formula for the $\Gamma$ function we prove our claim.
