Asymptotic expansion of integral involving an ArcTan

244 Views Asked by At

The function I want to study reads $$ f(y)= \frac{\sqrt{1+y^2}}{\pi^2 y} \int_0^\infty du \left\lbrace \arctan \left[\frac{2y}{u^2(1+y^2)+1-y^2 }\right] \right\rbrace^2 \, , $$ and it is well-defined for any real $y$ (actually the integral diverges for $y=0$, but this divergence is tamed by the prefactor so that $f(0)=0$, and $f(y)\simeq y/\pi$ for small $y$).

By computing the integral numerically I learn that $$ \lim_{y\to \infty}f(y) = 1 \, , $$ so I am interested in its asymptotic behavior for large $y$, like $$f(y)\simeq 1-g(y) \, ,$$ for some function $g(y)$ (vanishing in the limit $y\to\infty$) which I want to determine. Clearly a blind Taylor expansion does not work, because not all the terms in the series converge.

Do you have any suggestion?

EDIT:

The branch of the $ArcTan$ is chosen so that it returns a number in $[0,\pi]$.

EDIT 2:

To further clarify which branch of the $ArcTan$ I am interested in, here I am plotting the integrand $ArcTan$ (without squaring it) for two sample values of $y$. For $y=1$, in particular, the argument of $ArcTan$ is always positive, so it returns $\pi/2$ at $u=0$ and then it decays to zero at large $u$.

Plot of the integrand ArcTan.

With this choice, $f(y)$ grows monotonically from $0$ to $1$, with no peak (and no other surprises) in the middle.

2

There are 2 best solutions below

0
On BEST ANSWER

In this problem we define $$\arctan x=\operatorname{Arctan}x, \,\text{at}\,x>0$$ $$\arctan x=\pi-\operatorname{Arctan}|x|, \,\text{at}\,x<0$$ where $\operatorname{Arctan}x$ denotes the main branch $(\operatorname{Arctan}x=0\,\text{at}\,x=0\,\,\text{and}\,\operatorname{Arctan}x=\frac{\pi}{2}\,\text{at}\,x\to\infty\,)$.

Then $$f(y)= \frac{\sqrt{1+y^2}}{\pi^2 y} \int_0^\infty \left\lbrace \arctan \left[\frac{2y}{u^2(1+y^2)+1-y^2 }\right] \right\rbrace^2du$$ $$=\frac{\sqrt{1+y^2}}{\pi^2 y}\int_1^\infty \left\lbrace \arctan \left[\frac{2y}{(1+y^2)\big(u^2-\frac{y^2-1}{y^2+1}\big) }\right] \right\rbrace^2du$$ $$+\frac{\sqrt{1+y^2}}{\pi^2 y}\int_0^1 \left\lbrace \pi-\arctan \left[\frac{2y}{(1+y^2)\big(\frac{y^2-1}{y^2+1}-u^2\big) }\right] \right\rbrace^2du$$ Dropping the terms which bring additional factor $\sim\frac{1}{y^2}$, we can simplify the integral. The form of the first asymptotics terms will confirm the chosen approach.

