Calculus – Evaluating a Strange Integral Involving Tangent

calculusdefinite integralsimproper-integralsintegration

While browsing on Integral and Series, I found a strange integral posted by @Sangchul Lee. His post doesn't have a response for more than a month, so I decide to post it here. I hope he doesn't mind because the integral looks very interesting to me. I hope for you too. 🙂

enter image description here

$$\mbox{How does one prove}\quad
\int_{-\infty}^{\infty}
{{\rm d}x \over 1 + \left[\,x + \tan\left(\, x\,\right)\,\right]^{2}} = \pi\quad
{\large ?}
$$

Please don't ask me, I really have no idea how to prove it. I hope users here can find the answer to prove the integral. I'm also interested in knowing any references related to this integral. Thanks in advance.

Best Answer

Here is an approach.

We may use the following result, which goes back to G. Boole (1857) :

$$ \int_{-\infty}^{+\infty}f\left(x-\frac{a_1}{x-\lambda_1}-\cdots-\frac{a_n}{x-\lambda_n}\right)\mathrm{d}x=\int_{-\infty}^{+\infty} f(x)\: \mathrm{d}x \tag1 $$

with $a_i>0, \lambda_i \in \mathbb{R}$ and $f$ sufficiently 'regular'.

Observe that, for $x\neq n\pi$, $n=0,\pm1,\pm2,\ldots$, we have $$ \cot x = \lim_{N\to +\infty} \left(\frac1x+\frac1{x+\pi}+\frac1{x-\pi}+\cdots+\frac1{x+N\pi}+\frac1{x-N\pi}\right)$$ leading to (see Theorem 10.3 p. 14 here and see achille's answer giving a route to prove it)

$$ \int_{-\infty}^{+\infty}f\left(x-\cot x\right)\mathrm{d}x=\int_{-\infty}^{+\infty} f(x)\: \mathrm{d}x \tag2 $$

with $\displaystyle f(x)=\frac{1}{1+\left(\small{\dfrac\pi2 -x }\right)^2}$.

On the one hand, from $(2)$, $$ \begin{align} \int_{-\infty}^{+\infty}f\left(x-\cot x\right)\mathrm{d}x& =\int_{-\infty}^{+\infty} f(x)\: \mathrm{d}x \\\\ &=\int_{-\infty}^{+\infty}\frac{1}{1+\left(\small{\dfrac\pi2 -x }\right)^2}\: \mathrm{d}x\\\\ &=\int_{-\infty}^{+\infty}\frac{1}{1+x^2}\: \mathrm{d}x\\\\ & =\pi \tag3 \end{align} $$ On the other hand, with the change of variable $x \to \dfrac\pi2 -x$, $$ \begin{align} \int_{-\infty}^{+\infty}\!\!\!f\left(x-\cot x\right)\mathrm{d}x & =\int_{-\infty}^{+\infty} \!\!\!f\left(\dfrac\pi2-x-\tan x\right)\mathrm{d}x \\\\ & =\int_{-\infty}^{+\infty}\frac{1}{1+\left(x+ \tan x \right)^2} \mathrm{d}x \tag4 \end{align} $$ Combining $(3)$ and $(4)$ gives

$$ \int_{-\infty}^{+\infty}\frac{1}{1+\left(x+ \tan x \right)^2} \mathrm{d}x=\pi. $$