How to compute $\int_{0}^{1}\left (\frac{\arctan x}{1+(x+\frac{1}{x})\arctan x}\right )^2dx$ I want to calculate the following integral $$\int_{0}^{1}\left(\frac{\arctan x}{1+(x+\frac{1}{x})\arctan x}\right)^2 \, dx$$
But I have no way to do it, can someone help me, thank you.
 A: In fact, there exists a closed-form expression for the indefinite integral (credit Mathematica, not me, for this):
$${-x^2+(1+x^2)(\arctan(x))^2\over 2(x+(1+x^2)\arctan(x))}\,,$$ as can be
verified by differentiation.  Integral over $x\in [0,1]$ is equal to ${\pi^2-8\over 8(2+\pi)}\approx0.0454529$.   
A: This is about as far as I got.  Let me know if anyone can finish this analytically:
$$
\left( \frac{\arctan x}{1 + (x + \frac{1}{x}) \arctan x} \right)^2 = \\
\left( \frac{\frac{x}{1 + x^2} \cdot \arctan x}{x \cdot \frac{1}{1 + x^2} + \arctan x} \right)^2 = \\
\left( \frac{x \arctan x  \cdot (\arctan x)'}{(x \arctan x)'} \right)^2
= \\
\left( \frac{(\arctan x)'}{[\ln(x \arctan x)]'} \right)^2
$$
A: Here is a way to arrive at the answer, and it is by no means obvious.
In finding the indefinite integral the reverse quotient rule will be used. Recall that if $u$ and $v$ are differentiable functions, from the quotient rule
$$\left (\frac{u}{v} \right )' = \frac{u' v - v' u}{v^2},$$
it is immediate that
$$\int \frac{u' v - v' u}{v^2} \, dx = \int \left (\frac{u}{v} \right )' \, dx = \frac{u}{v} + C. \tag1$$
Now the indefinite integral 
$$I = \int \left (\frac{\arctan (x)}{1 + \left (x + \frac{1}{x} \right ) \arctan (x)} \right )^2 \, dx,$$
can be rewritten as
$$I = \int \frac{x^2 \arctan^2 (x)}{\left (x + (x^2 + 1) \arctan (x) \right )^2} \, dx.$$
Let $v = x + (x^2 + 1) \arctan (x)$. Then $v' = 2 + 2x \arctan (x)$. Now for the hard bit. We need to find a function $u(x)$ such that
$$u' v - v' u = u'[x + (x^2 + 1) \arctan (x)] - u [2 - 2x \arctan (x)] = x^2 \arctan^2 (x).$$
If 
$$u = \frac{-x^2 + (x^2 + 1) \arctan^2 (x)}{2},$$
then
$$u' = x + x \arctan^2 (x) + \arctan (x),$$
and we find, miraculously, that
$$u' v - v' u = x^2 \arctan^2 (x).$$
Our indefinite integral can now be readily found as it can be rewritten in the form given by (1). The result is:
$$I = \int \left (\frac{-x^2 + (1 + x^2) \arctan^2 (x)}{2[x + (x^2 + 1) \arctan (x)]} \right )' \, dx =  \frac{-x^2 + (1 + x^2) \arctan^2 (x)}{2[x + (x^2 + 1) \arctan (x)]} + C.$$ 
So for the definite integral on the interval $x \in [0,1]$ we have
$$\int_0^1 \left (\frac{\arctan (x)}{1 + \left (x + \frac{1}{x} \right ) \arctan (x)} \right )^2 \, dx = \frac{\pi^2 - 8}{8(2 + \pi)}.$$