For example, $$ \frac{\sqrt{1+y^2}}{\pi^2 y}=\frac{1}{\pi^2}\sqrt{1+\frac{1}{y^2}}=\frac{1}{\pi^2}\Big(1+\frac{1}{2y^2}+...\Big)$$ $$\frac{y^2-1}{y^2+1}-u^2=1-u^2-\frac{2}{y^2}-...\,\text{and}\,\,\frac{2y}{1+y^2}=\frac{2}{y}\Big(1-\frac{1}{y^2}+..\Big)$$ So, for the main asymptotics we use the following representation: $$\pi^2f(y)\sim\int_1^\infty \left\lbrace \arctan \left[\frac{2}{y(u^2-1) }\right] \right\rbrace^2du+\int_0^1 \left\lbrace\pi- \arctan \left[\frac{2}{y(1-u^2) }\right] \right\rbrace^2du$$ Making the substitution $x=u^2$ and opening parentheses $$=\pi^2+\frac{1}{2}\int_1^\infty\arctan^2\Big(\frac{2}{y(x-1)}\Big)\frac{dx}{\sqrt x}-\pi\int_0^1\arctan\Big(\frac{2}{y(1-x)}\Big)\frac{dx}{\sqrt x}$$ $$+\frac{1}{2}\int_0^1\arctan^2\Big(\frac{2}{y(1-x)}\Big)\frac{dx}{\sqrt x}=\pi^2+I_1+I_2+I_3\tag{1}$$ Now we will evaluate every term. $$I_1=\frac{1}{2}\int_1^\infty\arctan^2\Big(\frac{2}{y(x-1)}\Big)\frac{dx}{\sqrt x}=\frac{1}{y}\int_0^\infty\arctan^2\frac{1}{t}\,\frac{dt}{\sqrt{1+\frac{2t}{y}}}$$ $$=\frac{1}{y}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)dt-\frac{1}{y}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)\bigg(1-\frac{1}{\sqrt{1+\frac{2t}{y}}}\bigg)dt\tag 2$$ Integrating by part a couple of times, it is not difficult to evaluate the first integral in $(2)$ $$I_{1,1}=\frac{1}{y}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)dt=\frac{1}{y}\int_0^\infty\frac{\arctan^2x}{x^2}dx=\frac{\pi\ln2}{y}\tag 3$$ The second integral in $(2)$: $$I_{1,2}=\frac{1}{y}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)\bigg(1-\frac{1}{\sqrt{1+\frac{2t}{y}}}\bigg)dt$$ $$=\frac{2}{y^2}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)\frac{tdt}{\sqrt{1+\frac{2t}{y}}\Big(1+\sqrt{1+\frac{2t}{y}}\Big)}$$ To estimate it, let's split the interval of integration $[0;\sqrt\frac{y}{2}\,];\,[\sqrt\frac{y}{2};\infty)$. Making the substitution $t=\frac{1}{x}$ $$\frac{2}{y^2}\int_0^\sqrt\frac{y}{2}\arctan^2\Big(\frac{1}{t}\Big)\frac{tdt}{\sqrt{1+\frac{2t}{y}}\Big(1+\sqrt{1+\frac{2t}{y}}\Big)}<\frac{2}{y^2}\int_0^\sqrt\frac{y}{2}\arctan^2\Big(\frac{1}{t}\Big)\frac{tdt}{2}$$ $$=\frac{1}{y^2}\int_\sqrt\frac{2}{y}^\infty\frac{\arctan^2x}{x^3}dx=O\Big(\frac{\ln y}{y^2}\Big)$$ At the same time, $$\frac{2}{y^2}\int_\sqrt\frac{y}{2}^\infty\arctan^2\Big(\frac{1}{t}\Big)\frac{tdt}{\sqrt{1+\frac{2t}{y}}\Big(1+\sqrt{1+\frac{2t}{y}}\Big)}<\frac{2}{y^2}\int_\sqrt\frac{y}{2}^\infty\frac{dt}{t\sqrt{1+\frac{2t}{y}}\Big(1+\sqrt{1+\frac{2t}{y}}\Big)}$$ Making the substitution $t=\frac{xy}{2}$ $$=\frac{2}{y^2}\int_\sqrt\frac{2}{y}^\infty\frac{dx}{x\sqrt{1+x}(1+\sqrt{1+x})}<\frac{2}{y^2}\int_\sqrt\frac{2}{y}^\infty\frac{dx}{x(1+x)}=O\Big(\frac{\ln y}{y^2}\Big)$$ Therefore, $$\boxed{\,\,I_1=\frac{\pi\ln2}{y}+O\Big(\frac{\ln y}{y^2}\Big)\,\,}\tag 4$$ In the same way we evaluate $I_3$. Using $(3)$, after some manipulations we finally get $$I_3=\frac{1}{2}\int_0^1\arctan^2\Big(\frac{2}{y(1-x)}\Big)\frac{dx}{\sqrt x}=\frac{1}{y}\int_0^\frac{y}{2}\frac{\arctan^2\big(\frac{1}{t}\big)}{\sqrt{1-\frac{2t}{y}}}dt$$ $$=\frac{1}{y}\int_0^\infty\arctan^2\Big(\frac{1}{t}\Big)dt+O\Big(\frac{\ln y}{y^2}\Big)+O\Big(\frac{1}{y^{3/2}}\Big)$$ $$\boxed{\,\,I_3=\frac{\pi\ln2}{y}+O\Big(\frac{1}{y^{3/2}}\Big)\,\,}\tag 5$$ The most interesting story is with $I_2$ $$I_2=-\pi\int_0^1\arctan\Big(\frac{2}{y(1-x)}\Big)\frac{dx}{\sqrt x}=-\frac{2\pi}{y}\int_0^\frac{y}{2}\frac{\arctan\big(\frac{1}{t}\big)}{\sqrt{1-\frac{2t}{y}}}dt$$ Integrating by part $$=-\frac{2\pi}{y}\bigg(\frac{\pi y}{2}-y\int_0^\frac{y}{2}\frac{\sqrt{1-\frac{2t}{y}}}{1+t^2}dt\bigg)$$ After some manipulations, using $\frac{\pi}{2}=\int_0^\infty\frac{dt}{1+t^2}$, and integrating by part one more time $$I_2\sim-\frac{2\pi}{y}\bigg(2+\ln\Big(1+\frac{y^2}{4}\Big)-\frac{1}{y}\int_0^\frac{y}{2}\frac{\ln(1+t^2)}{\sqrt{1-\frac{2t}{y}}\big(1+\sqrt{1-\frac{2t}{y}}\big)}dt\bigg)$$ $$=-\frac{2\pi}{y}\bigg(2+\ln\Big(1+\frac{y^2}{4}\Big)-\frac{1}{2}\int_0^1\frac{\ln\Big(1+\frac{y^2}{4}x^2\Big)}{\sqrt{1-x}\big(1+\sqrt{1-x}\big)}dx\bigg)$$ To evaluate the remaining integral, again we split the interval of integration $[0;\sqrt\frac{2}{y}\,];\,[\sqrt\frac{2}{y};1]$. Integration over the first interval gives $O\Big(\frac{\ln y}{y^{3/2}}\Big)$; integration over the second interval gives the main terms. Skipping intermediate steps, we get: $$I_2\sim-\frac{2\pi}{y}\bigg(2+2\ln\frac{y}{2}-\int_0^1\frac{\ln x+\ln\frac{y}{2}}{\sqrt{1-x}\big(1+\sqrt{1-x}\big)^2}dx\bigg)$$ $$=-\frac{2\pi}{y}\bigg(2+2\ln\frac{y}{2}-2\int_0^1\frac{\ln (1-t^2)}{\big(1+t\big)^2}dx-2\ln\frac{y}{2}\int_0^1\frac{dt}{\big(1+t\big)^2}\bigg)$$ $$=-\frac{2\pi}{y}\bigg(2+2\ln\frac{y}{2}+2\ln2-1-\ln\frac{y}{2}\bigg)$$ $$\boxed{\,\,I_2=-\frac{2\pi}{y}\big(1+\ln2+\ln y\big)+O\Big(\frac{\ln y}{y^{3/2}}\Big)\,\,}\tag 6$$ Now, putting $(4)$, $(5)$ and $(6)$ into $(1)$ $$\boxed{\boxed{\,\,f(y)=1-\frac{2}{\pi}\frac{(\ln y+1)}{y}+O\Big(\frac{\ln y}{y^{3/2}}\Big)\,\,}}$$

