TITLE: Integral $\int_0^{\pi/2}\arctan^2\left(\frac{6\sin x}{3+\cos 2x}\right)\mathrm dx$
QUESTION [49 upvotes]: Is it possible to evaluate this integral in a closed form?
$$I=\int_0^{\pi/2}\arctan^2\left(\frac{6\sin x}{3+\cos 2x}\right)\mathrm dx$$

REPLY [36 votes]: I will refer to the following result from my previous answer:
\begin{align*}
I(r, s)
&= \int_{0}^{\frac{\pi}{2}} \arctan (r \sin\theta) \arctan (s \sin\theta) \, d\theta \\
&= \pi \chi_{2} \left( \frac{\sqrt{1+r^{2}} - 1}{r} \times \frac{\sqrt{1+s^{2}} - 1}{s} \right),
\end{align*}
where $\chi_{2}$ is the Legendre chi function. Using the addition formula for the arctangent, it follows that
$$ \arctan\left(\frac{6\sin x}{3 + \cos 2x} \right) = \arctan \left( \frac{\frac{3}{2}\sin x}{1 - \frac{1}{2}\sin^{2} x} \right) = \arctan (\sin x) + \arctan ( \tfrac{1}{2}\sin x). $$ So it follows that
$$ \int_{0}^{\frac{\pi}{2}} \arctan^{2}\left(\frac{6\sin x}{3+\cos 2x}\right) \, dx = I(1,1) + 2I(1,\tfrac{1}{2}) + I(\tfrac{1}{2},\tfrac{1}{2}), $$
which reduces to a combination of Legendre chi functions
$$ \pi \left\{ \chi_{2}(3 - 2\sqrt{2}) + \chi_{2}(9 - 4\sqrt{5}) + 2\chi_{2}\left( (\sqrt{2} - 1)(\sqrt{5} - 2) \right) \right\}.  $$