1

So, I was trying to calculate the integral

$$\ I(n) = \int_0^{\frac{\pi}{2}} \tan^n x dx$$

I used the substitution $\sin^2x = t$. Rearranging, I got the expression:

$$\ I(n) = \frac{1}{2} \cdot \int_0^1 t^{\frac{n-1}{2}} \cdot (1-t)^{\frac{-1-n}{2}} dt = \frac{1}{2}\cdot \beta(\frac{n+1}{2}, \frac{1-n}{2}) = \frac{\pi}{2\cos\frac{n\pi}{2}}$$

This works pretty nicely for $\ n < 1$, complying with the known results of $\ I(\frac{1}{2}) = \frac{\pi}{\sqrt2}$ and $\ I(\frac{1}{3}) = \frac{\pi}{\sqrt3}$

Also notice that the formula is invalid for odd natural $\ n$, which is to be expected since $\ I(1), I(3), I(5)....$ etc. diverge.

My question is : Why am I getting finite real values if I use the above formula for even natural $\ n$, despite the fact that $\ I(2), I(4), I(6)....$ etc. ought to (and do indeed) diverge?

Any help is appreciated. Thank you for reading!

Bob Dobbs
  • 15,712

3 Answers3

0

The beta function $\beta(x,y)$ has domain on $x,y \in \mathbb{C}$ where $\mathfrak{Re}(x),\mathfrak{Re}(y) > 0$.

Notice that, for $n > 1$, your second argument is negative, and hence a problem.

You can see the convergence problems in the integral definition. More simply, they can be seen reflected in the well-known gamma function identity, $$ \beta(x,y) = \frac{\Gamma(x) \Gamma(y)}{\Gamma(x+y)} $$ so $$ \beta \left( \frac{1+n}{2} , \frac{1-n}{2} \right) \;\;"="\;\; \Gamma \left( \frac{1+n}{2} \right) \Gamma \left( \frac{1-n}{2} \right) $$ but we know $\Gamma(z)$ isn't well-defined for $z \in \mathbb{Z}_{\le 0}$. This actually proves quite restricting beyond just natural even $n$; similarly, we conclude that $n > -1$, so $-1 < n < 1$ (for real $n$).

It is argued here that you require $\mathfrak{Re}(n) \in (-1,1)$ for complex $n$, more broadly.

PrincessEev
  • 50,606
0

$$ I_n = \int_0^{\frac{\pi}{2}} \tan^n (x)\, dx$$ $$x=\tan^{-1} (t) \qquad \implies \qquad I_n=\int_0^\infty \frac{t^n}{t^2+1}\,dt$$ which can converge only if $-1< n<1$.

If this is the case, therefore $$I_n=\frac{\pi }{2} \sec \left(n\frac{\pi }{2}\right)$$

0

$I=\int_0^1 t^{\frac{n-1}{2}} (1-t)^{\frac{-1-n}{2}} dt$ is an improper integral, because the integrand of this integral $f(t)=t^{\frac{n-1}{2}} (1-t)^{\frac{-1-n}{2}}$ is not continuous on $[0,1]$. In fact, it is not defined. It is discontinuous at $t=0$ and $t=1$.

We split the integral in two: $I=I_1+I_2$,$\,I_1=\int_0^{\frac12}f(t)dt$ and $I_2=\int_{\frac12}^1f(t)dt$.

Since, $f(t)\geq 0$, for $I$ to be convergent, $I_1$ and $I_2$ must be convergent.

$\begin{array} .I_1&>\int_0^{\frac12}t^{\frac{n-1}{2}} (1-\frac12)^{\frac{-1-n}{2}} dt\\ &=\lim_{\epsilon\to 0^+}\frac{2^\frac{n+3}{2}}{n+1}t^\frac{n+1}{2}\vert_\epsilon^{\frac12}\,\text{($n\neq -1$)}\\ &=2-\lim_{\epsilon\to 0^+}\frac{2^\frac{n+3}{2}}{n+1}\epsilon^\frac{n+1}{2} \end{array}$

The last limit exists if $n+1>0$. We also see that for $n=-1$, $I_1=-\ln2+\lim_{\epsilon\to0^+}\ln t$ does not converge. Conclusion: $n>-1$ for convergence of $I_1$.

A similar process shows that for convergence of $I_2$, we must have $n<1$.

For convergence of $I$: $\,-1<n<1.$

Bob Dobbs
  • 15,712