Integral $\int_{0}^{\pi/2} \arctan \left(2\tan^2 x\right) \mathrm{d}x$ The following integral may seem easy to evaluate ...

$$
\int_{0}^{\Large\frac{\pi}{2}} \arctan \left(2 \tan^2 x\right) \mathrm{d}x = \pi \arctan \left( \frac{1}{2} \right).
$$

Could you prove it?
 A: My answer is different from that you gave. Let
$$ I(a)=\int_0^{\frac{\pi}{2}}\arctan(a\tan^2x)dx. $$
Than $I(0)=0$ and
\begin{eqnarray}
I'(a)&=&\int_0^{\frac{\pi}{2}}\frac{\tan^2x}{1+a^2\tan^4x}dx\\
&=&\int_0^\infty\frac{u^2}{(1+u^2)(1+a^2u^4)}du\\
&=&\frac{1}{1+a^2}\int_0^\infty\left(-\frac{1}{1+u^2}+\frac{1+a^2u^2}{1+a^2u^4}\right)du\\
&=&\frac{1}{1+a^2}\left(-\int_0^\infty\frac{1}{1+u^2}du+\int_0^\infty\frac{1}{1+a^2u^4}du+\int_0^\infty\frac{a^2u^2}{1+a^2u^4}\right)du\\
&=&\frac{1}{1+a^2}\left(-\frac{\pi}{2}+\frac{\pi}{2\sqrt{2}\sqrt{a}}+\frac{\sqrt{a}\pi}{2\sqrt{2}}\right)
\end{eqnarray}
and hence
$$ I=\int_0^2I'(a)da=\pi\arctan(1+\sqrt{2a})\Big]_0^2=-\frac{\pi^2}{4}+\pi\arctan 3=\frac{\pi}{2}\arctan\frac{4}{3}.$$
A: Here is a result avoiding differentiation with respect to a parameter. 

Set$$ I(\alpha):= \int_{0}^{\Large\frac{\pi}{2}} \arctan \left(\frac{2\alpha \:\sin^2 x}{\alpha^2-1+\cos^2 x}\right)\: \mathrm{d}x, \quad \alpha>0. $$ 
  Then
  $$  I(\alpha)= \pi \arctan \left(\frac{1}{2\alpha}\right) \quad ({\star})
$$

With $ \alpha:=1$, we get
$$
\int_{0}^{\Large\frac{\pi}{2}} \arctan \left(2 \tan^2 x\right) \mathrm{d}x = \pi \arctan \left( \frac{1}{2} \right).
$$
To obtain $({\star})$ use the standard evaluation extended to complex numbers

$$
\int_{0}^{\Large\frac{\pi}{2}} \log \left(1+ t \sin^2 x\right) \mathrm{d}x = \pi \log \left( \frac{1+\sqrt{1+t}}{2} \right)
$$

and observe that 
$$
 \arctan (z) = \frac{i}{2}  \left(\log (1-i z)-\log (1+i z)\right), \quad\Re z \neq 0.
$$