6
On

Define the function $\mathcal{I}:\mathbb{R}\rightarrow\mathbb{R}$ via the (convergent) improper integral

$$\mathcal{I}{\left(z\right)}:=\int_{0}^{\infty}\mathrm{d}u\,\left[\arctan{\left(\frac{2z}{\left(1+z^{2}\right)u^{2}+1-z^{2}}\right)}\right]^{2}.$$

It is actually possible to obtain a closed form expression for $\mathcal{I}$ in terms of elementary functions. Since this is perhaps unexpected, I thought I'd post a solution.


Suppose $z\in\mathbb{R}$, and set $\arctan{\left(z\right)}=:\theta\in\left(-\frac{\pi}{2},\frac{\pi}{2}\right)\implies z=\tan{\left(\theta\right)}$. Then,

$$\frac{2z}{1+z^{2}}=\sin{\left(2\theta\right)},$$

$$\frac{1-z^{2}}{1+z^{2}}=\cos{\left(2\theta\right)},$$

and so

$$\begin{align} \mathcal{I}{\left(z\right)} &=\int_{0}^{\infty}\mathrm{d}u\,\left[\arctan{\left(\frac{2z}{\left(1+z^{2}\right)u^{2}+1-z^{2}}\right)}\right]^{2}\\ \implies\mathcal{I}{\left(\tan{\left(\theta\right)}\right)} &=\int_{0}^{\infty}\mathrm{d}u\,\left[\arctan{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)}\right]^{2}\\ &=\lim_{u\to\infty}\left[u\arctan^{2}{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)}\right]\\ &~~~~~-\int_{0}^{\infty}\mathrm{d}u\,u\frac{d}{du}\left[\arctan{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)}\right]^{2};~~~\small{I.B.P.}\\ &=-\int_{0}^{\infty}\mathrm{d}u\,u\left[-\frac{4u\sin{\left(2\theta\right)}}{u^{4}+2u^{2}\cos{\left(2\theta\right)}+1}\arctan{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)}\right]\\ &=2\int_{0}^{\infty}\mathrm{d}u\,\frac{2u^{2}\sin{\left(2\theta\right)}}{u^{4}+2u^{2}\cos{\left(2\theta\right)}+1}\arctan{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)}\\ &=\int_{0}^{\infty}\mathrm{d}u\,\frac{2u^{2}\sin{\left(2\theta\right)}}{u^{4}+2u^{2}\cos{\left(2\theta\right)}+1}\arctan{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)}\\ &~~~~~+\int_{-\infty}^{0}\mathrm{d}u\,\frac{2u^{2}\sin{\left(2\theta\right)}}{u^{4}+2u^{2}\cos{\left(2\theta\right)}+1}\arctan{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)};~~~\small{\left[u\mapsto-u\right]}\\ &=\int_{-\infty}^{\infty}\mathrm{d}u\,\frac{2u^{2}\sin{\left(2\theta\right)}}{u^{4}+2u^{2}\cos{\left(2\theta\right)}+1}\arctan{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)}.\\ \end{align}$$

