Evaluation of Integral $\int_0^{+\infty}\frac{\sin^2(\tan\,\!x)}{x^2}\mathrm{d}x$ 
Evaluation of $$\int_0^{+\infty}\dfrac{\sin^2(\tan\,\!x)}{x^2}\mathrm{d}x$$

Evaluate $\int_0^{\infty} {\sin(\tan(x)) \over x}dx$
I try to give the result through the method in the link, but I don't know what to do next.
\begin{align*}
I&\overset{\mathrm{def}}{=} \int_0^{+\infty}\frac{\sin^2(\tan\,\!x)}{x^2}\,\mathrm{d}x\\
&= \frac12 \int_{-\infty}^{+\infty}\frac{\sin^2(\tan\,\!x)}{x^2}\,\mathrm{d}x\\
&=\frac12 \left(\sum_{n=-\infty}^\infty \int_{(n-\frac12)\pi}^{(n+\frac12)\pi}\right)\frac{\sin^2(\tan\,\!x)}{x^2}\,\mathrm{d}x
\end{align*}
 A: You can apply integration by parts and you get
$$\int_0^{\infty}\frac{\sin^2(\tan x)}{x^2}dx=\left.\frac{-\sin^2(\tan x)}{x}\right|_0^\infty+\int_0^{\infty}\frac{\sin(2\,\tan x)}{x}\frac{1}{\cos^2(x)}dx=$$
$$=\int_0^{\infty}\frac{\sin(2\,\tan x)}{x}\frac{1}{\cos^2(x)}dx.$$
Now, you can follow the same procedure that in Evaluate $\int_0^{\infty} {\sin(\tan(x)) \over x}dx$ to arrive to
$$\frac12\int_{-\frac12\pi}^{\frac12\pi}\frac{\sin (2\tan x)}{\tan x}\frac{1}{\cos^2(x)} dx$$
that performing the change of variable $\tan x\to u$
$$\frac12\int_{-\frac12\pi}^{\frac12\pi}\frac{\sin (2\tan x)}{\tan x}\frac{1}{\cos^2(x)} dx=\int_{-\infty}^{\infty}\frac{\sin (2u)}{2u} du=\int_{0}^{\infty}\frac{\sin (u)}{u} du=\frac{\pi}{2}$$
A: The approach in the question seems to be attempting to follow the approach in my answer to the cited question, so I will adapt that approach here.

Real Manipulations
$$
\begin{align}
\int_0^\infty\frac{\sin^2(\tan(x))}{x^2}\,\mathrm{d}x
&=\frac12\int_{-\infty}^\infty\frac{\sin^2(\tan(x))}{x^2}\,\mathrm{d}x\tag1\\
&=\frac12\sum_{k\in\mathbb{Z}}\int_{-\pi/2}^{\pi/2}\frac{\sin^2(\tan(x))}{(x+k\pi)^2}\,\mathrm{d}x\tag2\\
&=\frac12\int_{-\pi/2}^{\pi/2}\frac{\sin^2(\tan(x))}{\sin^2(x)}\,\mathrm{d}x\tag3\\
&=\frac12\int_{-\infty}^\infty\frac{\sin^2(x)}{x^2}\,\mathrm{d}x\tag4\\[6pt]
&=\frac\pi2\tag5
\end{align}
$$
Explanation:
$(1)$: use the evenness of the integrand
$(2)$: use the periodicity of $\tan(x)$
$(3)$: substitute $x\mapsto x/\pi$ in $(7)$ from this answer and
$\phantom{\text{(3):}}$ take a derivative to get $\csc^2(x)=\sum\limits_{k\in\mathbb{Z}}\frac1{(x+k\pi)^2}$
$(4)$: substitute $x\mapsto\tan^{-1}(x)$
$(5)$: apply this answer
A: According to Lobachevsky Integral:
$$\begin{aligned}
&\int_0^{\infty}\frac{\sin^2(\tan x)}{x^2}\mathrm{d}x\\
=&\int_0^{\infty}\frac{\sin^2(\tan x)}{\sin^2x}\cdot \frac{\sin^2 x}{x^2}\mathrm{d}x\\
=&\int_0^{\frac{\pi}{2}}\frac{\sin^2(\tan x)}{\sin^2 x}\mathrm{d}x\\
=&\int_0^{\frac{\pi}{2}}\frac{\sin^2(\tan x)}{\tan^2 x}\mathrm{d}(\tan x)\\
=&\int_0^{\infty}\frac{\sin^2 u}{u^2}\mathrm{d}u\\
=&\frac{\pi}{2}
\end{aligned}$$
