Evaluate the integral $$P=\int_0^{\pi/2}x\arctan\left(\tfrac{1}{\sqrt3}+\tfrac{2}{\sqrt3}\tan x\right)dx.$$
Context:
I started trying to evaluate the integral $$J=\int_0^\infty \frac{\arctan(x)^2}{x^2+x+1}dx,$$ and the integral $P$ is part of the process. At first, I tried $x\mapsto 1/x$, but it just ended up showing that $$J=\frac{\pi^2}{4}\int_0^\infty \frac{dx}{x^2+x+1}-\pi\int_0^\infty \frac{\arctan x}{x^2+x+1}dx+J,$$ which is of no use. Next, I tried integration by parts, using $$\int\frac{dx}{x^2+x+1}=\frac{2}{\sqrt3}\arctan\frac{2x+1}{\sqrt3},$$ so that $$J=\frac{\pi^3}{4\sqrt3}-\frac{4}{\sqrt3}\int_0^\infty\arctan(x)\arctan\left(\tfrac1{\sqrt3}+\tfrac{2}{\sqrt3}x\right)\frac{dx}{1+x^2}.$$ Then with $x\mapsto \tan x$ we have $$J=\frac{\pi^3}{4\sqrt3}-\frac{4}{\sqrt3}P.$$ Theoretically, integration by parts if possible from this point, as Wolfram provides an awful closed form for the anti-derivative of $\arctan\left(\tfrac{1}{\sqrt3}+\tfrac{2}{\sqrt3}\tan x\right)$, but I do not think this is really that realistic of an approach. Is there a better way to evaluate the integral $P$?