Given $\theta\in\left(-\frac{\pi}{2},\frac{\pi}{2}\right)\land u\in\mathbb{R}$ such that $u^{2}+\cos{\left(2\theta\right)}\neq0$, we can show that

$$\begin{align} \arctan{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)} &=\arctan{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)}-\lim_{v\to\infty}\arctan{\left(\frac{\sin{\left(2\theta\right)}}{v^{2}+\cos{\left(2\theta\right)}}\right)}\\ &=-\int_{u}^{\infty}\mathrm{d}v\,\frac{d}{dv}\arctan{\left(\frac{\sin{\left(2\theta\right)}}{v^{2}+\cos{\left(2\theta\right)}}\right)}\\ &=-\int_{u}^{\infty}\mathrm{d}v\,\frac{(-1)2v\sin{\left(2\theta\right)}}{v^{4}+2v^{2}\cos{\left(2\theta\right)}+1}\\ &=\int_{u}^{\infty}\mathrm{d}v\,\frac{2v\sin{\left(2\theta\right)}}{v^{4}+2v^{2}\cos{\left(2\theta\right)}+1}\\ &=\int_{u}^{\infty}\mathrm{d}v\,\frac{4v\sin{\left(\theta\right)}\cos{\left(\theta\right)}}{\left[v^{2}-2v\sin{\left(\theta\right)}+1\right]\left[v^{2}+2v\sin{\left(\theta\right)}+1\right]}\\ &=\int_{u}^{\infty}\mathrm{d}v\,\left[\frac{\cos{\left(\theta\right)}}{v^{2}-2v\sin{\left(\theta\right)}+1}-\frac{\cos{\left(\theta\right)}}{v^{2}+2v\sin{\left(\theta\right)}+1}\right]\\ &=\int_{u}^{\infty}\mathrm{d}v\,\frac{\cos{\left(\theta\right)}}{v^{2}-2v\sin{\left(\theta\right)}+1}-\int_{u}^{\infty}\mathrm{d}v\,\frac{\cos{\left(\theta\right)}}{v^{2}+2v\sin{\left(\theta\right)}+1}\\ &=\int_{u-\sin{\left(\theta\right)}}^{\infty}\mathrm{d}w\,\frac{\cos{\left(\theta\right)}}{w^{2}+\cos^{2}{\left(\theta\right)}}-\int_{u+\sin{\left(\theta\right)}}^{\infty}\mathrm{d}w\,\frac{\cos{\left(\theta\right)}}{w^{2}+\cos^{2}{\left(\theta\right)}}\\ &=\int_{u-\sin{\left(\theta\right)}}^{u+\sin{\left(\theta\right)}}\mathrm{d}w\,\frac{\cos{\left(\theta\right)}}{w^{2}+\cos^{2}{\left(\theta\right)}}\\ &=\int_{\frac{u-\sin{\left(\theta\right)}}{\cos{\left(\theta\right)}}}^{\frac{u+\sin{\left(\theta\right)}}{\cos{\left(\theta\right)}}}\mathrm{d}x\,\frac{1}{x^{2}+1}\\ &=\arctan{\left(\frac{u+\sin{\left(\theta\right)}}{\cos{\left(\theta\right)}}\right)}-\arctan{\left(\frac{u-\sin{\left(\theta\right)}}{\cos{\left(\theta\right)}}\right)}.\\ \end{align}$$

