The integral $\int_{0}^{\pi/2} \tan^p x~dx$

beta functiondefinite integralsgamma function

The integral $I=\int_{0}^{\pi/2} \tan^p x~ dx$ is positive and convergent for $0<p<1$.

However, the Beta integral along with the property of Gamma function yields the integral \begin{align}I&=\int_{0}^{\pi/2} \tan^p x~ dx\\&=\int_{0}^{\pi/2} \sin^p x \cos^{-p} x ~dx\\&=\frac{1}{2} \Gamma(1/2+p/2)\Gamma(1/2-p/2)=\frac{\pi}{2} \sec (p\pi/2)\tag{*}\end{align}

The question is how to rule out $(*)$ for $p>1$?

Best Answer

For real parameters, the Beta function $\operatorname B(x,y)=\int_0^1t^{x-1}(1-t)^{y-1}\,dt$ is only defined when $x,y>0$ — otherwise the integral diverges.

Letting $t=\cos^2 x$, we have $$2\int_0^{\pi/2}\sin^px\cos^{-p}x\,dx=\int_0^1t^{-(p-1)/2-1}(1-t)^{(p+1)/2-1}\,dt.$$ When $p>1$ the term $-(p-1)/2$ is negative, so by definition the result cannot follow.

Related Question