-1

When encountering the integral $$\int_0^\pi i^{\tan x} d x,$$ I feel interesting and wonder of its value. Since it is improper at $x=\frac{\pi}{2},$ I start to split into two intervals and investigate each of them. $$\int_0^\pi i^{\tan x} d x = \underbrace{ \int_0^\frac\pi2 i^{\tan x} d x}_{J} + \underbrace{\int_ \frac\pi2 ^\pi i^{\tan x} d x}_{K} .$$ Using the period of $\tan x$, I change the the second integral $K$ by the substitution $x\mapsto \pi-x$. $$ K =\int_0^{\frac{\pi}{2}} i^{\tan (\pi-x)} d x =\int_0^{\frac{\pi}{2}} i^{-\tan x} d x $$ Combining them yields $$ \begin{aligned} I & =\int_0^{\frac{\pi}{2}}\left(e^{\frac{\pi}{2} i \tan x}+ e^{-\frac{\pi}{2} i \tan x}\right) d x\\ & =\int_0^{\frac{\pi}{2}}\left(e^{\frac{\pi}{2} i \tan x}+ \overline{ e^{\frac{\pi}{2} i \tan x}}\right) d x\\ & =2 \int_0^{\frac{\pi}{2}} \cos \left(\frac{\pi}{2} \tan x\right) d x \end{aligned} $$ which is surprisingly real.

Naturally, putting $t=\tan x$ transforms the integral into $$ \begin{aligned} I & =2 \int_0^{\infty} \frac{\cos \left(\frac{\pi}{2} t\right)}{1+t^2} d t \\ & =\int_{-\infty}^{\infty} \frac{\cos \left(\frac{\pi}{2} t\right)}{1+t^2} d t\\&=\Re \int_{-\infty}^{\infty} \frac{e^{\frac{\pi}{2} t i}}{1+t^2}dt \\ & =\Re \oint_\gamma \frac{e^{\frac{\pi}{2} z i}}{1+z^2} d z \end{aligned} $$ using contour integration along anti-clockwise direction of the path $$\gamma=\gamma_{1} \cup \gamma_{2} \textrm{ where } \gamma_{1}(t)=t+i 0(-R \leq t \leq R) \textrm{ and } \gamma_{2}(t)=R e^{i t} (0<t<\pi) \textrm{ as } R \rightarrow \infty. $$ \begin{aligned} I & =\Re\left[2 \pi i \lim _{z \rightarrow i}(z-i) \frac{e^{\frac{\pi}{2} z i}}{z^2+1}\right] \\ & =\Re\left[2 \pi i \frac{e^{-\frac{\pi}{2}}}{2 i}\right] \\ & =\pi e^{-\frac{\pi}{2}} \end{aligned} My Question

Is there any real method to deal with integral?

Your comments and alternative methods are highly appreciated.

Lai
  • 20,421
  • 5
    At what point do you want to have a real method? I'm asking because $\int_{-\infty}^{\infty} \frac{e^{\frac{\pi}{2} t i}}{1+t^2}dt$ is a known Fourier transform. – Stefan Lafon Aug 15 '23 at 01:12
  • As @StefanLafon mentioned this is a known Fourier transform evaluated at $s=1$. – Andy Walls Aug 15 '23 at 01:19
  • 2
    $\displaystyle \int_{-\infty}^{\infty} \frac{\cos \left(a t\right)}{1+t^2} d t$ is very famous and has been posted a lot – NoName Aug 15 '23 at 01:22
  • 1
    One method would be Feynman's trick, in the vein of this post – PrincessEev Aug 15 '23 at 01:29
  • 1
    More details re: Fourier transform -- recognize that $$ I = \mathfrak{Re} \left( \mathcal{F} \left[ \frac{1}{1+x^2} \right] \bigg|{\xi=-\pi/2} \right) $$ where $\mathcal{F}f$ denotes the Fourier transform of $f$, given by $$ \mathcal{F}f := \int\mathbb{R} f(x) e^{- i \xi x} , \mathrm{d}x $$ (or whatever convention you please). Luckily we know that $$ \mathcal{F} \left[ \frac{1}{\alpha^2+x^2} \right] \bigg|_{\xi} = \frac\pi {\alpha e^{\alpha |\xi|}} $$ – PrincessEev Aug 15 '23 at 01:29
  • 1
    In going from $i^{\tan x}$ to $e^{\frac{\pi}{2} i \tan x}$, you have chosen a particular branch of the (multi-valued) $i^{\tan x}$. Explain that. Also, explain why this wildly oscillatory integral converges. – GEdgar Aug 15 '23 at 01:45
  • 1
    Thank you all for your wonderful alternative methods and comments. I had learnt much from you all. – Lai Aug 15 '23 at 03:39

1 Answers1

3

$$I =2 \int_0^{\infty} \frac{\cos \left(\frac{\pi}{2} t\right)}{1+t^2} \,dt=i\left(\int_0^{\infty} \frac{\cos \left(\frac{\pi}{2} t\right)}{t+i} \,dt -\int_0^{\infty} \frac{\cos \left(\frac{\pi}{2} t\right)}{t-i} \,dt\right)$$ Use the obvious changes of variable $u=t\pm i$ and expand the cosine $$\int \frac{\cos \left(\frac{\pi}{2} t\right)}{t+i} \,dt=\cosh \left(\frac{\pi }{2}\right)\int\frac{ \cos \left(\frac{\pi u}{2}\right)}{u}\,du+i \sinh \left(\frac{\pi }{2}\right)\int\frac{ \sin \left(\frac{\pi u}{2}\right)}{u}\,du$$ Now $v=\frac{\pi u}{2}$ to face the usual sine and cosine integrals.

Back to $t$ and using the bounds $$I=\pi\,e^{-\pi /2}$$