It can also be shown that

$$u^{4}+2u^{2}\cos{\left(2\theta\right)}+1=\left[u^{2}-2u\sin{\left(\theta\right)}+1\right]\left[u^{2}+2u\sin{\left(\theta\right)}+1\right];~~~\small{(u,\theta)\in\mathbb{R}^{2}}.$$

Then, for $\theta\in\left(-\frac{\pi}{2},\frac{\pi}{2}\right)$ we have

$$\begin{align} \mathcal{I}{\left(\tan{\left(\theta\right)}\right)} &=\int_{-\infty}^{\infty}\mathrm{d}u\,\frac{2u^{2}\sin{\left(2\theta\right)}}{u^{4}+2u^{2}\cos{\left(2\theta\right)}+1}\arctan{\left(\frac{\sin{\left(2\theta\right)}}{u^{2}+\cos{\left(2\theta\right)}}\right)}\\ &=\int_{-\infty}^{\infty}\mathrm{d}u\,\frac{2u^{2}\sin{\left(2\theta\right)}}{\left[u^{2}-2u\sin{\left(\theta\right)}+1\right]\left[u^{2}+2u\sin{\left(\theta\right)}+1\right]}\\ &~~~~~\times\left[\arctan{\left(\frac{u+\sin{\left(\theta\right)}}{\cos{\left(\theta\right)}}\right)}-\arctan{\left(\frac{u-\sin{\left(\theta\right)}}{\cos{\left(\theta\right)}}\right)}\right]\\ &=\int_{-\infty}^{\infty}\mathrm{d}u\,\left[\frac{u\cos{\left(\theta\right)}}{u^{2}-2u\sin{\left(\theta\right)}+1}-\frac{u\cos{\left(\theta\right)}}{u^{2}+2u\sin{\left(\theta\right)}+1}\right]\\ &~~~~~\times\left[\arctan{\left(\frac{\sin{\left(\theta\right)}+u}{\cos{\left(\theta\right)}}\right)}+\arctan{\left(\frac{\sin{\left(\theta\right)}-u}{\cos{\left(\theta\right)}}\right)}\right]\\ &=\int_{-\infty}^{\infty}\mathrm{d}u\,\frac{u\cos{\left(\theta\right)}}{u^{2}-2u\sin{\left(\theta\right)}+1}\left[\arctan{\left(\frac{\sin{\left(\theta\right)}+u}{\cos{\left(\theta\right)}}\right)}+\arctan{\left(\frac{\sin{\left(\theta\right)}-u}{\cos{\left(\theta\right)}}\right)}\right]\\ &~~~~~-\int_{-\infty}^{\infty}\mathrm{d}u\,\frac{u\cos{\left(\theta\right)}}{u^{2}+2u\sin{\left(\theta\right)}+1}\left[\arctan{\left(\frac{\sin{\left(\theta\right)}+u}{\cos{\left(\theta\right)}}\right)}+\arctan{\left(\frac{\sin{\left(\theta\right)}-u}{\cos{\left(\theta\right)}}\right)}\right]\\ &=\int_{-\infty}^{\infty}\mathrm{d}u\,\frac{u\cos{\left(\theta\right)}}{u^{2}-2u\sin{\left(\theta\right)}+1}\left[\arctan{\left(\frac{\sin{\left(\theta\right)}+u}{\cos{\left(\theta\right)}}\right)}+\arctan{\left(\frac{\sin{\left(\theta\right)}-u}{\cos{\left(\theta\right)}}\right)}\right]\\ &~~~~~+\int_{-\infty}^{\infty}\mathrm{d}u\,\frac{u\cos{\left(\theta\right)}}{u^{2}-2u\sin{\left(\theta\right)}+1}\\ &~~~~~\times\left[\arctan{\left(\frac{\sin{\left(\theta\right)}-u}{\cos{\left(\theta\right)}}\right)}+\arctan{\left(\frac{\sin{\left(\theta\right)}+u}{\cos{\left(\theta\right)}}\right)}\right];~~~\small{\left[u\mapsto-u\right]}\\ &=2\int_{-\infty}^{\infty}\mathrm{d}u\,\frac{u\cos{\left(\theta\right)}}{u^{2}-2u\sin{\left(\theta\right)}+1}\left[\arctan{\left(\frac{\sin{\left(\theta\right)}+u}{\cos{\left(\theta\right)}}\right)}+\arctan{\left(\frac{\sin{\left(\theta\right)}-u}{\cos{\left(\theta\right)}}\right)}\right]\\ &=\int_{-\infty}^{\infty}\mathrm{d}u\,\frac{2u\cos{\left(\theta\right)}}{u^{2}-2u\sin{\left(\theta\right)}+1}\left[\arctan{\left(\frac{u+\sin{\left(\theta\right)}}{\cos{\left(\theta\right)}}\right)}-\arctan{\left(\frac{u-\sin{\left(\theta\right)}}{\cos{\left(\theta\right)}}\right)}\right]\\ &=\int_{-\infty}^{\infty}\mathrm{d}v\,\frac{2\left[v+\sin{\left(\theta\right)}\right]\cos{\left(\theta\right)}}{v^{2}+\cos^{2}{\left(\theta\right)}}\\ &~~~~~\times\left[\arctan{\left(\frac{v+2\sin{\left(\theta\right)}}{\cos{\left(\theta\right)}}\right)}-\arctan{\left(\frac{v}{\cos{\left(\theta\right)}}\right)}\right];~~~\small{\left[u=v+\sin{\left(\theta\right)}\right]}\\ &=\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{2\cos{\left(\theta\right)}\left[w\cos{\left(\theta\right)}+\sin{\left(\theta\right)}\right]\cos{\left(\theta\right)}}{w^{2}\cos^{2}{\left(\theta\right)}+\cos^{2}{\left(\theta\right)}}\\ &~~~~~\times\left[\arctan{\left(\frac{w\cos{\left(\theta\right)}+2\sin{\left(\theta\right)}}{\cos{\left(\theta\right)}}\right)}-\arctan{\left(w\right)}\right];~~~\small{\left[v=w\cos{\left(\theta\right)}\right]}\\ &=\cos{\left(\theta\right)}\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{2w+2\tan{\left(\theta\right)}}{w^{2}+1}\left[\arctan{\left(w+2\tan{\left(\theta\right)}\right)}-\arctan{\left(w\right)}\right]\\ &=\frac{2}{\sqrt{1+\tan^{2}{\left(\theta\right)}}}\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{w+\tan{\left(\theta\right)}}{w^{2}+1}\left[\arctan{\left(w+2\tan{\left(\theta\right)}\right)}-\arctan{\left(w\right)}\right]\\ &=\frac{2}{\sqrt{1+z^{2}}}\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{w+z}{w^{2}+1}\left[\arctan{\left(w+2z\right)}-\arctan{\left(w\right)}\right];~~~\small{\left[z=\tan{\left(\theta\right)}\right]}\\ &=\frac{2}{\sqrt{1+z^{2}}}\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{w+z}{w^{2}+1}\int_{w}^{w+2z}\mathrm{d}x\,\frac{1}{x^{2}+1}\\ &=\frac{2}{\sqrt{1+z^{2}}}\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{w+z}{w^{2}+1}\int_{0}^{2z}\mathrm{d}y\,\frac{1}{\left(w+y\right)^{2}+1};~~~\small{\left[x=w+y\right]}\\ &=\frac{2}{\sqrt{1+z^{2}}}\int_{-\infty}^{\infty}\mathrm{d}w\int_{0}^{2z}\mathrm{d}y\,\frac{w+z}{w^{2}+1}\cdot\frac{1}{\left(w+y\right)^{2}+1}\\ &=\frac{2}{\sqrt{1+z^{2}}}\int_{0}^{2z}\mathrm{d}y\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{w+z}{\left(w^{2}+1\right)\left[\left(w+y\right)^{2}+1\right]}.\\ \end{align}$$

