A strange integral: ∫+∞−∞dx1+(x+tanx)2=π.\int_{-\infty}^{+\infty} {dx \over 1 + \left(x + \tan x\right)^2} = \pi.

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. 🙂

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.

Here is an approach.

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

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 leading to (see Theorem 10.3 p. 14 here and see achille’s answer giving a route to prove it)

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

On the one hand, from $(2)$,

On the other hand, with the change of variable $x \to \dfrac\pi2 -x$,

Combining $(3)$ and $(4)$ gives