Integral $\int_0^1 \left(\arctan x \right)^2\,dx$ Evaluate 
$$\int_0^1 \left(\arctan x \right)^2\,dx$$
The answer should be
$${\pi^2\over16} + \frac{\pi\ln(2)}{4} -C$$  
where $C$ is Catalan's constant. 
How do I proceed?
I tried doing integration by parts twice and got stuck at $$\int_0^1{\frac{\log\left(\frac1{x}+x\right)}{1+x^2}}\,dx$$

If one know that  $\displaystyle \int_0^{\dfrac{\pi}{2}}\log (\sin (x))dx=-\dfrac{\pi}{2}\log(2)$
so then :
$\displaystyle \int_0^\dfrac{\pi}{2}\dfrac{x}{\tan x }dx=\dfrac{\pi}{2}\log(2)$   (by integration by parts)
Let $I=\displaystyle \int_0^\dfrac{\pi}{2}\dfrac{x}{\tan x }dx$
Change of variable $u=\tan x$ :
$I=\displaystyle \int_0^{+\infty} \dfrac{\arctan x}{x(1+x^2)}dx$
$I=\displaystyle \int_0^1 \dfrac{\arctan x}{x(1+x^2)}dx+\int_1^{+\infty} \dfrac{\arctan x}{x(1+x^2)}dx$
in the second integral, in the right member make the change of variable $u=\dfrac{1}{x }$
$I= \displaystyle\int_0^1 \dfrac{\arctan x}{x(1+x^2)}dx+ \int_0^1 \dfrac{x\arctan
\Big(\dfrac{1}{x}\Big) }{1+x^2}dx$
For $x>0$ one have $\arctan\Big(\dfrac{1}{x}\Big)+\arctan x=\dfrac{\pi}{2}$
$I= \displaystyle\int_0^1 \dfrac{\arctan x}{x(1+x^2)}dx+\dfrac{\pi}{2}\int_0^1\dfrac{x}{1+x^2}dx-\int_0^1\dfrac{x\arctan x}{1+x^2}dx$
But:
$\dfrac{1}{x(1+x^2)}=\dfrac{1}{x}-\dfrac{x}{1+x^2}$
So then:
$I=\displaystyle\int_0^1 \dfrac{\arctan x}{x}dx-\displaystyle\int_0^1 \dfrac{x\arctan x}{1+x^2}dx+\dfrac{\pi}{2}\int_0^1\dfrac{x}{1+x^2}dx-\int_0^1\dfrac{x\arctan x}{1+x^2}dx$
Hence:
$I=\displaystyle\int_0^1 \dfrac{\arctan x}{x}dx-2\displaystyle\int_0^1 \dfrac{x\arctan x}{1+x^2}dx+\dfrac{\pi}{4}\Big[\log(1+x^2)\Big]_0^1$
and so:
$I=\displaystyle\int_0^1 \dfrac{\arctan x}{x}dx-2\displaystyle\int_0^1 \dfrac{x\arctan x
}{1+x^2}dx+\dfrac{\pi}{4}\log(2)$
But:
the derivative of $x\rightarrow(\arctan x)^2$ is $x\rightarrow\dfrac{2\arctan x }{1+x^2}$
So then:
$I=\displaystyle\int_0^1 \dfrac{\arctan x}{x}dx-\Big(\big[ x(\arctan x)^2\big]_0^1-\int_0^1(\arctan x)^2 dx\Big)+\dfrac{\pi}{4}\log(2)$
$I=\displaystyle\int_0^1\dfrac{\arctan x }{x}dx-\dfrac{\pi^2}{16}+\int_0^1(\arctan x)^2 dx$
But $I=\dfrac{\pi}{2}\log(2)$ so then:
$$\displaystyle\int_0^1 (\arctan x)^2
dx=\dfrac{\pi^2}{16}-G+\dfrac{\pi}{4}\log(2)$$
where $\displaystyle G=\int_0^1 \dfrac{\arctan x}{x}dx$ is the Catalan's constant.