Given fixed but arbitrary $y\in\mathbb{R}$, the following partial fraction decompositions hold for all $w\in\mathbb{R}$:

$$\frac{y\left(y^{2}+4\right)}{\left(w^{2}+1\right)\left[\left(w+y\right)^{2}+1\right]}=\frac{2\left(w+y\right)+y}{\left(w+y\right)^{2}+1}-\frac{2w-y}{w^{2}+1},$$

$$\frac{y\left(y^{2}+4\right)w}{\left(w^{2}+1\right)\left[\left(w+y\right)^{2}+1\right]}=-\frac{y\left(w+y\right)+\left(y^{2}+2\right)}{\left(w+y\right)^{2}+1}+\frac{yw+2}{w^{2}+1}.$$

Using the fact that

$$\int_{-\infty}^{\infty}\mathrm{d}w\,\left[\frac{\left(w+y\right)}{\left(w+y\right)^{2}+1}-\frac{w}{w^{2}+1}\right]=0;~~~\small{y\in\mathbb{R}},$$

Then,

$$\begin{align} \int_{-\infty}^{\infty}\mathrm{d}w\,\frac{y\left(y^{2}+4\right)}{\left(w^{2}+1\right)\left[\left(w+y\right)^{2}+1\right]} &=\int_{-\infty}^{\infty}\mathrm{d}w\,\left[\frac{2\left(w+y\right)+y}{\left(w+y\right)^{2}+1}-\frac{2w-y}{w^{2}+1}\right]\\ &=\int_{-\infty}^{\infty}\mathrm{d}w\,\left[\frac{y}{\left(w+y\right)^{2}+1}+\frac{y}{w^{2}+1}\right]\\ &=y\left[\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{1}{\left(w+y\right)^{2}+1}+\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{1}{w^{2}+1}\right]\\ &=y\left[\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{1}{w^{2}+1}+\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{1}{w^{2}+1}\right]\\ &=2y\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{1}{w^{2}+1}\\ &=2y\pi,\\ \end{align}$$

and

$$\begin{align} \int_{-\infty}^{\infty}\mathrm{d}w\,\frac{y\left(y^{2}+4\right)w}{\left(w^{2}+1\right)\left[\left(w+y\right)^{2}+1\right]} &=\int_{-\infty}^{\infty}\mathrm{d}w\,\left[-\frac{y\left(w+y\right)+\left(y^{2}+2\right)}{\left(w+y\right)^{2}+1}+\frac{yw+2}{w^{2}+1}\right]\\ &=\int_{-\infty}^{\infty}\mathrm{d}w\,\left[\frac{2}{w^{2}+1}-\frac{\left(y^{2}+2\right)}{\left(w+y\right)^{2}+1}\right]\\ &=\left[\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{2}{w^{2}+1}-\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{\left(y^{2}+2\right)}{\left(w+y\right)^{2}+1}\right]\\ &=\left[2\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{1}{w^{2}+1}-\left(y^{2}+2\right)\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{1}{w^{2}+1}\right]\\ &=-y^{2}\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{1}{w^{2}+1}\\ &=-y^{2}\pi,\\ \end{align}$$

and hence,

$$\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{w+z}{\left(w^{2}+1\right)\left[\left(w+y\right)^{2}+1\right]}=\frac{\pi\left(2z-y\right)}{\left(y^{2}+4\right)}.$$

Thus,

$$\begin{align} \mathcal{I}{\left(z\right)} &=\frac{2}{\sqrt{1+z^{2}}}\int_{0}^{2z}\mathrm{d}y\int_{-\infty}^{\infty}\mathrm{d}w\,\frac{w+z}{\left(w^{2}+1\right)\left[\left(w+y\right)^{2}+1\right]}\\ &=\frac{2}{\sqrt{1+z^{2}}}\int_{0}^{2z}\mathrm{d}y\,\frac{\pi\left(2z-y\right)}{\left(y^{2}+4\right)}\\ &=\frac{\pi}{\sqrt{1+z^{2}}}\int_{0}^{z}\mathrm{d}t\,\frac{2\left(z-t\right)}{t^{2}+1};~~~\small{\left[y=2t\right]}\\ &=\frac{\pi}{\sqrt{1+z^{2}}}\left[2z\int_{0}^{z}\mathrm{d}t\,\frac{1}{t^{2}+1}-\int_{0}^{z}\mathrm{d}t\,\frac{2t}{t^{2}+1}\right]\\ &=\frac{\pi}{\sqrt{1+z^{2}}}\left[2z\arctan{\left(z\right)}-\ln{\left(1+z^{2}\right)}\right].\blacksquare\\ \end{align}$$